Saravanan666/pypi-org huggingface dataset:
Package: retico
reticoRetico is an open-source framework for building state-of-the-art incremental processing
systems. This python package contains the functionality of the major supported retico
modules and makes them easily accessible.Examplefromreticoimport*fromretico.modulesimport*defcallback(update_msg):forx,utinupdate_msg:print(f"{ut}:{x.text}({x.stability}) -{x.final}")m1=MicrophoneModule()m2=Wav2VecModule()m3=TextDispatcherModule()m4=GoogleTTSModule("en-US","en-US-Wavenet-A")m5=SpeakerModule()m6=CallbackModule(callback)m1.subscribe(m2)m2.subscribe(m3)m3.subscribe(m4)m4.subscribe(m5)m2.subscribe(m6)run(m1)input()stop(m1)
Package: retico-chatgpt
retico-chatgptA module that uses OpenAI's GPT-3 to generate responses to user input incrementally.Exampleimportretico_coreimportretico_wav2vecasrimportretico_chatgptimportdotenvdotenv.load_dotenv()INSTRUCTIONS="""You are an AI assistant that is an expert in alcoholic beverages.You know about cocktails, wines, spirits and beers.You can provide advice on drink menus, cocktail ingredients, how to make cocktails, and anything else related to alcoholic drinks.If you are unable to provide an answer to a question, please respond with the phrase "I'm just a simple barman, I can't help with that."Please aim to be as helpful, creative, and friendly as possible in all of your responses.Do not use any external URLs in your answers. Do not refer to any blogs in your answers.You are interacting with spoken words. Be very brief and do not format your responses.Do not use dashes in lists, and do not use any other formatting.Write out numbers as words, for example use "one" instead of "1"."""mic=retico_core.audio.MicrophoneModule()asr=retico_wav2vecasr.Wav2VecASRModule(language="en")chatgpt=retico_chatgpt.ChatGPTDialogueModule(system_prompt=INSTRUCTIONS)printer=retico_core.debug.TextPrinterModule()mic.subscribe(asr)asr.subscribe(chatgpt)chatgpt.subscribe(printer)retico_core.network.run(mic)print("Network is running")input()retico_core.network.stop(mic)For this example, either the environment variableOPENAI_API_KEYneeds to be set or a.envfile needs to be present in the current working directory with the following content:OPENAI_API_KEY=<your-openai-api-key>
Package: retico-core
retico-coreThis project includes the core functionality of the retico framework. This includes the
abstract, general definitions of incremental modules and incremental units (IUs), as
well as modules and IUs for audio input/output, debugging, dialogue, and text
processing. Also, some tools for saving and loading modules to and from file are
available.For the main repository that includes a variety of useful modules and IU definitions,
go togithub.com/retico-team/retico.How to installFor installing retico-core, you need to haveportaudioinstalled. See the
documentation for a detailed description of how to install it. Then, you can install it
via pip:$pipinstallretico-coreDocumentationThe documentation of retico-core can be found athttps://retico-core.readthedocs.io/
Package: retico-core-asr
retico-core-asrThis project includes the core functionality of the retico asr moduleHow to installThis will also install the retico-core-core modules that are required for all of retico to functionvia pip:$pipinstallretico-core-asrImportimport asr
import asr_cat
import asr_deepspeechReticoDocumentation for the main retico project can be found hereSample Programfrom retico_core.core.audio import MicrophoneModule
from retico_core.core.debug import DebugModule
from asr import OfflineASRModule


debug = DebugModule()

microphone = MicrophoneModule(rate=16000)
localAsr = OfflineASRModule()

'''
subscribe to modules in a cascading pattern
Microphone is needed by localAsr so subscribe to localAsr
debug will relay the information form localAsr so subscribe localAsr to debug
'''

microphone.subscribe(localAsr)
localAsr.subscribe(debug)


# run modules
microphone.run()
localAsr.run()
debug.run()


input()

# stop modules
microphone.stop()
localAsr.stop()
debug.stop()
Package: retico-core-core
retico-coreThis project includes the core functionality of the retico framework. This includes the
abstract, general definitions of incremental modules and incremental units (IUs), as
well as modules and IUs for audio input/output, debugging, dialogue, and text
processing. Also, some tools for saving and loading modules to and from file are
available.For the main repository that includes a variety of useful modules and IU definitions,
go togithub.com/retico-team/retico.How to installFor installing retico-core, you need to haveportaudioinstalled. See the
documentation for a detailed description of how to install it. Then, you can install it
via pip:$pipinstallretico-coreDocumentationThe documentation of retico-core can be found athttps://retico-core.readthedocs.io/Importimport retico_core.core.abstract
import retico_core.core.audio
import retico_core.core.debug
import retico_core.core.dialogue
import retico_core.core.network
import retico_core.core.text
import retico_core.core.visualPip DeploymentSingle Modulecd <project directory>
rm -rf dist
python -m build --sdist
twine upload dist/*Batch uploadLinux/OSX/Powershell./retico_deploy.sh
Package: retico-core-psi
retico-core-psiThis project includes the core functionality of the retico psi moduleHow to installThis will also install the retico-core-core modules that are required for all of retico to functionvia pip:$pipinstallretico-core-psiImportimport configFileReader
import psi_common
import psiAsrReceiverReticoDocumentation for the main retico project can be found here
Package: retico-core-rasa-nlu
retico-core-rasaThis project includes the core functionality of the retico rasa moduleHow to installThis will also install the retico-core-core modules that are required for all of retico to functionvia pip:$pipinstallretico-core-rasaUsageFor this module you must have a rasa pretrained model saved in the system then pass it to the NLUfrom retico_core.modules.rasa.retico_nlu import RasaNLUModule
nlu = RasaNLUModule(model_dir=<PATH TO MODEL DIRECTORY>, incremental=False)Importimport retico_nluReticoDocumentation for the main retico project can be found here
Package: retico-core-sds-class
retico-core-sds-classThis project includes the core functionality of the retico sds-class moduleHow to installThis will also install the retico-core-core modules that are required for all of retico to functionvia pip:$pipinstallretico-core-sds-classImportimport sds_class_iu
import TaggerModuleReticoDocumentation for the main retico project can be found here
Package: retico-core-slim
retico-core-slimThis project includes the core functionality of the retico slim moduleHow to installThis will also install the retico-core-core modules that are required for all of retico to functionvia pip:$pipinstallretico-core-slimImportimport slim_common
import wac
import words_as_classifiersReticoDocumentation for the main retico project can be found here
Package: retico-googleasr
retico-googleasrThis project contains the incremental module for running Google Cloud ASR in a retico
environment. Google ASR provides continuous speech recognition updates by updating the
current prediction. As this is not in the correct format for incremental processing, the
recognized speech gets incrementalized and only updates to the previous states are
published. E.g.,[UpdateType]        [text]             [stability]            [final]
UpdateType.ADD:     this               (0.8999999761581421) - False
UpdateType.ADD:     isn't a sentence   (0.8999999761581421) - False
UpdateType.REVOKE:  isn't a sentence   (0.8999999761581421) - False
UpdateType.ADD:     is a test sentence (0.0)                - TrueInstallingTo use the Automatic Speech Recognition module utilizing google cloud speech, you need to install the third-party package first.For this, you may follow the first two steps ofthis tutorial.Important is, that you create yourGoogle Application Credentials json fileand save the path to that file into the global variableGOOGLE_APPLICATION_CREDENTIALS(look for the "Before you begin" section on the tutorial page).After that you can install the package with$pipinstallretico-googleasrDocumentationSadly, there is no proper documentation for retico-googleasr right now, but you can
start using the GoogleASRModule like this:fromretico_coreimport*fromretico_googleasrimport*msg=[]defcallback(update_msg):globalmsgforx,utinupdate_msg:ifut==UpdateType.ADD:msg.append(x)ifut==UpdateType.REVOKE:msg.remove(x)txt=""committed=Falseforxinmsg:txt+=x.text+" "committed=committedorx.committedprint(" "*80,end="\r")print(f"{txt}",end="\r")ifcommitted:msg=[]print("")m1=audio.MicrophoneModule()m2=GoogleASRModule("en-US")# en-US or de-DE or ....m3=debug.CallbackModule(callback=callback)m1.subscribe(m2)m2.subscribe(m3)network.run(m1)print("Running")input()network.stop(m1)
Package: retico-googletts
retico-googlettsThis project contains the incremental module for running Google Cloud TTS in a retico
environment. Google TTS provides multiple languages and voices, which can be looked
uphere.The current implementation of the TTS module is not strictly incremental, as a new input
triggers a complete resynthesizing of the speech.How to installAlthough the installation of retico-googletts only requiresretico-core, there are a few software
dependencies that have to be installed manuallyGCloudFor the authentication with the Google TTS API, the command line argumentgcloudhas
to be availbale. For information visit theGoogle Cloud Documentation. To validate that
the access work, the following command has to return the access token to authenticate
the use of the API:$gcloudauthprint-access-tokenffmpegIn order to convert the received audio files into the proper format, retico-googletts
requiresffmpeg.DocumentationSadly, there is no proper documentation for retico-googletts right now, but you can
start using the GoogleTTSModule like this:fromretico_coreimport*fromretico_googleasrimport*fromretico_googlettsimport*defcallback(update_msg):forx,utinupdate_msg:print(f"{ut}:{x.text}({x.stability}) -{x.final}")m1=audio.MicrophoneModule()m2=GoogleASRModule()m3=text.TextDispatcherModule()m4=GoogleTTSModule("en-US","en-US-Wavenet-A")m5=audio.AudioDispatcherModule(target_frame_length=0.2)m6=audio.StreamingSpeakerModule(frame_length=0.2)m7=debug.CallbackModule(callback)m1.subscribe(m2)m2.subscribe(m3)m3.subscribe(m4)m4.subscribe(m5)m2.subscribe(m7)m5.subscribe(m6)network.run(m1)print("Running")input()network.stop(m1)
Package: retico-hftranslate
retico-hftranslateLocal translation module based on the hugging face transformer library.Examplefromretico_coreimport*importretico_wav2vecasrimportretico_speechbrainttsimportretico_hftranslatemsg=[]defcallback(update_msg):globalmsgforx,utinupdate_msg:ifut==UpdateType.ADD:msg.append(x)ifut==UpdateType.REVOKE:msg.remove(x)txt=""committed=Falseforxinmsg:txt+=x.text+" "committed=committedorx.committedprint(" "*80,end="\r")print(f"{txt}",end="\r")ifcommitted:msg=[]print("")m1=audio.MicrophoneModule()m2=retico_wav2vecasr.Wav2VecASRModule(language="de")m3=retico_hftranslate.HFTranslateModule(from_lang="de",to_lang="en")m5=retico_speechbraintts.SpeechBrainTTSModule(language="en")m6=audio.SpeakerModule(rate=22050)m4=debug.CallbackModule(callback)m1.subscribe(m2)m2.subscribe(m3)m3.subscribe(m4)m3.subscribe(m5)m5.subscribe(m6)network.run(m1)print("Press any key to exit")input()network.stop(m1)
Package: retico-speechbraintts
retico-speechbrainttsLocal speechbrain speech synthesis for retico.Installation and requirementsYou can install the module via pip:$pipinstallretico-speechbrainttsFor this, PyTorch has to be installed:$pipinstalltorchExamplefromretico_coreimport*importretico_wav2vecasrimportretico_speechbrainttsmicrophone=audio.MicrophoneModule()asr=retico_wav2vecasr.Wav2VecASRModule("en")tts=retico_speechbraintts.SpeechBrainTTSModule("en")speaker=audio.SpeakerModule(rate=22050)microphone.subscribe(asr)asr.subscribe(tts)tts.subscribe(speaker)network.run(asr)print("Running the TTS. Press enter to exit")input()network.stop(asr)
Package: retico-wav2vecasr
retico-wav2vecasrLocal wav2vec ASR Module for ReTiCoInstallations and requirementsyou can install the module via pip:$pipinstallretico-wav2vecasrIn order to access the ASR models, one of PyTorch, TensorFlow, or Flax need to
be installed. For example, PyTorch can be installed via pip with:$pipinstalltorchExampleimportretico_corefromretico_wav2vecasrimport*fromretico_wav2vecasr.wav2vecasrimportWav2VecASRModulemsg=[]defcallback(update_msg):globalmsgforx,utinupdate_msg:ifut==retico_core.UpdateType.ADD:msg.append(x)ifut==retico_core.UpdateType.REVOKE:msg.remove(x)txt=""committed=Falseforxinmsg:txt+=x.text+" "committed=committedorx.committedprint(" "*80,end="\r")print(f"{txt}",end="\r")ifcommitted:msg=[]print("")microphone=retico_core.audio.MicrophoneModule()asr=Wav2VecASRModule("en")m3=debug.CallbackModule(callback=callback)microphone.subscribe(asr)asr.subscribe(m3)retico_core.network.run(asr)print("Running the ASR. Press enter to exit")input()retico_core.network.stop(asr)
Package: reticulatus
Codex ReticulatusCodex Reticulatus a collection of Python recipes that can help you avoid starvatinon while in the wild.Free software: BSD licenseDocumentation:https://reticulatus.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-11-08)First release on PyPI.
Package: reticuler
ReticulerPython package to simulate the growth of spatial networks in nature.DocumentationSetupExternal dependencies:FreeFEM++- PDE solverPackage installationpip install reticulerUsageDuring the installation four command line scripts are installed:reticulate- runs the simulationreticulate_back- runs the the Backward Evolution Algorithmclip_ret- clips the network to one of the growth thresholds (maximum forward evolution step, length, height, evolution time, or BEA step)plot_ret- plots the network based on the.jsonfile from the simulationTo use just type in the command line:reticulate -hTypical network growth simulation:output file:test,growth threshold type: maximum network height,growth threshold: 2reticulate -out test --growth_params {\"growth_thresh_type\":1,\"growth_thresh\":2}How to citeThrough history to growth dynamics: backward evolution of spatial networks, S. Żukowski, P. Morawiecki, H. Seybold, P. Szymczak, Sci. Rep. 12, 20407 (2022).MaterialsReferencesBifurcation dynamics of natural drainage networks,  A. Petroff, O. Devauchelle, H. Seybold, and D. H. Rothman. Philos. Trans. Royal Soc. A 371, no. 2004 (2013): 20120365.
Package: reticulok
reticulokA package to get repititions on DevOps best practices, python library deployment, and coding challenge solutions.OverviewAs a professional data engineer, I've noticed that my everyday responsibilities fall into four main buckets:A - Ingestion of Data from External SourcesB - Processing of Data via Optimized CodeC - Structuring Data into Marts for Downstream Ingestion/AnalysisD - Infrastructural and DevOps to Automate Deployment/Testing
Package: retimer
retimerA simple package to make retry loops easierGetting startedYou cangetretimerfrom PyPI,
which means it's easily installable withpip:python-mpipinstallretimerExample usageThink of a scenario where you need to keep trying to do something for a range of time, usually you can write this:fromtimeimportperfcountertimeout=10begin=perfcounter()whilepercounter()-begin<timeout:# do something for 10 secondsifretry_doing_something:time.sleep(.5)continueifsomething_bad:break# all goodbreakifperfcounter-begin>=timeout:print(f"Could not do something after{timeout}seconds")else:print("Success!")Rewriting using this package becomes:fromretimerimportTimerimporttimetimer=Timer(10)whiletimer.not_expired:# do something for 10 secondsifretry_doing_something:time.sleep(.5)continueifsomething_bad:timer.explode()# all goodbreakiftimer.expired:print(f"Could not do something after{timer.duration}seconds")else:print("Success!")Although both codes accomplish the same result, I personally find the second one more readable and shines when I need two or more chained loopsChangelogRefer to theCHANGELOG.mdfile.
Package: retinaface
RetinaFaceface detector with landmarks, RetinaFace PyPI implementreference :https://github.com/peteryuX/retinaface-tf2INSTALLpip3installrefinafaceUSEAGE#pip3 install opencv-pythonimportcv2fromretinafaceimportRetinaFace# init with 'normal' accuracy option (resize width or height to 800 )# or you can choice 'speed' (resize to 320)# or you can initiate with no parameter for running with original image sizedetector=RetinaFace(quality="normal")# same with cv2.imread,cv2.cvtColorrgb_image=detector.read("data/hian.jpg")faces=detector.predict(rgb_image)# faces is list of face dictionary# each face dictionary contains x1 y1 x2 y2 left_eye right_eye nose left_lip right_lip# faces=[{"x1":20,"y1":32, ... }, ...]result_img=detector.draw(rgb_image,faces)# save ([...,::-1] : rgb -> bgr )cv2.imwrite("data/result_img.jpg",result_img[...,::-1])# show using cv2# cv2.imshow("result",result_img[...,::-1])# cv2.waitKey()result with drawing
Package: retinaface-post-processing
RetinaFace Post-ProcessingModule for post-processing ofRetinaFaceNetinference results.Model outputs are floating points tensors:name:face_rpn_cls_prob, shape:1, 16800, 2, format:B, A*C, 2, represents detection scores for 2 classes: background and face.name:face_rpn_bbox_pred,  shape:1, 16800, 4, format:B, A*C, 4, representsdetection box deltas.name:face_rpn_landmark_pred, shape:1, 16800, 10, format:B, A*C, 10, representsfacial landmarks.For each output format:B- batch sizeA- number of anchorsC- sum of products of dimensions for each stride,C = H32 * W32 + H16 * W16 + H8 * W8H- feature height with the corresponding strideW- feature width with the corresponding strideDetection box deltas have format[dx, dy, dh, dw], where:(dx, dy)- regression for center of bounding box(dh, dw)- regression by height and width of bounding boxFacial landmarks have format[x1, y1, x2, y2, x3, y3, x4, y4, x5, y5], where:(x1, y1)- coordinates of left eye(x2, y2)- coordinates of rights eye(x3, y3)- coordinates of nose(x4, y4)- coordinates of left mouth corner(x5, y5)- coordinates of right mouth corner
Package: retinasdk
Cortical.io’s Retina APIallows the user to perform semantic operations on text. One can
for example:measure the semantic similarity between two written entitiescreate a semantic classifier based on positive and negative example textsextract keywords from a textdivide a text into sub-sections corresponding to semantic changesextract terms from a text based on part of speech tagsThe meaning of terms and texts is stored in a sparse binary representation that allows the user to apply logical
operators to refine the semantic representation of a concept.You can read more about the technology at thedocumentation page.To access the API, you will need to register for anAPI key.
Package: retina-therm
retina-thermA Green's function based model for calculating the temperature rise caused by laser exposure to the retina.
The model supports both flat top and Gaussian beam profiles and multiple absorbing
layers. It is written in Python, so can be installed withpipand run anywhere Python
runs.It is currently a work in progress, but is already capable of simulating CW, pulsed, and
multi-pulsed exposures to a multi-layer retina.Derivation of MethodThe program uses a Green's Function solution to the heat equation with a source term due
to Beer's Law absorption in one or more layers of material that have the same thermal
properties. Unlike a finite-difference heat solver, this method can quickly calculate
the temperature rise at a single point in space and time. That means it can be much
faster that an FD solver if all you want/need is the temperature at a single point.However, it is more limited than an FD solver, the solution assumes that the media is
infinite (no boundaries), and homogeneous with respect to thermal properties. When
simulating retina exposures, the thermal properties of all retinal layers and
surrounding tissue are typically assumed to be the same as water, so this method
can still be applied to retinal exposures. It cannot be applied to skin exposures
where the different layers have different thermal properties and there is an air-skin
surface boundary.See thewrite-upfor a detailed derivation of the method.InstallingInstall with pip$pipinstallretina-thermUsageretina-thermis a library (module) that implements the various models with a CLI that
can configure and run models from a YAML config files. If you want to write your own
CLI, or embed a model in your own module, see the CLI source or unit tests for examples
of how to set up and run the models.If you just want to run a simulation, you can do so by running the CLI with an argument
specifying the configuration file.$retina-thermtemperature-riseconfig.ymlHere is an example configuration that simulates one of the exposures simulated byMainster in 1970(This is a great paper by
the way).thermal:k:1.5e-3 cal / K / s / cmrho:1 g/cm^3c:1 cal / K /glayers:-mua:310 1/cmd:10 umz0:0 um-mua:53 1/cmd:100 umz0:10 umlaser:wavelength:700 nmduration:10 sE0:1 cal/s/cm^2R:10 umsimulation:sensor:z:1 umtime:max:1 sdt:10 usdatout:retina-therm-{c[cmd]}-{c[laser/R]}.txtwith_units:Falseuse_multi_precision:Falseuse_aoproximate:TrueNote how physical quantities are given with units.retina-thermusesPintinternally
to do unit conversions, so you can specify configuration parameters in whatever unit you
have, no need to convert beforehand.
Package: retinawhitenoise
RecreateWhiteNoiseStimuliWithPythonCode for regenerating the random-number-based contrast values applied in experiments with white-noise stimulation in the Gollisch Lab.
Used for both temporal and spatiotemporal stimuli, and for both binary and Gaussian white noise.The random-number sequences are needed for analyzing the spike responses of recorded cells under white-noise stimulation.InstallationA full installation of the package is done from command-line usingpipwithpip install retinawhitenoiseManual installationIf thepippackage is not available for a given operating system or Python version, the package and Cython code can be compiled manually instead.pip install https://github.com/gollischlab/RecreateWhiteNoiseStimuliWithPython/archive/main.tar.gzWindows might require theMicrosoft C++ Build Toolsto be installed (including"Windows SDK"and"MSVC ... C++ x64/x86 build tools"). For details, seehere.UsageThe Python packageretinawhitenoiseoffers two modulesbinarystimulusandgaussianstimulus,
each offering routines torecreate,save(to disk), andloadstimulus sequences.Instructions on how to use them with example code and explanations is included in the jupyter notebookexamples.ipynb.
Package: retinex
RetinexRetinex algorithms for image enhancement. They are specially useful to process images with uneven illumination.Still a work in progress. Next, I want to implement other techniques for color correction.InstallationYou may use pip to install retinex.pipinstallretinexUsageHere is an example of how to use MSRCR (multi-scale retinex with color correction).importskimagefromretineximportmsrcrimg_original=skimage.io.imread("leaves.jpg")img_msrcr=msrcr(img,sigmas=(25.,50.,100.,))Check theexamplesfolder for some more samples:Image creditsImages in thesample_imagesfolder were made freely available online by talented photographers. My big thanks to them:leaves.jpg: Photo byRodion KutsaievonUnsplashman.jpg: Photo byMichael McAuliffeonUnsplashpark.jpg: Photo byOleg LukinonUnsplashstreet.jpg: Photo byRon DouglasonflickrReferencesRahman, Z. U., Jobson, D. J., & Woodell, G. A. (2004).Retinex processing for automatic image enhancement. Journal of Electronic imaging, 13(1), 100-110.ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT