Saravanan666/pypi-org huggingface dataset:
Package: tripleo-quickstart
tripleo-quickstartAn up-to-date HTML version is available ondocs.openstack.org.Release notes for the project can be found at:https://docs.openstack.org/releasenotes/tripleo-quickstart/One of the barriers to entry for trying out TripleO and its derivatives has
been the relative difficulty in getting an environment up quickly.This set of ansible roles is meant to help.Quickstart’s default deployment method uses a physical machine, which is
referred to as$VIRTHOSTthroughout this documentation. On this physical
machine Quickstart sets up multiple virtual machines (VMs) and virtual networks
using libvirt.One of the VMs is set up asundercloud, an all-in-one OpenStack cloud used
by system administrators to deploy theovercloud, the end-user facing
OpenStack installation, usually consisting of multiple VMs.You will need a$VIRTHOSTwith at least16 GBof RAM, preferably32
GB, and you must be able tosshto the virthost machine as root without a
password from the machine running ansible.  Currently the virthost machine must
be running a recent Red Hat-based Linux distribution (CentOS 7.x, RHEL 7.x).
Other distributions could work but will not be supported with out CI validation.NoteRunning quickstart.sh commands as root is not suggested or supported.The SSH server on your$VIRTHOSTmust be accessible via public keys for
both the root and stack users.A quick way to test that root to your virthost machine is ready to rock is:ssh root@$VIRTHOST uname -aThestackuser is not added until the quickstart deploy runs, so this cannot
be tested in advance.  However, if you lock down on a per-user basis, ensureAllowUsersincludesstack.Timeouts can be an issue if the SSH server is configured to disconnect users
after periods of inactivity.  This can be addressed for example by:ClientAliveInterval 120
ClientAliveCountMax 720The quickstart defaults are meant to “just work”, so it is as easy as
downloading and running thequickstart.shscript.CopyrightCopyright 2015-2016 Red Hat, Inc.Licensed under the Apache License, Version 2.0 (the “License”); you may
not use this file except in compliance with the License. You may obtain
a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: tripleo-repos
A tool for managing tripleo repos from places like RDO Trunk and Ceph.See:https://blogs.rdoproject.org/2016/04/newbie-in-rdo-2-rdo-trunk-from-a-bird-s-eye-view/Also ensures yum-plugin-priorities is installed since the RDO Trunk repos
require that to work sanely.NoteThe tool will remove any delorean* repos at the target location
to avoid conflicts with older repos. This means you must specify
all of the repos you want to enable in one tripleo-repos call.ExamplesInstall current master RDO Trunk repo and the deps repo:tripleo-repos currentInstall current-tripleo RDO Trunk repo and the deps repo:tripleo-repos current-tripleoInstall the current-tripleo-dev repo. This will also pull current and deps,
and will adjust the priorities of each repo appropriately:tripleo-repos current-tripleo-devInstall the mitaka RDO Trunk repo and deps:tripleo-repos -b mitaka currentWrite repos to a different path:tripleo-repos -o ~/test-repos currentInstall the current-tripleo, deps, and ceph repos. NOTE: The Ceph repo is
installed from a package and thus does not respect -o:tripleo-repos current-tripleo cephTripleOTo use this for TripleO development, replace the tripleo.sh –repo-setup
step with the following:git clone https://github.com/cybertron/tripleo-repos
cd tripleo-repos
sudo ./setup.py install
sudo tripleo-repos current-tripleo-dev cephNow you’re ready to install the undercloud:tripleo.sh --undercloudAnd to build images:export OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF="$(ls /etc/yum.repos.d/delorean* /etc/yum.repos.d/CentOS-Ceph-*)"
tripleo.sh --overcloud-imagesNoteThis is a tool for bootstrapping the repo setup for TripleO,
so it should not have any runtime OpenStack dependencies
or we end up in a chicken-and-egg pickle, and let’s be honest - no one wants a
chicken and egg pickle.
Package: tripleo-validations
A collection of Ansible roles and playbooks to detect and report potential
issues during TripleO deployments.The validations will help detect issues early in the deployment process and
prevent field engineers from wasting time on misconfiguration or hardware
issues in their environments.All validations are written in Ansible and are written in a way that’s
consumable by theValidation Framework Command Line Interface (CLI)or by Ansible directly.Free software: Apache licenseDocumentation:https://docs.openstack.org/tripleo-validations/latest/Release notes:https://docs.openstack.org/releasenotes/tripleo-validations/Source:https://opendev.org/openstack/tripleo-validationsBugs:https://storyboard.openstack.org/#!/project/openstack/tripleo-validations
Package: triple-quote-clean
triple-quote-cleantriple-quote-cleanUsageBasic UsageIndentationGuide CharactersJinja PipeTripleQuoteCleaner is a Python class that can be used to clean triple-quoted
strings in a variety of ways. It's designed to be used in cases where you want
to remove extraneous whitespace and/or add indentation to a triple-quoted
string. This is useful when dealing with extensions/code that require some
extraneous metadata in the string.To use TripleQuoteCleaner, simply import it into your Python script:fromtriple_quote_cleanimportTripleQuoteCleanerUsageBasic UsageTripleQuoteCleaner is designed to be used with the>>,<<,<>,**operators in Python. All the different operators were selected to allow for
flexibility when considering the operator order, i.e.**takes the highest
priority and should be used when adding stringsHere's an example:query="""--sqlselect *from some_database"""tqc=TripleQuoteCleaner()tqc.skip_top_lines=1output=query>>tqcIn this example, the >> operator is used to "pipe" the query string into tqc.
skip_top_lines is set to 1 so that the first line of the query (the "--sql"
line) is skipped. The output of this code will be:select*fromsome_databaseIndentationTripleQuoteCleaner can also be used to add indentation to a triple-quoted
string. Here's an example:input_string="""hello world"""tqc=TripleQuoteCleaner()output='\n'+input_string>>tqc.tabIn this example, tqc.tab is used to add one level of indentation to the output
string. The output of this code will be:hello worldGuide CharactersIndentation can also be specified using a "guide character". This is useful if
you want to maintain a certain level of tabs in all your paragraphs in your
triple-quoted string. Here's an example:query="""--sql$$select *from some_database"""tqc=TripleQuoteCleaner()tqc.skip_top_lines=1output=query>>tqcIn this example, tqc.guide_character is set to "$$" so that the 4 beginning
spaces will be maintained . The output of this code will be:select*fromsome_databaseJinja PipeA jinja pipe is a simple wrapper over a jinja string render. For exampletqc=TripleQuoteCleaner(skip_top_lines=1)(JinjaPipe(columns=["hello","these","are","some","columns"])<<tqc**"""--sqlselect{% for item in columns %}{% if loop.last%}nvl({{item}}, -1){% else %}nvl({{item}}, -1),{% endif %}{% endfor %}fromsome.table""")will produceselecthello,these,are,some,columns,worldfromsome.table
Package: triplerecovery
triple-recoveryA paper implementation in numpy pythonRequirementsPython >= 3.7Installationpip3installtriplerecoveryAuto Installednumpy >=1.22.4opencv-python >=4.6.0.66UsageEmbeddingimportcv2importtriplerecoveryastrir# image can be rgb or grey# grey must have two dimetions so add cv2.# if you know the image is grey then use cv2.IMREAD_GRAYSCALEimarr=cv2.imread("<your image path>")embeded_image=trir.embed(imarr).imarrRecoveryimportcv2importtriplerecoveryastririmarr=cv2.imread("<your embeded image path>")recovered_image=trir.recover(imarr).imarr# OR for changed interpolationrecovered_image=trir.recover(imarr,interpolation=cv2.INTER_CUBIC).imarr
Package: triplerecovery2
triple-recoveryA paper implementation in numpy pythonRequirementsPython >= 3.7Installationpip3installtriplerecoveryAuto Installednumpy >=1.22.4opencv-python >=4.6.0.66UsageEmbeddingimportcv2importtriplerecoveryastrir# image can be rgb or grey# grey must have two dimetions so add cv2.# if you know the image is grey then use cv2.IMREAD_GRAYSCALEimarr=cv2.imread("<your image path>")embeded_image=trir.embed(imarr).imarrRecoveryimportcv2importtriplerecoveryastririmarr=cv2.imread("<your embeded image path>")recovered_image=trir.recover(imarr).imarr# OR for changed interpolationrecovered_image=trir.recover(imarr,interpolation=cv2.INTER_CUBIC).imarr
Package: triplets
RDF parser:Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)The solution does not care about CIM version nor namespacesInput files can be xml or zip files (containing one or mutiple xml files)All files are parsed into one and same Pandas DataFrame, thus if you want single file or single data model, you need to filter on INSTANCE_ID columnTo get started:importpandasfromtripletsimportrdf_parserpath="CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"data=pandas.read_RDF([path])Result:You can then query a dataframe of all same type elements and its parameters across all [EQ, SSH, TP, SV etc.] instance files, where parameters are columns and index is object ID-sdata.type_tableview("ACLineSegment")Look into examples folders for more
Package: triple-walk
A simple algorithm to learn embeddings of entities in knowledge graph.What is itTripleWalk is an algorithm to learn vector embeddings of entities in a knowledge graph by performing random walks on triples.InstallationPlease not this package is only available for python 3.8+ and Pytorch >= 1.9.0Install from PyPIpipinstalltriple-walkInstall from Githubpipinstallgit+https://github.com/udel-cbcb/triple_walk.git#egg=triple_walkTriple WalkAuthor : Sachin GavaliRequirements1. Pytorch >= 1.9.0
2. NVIDIA-GPU (Cuda Toolkit >= 11.4
3. AMD-GPU (ROCM == 4.0.1)
4. Python == 3.8ExamplesSkipGram Triple Walk model :SkipGramTripleCBOW Triple Walk model :CBOWTriple
Package: triplex
TripleXExplaining models, with triplesTriplex is a local explainability method to explain transformer models by creating small knowledge graphs in the form of triplets.
This implementation focuses on explaining predictions on NLI (natural language inference) tasks.
Explanations are provided asdfas.DFAH(Deterministic Finite state Automata of Hypernyms).importpathlibimportcopyimportjsonfromdfasimportDFAH# base pathBASE_PATH=str(pathlib.Path().absolute())+'/'# Load a sample DFAHdfah=DFAH.from_json(BASE_PATH+'data/dummies/dfah.json')# Show a DFAH visuallyprint(dfah)# access the perturbations it went throughperturbations=dfah.perturbations# dfah are copy-able and serializablecopy_dfah=copy.copy(dfah)withopen('data/dummies/my_dfah.json')aslog:json.dump(dfah.to_json(),log)Getting startedInstall dependencies:pipinstalltriplex

python-mremote.pydownloaden_core_web_smRunfromtransformersimportAutoModelimportlogzerofromtriplex.tripleximportTripleX# logging level, set to logging.DEBUG for verbose outputlogzero.loglevel(logzero.logging.INFO)model='microsoft/deberta-base'model=AutoModel.from_pretrained(model,output_attentions=True)# create explainerexplainer=TripleX(model)premise='Dana Reeve, the widow of the actor Christopher Reeve, has died of lung cancer at age 44, according to the Christopher Reeve Foundation.'hypothesis='Christopher Reeve had an accident.'dfas,counterfactual_dfas=explainer.extract(premise,hypothesis,depth=2,max_perturbations_per_token=3)print('--- Explanations')fordindfas[:3]:print(str(d))fordincounterfactual_dfas[:3]:print(str(d))To run on a local JSONL dataset:fromtransformersimportAutoModelimportpandasaspdfromscripts.extract_from_datasetimportto_standard_labelsfromtriplex.tripleximportTripleXdataset='path/to/dataset.jsonl'data=pd.read_json(dataset,lines=True)data=data.drop('idx',axis='columns')data['label']=to_standard_labels(data['label'].values,dataset)data=data[['premise','hypothesis','label']]model=AutoModel.from_pretrained('microsoft/deberta-base',output_attentions=True)explainer=TripleX(model)explanations=list()foridx,rowindata.iterrows():premise,hypothesis,label=row.premise,row.hypothesis,row.labeldfas,counterfactual_dfas=explainer.extract(premise,hypothesis,depth=2,max_perturbations_per_token=3)explanations.append((premise,hypothesis,label,dfas,counterfactual_dfas))
Package: tripper
TripperTriplestore wrapper for Python providing a simple and consistent interface to a range of triplestore backends.Basic conceptsTripper provides a simple and consistent interface to a range of triplestore backends.
It strives for simplicity and is modelled afterrdflib(with a few simplifications).In Tripper:All IRIs are represented by Python strings.
Example:"http://emmo.info/emmo#Atom"Blank nodes are strings starting with "_:".
Example:"_:bnode1"Literals are constructed withtripper.Literal.
Example:tripper.Literal(3.14, datatype=XSD.float)To make it easy to work with IRIs, provide Tripper a set of pre-defined namespaces, likeXSD.float.
New namespaces can be defined with thetripper.Namespaceclass.A triplestore wrapper is created with thetripper.Triplestoreclass.Advanced featuresThe submodulesmappingsandconvertprovide additional functionality beyond interfacing triplestore backends:tripper.mappings: traverse mappings stored in the triplestore and find possible mapping routes.tripper.convert: convert between RDF and other data representations.DocumentationGetting started: See thetutorialDiscovery of custom backendsReference manualInstallationTripper has by itself no dependencies outside the standard library, but the triplestore backends may have specific dependencies.The package can be installed fromPyPIusingpip:pipinstalltripperLicense and copyrightAll files in this repository are licensed under theMIT license.
If not stated otherwise in the top of the files, they have copyright © 2022
SINTEF.
Package: triprint
This package can be used for getting desired number of row star traiangle in up or down direction by giving an input for the desired number of rows.UseFor example if you want to get a 5 row star triangle in upward direction. Then you can simply code it as,import triprinttriprint.pstar(5,1)First input will give the number of rows and second input is the boolean 0 or 1, 0 for down triangle and 1 for upper triangle.Attributepstar('Number of rows in int','0 or 1')  # For printing triangles made up of '*'phash('Number of rows in int','0 or 1')  # For printing triangles made up of '#pdoller('Number of rows in int','0 or 1')  # For printing triangles made up of '$'pat('Number of rows in int','0 or 1')  # For printing triangles made up of '@'
Package: trips
I may not have gone where I intended to go, but I think I have ended up where I needed to beFeaturesTODOInstallation$pipinstalltrips✨🍰✨Usage$trips<from><to>Go somewhere nice!See alsotrips--help.User TestimonialsUnknown, former unknownist—Without trips my life would be incomplete.Inspirationruter-cli- a Ruter command line interface written in Node.jsvbb-cli- a CLI for Berlin & Brandenburg public transporttramz- A CLI client for public transit in Sweden
Package: tripsim
tripsimDriving trip simulator for building a series of coordinates that can be used for testing telematics systems.:warning: This is quite a simplified implementation that should not be used for anything beyond simple load testing or distance calculations.Getting StartedCurrenlty, only python versions 3.9+ are supported.pip install tripsimSimulating a TripHere we will simulate driving and plotting the points taken from one random point to another in a city.fromtripsimimportsimulate_trip# other imports for this exampleimportmatplotlib.pyplotaspltfromshapely.geometryimportLineStringimportosmnxasoxdefmain():# Get the graph of the city of Corkgraph=ox.graph_from_place('Cork City, Ireland',network_type='drive')# the simulated trip will return a list of points# each point has a latitude and longitude, along with a timestamp (in seconds)trip=simulate_trip(graph)# adjust your styling accordingly_,ax=ox.plot_graph(graph,dpi=180,node_color='green',node_size=1,node_alpha=0.1,node_edgecolor='white',node_zorder=5,edge_color='white',edge_linewidth=2,edge_alpha=0.1,show=False,close=False)# the points are a dataclass with a few convenience methodscoords=[(point.get_lat(),point.get_lon())forpointintrip]# here we are setting the list of coords as a LineString# for easy plottingcoords_graph_line=LineString(coords)x,y=coords_graph_line.xyax.plot(x,y,'-o',color='red',markersize=3,alpha=0.7,zorder=1)plt.show()if__name__=='__main__':main()The created trip should look something like this when plotted.Handling PointsA trip is just a list ofPointinstances, which represent a point on the earth's surface. ThePointdataclass gives you a few convenience methods.fromtripsimimportPointimporttime# create a pointpoint=Point(lat=-33.8670522,lon=151.1957362)# x = longitude# y = latitudeassertpoint.lat==-33.8670522assertpoint.lat==point.yassertpoint.lon==151.1957362assertpoint.lon==point.xassertpoint.xy==(151.1957362,-33.8670522)# you can add timestamps to Points to replicate# collecting GPS data on an intervalpoint.set_timestamp(time.time())# you can create new Points relative to this one# new point 1km northpoint_2=point.next_point(distance=1,bearing=0)# inequality works on points lat/lonassertpoint!=point_2assertpoint.distance_to(point_2)==1.0assertpoint.bearing_to(point_2)==0.0
Package: tripteki-pylint
ConventionTrip Teknologi's Codebase Convention.Getting StartedInstallation :$ python3 -m pip install --user tripteki-pylintHow to use :Publishpylintrcfile in the root of your project's directory with running :tripteki-pylintUsagepython3 -m pylint --recursive=y .AuthorTrip Teknologi (@tripteki)Hasby Maulana (@hsbmaulana)
Package: tri-py
tripyA package for efficient[^1] likelihood evaluation and sampling for Multivariate Normal distributions where the covariance matrix:Is Separable, i.e. can be expressed as theKronecker productof the covariance over different dimensions (e.g. space and time);May have Exponential correlation (i.e.(block-) tridiagonalprecision matrix) in one or more dimensions;Is polluted with uncorrelated scalar or vector noise.[^1]: In the general case, exact likelihood evaluation hasO(N3)computational complexity andO(N2)memory requirements. The term "efficient" is used here to refer to the reduction of complexity and memory usage by utilizing the sparsity and Kronecker product structure of the covariance matrix.Structurebase: Base class for problem formulation, taken fromtaralli. Likely to be removed in a future update.utils: Utility functions for efficient linear algebra invovling tridiagonal and Kronecker product matrices.loglikelihood: Functions for efficient loglikelihood evaluation.kernels: Formulation of commonly used kernels.sampling: Functions for efficient sampling.UsageTODOsValidation of all functions against reference implementations.Documentation, including examples and timing tests.Unit and integration testing.Improve this README by including mathematical notation and references.
Package: triq
triqUsetrioasync framework
with PyQt5/PySide2CautionThis is an alpha-quality software.How to...importtriqimporttrioasyncdefsome_async_func(message):awaittrio.sleep(0.5)print(message)app=QApplication([])hitme=QPushButton('Hit me')hitme.clicked.connect(lambda:triq.call_async(some_async_func,'hello, world!'))hitme.show()bye=QPushButton('Bye')bye.clicked.connect(triq.exit)bye.show()triq.run(app)The above should work in PyQt5 and PySide2
Package: tris
TrisThis repository comprises the codebase for our paper, "An Automated Screening System for Trinary Star System Candidates",
that has been submitted toPhysica Scripta.Trisis an open-source tool that offers a specialized method to determine "observed-minus-computed" (OC) diagrams from
astronomical flux time series data (lightcurves) obtained from NASA's Kepler and K2 missions.Here is a brief outline of the algorithm:Diagram of Algorithm.Basic Guide to Codebasedatagen- Contains the data generation and acquisition scheme to get the files indata.docs- Contains the documentation code for the codebase.notebooks- Notebooks to test our code and visualise them, and also to give examples of usagepipelining- Older versions ofdatagen.old- Older versions oftris. Also contains logbooks of our work.tris- Currently contains (early-stage) versions of our improved library code that will later be deployed on PyPI.manual_classification.xlsx- Post Algorithm Manual Classification done by us.Do note that in our codebase, you will see references to adata/folder. This folder contains the acquired.fitsfiles that contain the light curves for all objects classified as EBs. You can install this by runningdatagen/load.sh.DocumentationRead the documentation athttps://three-body-analysis.github.io/codebase/.Setup and InstallationInstalling from PyPIYes, we have publishedtrison PyPI! To installtrisand all its dependencies, the easiest method would be to usepipto query PyPI. This should, by default, be present in your Python installation. To, install run the following
command in a terminal or Command Prompt / Powershell:$pipinstalltrisDepending on the OS, you might need to usepip3instead. If the command is not found, you can choose to use the
following command too:$python-mpipinstalltrisHere too,pythonorpipmight be replaced withpyorpython3andpip3depending on the OS and installation
configuration. If you have any issues with this, it is always helpful to consultStack Overflow.Installing from SourceTo install from source, you need to get the following:GitGit is needed to install this repository. This is not completely necessary as you can also install the zip file for this
repository and store it on a local drive manually. To install Git, followthis guide.After you have successfully installed Git, you can run the following command in a terminal / Command Prompt etc:$gitclonehttps://github.com/three-body-analysis/codebase.gitThis stores a copy in the foldercodebase. You can then navigate into it usingcd codebase.PoetryThis project can be used easily via a tool know as Poetry. This allows you to easily reflect edits made in the original
source code! To installpoetry, you can also install it usingpipby typing in the command as follows:$pipinstallpoetryAgain, if you have any issues withpip, check outhere.After this, you can use the following command to install this library:$poetryinstall
Package: trisdb-py
trisdb-py=========The Python interface to TrisDb### Installation```sudo pip install trisdb-py```### Usage```python>>> from trisdb import *>>> # Connect and insert some data>>> db = TrisDbConnection('localhost', 1205)>>> db.create('Alice', 'loves', 'pizza')>>> db.create('Kate', 'likes', 'football')>>> # Print all records>>> result = db.get('*')>>> for i in result:>>>    print i['subject'] + '-' + i['predicate'] + '-' + i['object']>>> # Who likes football?>>> result = db.gets('*', 'likes', 'football')>>> for i in result:>>>    print i>>> # Batch insert using MULTI>>> m = db.multi()>>> for i in range(0,10):>>>     m.create('key'+str(i), 'value', 'value'+str(i))>>> db.execute(m)>>> # Clear all data from DB and close connection>>> db.clear()>>> db.close()```