Saravanan666/pypi-org huggingface dataset:
Package: retirable-resources
# Retirable resourcesA Python library for using Google Cloud Firestore to manage resources have a lifecycle: creation -> use -> retirement.During “use”, each resource can be used for different purposes by a set
of “owners”. Each owner can retire their use of the resource independently
of other owners. When all owners have retired a resource, it is automatically
retired.## TestingRun the emulator withfirebase emulators:start –project fooThen run the tests withpython -m unittest## TODOScript up running the emmulator, and passing its port to the test scriptemulators:exec *scriptpath*see <https://firebase.google.com/docs/emulator-suite/install_and_configure>
also useful: <https://firebase.google.com/docs/emulator-suite/connect_firestore#web>
Package: retnets
RETNETS (Retentive Networks) - PyPI PackageOverviewRETNETS is a powerful package designed to facilitate the usage of the Retentive Network by AI engineers. Whether you're working with Torch or Tensorflow, RETNET provides seamless integration and empowers you to harness the potential of Retentive Network for your AI projects.What is the Retentive Network?What is RETNET?RETNETS, or Retentive Network, is a revolutionary neural network architecture transforming large language models. It introduces the "retention mechanism," efficiently addressing inference and parallelism challenges faced by traditional Transformers.The retention mechanism utilizes parallel, recurrent, and chunkwise recurrent representations, overcoming the "impossible triangle" challenge. RETNET demonstrates remarkable performance and efficiency, enabling faster decoding and significant memory savings compared to standard Transformers.The future of RETNET looks promising, with plans for scaling and deployment on various edge devices. It promises to revolutionize large language models, empowering AI engineers with efficient training and accelerated inference capabilities. Embrace RETNET for cutting-edge advancements in natural language processing!FeaturesEasy-to-use interface for both Torch and Tensorflow.Simple and intuitive integration with your existing AI projects.Harness the power of the Retentive Network for sequential data processing.Comprehensive documentation and code examples to get you started quickly.InstallationYou can install RETNETS using pip with the following command:pipinstallretnetsUsageUsing RETNETS in your AI project is a breeze! Just import the package and start leveraging the capabilities of the Retentive Network.importretnets# Your code here...DocumentationFor detailed information on how to use RETNET with Torch or Tensorflow, please refer to ourdocumentation.ContributingWe welcome contributions from the community! If you find a bug, have a feature request, or want to add improvements, feel free to open an issue or submit a pull request.LicenseNote:Some code is from the official Microsoft/Meta repository for Torchscale.RETNETS is released under theMIT License.
Package: retool
docstestspackageAn example package. Generated with cookiecutter-pylibrary.Free software: BSD 2-Clause LicenseInstallationpip install 1274c9e8-d29f-11e9-96d1-7c5cf84ffe8eDocumentationhttps://lib2.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append tox
Package: retoolrpc
retoolrpcPython client packageReview Retool'sRPC documentationbefore installing the JavaScript package.InstallationUsepiporpoetryto install the packages.# Using pip
pip install retoolrpc asyncio

# Using poetry
poetry init
poetry add retoolrpc asyncioUsage exampleimportasynciofromretoolrpcimportRetoolRPC,RetoolRPCConfigasyncdefstart_rpc():rpc_config=RetoolRPCConfig(api_token="your-api-token-here",# Replace this token with your API tokenhost="http://localhost:3000/",# Replace this host with your host domainresource_id="resource-id",# Replace this resource ID with your IDenvironment_name="production",# Replace this environment name with your name (defaults to production)polling_interval_ms=1000,# The polling interval for the RPCversion="0.0.1",# An optional version number for functions schemaslog_level="info",# Change to 'debug' for verbose logging)rpc=RetoolRPC(rpc_config)defhelloWorld(args,context):returnf"Hello{args['name']}!"rpc.register({"name":"helloWorld","arguments":{"name":{"type":"string","description":"Your name","required":True,"array":False,},},"implementation":helloWorld,"permissions":None,})awaitrpc.listen()if__name__=="__main__":asyncio.run(start_rpc())
Package: retort
Retort is a schema migration tool forSQLAlchemy, compares DB schema against
table metadata, and updates DB schema according to this.It depends on theAlembic
autogenerate.RequirementsRetort works withPython 3.3+SQLAlchemyAlembicautopep8Installationvia pip$pipinstallretortvia setup.py$pythonsetup.pyinstallBasic Usage ExamplesGenerate config file (retort_config.py)(venv)tpdn@example:~/retort_example$retortinitCreateretort_conf.py.Edit config file# retort_config.pyfrommodelimportuserTARGETS=[{'engine':user.engine,#sqlalchemy engine'metadata':user.Base.metadata#sqlalchemy metadata},]# model/user.pyfromsqlalchemyimportColumn,Integer,String,create_enginefromsqlalchemy.ext.declarativeimportdeclarative_baseengine=create_engine('mysql+pymysql://foobar:abcdef@localhost/retort_test_db')Base=declarative_base()classUser(Base):__tablename__='users'id=Column(Integer,primary_key=True)name=Column(String(255))fullname=Column(String(255))xyz=Column(String(255))Apply(venv)tpdn@example:~/retort_example$retortapply====================url:mysql+pymysql://foobar:abcdef@localhost/retort_test_dblogging_name:None====================op.create_table('users',sa.Column('id',sa.Integer(),nullable=False),sa.Column('name',sa.String(length=255),nullable=True),sa.Column('fullname',sa.String(length=255),nullable=True),sa.Column('xyz',sa.String(length=255),nullable=True),sa.PrimaryKeyConstraint('id'))Doyoureallywanttoapplythis?[y/n]:yApplyingmigration......====================url:mysql+pymysql://foobar:abcdef@localhost/retort_test_dblogging_name:None====================op.create_table('users',sa.Column('id',sa.Integer(),nullable=False),sa.Column('name',sa.String(length=255),nullable=True),sa.Column('fullname',sa.String(length=255),nullable=True),sa.Column('xyz',sa.String(length=255),nullable=True),sa.PrimaryKeyConstraint('id'))--->Processingtime:0.0894(sec)Complete!Update model(remove xyz column)# model/user.pyfromsqlalchemyimportColumn,Integer,String,create_enginefromsqlalchemy.ext.declarativeimportdeclarative_baseengine=create_engine('mysql+pymysql://foobar:abcdef@localhost/retort_test_db')Base=declarative_base()classUser(Base):__tablename__='users'id=Column(Integer,primary_key=True)name=Column(String(255))fullname=Column(String(255))# xyz = Column(String(255))Apply with –sql option(venv)tpdn@example:~/retort_example$retortapply--sql====================url:mysql+pymysql://foobar:abcdef@localhost/retort_test_dblogging_name:None====================ALTERTABLEusersDROPCOLUMNxyz;Doyoureallywanttoapplythis?[y/n]:yApplyingmigration......====================url:mysql+pymysql://foobar:abcdef@localhost/retort_test_dblogging_name:None====================ALTERTABLEusersDROPCOLUMNxyz;--->Processingtime:0.0745(sec)Complete!Commands and Optionsretort init

retort apply
  --sql # print sql mode
  --dry-run # dry run (no database update)
  --yes # skip confirmation
  --without-drop # without drop operations (DROP TABLE, DROP COLUMN, DROP INDEX, DROP CONSTRAINT)

retort print_operations
  --sql
  --without-dropAuthorNAKAMORI Ryosuke-https://github.com/tpdnLicenceBSD License (2-Clause)
Package: retox
A command line service that runs your tox tests in parallel, using threading and multicore CPUs.See your tox environments in a dashboard and automatically watch source folders for file changes and re-run tests.See :https://github.com/tonybaloney/retox/raw/master/docs/_static/screenshot.jpegfor an example screenshotRequirementsLinux users may need to install libncurses5-dev before using Tox. If you see an error “ImportError: No module named ‘_curses’” this is because of the Requirement.UsageTo install, runpipinstallretoxThen from any project that has atox.inifile setup and using tox, you can simply runretoxThis will start the service, from where you can press (b) to rebuild on demand.Watching foldersRetox can watch one or many directories for file changes and re-run the tox environments when changes are detectedretox-wmy_project_folder-wmy_test_folderExcluding pathsRetox will ignore files matching a given regex:retox-wmy_project_folder--exclude='.*\.(swp|pyc)$'Tox supportAny tox arguments can be given to the command, and using –help to get a full list of commands. Tox arguments will be passed to all virtualenvsretox-epy27,py36multicore configurationThe number of concurrent processes in the threadpool can be set using the -n parameter.
By default this will be equal to the number of CPU’s on the OS. If you want to expand or throttle this, use the
flag to change the size of the threadpool.retox-n4Logging2 files will be created - .retox.log, which is a file for all runs of the logs for the virtual environments. This can be handy to tail to see live output
.retox.json - a JSON file with the virtualenv tasks and specific command output.CreditsThis was inspired by the detox project, which was created by the tox development team. I worked and then significantly changed the way it works
to support re-running environments with ease.
Package: retrace
Retrace your steps and try again.Retrace provides a configurable decorator which allows you to wrap
Python callables and retry them on errors or other specific conditions.DocsIt is simple and elegant.See the documentation at:http://d0ugal.github.io/retrace/QuickstartFirst,pip install retrace.importretrace@retrace.retrydefunstable():# ...Boom. Done.This function will now be retied up to 5 times if it raises an
exception. You can customise how often it is retried, limit the
exceptions and add validators to further verify the return value. Check
out the docs for all this and more.
Package: retrack
A business rules engineInstallationpipinstallretrackUsageimportretrackrule=retrack.from_json("rule.json")result=rule.execute(your_data_df)Creating a rule/modelA rule is a set of conditions and actions that are executed when the conditions are met. The conditions are evaluated using the data passed to the runner. The actions are executed when the conditions are met.Each rule is composed of many nodes. To see each node type, check thenodesfolder.To create a rule, you need to create a JSON file with the following structure:{"nodes":{"node id":{"id":"node id","data":{},"inputs":{},"outputs":{},"name":"node name",},// ... more nodes}}Thenodeskey is a dictionary of nodes. Each node has the following properties:id: The node id. This is used to reference the node in theinputsandoutputsproperties.data: The node data. This is used as a metadata for the node.inputs: The node inputs. This is used to reference the node inputs.outputs: The node outputs. This is used to reference the node outputs.name: The node name. This is used to define the node type.Theinputsandoutputsproperties are dictionaries of node connections. Each connection has the following properties:node: The node id that is connected to the current node.input: The input name of the connection that is connected to the current node. This is only used in theinputsproperty.output: The output name of the connection that is connected to the current node. This is only used in theoutputsproperty.To see some examples, check theexamplesfolder.Creating a custom nodeTo create a custom node, you need to create a class that inherits from theBaseNodeclass. Each node is a pydantic model, so you can use pydantic features to create your custom node. To see the available features, check thepydantic documentation.To create a custom node you need to define the inputs and outputs of the node. To do this, you need to define theinputsandoutputsclass attributes. Let's see an example of a custom node that has two inputs, sum them and return the result:importretrackimportpydanticimportpandasaspdimporttypingclassSumInputsModel(pydantic.BaseModel):input_value_0:retrack.InputConnectionModelinput_value_1:retrack.InputConnectionModelclassSumOutputsModel(pydantic.BaseModel):output_value:retrack.OutputConnectionModelclassSumNode(retrack.BaseNode):inputs:SumInputsModeloutputs:SumOutputsModeldefrun(self,input_value_0:pd.Series,input_value_1:pd.Series,)->typing.Dict[str,pd.Series]:output_value=input_value_0.astype(float)+input_value_1.astype(float)return{"output_value":output_value,}After creating the custom node, you need to register it in the nodes registry and pass the registry to the parser. Let's see an example:importretrack# Register the custom nodecustom_registry=retrack.nodes_registry()custom_registry.register("sum",SumNode)rule=retrack.from_json("rule.json",nodes_registry=custom_registry)ContributingContributions are welcome! Please read thecontributing guidelinesfirst.
Package: retractions
retractionsCheck DOIs for retractionsUsageusage: retractions [-h] [-r] [-b {openretractions}] [-i INFILE] [-o OUTFILE]
                   [-u]
                   [doi ...]

positional arguments:
  doi                   DOI to check for retractions or updates. Handled after
                        --infile lists.

optional arguments:
  -h, --help            show this help message and exit
  -r, --retractions-only
                        Only list retracted DOIs, not updated
  -b {openretractions}, --backend {openretractions}
  -i INFILE, --infile INFILE
                        Get DOIs from file (newline-separated); accepts
                        multiple
  -o OUTFILE, --outfile OUTFILE
                        Write to file instead of stdout
  -u, --url             Show DOIs as URLs
Package: retraction-watch-import
Retraction Watch Database ImporterThis Airflow script imports the Retraction Watch database into the annotations system of the Crossref Labs API.Input FormatThe script expects an S3 folder that contains CSV files with Retraction Watch data.The CSV file should have the headings (with this capitalization):DOIRetractionDOIReasonRetractionNatureNotesURLSThe first row of the CSV should be the headings. Multiple entries are possible (e.g. an expression of concern and a retraction), but only one type of each, for each DOI, will be imported. (I.e. you cannot have two retractions or two expressions of concern.)IdempotencyThe script is idempotent. If you run it multiple times, it will only import new data and the results should be the same after multiple runs.ArchivingAfter processing a JSON input file, the script will move it to an archive folder in the same S3 bucket.Periodic Runs and Missing Input FilesThe script is designed to be run periodically. If it does not find any input files, it will raise an exception. This is by design.© Crossref 2023
Package: retracto
YouTube comment spam can take many forms. Major creators are often concerned about spam that impersonates them, promises viewers something good for messaging them, and then directs individuals off YouTube in some way to eventually scam them.Other spam comments can be less overtly malicious but still annoying or potentially harmful. YouTube does have many tools to combat spammy comments, and it removes a huge amount of them automatically.Retracto automatically identifies spam comments using Machine Learning and deletes them in a single command.The package contains the following commands:retracto login
retracto comment <video_id>
You have to start by logging into your google account by using retracto login and then use retracto comment <video_id> to strip down spam comments on your video.<video_id>: Go to your video on YouTube and copy the video id from the url(https://www.youtube.com/watch?v=<video_id>) and use it in the command.
Package: retratodefases
¿Qué es esto?La idea de este repositorio es crear una librería que contenga distintas clases para pintar retratos de fases de distintos sistemas (2D, 3D, ...), para poder realizar los mismos de manera sencilla, puesto que no encontré ninguna opción que pareciera relativamente sencilla para realizarlos.ContribuirElcódigoes abierto, todos podéis descargarlo y utilizarlo. Y también podéis contribuir si lo deseáis. Para ello, se puede hacer una de las siguientes opciones:Descargarse una rama del proyecto (fork), hacer una mejora y pedir su admisión a través de GitHub.Contactar por correo a778841@unizar.esAutoresVíctor Loras HerreroUnai Lería ForteaInstalaciónInstalación con pip:$ pip install retratodefasesInstalación con git:Abrir una terminal en el directorio deseado:$ git clonehttps://github.com/Loracio/retrato-de-fasesInstalación manual:Visita la página deretrato-de-fasesen github. Pulsar el botón verde con el textoCodigoy descargar en forma de zip.
Guardar y descomprimir el archivo en el directorio deseado.Ejemplos de usoejemplos.ipynb:Ejemplos para ver cómo se utilizan las clases de RetratoDeFases2D.ejemplosSliders.py:Contiene ejemplos de plots con sliders para retratos de fases 2D.ejemploTrayectoria.py:Contiene ejemplos de trayectorias 3D con y sin sliders.Instrucciones para utilizar la libreríaSimplemente, deberemos importar la librería:importretratodefasesfromretratodefasesimport*Esto importará las clases que debe usar el usuario, por el momento son:RetratoDeFases2DRetratoDeFases3DTrayectoria3DTodas ellas comparten un mismo tipo de primer argumento: una función que dadas unas coordenadas te devuelve la derivada de cada coordenada en ese punto.Función dFdefdF(x,y):returnexpresionX,expresionYTambién se pueden pasar variables extras en forma de diccionario. Por ejemplo para un oscilador armónico de frecuenciaw(con valor estandar 1):defoscilador(x,y,*,w=1):returnexpresionX,expresionYRetratoDeFases2Dclassretratodefases.RetratoDeFases2D(dF, RangoRepresentacion, *, LongitudMalla=10, dF_args={}, Densidad=1, Polar=False, **opciones)Permite representar un retrato de fases en dos dimensiones de una funcióndFde 2 parámetros obligatorios.RetratoDeFases3Dclassretratodefases.RetratoDeFases2D(dF, RangoRepresentacion, *, LongitudMalla=10, dF_args={}, Densidad=1, Polar=False, **opciones)Permite representar un retrato de fases en tres dimensiones de una funcióndFde 3 parámetros obligatorios.Trayectoria3Dclassretratodefases.Trayectoria3D(dF, *, RangoRepresentacion=None, dF_args={}, n_points=10000, runge_kutta_step=0.01, runge_kutta_freq=1, **opciones)Permite representar trayectorias tridimensionales de una funcióndFde 3 parámetros obligatorios.
Package: retries
# `retry` decorator[![Build Status](https://travis-ci.org/soasme/retries.png?branch=master)](https://travis-ci.org/soasme/retries)A dead simple way to retry your method.Through source code:git clone git://github.com/soasme/retries.gitcd retriespython setup.py installUsage:from retry import retry@retry(errors=(urllib2.URLError), tries=3, delay=3.5)def fetch_page():pass@retry(errors=(TTransportException, ), delay=0.1)def thrift_call():pass
Package: retrieve
retrieveNo-frills library to download pre-trained models, cache it and return the local path.Installationpipinstall-UretrieveMotivationWhen using pre-trained ML models in your projects, majority of them require you to manually download the data/model weights and then specify the path in your code. Everyone in your team has to go through the same trouble of manually setting this up before they can run your models.The idea with this library is automate this and make using pre-trained models as easy as possible.UsagePass the pre-trained model path to the retrieve.url(...) method and it will return you a filepath to the file. If the file is not already download, it is fetched and shows a progress of download.importretrieve# URL for the pre-trained modelpretrained_model_url='...'# Get local path to the pre-trained modelpath=retrieve.url(pretrained_model_url)If source is a zip file, it's automatically extracted out and the extracted folder path is returned.
Package: retrievepankey
Shortcut functions for coding and working with PAN devicesRetrieve PAN API key from file in user home directoryGet API key from .panconfkeystore file in user home directory.  Input file format has one entry per line.<apikey>:<ip>Code exampleimport retrievepankey
apikey = retrievepankey.read_key_file("192.168.1.1")Retrieve device info from file in user home directoryUse shortcut name in scripts to retrieve info about device.Will return device 'ip' field by defaultInput file format for 'fetch_deviceinfo_file()' is below.  The function reads in a YAML format from .pandevice file, in user home directory, by default.  All sub fields (serial, ip, type, etc) can be customized and returned.  If there is no match, the input string to the function is returned.DEMOFW1:
  serial: 09870100089
  ip: 192.168.50.100
  type: panos
  panorama: 192.168.100.100
  panorama2: 192.168.100.101
  hapair: 192.168.50.101
DEMOFW2:
  serial: 098001000597
  ip: 192.168.50.101
  type: panos
  panorama: 192.168.100.100
  panorama2: 192.168.100.101
  hapair: 192.168.50.101Code exampleimport retrievepankey

firewallip = retrievepankey.fetch_deviceinfo_file("DEMO-FW")
panoip = retrievepankey.fetch_deviceinfo_file("DEMO-FW", field='panorama')
Package: retrieveStack
Welcome to retrieveStack DocumentationretrieveStack is an analytical framework by resembling a feedforward neural network and using stacked generalization in multiple levels to improve accuracy in classification (or regression) problems.
In contrast to conventional feedforward neural-network-like stacked structures, retrieveStack gathers the information of models in all layers, choose good models from multiple layers by comparing to output layer, and combine them with output layer model to optimize final prediction. Below is the pictorial description of how retriveStack working:retrieveStack gives better prediction than the best single model contains in first layer. Please note its performance relies on a mix of strong and diverse single models in order to get the best out of this analytical frameworkQuick LinksGitHub HomepageOnline DocumentationPyPI downloadInstallIssue submit and feature requestAPI reference and source codeTutorialInstallretrieveStackis released on PyPI, so all you need is:$pipinstallretrieveStackTo upgrade to latest version:$pipinstall--upgraderetrieveStack
Package: retrival
我家还蛮大的, 欢迎你们来我家van.https://github.com/skykiseki/retrivalretrival关于bm25召回的包都是集成的, 太重了而且很慢, 所以自己写了个包用, 基于Numba加速会快很多完整文档见README.mdGitHub:https://github.com/skykiseki/retrival