Saravanan666/pypi-org huggingface dataset:
Package: trnslator
[![Build Status](https://travis-ci.com/louisleroy5/trnslator.svg?token=qpRnYhTVUeLJ5WM1w9Wx&branch=master)](https://travis-ci.com/louisleroy5/trnslator)
[![Coverage Status](https://coveralls.io/repos/github/louisleroy5/trnslator/badge.svg?branch=develop&t=PLPFwA)](https://coveralls.io/github/louisleroy5/trnslator?branch=develop)
[![Documentation Status](https://readthedocs.org/projects/trnslator/badge/?version=latest)](https://trnslator.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)# Trnslatorpython for converting building simulation archetypesConvert IDF file (EnergyPlus) to BUI file (TRNBuild)## Overview** Trnslator** is a Python package that helps converting building archetypes. The public feature released in this
version is the  conversion of [EnergyPlus](https://energyplus.net) IDF models to Trnsys [TrnBuild](http://www.trnsys.com/features/suite-of-tools.php.html) Models (compatible with the multizone building model). For a list of features
currently in development see the [In development](#in-development) section.## AuthorsThis work is developed by a small team of building energy simulation enthusiastsLouis Leroy, Master Student at Polytechnique Montréal (Corresponding Author)Samuel Letellier-Duchesne, PhD Candidate at Polytechnique Montréal
Package: trogon
TrogonAuto-generate friendly terminal user interfaces for command line apps.🎬 Video demonstrationA quick tour of a Trogon app applied tosqlite-utils.https://github.com/Textualize/trogon/assets/554369/c9e5dabb-5624-45cb-8612-f6ecfde70362Trogon works with the popularClicklibrary for Python, but will support other libraries and languages in the future.How it worksTrogon inspects your (command line) app and extracts aschemawhich describes the options / switches / help etc.
It then uses that information to build aTextualUI you can use to edit and run the command.Ultimately we would like to formalize this schema and a protocol to extract or expose it from apps.
This which would allow Trogon to build TUIs for any CLI app, regardless of how it was built.
If you are familiar with Swagger, think Swagger for CLIs.ScreenshotsWhy?Command line apps reward repeated use, but they lack indiscoverability.
If you don't use a CLI app frequently, or there are too many options to commit to memory, a Trogon TUI interface can help you (re)discover options and switches.What does the name mean?This project started life as aTextualexperiment, which we have been giving give bird's names to.
ATrogonis a beautiful bird I was lucky enough to photograph in 2017.See alsoFrogmouth, a Markdown browser for the terminal.RoadmapTrogon is usable now. It is only 2 lines (!) of code to add to an existing project.It is still in an early stage of development, and we have lots of improvements planned for it.InstallingTrogon may be installed with PyPI.pipinstalltrogonQuickstartImportfrom trogon import tuiAdd the@tuidecorator above your click app. e.g.@tui()@click.group(...)defcli():...Your click app will have a newtuicommand available.See also theexamplesfolder for two example apps.Custom command name and custom helpBy default the command added will be calledtuiand the help text for it will beOpen Textual TUI.You can customize one or both of these using thehelp=andcommand=parameters:@tui(command="ui",help="Open terminal UI")@click.group(...)defcli():...Follow this projectIf this app interests you, you may want to join the TextualDiscord serverwhere you can talk to Textual developers / community.
Package: troika
TroikaSubmit, monitor and kill jobs on local and remote hostsRequirementsPython 3.8 or higherpyyaml(https://pypi.org/project/PyYAML/)For testing:pytest(https://pypi.org/project/pytest/)For building the documentation:sphinx(https://www.sphinx-doc.org)Installingpython3 -m venv troika
source troika/bin/activate
python3 -m pip install troikaRunning the testsOnce Troika is installed in your environment, the tests can be run usingpytest:python3 -m pytest -v tests/Building documentationThe documentation usessphinx. To generate the HTML docs:cd docs/
make htmlPresentationSlides and recording of the"Troika: Submit, monitor, and interrupt jobs on any HPC system with the same interface"talk atFOSDEM'23are available viahttps://fosdem.org/2023/schedule/event/troika_hpc_jobs.Getting startedConceptsTroika holds a list ofsitesonto which jobs can be submitted. A site is
defined by two main parameters: aconnection type(localorssh), and asite type(e.g.directorslurm). Every site is identified by a name
given in the configuration file.Example configuration file---sites:localhost:type:direct# jobs are run directly on the targetconnection:local# the target is the current hostremote:type:direct# jobs are run directly on the targetconnection:ssh# connect to the target via sshhost:remotebox# ssh hostcopy_script:true# if false, the script will be piped through sshat_startup:["check_connection"]slurm_cluster:type:slurm# jobs are submitted to Slurmconnection:ssh# connect to the target via sshhost:remotecluster# ssh hostcopy_script:true# if false, the script will be piped through sshat_startup:["check_connection"]pre_submit:["create_output_dir"]at_exit:["copy_submit_logfile"]pbs_cluster:type:pbs# jobs are submitted to PBSconnection:ssh# connect to the target via sshhost:othercluster# ssh hostcopy_script:true# if false, the script will be piped through sshat_startup:["check_connection"]pre_submit:["create_output_dir"]at_exit:["copy_submit_logfile"]The configuration can be checked using thelist-sitescommand:$ troika -c config.yml list-sites
Available sites:
Name                         Type            Connection
------------------------------------------------------------
localhost                    direct          local
remote                       direct          ssh
slurm_cluster                slurm           ssh
pbs_cluster                  pbs             sshAvailable options$ troika --helpMain commandsSubmit a job oncluster:$ troika -c config.yaml submit -o /path/to/output/file cluster job.shQuery the status of the job:$ troika -c config.yaml monitor cluster job.shKill the job:$ troika -c config.yaml kill cluster job.sh
Package: troj
TrojAI Integration PackageTrojAI provides the troj Python convenience package to allow users to integrate TrojAI adversarial protections and robustness metrics seamlessly into their AI development pipelines.InstallationRun the following to install:pipinstalltroj["dev"]pipinstalltroj["nlp"]pipinstalltroj["cv"]UsageThe troj package has support for Image Classification and Object Detection tasks. The notebooks in the demos folder contain examples to get set up on either task using PyTorch or TensorFlow (limited support for now). The test_troj.py file also contains our tests that run on deployment and could also be helpful for understanding our API better.One more thing is that our package expects specific data formats for now until we can support more formats.
The two formats are described by the following:'''ImageNet folder style (Image Classification):/train----/class1----/class2.../test----/class1----/class2...etcCoCo annotation style (Object Detection):/images----image1.jpg----image2.jpg...etcannotation.json'''ExamplesExample notebooks for many use cases are contained in the demos folder. If there are errors in the notebook, cross reference the syntax with test_troj.py, the tests will always contain the most updated working version of our packages and the notebooks may lag a bit.Command Line ToolTroj package use via command line is currently in development. After package install the command line tool can be accessed through the command "troj" which currently takes two arguments, an attacking config file and a user config file to authenticate with our AWS infrastructure. The command line files can be found under trojai/cmd. If you want to run the NLP demo we currently have setup, try out the following command:troj --c "trojai\cmd\example.json" --a "trojai\cmd\user-config.json"How to develop locally (MOSTLY INTERNAL ONLY)Here are three commands to run after cloning the repo to install the cloned version to your environment (changes in code will be reflected immediately if using this).pip install wheel
python setup.py bdist_wheel
pip install -e.[dev]How to build and upload to pypi (INTERNAL ONLY)Build the package under dist folder using this, will create tar.gz and .whl for version id in setup.py:python -m buildUpload it to testpypi repo using this (remove --repository flag to go live, make sure dist only has the files you expect):Dev Package:
    python -m twine upload --repository testpypi dist/*
prod package:
    python -m twine upload dist/*When install from testpypi repo you need this format: pip install --extra-index-urlhttps://test.pypi.org/simple/package_name_herehttps://stackoverflow.com/questions/51589673/pip-install-producing-could-not-find-a-version-that-satisfies-the-requirement- otherwise dependency packages wont be looked for on live pypi
Package: trojai
OverviewThis is the top-level TrojAI module.  It contains two submodules:datagenandmodelgen.datagencontains the necessary API functions to quickly generate synthetic data that could be used for training machine learning models. Themodelgenmodule contains the necessary API functions to quickly generate DNN models from the generated data.Getting StartedCheck out our documentation here:https://trojai.readthedocs.io, and our arXiv article here:https://arxiv.org/abs/2003.07233Repository Organizationtrojai
|   setup.py - Script to install trojai module into Python environment
|   requirements.txt - A list of Python dependencies for pip
│   developers - information for developers
│   scripts
    └───datagen - integration scripts showcasing datagen API functionality
    └───modelgen - integration scripts showcasing modelgen API functionality
└───trojai - top level Python module
    └───datagen - data generation submodule
    └───modelgen - model generation submodule
    └───test - top level scripts directory
        └───datagen - contains unittests for the datagen submodule
        └───modelgen - contains unittests for the modelgen submoduleAcknowledgementsThis research is based upon work supported in part by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA). The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
Package: trojai-rl
OverviewThis is the top-level TrojAI RL module.  It contains two submodules:datagenandmodelgen.datagencontains the reinforcement learning (RL) environments used to generate trojaned models. Themodelgenmodule contains the necessary API functions to generate DRL models from RL environments.Getting StartedCheck out our documentation here:https://trojai.readthedocs.ioThis package is designed to be installed viapip, i.e.pip install trojai_rlor by cloning the repository and performing a local install (link may need to be updated):git clone https://github.com/trojai/trojai_rl.git
cd trojai_rl
pip install .Note that thegympackage may require some additional dependencies and support for Windows is still experimental. See:https://github.com/openai/gymfor additional details.Repository Organizationtrojai_rl
|   setup.py - Script to install trojai_rl module into Python environment
|   requirements.txt - A list of Python dependencies for pip
│   developers - information for developers
|   notebooks - A directory for Jupyter notebooks with example code
│   scripts - integration scripts showcasing API functionality
└───trojai - top level Python module
    └───datagen - submodule with implemented RL environments
    └───modelgen - model generation submodule
    └───test - top level scripts directory
        └───datagen - contains unittests for the datagen submodule
        └───modelgen - contains unittests for the modelgen submoduleAcknowledgementsThis research is based upon work supported in part by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA). The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
Package: trojai-sdk
trojai-sdkTrojAI's SDK and command line interface. This tool is used for submitting and monitoring jobs for evaluation by the TrojAI engine.UsesCommand Line FunctionsIMPORTANT: We've updated our authentication methods! Older auth configs required an id_token key and a refresh_token key. These keys are no longer required and should be removed from auth configs going forward. The only key required moving forward is the api_key.The behaviour for submitting jobs using the command line is as follows:Submit a valid configtsdk-cpath/to/config.jsonThe following arguments are intended to be used together to download failed results of a given job. Any feedback on this feature is appreciated!Download failed samples from a given runtsdk-dl_fails-job_name"trojeval-tabular-24052023-142652-850205"-auth_config".\trojsdk\examples\auth_config_dev.json"-save_path"./failed_samples.json"job_name: Can be found by using kubectl get pods. K8s creates the pods with an extra tag at the end, be sure to remove the randomly generated characters that prevent pod collisions.Example:
k8s pod name: trojeval-tabular-25052023-170036-121934-tknf5
valid job name: trojeval-tabular-25052023-170036-121934Copy the job name of the evaluation when completed. You can also find the job name by clicking the Status column link in the front end project view for any run.
auth_config: A path to a valid auth config for your cluster. Valid endpoint and api key are required
save_path: where the resulting json file will be saved toProgrammatic FunctionsWe've added a more programmatic version of the config builder to be used in any python script.
This TrojExperimenter is designed to be an aggregator for your trojai config files, and configs can be swapped in code instead of manually modifying json files.A test example is detailed below:conf_handler=TrojExperimenter("./trojsdk/examples/auth_config_dev.json")proj="test_proj"dataset="credit_dataset"model="logistic_model"conf_handler.create_experiment(proj,dataset,model,delete_existing=True)conf_handler.log_testing_data(path_to_dset_file="s3://trojai-object-storage/stars_tabular/stars_validation.csv",label_column="Type",classes_dictionary={"red dwarf":0,"brown dwarf":1,"white dwarf":2,"main sequence":3,"super giants":4,"hyper giants":5})conf_handler.log_model(model="s3://trojai-object-storage/stars_tabular/StarKNNPipe.pkl",model_wrapper_file="s3://trojai-object-storage/stars_tabular/StarKNNWrapper.py")conf_handler.log_attacks("./trojsdk/examples/star_attacks.json")conf_handler.log_docker_metadata("trojai/troj-engine-base-tabular:tabular-dev-latest","trojaicreds","IfNotPresent")k8s_dict={"container_port":80,"resources":{"requests":{"cpu":"250m","memory":"800M"},"limits":{"cpu":"500m","memory":"2000M"}},"tolerations":[{"effect":"NoSchedule","operator":"Equal","value":"robustness-evaluation","key":"dedicated"}]}conf_handler.log_k8s_metadata(k8s_dict)conf_handler.construct_base_config(task_type="tabular")tjh=conf_handler.run_troj_evaluation(proj,dataset,model,no_ssl=True)ConfigFor examples and explanations on creating valid your config files, please visit our gitbook.Intro to TrojAINLPTabular
Package: trojan-rabbit
The Trojan RabbitA collection of python extras (and an hommage to Monty Python's Holy Grail)Decorator @dynamicmethodThis decorator provides the missing option for method definitions:| decorator           | 1st parameter passed when called from |
|                     | instance / class                      |
|---------------------+---------------------------------------|
| - (instance method) | instance / None                       |
| @classmethod        | class    / class                      |
| @staticmethod       | -        / -                          |
| @dynamicmethod      | instance / class                      |Usagefromtrojan_rabbit.dynamicmethodimportdynamicmethodclassKnight:description="a knight of the Round Table"def__init__(self,name,attribute):self.name=nameself.attribute=attribute@dynamicmethoddefwhoami(caller):ifisinstance(caller,Knight):print(f"{caller.attribute.capitalize()}Sir{caller.name}",end=', ')print(caller.description)robin=Knight("Robin","brave")Knight.whoami# output: <bound method Knight.whoami of <class '__main__.Knight'>>robin.whoami# output: <bound method Knight.whoami of <__main__.Knight object at 0x7f377073fe50>>Knight.whoami()# output: a knight of the Round Tablerobin.whoami()# output: Brave Sir Robin, a knight of the Round Table
Package: trojanzoo-sphinx-theme
TrojanZoo Sphinx ThemeSphinx theme forTrojanZoo Docsbased on theRead the Docs Sphinx Theme. Forked fromPytorch Sphinx Themewith commitb4d0005at 09/24/2021.Difference from pytorch_sphinx_themeThis work removes all pytorch-related things and support many customizations. It also removes all other unnecessary items to make it a pure doc template.See demos at:https://ain-soph.github.io/trojanzoo_sphinx_theme/https://ain-soph.github.io/alpsplot/https://ain-soph.github.io/trojanzoo/Local DevelopmentRun python setup:git clone https://github.com/ain-soph/trojanzoo_sphinx_theme
pip install -e trojanzoo_sphinx_themeand install the dependencies usingpip install -r requirements.txtIn the root directory install thepackage.json:# node version 8.4.0
yarn installIf you havenpminstalled then run:npm installRun grunt to build the html site and enable live reloading of the demo app atlocalhost:1919:grunt
Package: trojsten_judge_client
Client for Trojsten Judge System.Usagefromjudge_client.clientimportJudgeClientjudge_cient=JudgeClient(tester_id,tester_url,tester_port)judge_client.submit(submit_id,user_id,task_id,submission_content,language)Installationpip install trojsten-judge-clientCompatibilityPython 2.7Python 3.6Python 3.7LicenceMITAuthorsMichal Hozza <mhozza@gmail.com>.
Package: trolldb
TrollDBJust a simple json database project made by Walter.InstallingYou need cryptography to use trolldb.pip install --upgrade trolldbExample codeimport trolldb


database = trolldb.Database(trolldb.key_by_filename('key.trolldb')) # new database
print('Doing database on {0}'.format(database.getfilename())) 

v = str(1)
database.add(v, '{0}'.format(v)) # sets variable in the database
print(database.get(v)) # get variable 
print(database.getplainjson()) # prints the whole jsonGetting 'key'Trolldb will write your key into file called "key.trolldb"import trolldb
trolldb.genkey()Creating new database (or load existing database)import trolldb
database = trolldb.Database("yourkeyhere")Creating or changing a variable's valuedatabase.add("varname", "value")Deleting variabledatabase.remove("varname")Using tablesnote: Tables aren't finished yet.Creating a new table (or load an existing table)import trolldb
database = trolldb.Database("yourkeyhere")
table = trolldb.Table.new(database, "tablename")Adding an element into the table (or changing an existing element)table.add("elemname", "value")Getting element valuetable.get("elemname")Deleting elementtable.remove("elemname")
Package: trolley
Trolley syncs issues from CSVs to Github and to sync projects between
Github and Trello.Trolley is a useful tool for loading an initial set of issues, labels,
and milestones on github.Trolley was written to also help me manage a few projects where I need
to selectively sync Issues and boards between Trello and Github.By Roland zh (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia CommonsInstallation$pipinstalltrolleyUsageExample trolley.ymlgithub:username:'username'password:'password'org:'github'repo:'gitignore'trello:app_key:'get-this-from-trello'app_secret:'get-this-from-trello'auth_token:'get-this-from-trello'board_id:'your-board-id-sha'default_list:'Uncategorized'Usage$trolley--conftrolley.yml--help$trolley--conftrolley.ymlcreate_github_issuesCommandsbootstrapSets up github with some sensible defaults.close_existing_github_issuesClose all existing GitHub issues.create_github_issuesCreate GitHub issues from a CSV file.create_github_labelsCreate GitHub labels from a CSV file.create_github_milestonesCreate GitHub milestones from a CSV file.create_trello_cardsCreate Trello cards from a CSV file.create_trello_labelsCreate Trello labels from a CSV file.create_trello_listsCreate Trello lists from a CSV file.delete_existing_github_labelsDelete labels from GitHub repo.delete_existing_github_milestonesDelete milestones from GitHub repo.sync_github_issues_to_trello_cardsConvert your GitHub issues to Trello cards.sync_trello_cards_to_github_issuesConvert your Trello cards to GitHub issues.Object OverviewGithubTrelloNotesOrg / RepoBoard==IssuesCards==LabelsLabels==MilestonesListsMilestones and Lists may be mapped together but they are fundamentally
treated very differently.Future featuresNeeds allowed list / blocked list for handling via labels.This is basically “works for me” but it needs error handling.InspirationThis project shares ideas from the following projects:The CSV bits via:https://github.com/nprapps/app-template
Package: trollformatter
Trollformatter: Troll your fellow devs and compsci teachersEver wanted to troll someone by formatting your C/C++/Java code like this?Well now you can.What is this?Trollformatter is a formatter inspired by the image above. It basically moves all your semicolons,
braces, etc. to the edge of the file to make it appear to not have semicolons or braces. The
generated code looks much cleaner (/s), and still runs the same as the original file.DISCLAIMER: DO NOT USE THIS IN ANY KIND OF PRODUCTION ENVIRONMENT. THE TROLLFORMATTER PROGRAM
IS IN ALPHA AND IS NOT GUARANTEED TO WORK PROPERLY AT ALL TIMES. THE DEVELOPERS OF THIS
PROGRAM ARENOTRESPONSIBLE IF YOU LOSE YOUR JOB OR GET A FAILING GRADE BECAUSE
YOU USED THIS.How do I run Trollformatter?HEADS UP! Trollformatter is now available on PyPI!To install via PyPI (recommended):Get Python.Get thepippackage manager.Runpip3 install trollformatter.To install via source (for development or latest version):Get Python.Runpython3 setup.py install. (you may needsudoor--user).To run:Get your code.Runtrollformatter file.java(or.cor.cpp)Check thefile_troll.javafile. If you are satisfied
with the result, you may remove the original and rename this
one.Watch your compsci teacher explode.Sounds interesting. How can I contribute?If you want to help out the trollformatter project,
check out the issues board on Gitlab (or test the program
and log undiscovered issues). You can assign an
issue to yourself, fork the project, and send
in a merge request when you're ready to merge your
code.