Saravanan666/pypi-org huggingface dataset:
Package: pydialogflow-fulfillment
Dialogflow Fulfillment PythonTheDialogflow Fulfillment Libraryallows you to connect natural language understanding and processing to your own systems, APIs, and databases. Using Fulfillment, you can surface commands and information from your services to your users through a natural conversational interface.This Library makes creating fulfillment for Dialogflow v2 agents withDjangoorFlaskeasy and simple.Supported FeaturesGoogle AssistantConfirmationSimple ResponseSystem IntentSuggestionsLink out SuggestionGoogle Assistant SigninPermissionsRegisterUpdateDateTimeDeliveryAddressOuputContextTableTelegramSimple Telegram ResponseTelegram Message Response with support for HTML and MarkdownTelegram Keyboard Button ResponseQuick StartLogin or Create a Dialogflow AccountCreate a Dialogflow agent or import samplesSetup your Django or Flask APIInstall this library from Pip usingpip install pydialogflow-fulfillmentGo toFulfillment > Enable Webhook > Enter the url for your API > Enable webhook for all domainsUpgradepip install --upgrade pydialogflow-fulfillmentUsageViewusage documentationon Read the Docs.LicenseSee LICENSE.md.
Package: pydiamond-engine
PyDiamondPyDiamond engine is a game engine for Python game developers.The framework uses the popularpygame library.UsageExample with the minimal requirements:frompydiamond.window.displayimportWindowdefmain()->int:w:Window=Window(title="my window",size=(800,600))withw.open():whilew.loop():foreventinw.process_events():# do some stuffpassw.clear()# draw your objectsw.refresh()return0if__name__=="__main__":exit(main())This code will open a small window.DocumentationComing soon. :)DependenciesPyDiamond is developed based on pygame and Python (obviously). In addition, some features of pygame are available with a specific version of the SDL.Dependency version:CPython >= 3.10pygame == 2.1.2SDL >= 2.0.16SDL_image >= 2.0.0SDL_mixer >= 2.0.0Other python dependencies referred byrequirements.txtUse the following command to install all the necessary dependenciespython3-mpipinstall-rrequirements.txtCreditsVendored-in packagesGradientmodule by DR0IDOrderedSetcollection by rspeerLicenseThis project is licensed under the terms of theGNU General Public License v3.0.
Package: pyDiamonds
PyDIAMONDS was created to provide python bindings for the bayesian inference software DIAMONDS. It provides an easy way
to access the fast underlying C++ code in python. For a deeper documentation visithttps://github.com/EnricoCorsaro/DIAMONDS, where you can find the C++ code.InstallationPyDIAMONDS is provided through pypi. Simply call:pip install pyDiamondsto install the package. Be sure to have a full cmake toolchain as well as clang/gcc on your machine to build the code.DocumentationThe documentation of the classes available to python will be more and more implemented over time. See the docs folder
for documentation. For a more exhaustive documentation visithttps://github.com/EnricoCorsaro/DIAMONDSwhere you can
find a more exhaustive documentation on DIAMONDS. Various examples can also be found in the examples folder.
Package: pyDiamondsBackground
PyDIAMONDS-Background is an extension to the Python bindings of the DIAMONDS code, which is available athttps://github.com/muma7490/PyDIAMONDS. It provides a simple interface, with which the user is able to fit signal,
providing a model that describes it. The package depends onnumpyandpyDiamonds. It also provides
implementations of a white noise only model, a white noise oscillation model and a full background model.InstallationTo install the package call:pip install pyDiamondsBackgroundDocumentationSee docs folder
Package: pydiar
PyDiarThis repo contains simple to use, pretrained/training-less models for speaker diarization.Supported ModelsBinary Key Speaker ModelingBased onpyBKby Jose Patino which implements the diarization system from "The EURECOM submission to the first DIHARD Challenge" by Patino, Jose and Delgado, Héctor and Evans, NicholasIf you have any other models you would like to see added, please open an issue.UsageThis library seeks to provide a very basic interface. To use the Binary Key model on a file, do something like this:importnumpyasnpfrompydiar.modelsimportBinaryKeyDiarizationModel,Segmentfrompydiar.util.miscimportoptimize_segmentsfrompydubimportAudioSegmentINPUT_FILE="test.wav"sample_rate=32000audio=AudioSegment.from_wav("test.wav")audio=audio.set_frame_rate(sample_rate)audio=audio.set_channels(1)diarization_model=BinaryKeyDiarizationModel()segments=diarization_model.diarize(sample_rate,np.array(audio.get_array_of_samples()))optimized_segments=optimize_segments(segments)Nowoptimized_segmentscontains a list of segments with their start, length and speaker idExampleA simple script which reads an audio file, diarizes it and transcribes it into the WebVTT format can be found inexamples/generate_webvtt.py.
To use it, download a vosk model fromhttps://alphacephei.com/vosk/modelsand then run the script usingpoetryinstall
poetryrunpython-mexamples.generate_webvtt-iPATH/TO/INPUT.wav-mPATH/TO/VOSK_MODEL
Package: pydiarization
pydiarizationpydiarization is a wrapper around theIBDiarizationtoolkit.RequirementsYou must have the follow binaries in your path:ffmpegcompute-mfcc-featsandcopy-feats-to-htkfrom Kaldidiarizemefrom the IBDiarization toolkit.Installationpydiarization can be installed by either condaconda install -c wdroz pydiarizationor pippip install pydiarizationUsageBefore using the pywrapper, you have to create a folder that will contains the results of the IBDiarization toolkit.mkdirresult.dirTest the installationTo check if all binaries works and are recognized by pydiarization, you can run the tests by typing:python3 -m pydiarization.test_diarization_wrapperfrom codeExample that convert a single video to a string (.rttm content)frompydiarization.diarization_wrapperimportvideo_to_rttm_stringrttm_content=video_to_rttm_string('MY_VIDEO_OR_URL.avi')Here the list of all the high-levels API:defvideo_to_rttm_string(video_path):""" High-level function that return the rttm as string from a videoArguments:video_path -- where the video isReturn: the rttm content as string"""defwav_to_rttm_string(wav_path):""" High-level function that return the rttm as string from a wavArguments:wav_path -- where the wav isReturn: the rttm content as string"""defrttm_to_string(rttm_path):""" transform rttm file to stringArguments:rttm_path -- where is the rttm fileReturn: rttm content as string"""defrttm_from_video(video_path,rttm_path):""" create a .rttm file from a videoArguments:video_path -- path to the videorttm_path -- path where the .rrtm file will be saved"""defrttm_from_wav(wav_path,rttm_path):""" create a .rttm file from a wavArguments:wav_path -- path to the wav filerttm_path -- path where the .rrtm file will be saved"""from CLIThe usage is the follow:$ python3 -m pydiarization.run --help
usage: run.py [-h] [--video VIDEO] [--wav WAV] [--output OUTPUT]

Diarization Toolkit Wrapper CLI

optional arguments:
  -h, --help       show this help message and exit
  --video VIDEO    take a video file or URL as input
  --wav WAV        take a wav file as input
  --output OUTPUT  specify to write as .rttm filesome examplesAsk to get the .rttm content from a url:python3 -m pydiarization.run --video http://data.cstr.inf.ed.ac.uk/summa/data/test.mp4SPEAKER tmp86hrhwsd 1 0.01 292.17   tmp86hrhwsd_spkr_9 
SPEAKER tmp86hrhwsd 1 292.18 2.98   tmp86hrhwsd_spkr_2Ask to write to .rttm file instead:python3 -m pydiarization.run --video http://data.cstr.inf.ed.ac.uk/summa/data/test.mp4 --output toto.rttm
Package: pydiary
pydiaryMatLab style commands logger for the Python interpreter, with added features.UsageImport the Diary class from the package and create a new instance. The commands you type in from now on will be logged into a file. Calldiary.off()to disable logging.frompydiaryimportDiaryDiary()# Turns diary on, saving commands to the default file diary.py...# The current active diary is automatically assigned to a variable called "diary"diary.off()# Turns diary offYou can pass a custom path for the diary file and save the instance to re-enable it afterwards:# Turns diary on, saving commands to a file called mydiary.py in the current directorymy_diary=Diary('mydiary.py')# You can save a reference to the Diary instance to use it later...my_diary.off()...my_diary.on()# Turns on the previously created diaryAdvanced usageBuffered modeBy default pydiary uses an internal string buffer to keep the diary file free for manual changes, and only writes to it when you turn off the diary.
You can force pydiary to flush commands to the file by callingdiary.flush().Calldiary.discard()if you want to discard all commands not yet written to the diary file.Direct modeYou can force pydiary to operate in direct mode by setting thebufferedparameter toFalsewhen creating an instance.Diary(buffered=False)In this mode pydiary will write commands directly to the diary file. Note that due to the way Python handles writing to files, the commands may not be written immediately and you may still need to calldiary.off()to see them in the file.Improvement, Issues reportSuggest improvements or features, report bugs athttps://github.com/nathanlepori/pydiary/issuesAuthorsNathan Lepori
Package: pydiatra
Overviewpydiatrais yet another static checker for Python code.Implemented checksembedded code copiesexceptshadowing builtins
(e.g.except IOError, OSError:, which overwritesOSError)bareexcept(i.e.except:)hardcoded errno values
(e.g.exc.errno == 2instead ofexc.errno == errno.ENOENT)inconsistent use of tabs and spaces in indentationmkstemp()file descriptor leaks
(e.g.path =tempfile.mkstemp()[1])obsolete PIL imports
(e.g.import Imageinstead offrom PIL import Image)regular expression syntax errorsmisplaced flags arguments inre.split(),re.sub(),re.subn()dubious or deprecated constructs in regular expressions:duplicate range
(e.g.re.compile("[aa]"))overlapping ranges
(e.g.re.compile("[a-zA-z]"))bad escape sequences
(e.g.re.compile(r"\eggs"))misplaced inline flags
(e.g.re.compile("eggs(?i)"); Python 3.6+ only)combining incompatible flagsredundant flagsstring exceptions
(e.g.raise "eggs"orexcept "ham":)string formatting errorscomparisons withsys.versionorsys.hexversionPython syntax errorsPython syntax warningsassertions that are always truesyntactic constructs that are no longer supported in Python 3ill-formed assignments to global variablesuse ofasyncandawaitas namesinvalid escape sequences in strings
(Python 3.6+ only)See the manual page for details.PrerequisitesPython 2.6+ or 3.2+argparse(needed only for Python 2.6)futures(needed only for Python 2.X)
Package: py-dic
pyDICA Digital Image Correlation application, developed in Python.Getting StartedThis package is hosted on pypi. To install it, simply run:$ python -m pip install py_dicYou can now start the GUI by running:$ python -m py_dicRunning the source codeClone or download the contetnts into a local directory. Install the package viasetupy.pyor run themain.pyfile and follow the on-screen instructions.$ python -m py_dic.mainTo change the default analysis settings, edit thesettings.inifile.You can use therun.batfile to start the GUI on Windows, but it expects the Python interpreter to be located in the./venv/Scriptsfolder inside the project's root directory. To achieve this, run the following commands (on a Windows machine):$ cd pyIDC
$ python -m pip virtualenv venv
$ venv\Scripts\activate.batto create a ner virtual environment inside thevenvfolder and activate is. Now, install the project requirements into this activated virtual environment:$ python -m pip install -r requirements.txtNow, you can execute therun.batfile to start the pyDIC GUI.AuthorsDomen GorjupJanko SlavičMiha Boltežar
Package: pydicates
Predicates for PythonLibrary for constuction predicates like(OwnedBy('alex') | OwnedBy('alice')) & HasTag('game-design')and applying them to other objects.MotivationI tired from reimplementation of custom predicate logic in my pet projects. So, I implemented that library.Library focus on usability, not performance. At least, for now.InstallpipinstallpydicatesUseMinimal examplefrompydicatesimportPredicate,commondefHasTag(tag):returnPredicate('has_tag',tag)defhas_tag(context,tag,document):returntagindocument['tags']common.register('has_tag',has_tag)document={'tags':('a','b','c','d')}assertcommon(HasTag('a')&HasTag('c'),document)assertnotcommon(HasTag('a')&HasTag('e'),document)assertcommon(HasTag('a')&~HasTag('e'),document)assertcommon(HasTag('a')&(HasTag('e')|HasTag('d')),document)More examples can be found in./examplesdirectory.See./examples/documents_check.pyfor API description.See./testsfor more examples.LimitationsCan not chain redefined comparisons:a < b < cis equal to(a < b) and (b < c)which translates by Python tob < c, becausea < bis object (Predicate) and alwaysTrue.
Package: pyDICI
pyDICIPacote para enviar dados ao DICIInstallpip install pyDICIUseImportar pacoteimport pyDICI as diciArquivo ExcelMontar um arquivo Excel (XLSX) com o seguinte formato. Podem ser adicionadas quantas linhas forem necessÃ¡rias.CronogramaLeiauteAnoEntregaEntidadeArquivoNome do CronogramaNome do LeiauteAno 4 DÃ­gitosTipo de EntregaNome da EntidadeCaminho para arquivo com dados a serem carregadosSalve o arquivo no formato Excel XLSX (ex.: C:\arquivos.xlsx)Os cronogramas e leiautes precisam jÃ¡ estar cadastrados no DICI.Exemplo:CronogramaLeiauteAnoEntregaEntidadeArquivoAcessos SMP 2019Acessos SMP2019MES_2CLARO S.A. (40.432.544/0001-47)C:\claro.csvCronograma MarcaCronograma Marca2019PontualAGENCIA NACIONAL DE TELECOMUNICACOES - SEDE (02.030.715/0001-12)C:\marca.xmlCredenciadas do SMPCredenciadas do SMP2019PontualAGENCIA NACIONAL DE TELECOMUNICACOES - SEDE (02.030.715/0001-12)C:\credenciadas.csvMantenha o chromedriver.exe (http://chromedriver.chromium.org/downloads) no %PATH% ou na pasta do seu projeto.Enviar dados para o servidor de produÃ§Ã£odici.enviar_dados('C:\\arquivos.xlsx')Enviar dados para o servidor de homologaÃ§Ã£odici.enviar_dados('C:\\arquivos.xlsx', hm=True)EndereÃ§o do servidor de produÃ§Ã£odici.servidor_producaoEndereÃ§o do servidor de homologaÃ§Ã£odici.servidor_homologacaoTipos de entrega aceitasdici.entregasTipos de arquivos de dados aceitosdici.formatos
Package: pydicomutils
pydicomutilsPython repository building upon pydicom to create a utility package intended to be used when creating DICOM objects.InstallationpipinstallpydicomutilsUsageIn the folderexamples, a number of example scripts are available, showcasing how the package can be used to create various DICOM objects.# Assuming pydicomutils to alread be installedgitclonehttps://github.com/sectra-medical/pydicomutils.gitcdpydicomutils
pipinstallexamples/requirements.txt
pythonexamples/run_all_examples.py
Package: pydict
PydictPydict is a simple command line dictionary, it lets you search the meanings of the word on the terminal.
It refers to the online dictionaryhttp://www.thefreedictionary.comIt also pronouces the keywords.RequirementsIt requires a command line mp3 player - mpg123. To install it use the following command:
$ sudo apt-get install mpg123UsageTo search for a keyword:>>> import pydict
>>> pydict.search('awesome', 2, 'uk')It will search for the word ‘awesome’ and pronouce it 2 times and in ‘uk’ style.
It will display the result of meaning of ‘awesome’.
If a keyword is not found in the dictionary it reports error.To just pronouce the word:>>> import pydict
>>> pydict.speak('awesome', 2, 'us')If pronouciation does not exist it reports error.
It has three styles ‘normal’, ‘us’ and ‘uk’.From command line:$ pydict -q ‘awesome’ -s uk -p 2options:
-q –query:             keyword
-s –style:     normal, US or UK
-p –pronounce: repeat pronounciation
-m –meaning:   display search or not. (0 or 1)
Package: pydict2json
Convert the string representation of a Python dictionary to JSONYou've got a Python dictionary that was printed to a log file.  You want to run it through JSON tools, likejqbut it's not actually JSON.This command line tool allows you convert to JSON.Why?If you're the owner of a python script that writes simply doesprint(str(d))you should consider changing it to useprint(json.dumps(d))instead.
However, you're not always the owner of scripts you use and you can't always change the code.
Instead, convert from the python string representation of a dictionary to JSON.Examples$ cat input.txt
{'example': {'number': 42, 'text': 'lorem ipsum', 'boolean': True}}Let's convert it to JSON with:$ cat input.txt | python3 -m pydict2json
{"example": {"number": 42, "text": "lorem ipsum", "boolean": true}}That's hard to read, let's pretty print:$ cat input.txt | python3 -m pydict2json --pretty
{
  "example": {
    "number": 42,
    "text": "lorem ipsum",
    "boolean": true
  }
}Much better.Now that it's JSON we can use all our favorite JSON tools likejq:$ cat input.txt | python3 -m pydict2json | jq .example.number
42The tool also supports input directly on the command line:$ python3 -m pydict2json --literal "{'a': None}"
{"a": null}
Package: py-dict-client
py-dict-client 0.1.6py-dict-clientis a Python 3 client implementing theDictionary Server Protocol.Installation$ pip install py-dict-clientUsage>>> from dictionary_client import DictionaryClient
>>> dc = DictionaryClient()

>>> dc.databases
{'fra-eng': 'French-English FreeDict Dictionary ver. 0.4.1',
 'eng-fra': 'English-French FreeDict Dictionary ver. 0.1.6',
 'wn': 'WordNet (r) 3.1 (2011)',
 'foldoc': 'The Free On-line Dictionary of Computing (2020-04-05)'}

>>> dc.define('oiseau', db='fra-eng').content
[{'db': 'fra-eng', 'definition': 'oiseau /wazo/ <n, masc>\nbird'}]

>>> dc.define('chauffeur').content
[{'db': 'fra-eng', 'definition': 'chauffeur /ʃofœʀ/ <n, masc>\nchauffeur, driver'},
 {'db': 'eng-fra', 'definition': 'chauffeur /ʃoufər/\nchauffeur'},
 {'db': 'wn', 'definition': 'chauffeur\n    n 1: a man paid to drive a privately owned car\n...'}]

>>> dc.match('hello').content
defaultdict(<class 'list'>, {'eng-fra': ['hello'], 'wn': ['hello'], 'foldoc': ['hello']})

>>> dc.disconnect()ContributingContributions are welcome. Please format your code with black, and add/improve tests where suitable.To run the tests:$ make testTODO implement remaining commands in specificationSTATUSSHOW INFOSHOW SERVERHELPOPTIONAUTHSASLAUTH
Package: pydictdis
pydisEnglish |简体中文Based on python's dict bottom layer, it implements management similar to redis interfaceIf you want to manage memory like redis, but don't want to introduce as many services as redis, you can use pydis,
Of course, pydis is completely implemented based on python's dict, and only has the basic functions of redis. Please evaluate this carefully before using it.installpipinstallpydictdisUsageconfigfrompydisimportPydismanager=Pydis()manager.set_config("default_timeout",50)# set default timeout is 50 secondssimple usagefrompydisimportPydismanager=Pydis()manager.set("key1","value1")manager.get("key1")# value1manager.delete("key1")manager.get("key1")# Nonettl usagefrompydisimportPydismanager=Pydis()manager.set("key2","value2",timeout=10)print(manager.ttl("key2"))# wait 10 secondsmanager.get("key2")# return None, because key2 already expiredincr and decr usagefrompydisimportPydismanager=Pydis()manager.set("key3",0)manager.incr("key3")manager.incr("key3")manager.incr("key3")print(manager.get("key3"))# 3manager.decr("key3")print(manager.get("key3"))# 2keys usagefrompydisimportPydismanager=Pydis()manager.set("key1","value1")print(list(manager.keys()))# ["key1"]set_nxfrompydisimportPydismanager=Pydis()manager.set_nx('key1','value')manager.set_nx('key1','value1')manager.get('key1')# valuecleanfrompydisimportPydismanager=Pydis()manager.set('key','value')manager.set('key1','value1',timeout=1)# after one secondsmanager.clean()# only have key in pydis, key1 already deletedforce_cleanfrompydisimportPydismanager=Pydis()manager.set('key','value')manager.set('key1','value1',timeout=1)manager.force_clean()# will delete all key
Package: pydiction
Pydiction: Deep Comparison and Assertion LibraryPydiction is a Python library for deep comparisons and assertions on complex data structures. It provides a flexible and customizable way to compare dictionaries and lists while supporting various comparison scenarios, including nested comparisons and negative tests.Getting StartedThese instructions will help you get started with using Pydiction for comparing data structures in your Python projects.PrerequisitesPydiction has the following prerequisites:Python 3.xInstallationYou can install Pydiction usingpip:pipinstallpydictionUsageSimple UsageHere's a basic example of how to use Pydiction for deep comparisons:frompydictionimportMatcher,Contains# Create a Matcher instancematcher=Matcher()# Define your actual and expected data structuresactual={"a":1,"b":2}expected=Contains({"a":1})# Perform the comparison and handle errorstry:matcher.assert_declarative_object(actual,expected)exceptAssertionErrorase:print(f"AssertionError:{e}")AdvancedfrompydictionimportANY_NOT_NONE,Matcher,ANY,Contains,DoesntContains,Expect,ExpectNotmatcher=Matcher()actual={"name":"John","email":"john@example.com","age":25,"friends":[{"name":"Alice","email":"alice@example.com","age":21,}],"comments":[{"text":"Great post!"}],"likes":[{"title":"First Post","content":"This is my first post!",},{"text":"Great post!"},],}expected={"name":"John","age":Expect(10).__gt__,"comments":DoesntContains([{"text":"not existing post!"}]),"email":ExpectNot("gmail.com").__contains__,"friends":[{"age":ANY_NOT_NONE,"email":ANY_NOT_NONE,"name":"Alice",}],"likes":Contains([{"content":"This is my first post!","title":"First Post",},]),}matcher.assert_declarative_object(actual,expected)ContributingIf you'd like to contribute to Pydiction or report issues, please follow these guidelines:Fork the repository on GitHub.Clone your forked repository to your local machine.Create a new branch for your feature or bug fix.Make your changes and commit them with clear and concise commit messages.Push your changes to your forked repository.Create a pull request against the main repository.
Package: py-dict-repr
Python Dictionary RepresentationDescriptionTheDictReprclass is an abstract base class that enables any subclass to define its own dictionary representation. This makes it possible to do:dict_repr=dict(arbitrary_object)The subclass only needs to do two things:Override thekeys()instance method to return a list of stringsHave the keys map to variables or properties on that objectExamplelassMyArbitraryClass(DictRepr):_keys=["uppercase","length"]def__init__(self,value:str):self._value=value@propertydefuppercase(self):returnself._value.upper()@propertydeflength(self):returnlen(self._value)defkeys(self):returnself._keysif__name__=="__main__":myobj=MyArbitraryClass("Hello World")mydict=dict(myobj)print("mydict type:{}".format(type(mydict)))pprint(mydict)$python3examples/dict_repr_example.pymydict type: <class 'dict'>{'length': 11, 'uppercase': 'HELLO WORLD'}Mapping Keys to Object AttributesIt may be the case that a desired dicitonary key isn't the name of the corresponding attribute. For example, a string may have spaces or other characters that, while perfectly suitable as a dictionary key, make it illegal as an object attribute name.In this case, theKeyTupleclass provides a mapping between key string and attribute name. Simply include a KeyTuple object in place of the key string:_keys=[KeyTuple("string with spaces 1","no_spaces_1"),KeyTuple("string with spaces 2","no_spaces_2")]KeyTuple ExampleLet's modify the previous example:frompy_dict_reprimportDictRepr,KeyTupleclassMyArbitraryClass(DictRepr):_keys=[KeyTuple("uppercase verion","uppercase"),KeyTuple("string length","length"),# KeyTuple may be mixed with regular key strings"lowercase"]def__init__(self,value:str):self._value=value@propertydefuppercase(self):returnself._value.upper()@propertydeflowercase(self):returnself._value.lower()@propertydeflength(self):returnlen(self._value)defkeys(self):returnself._keysif__name__=="__main__":myobj=MyArbitraryClass("Hello World")mydict=dict(myobj)print("mydict type:{}".format(type(mydict)))pprint(mydict)$python3examples/dict_repr_example.pypython3 ./examples/dict_repr_keytuple_example.pymydict type: <class 'dict'>{string length: 11, uppercase verion: 'HELLO WORLD', 'lowercase': 'hello world'}