text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# 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 cop... | AdaMix/examples/research_projects/movement-pruning/masked_run_glue.py/0 | {
"file_path": "AdaMix/examples/research_projects/movement-pruning/masked_run_glue.py",
"repo_id": "AdaMix",
"token_count": 18214
} | 42 |
# Intro
Authors: @patrickvonplaten and @lhoestq
Aimed at tackling the knowledge-intensive NLP tasks (think tasks a human wouldn't be expected to solve without access to external knowledge sources), RAG models are seq2seq models with access to a retrieval mechanism providing relevant context documents at training and ... | AdaMix/examples/research_projects/rag/README.md/0 | {
"file_path": "AdaMix/examples/research_projects/rag/README.md",
"repo_id": "AdaMix",
"token_count": 3258
} | 43 |
import logging
import os
from dataclasses import dataclass, field
from functools import partial
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import List, Optional
import torch
from datasets import Features, Sequence, Value, load_dataset
import faiss
from transformers import (
DPRCo... | AdaMix/examples/research_projects/rag/use_own_knowledge_dataset.py/0 | {
"file_path": "AdaMix/examples/research_projects/rag/use_own_knowledge_dataset.py",
"repo_id": "AdaMix",
"token_count": 2920
} | 44 |
#!/usr/bin/env bash
export PYTHONPATH="../":"${PYTHONPATH}"
# From appendix C of paper https://arxiv.org/abs/1912.08777
# Set --gradient_accumulation_steps so that effective batch size is 256 (2*128, 4*64, 8*32, 16*16)
python finetune.py \
--learning_rate=1e-4 \
--do_train \
--do_predict \
--n_val 100... | AdaMix/examples/research_projects/seq2seq-distillation/finetune_pegasus_xsum.sh/0 | {
"file_path": "AdaMix/examples/research_projects/seq2seq-distillation/finetune_pegasus_xsum.sh",
"repo_id": "AdaMix",
"token_count": 208
} | 45 |
#!/usr/bin/env python3
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
import datasets
import numpy as np
import torch
import torch.nn as nn
from packaging import version
import soundfile as sf
from transformers import (
HfArgumentParser,
Trainer,
TrainingArgum... | AdaMix/examples/research_projects/wav2vec2/run_asr.py/0 | {
"file_path": "AdaMix/examples/research_projects/wav2vec2/run_asr.py",
"repo_id": "AdaMix",
"token_count": 4278
} | 46 |
[tool.black]
line-length = 119
target-version = ['py35']
| AdaMix/pyproject.toml/0 | {
"file_path": "AdaMix/pyproject.toml",
"repo_id": "AdaMix",
"token_count": 21
} | 47 |
#!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | AdaMix/scripts/pegasus/build_test_sample_spm_no_bos.py/0 | {
"file_path": "AdaMix/scripts/pegasus/build_test_sample_spm_no_bos.py",
"repo_id": "AdaMix",
"token_count": 393
} | 48 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/src/transformers/commands/add_new_model.py/0 | {
"file_path": "AdaMix/src/transformers/commands/add_new_model.py",
"repo_id": "AdaMix",
"token_count": 4355
} | 49 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | AdaMix/src/transformers/hf_api.py/0 | {
"file_path": "AdaMix/src/transformers/hf_api.py",
"repo_id": "AdaMix",
"token_count": 3145
} | 50 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/models/auto/configuration_auto.py/0 | {
"file_path": "AdaMix/src/transformers/models/auto/configuration_auto.py",
"repo_id": "AdaMix",
"token_count": 8527
} | 51 |
# coding=utf-8
# Copyright 2020 The Facebook AI Research Team Authors and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LIC... | AdaMix/src/transformers/models/bart/tokenization_bart_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/bart/tokenization_bart_fast.py",
"repo_id": "AdaMix",
"token_count": 1510
} | 52 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/models/bert/convert_bert_pytorch_checkpoint_to_original_tf.py/0 | {
"file_path": "AdaMix/src/transformers/models/bert/convert_bert_pytorch_checkpoint_to_original_tf.py",
"repo_id": "AdaMix",
"token_count": 1659
} | 53 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/models/convbert/tokenization_convbert.py/0 | {
"file_path": "AdaMix/src/transformers/models/convbert/tokenization_convbert.py",
"repo_id": "AdaMix",
"token_count": 812
} | 54 |
# coding=utf-8
# Copyright 2020, Microsoft and the HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | AdaMix/src/transformers/models/deberta/configuration_deberta.py/0 | {
"file_path": "AdaMix/src/transformers/models/deberta/configuration_deberta.py",
"repo_id": "AdaMix",
"token_count": 3007
} | 55 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/src/transformers/models/dpr/convert_dpr_original_checkpoint_to_pytorch.py/0 | {
"file_path": "AdaMix/src/transformers/models/dpr/convert_dpr_original_checkpoint_to_pytorch.py",
"repo_id": "AdaMix",
"token_count": 2397
} | 56 |
# coding=utf-8
# Copyright 2019-present CNRS, Facebook Inc. and the HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | AdaMix/src/transformers/models/flaubert/tokenization_flaubert.py/0 | {
"file_path": "AdaMix/src/transformers/models/flaubert/tokenization_flaubert.py",
"repo_id": "AdaMix",
"token_count": 2308
} | 57 |
# coding=utf-8
# Copyright 2020, Hugging Face
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | AdaMix/src/transformers/models/funnel/configuration_funnel.py/0 | {
"file_path": "AdaMix/src/transformers/models/funnel/configuration_funnel.py",
"repo_id": "AdaMix",
"token_count": 3695
} | 58 |
# coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | AdaMix/src/transformers/models/gpt2/tokenization_gpt2.py/0 | {
"file_path": "AdaMix/src/transformers/models/gpt2/tokenization_gpt2.py",
"repo_id": "AdaMix",
"token_count": 5478
} | 59 |
# coding=utf-8
# Copyright 2021 Iz Beltagy, Matthew E. Peters, Arman Cohan and The HuggingFace Inc. team. All rights reserved.
#
# 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 at
#
# http://w... | AdaMix/src/transformers/models/led/configuration_led.py/0 | {
"file_path": "AdaMix/src/transformers/models/led/configuration_led.py",
"repo_id": "AdaMix",
"token_count": 3257
} | 60 |
# coding=utf-8
# Copyright 2020 The Allen Institute for AI team and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2... | AdaMix/src/transformers/models/longformer/tokenization_longformer_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/longformer/tokenization_longformer_fast.py",
"repo_id": "AdaMix",
"token_count": 1651
} | 61 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/src/transformers/models/marian/tokenization_marian.py/0 | {
"file_path": "AdaMix/src/transformers/models/marian/tokenization_marian.py",
"repo_id": "AdaMix",
"token_count": 5811
} | 62 |
# coding=utf-8
#
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | AdaMix/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py",
"repo_id": "AdaMix",
"token_count": 703
} | 63 |
# coding=utf-8
# Copyright 2020, The T5 Authors and HuggingFace 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | AdaMix/src/transformers/models/mt5/configuration_mt5.py/0 | {
"file_path": "AdaMix/src/transformers/models/mt5/configuration_mt5.py",
"repo_id": "AdaMix",
"token_count": 2276
} | 64 |
# coding=utf-8
# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | AdaMix/src/transformers/models/rag/modeling_tf_rag.py/0 | {
"file_path": "AdaMix/src/transformers/models/rag/modeling_tf_rag.py",
"repo_id": "AdaMix",
"token_count": 40947
} | 65 |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | AdaMix/src/transformers/models/squeezebert/__init__.py/0 | {
"file_path": "AdaMix/src/transformers/models/squeezebert/__init__.py",
"repo_id": "AdaMix",
"token_count": 1130
} | 66 |
# coding=utf-8
# Copyright 2019 The Open AI Team Authors and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | AdaMix/src/transformers/models/xlm/tokenization_xlm.py/0 | {
"file_path": "AdaMix/src/transformers/models/xlm/tokenization_xlm.py",
"repo_id": "AdaMix",
"token_count": 18277
} | 67 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICEN... | AdaMix/src/transformers/optimization.py/0 | {
"file_path": "AdaMix/src/transformers/optimization.py",
"repo_id": "AdaMix",
"token_count": 10987
} | 68 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/src/transformers/sagemaker/training_args_sm.py/0 | {
"file_path": "AdaMix/src/transformers/sagemaker/training_args_sm.py",
"repo_id": "AdaMix",
"token_count": 1470
} | 69 |
# coding=utf-8
# Copyright {{cookiecutter.authors}} and The HuggingFace Inc. team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/... | AdaMix/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/tokenization_{{cookiecutter.lowercase_modelname}}.py/0 | {
"file_path": "AdaMix/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/tokenization_{{cookiecutter.lowercase_modelname}}.py",
"repo_id": "AdaMix",
"token_count": 5419
} | 70 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_file_utils.py/0 | {
"file_path": "AdaMix/tests/test_file_utils.py",
"repo_id": "AdaMix",
"token_count": 1342
} | 71 |
# coding=utf-8
# Copyright 2021, The HuggingFace Inc. team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | AdaMix/tests/test_modeling_blenderbot.py/0 | {
"file_path": "AdaMix/tests/test_modeling_blenderbot.py",
"repo_id": "AdaMix",
"token_count": 9372
} | 72 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team, Microsoft Corporation.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | AdaMix/tests/test_modeling_tf_mpnet.py/0 | {
"file_path": "AdaMix/tests/test_modeling_tf_mpnet.py",
"repo_id": "AdaMix",
"token_count": 4597
} | 73 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_modeling_xlm_roberta.py/0 | {
"file_path": "AdaMix/tests/test_modeling_xlm_roberta.py",
"repo_id": "AdaMix",
"token_count": 1239
} | 74 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_pipelines_text_generation.py/0 | {
"file_path": "AdaMix/tests/test_pipelines_text_generation.py",
"repo_id": "AdaMix",
"token_count": 985
} | 75 |
#!/usr/bin/env python3
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENS... | AdaMix/tests/test_tokenization_blenderbot.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_blenderbot.py",
"repo_id": "AdaMix",
"token_count": 539
} | 76 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_tokenization_mbart.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_mbart.py",
"repo_id": "AdaMix",
"token_count": 4634
} | 77 |
# coding=utf-8
# Copyright 2018 HuggingFace 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | AdaMix/tests/test_tokenization_utils.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_utils.py",
"repo_id": "AdaMix",
"token_count": 5256
} | 78 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/utils/check_repo.py/0 | {
"file_path": "AdaMix/utils/check_repo.py",
"repo_id": "AdaMix",
"token_count": 7766
} | 79 |
from argparse import ArgumentParser
import airsimdroneracinglab as airsim
import time
import utils
import threading
import numpy as np
import cv2
from baseline_racer import BaselineRacer
class BaselineRacerImageBenchmarker(BaselineRacer):
def __init__(
self,
img_benchmark_type="simGetImage",
... | AirSim-Drone-Racing-Lab/baselines/baseline_racer_image_benchmarker.py/0 | {
"file_path": "AirSim-Drone-Racing-Lab/baselines/baseline_racer_image_benchmarker.py",
"repo_id": "AirSim-Drone-Racing-Lab",
"token_count": 2927
} | 80 |
import airsimdroneracinglab
import threading
import time
class ReproduceResetRaceCondition:
def __init__(self, drone_name="drone_1"):
self.airsim_client = airsimdroneracinglab.MultirotorClient()
self.airsim_client_2 = airsimdroneracinglab.MultirotorClient()
self.airsim_client_3 = airsimdro... | AirSim-Drone-Racing-Lab/tests/test_reset.py/0 | {
"file_path": "AirSim-Drone-Racing-Lab/tests/test_reset.py",
"repo_id": "AirSim-Drone-Racing-Lab",
"token_count": 1714
} | 81 |
import tensorflow as tf
import os
import sys
curr_dir = os.path.dirname(os.path.abspath(__file__))
# imports
import_path = os.path.join(curr_dir, '..')
sys.path.insert(0, import_path)
import racing_models.cmvae
import racing_utils
# DEFINE TRAINING META PARAMETERS
data_dir = '/home/rb/all_files/airsim_datasets/soccer... | AirSim-Drone-Racing-VAE-Imitation/cmvae/train_cmvae.py/0 | {
"file_path": "AirSim-Drone-Racing-VAE-Imitation/cmvae/train_cmvae.py",
"repo_id": "AirSim-Drone-Racing-VAE-Imitation",
"token_count": 3684
} | 82 |
import airsimneurips as airsim
import json
import numpy as np
import os
def to_airsim_vector(np_arr):
assert np.size(np_arr) == 3
return airsim.Vector3r(np.float(np_arr[0]), np.float(np_arr[1]), np.float(np_arr[2]))
def to_airsim_vectors(np_arr):
return [to_airsim_vector(np_arr[i, :]) for i in range(np.si... | AirSim-NeurIPS2019-Drone-Racing/baselines/utils.py/0 | {
"file_path": "AirSim-NeurIPS2019-Drone-Racing/baselines/utils.py",
"repo_id": "AirSim-NeurIPS2019-Drone-Racing",
"token_count": 1763
} | 83 |
# Azure Monitor Contributing Guide
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microso... | ApplicationInsights-Python/CONTRIBUTING.md/0 | {
"file_path": "ApplicationInsights-Python/CONTRIBUTING.md",
"repo_id": "ApplicationInsights-Python",
"token_count": 1111
} | 84 |
[bdist_wheel]
universal=1
| ApplicationInsights-Python/azure-monitor-events-extension/setup.cfg/0 | {
"file_path": "ApplicationInsights-Python/azure-monitor-events-extension/setup.cfg",
"repo_id": "ApplicationInsights-Python",
"token_count": 11
} | 85 |
# Support
## How to file issues and get help
This project has been created to accelerate the development of Trusted Research Environments by Microsoft and its partners while working with customers.
This project does not have a dedicated team of maintainers outside of those who are working on an active engagements an... | AzureTRE/SUPPORT.md/0 | {
"file_path": "AzureTRE/SUPPORT.md",
"repo_id": "AzureTRE",
"token_count": 206
} | 86 |
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "python",
"AIRLOCK_STATUS_CHANGED_QUEUE_NAME": "status_changed",
"AIRLOCK_SCAN_RESULT_QUEUE_NAME": "scan_result",
"SB_CONNECTION_STRING": "Endpoint=sb://XXXX.servicebus.windows.net/;SharedAccessKeyName=.....",
"BLOB_CREATED_TOPIC_NA... | AzureTRE/airlock_processor/local.settings.json-sample/0 | {
"file_path": "AzureTRE/airlock_processor/local.settings.json-sample",
"repo_id": "AzureTRE",
"token_count": 193
} | 87 |
from fastapi import Depends, HTTPException, Path, status
from pydantic import UUID4
from api.helpers import get_repository
from db.repositories.airlock_requests import AirlockRequestRepository
from models.domain.airlock_request import AirlockRequest
from db.errors import EntityDoesNotExist, UnableToAccessDatabase
from... | AzureTRE/api_app/api/dependencies/airlock.py/0 | {
"file_path": "AzureTRE/api_app/api/dependencies/airlock.py",
"repo_id": "AzureTRE",
"token_count": 393
} | 88 |
from fastapi import APIRouter, Depends, HTTPException, status
from db.migrations.airlock import AirlockMigration
from db.migrations.resources import ResourceMigration
from api.helpers import get_repository
from db.repositories.operations import OperationRepository
from db.repositories.resources_history import ResourceH... | AzureTRE/api_app/api/routes/migrations.py/0 | {
"file_path": "AzureTRE/api_app/api/routes/migrations.py",
"repo_id": "AzureTRE",
"token_count": 2008
} | 89 |
from resources import strings
from db.repositories.airlock_requests import AirlockRequestRepository
class AirlockMigration(AirlockRequestRepository):
@classmethod
async def create(cls):
cls = AirlockMigration()
resource_repo = await super().create()
cls._container = resource_repo._cont... | AzureTRE/api_app/db/migrations/airlock.py/0 | {
"file_path": "AzureTRE/api_app/db/migrations/airlock.py",
"repo_id": "AzureTRE",
"token_count": 1361
} | 90 |
from typing import Optional, List
from pydantic import Field
from models.domain.resource import AvailableUpgrade, ResourceType
from models.domain.azuretremodel import AzureTREModel
class RestrictedProperties(AzureTREModel):
display_name: str = ""
description: str = ""
overview: str = ""
connection_uri... | AzureTRE/api_app/models/domain/restricted_resource.py/0 | {
"file_path": "AzureTRE/api_app/models/domain/restricted_resource.py",
"repo_id": "AzureTRE",
"token_count": 424
} | 91 |
from typing import List
from pydantic import BaseModel, Field
from models.domain.restricted_resource import RestrictedResource
from models.domain.resource import ResourceType
from models.domain.shared_service import SharedService
def get_sample_shared_service(shared_service_id: str) -> dict:
return {
"... | AzureTRE/api_app/models/schemas/shared_service.py/0 | {
"file_path": "AzureTRE/api_app/models/schemas/shared_service.py",
"repo_id": "AzureTRE",
"token_count": 1224
} | 92 |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/microsoft/AzureTRE/schema/azuread.json",
"type": "object",
"title": "Azure AD Authorisation Schema",
"default": {},
"required": [
],
"properties": {
}
}
| AzureTRE/api_app/schemas/azuread.json/0 | {
"file_path": "AzureTRE/api_app/schemas/azuread.json",
"repo_id": "AzureTRE",
"token_count": 120
} | 93 |
from core import config, credentials
from services.logging import logger
from azure.mgmt.compute import ComputeManagementClient, models
from azure.core.exceptions import ResourceNotFoundError
def get_azure_resource_status(resource_id):
resource_name = resource_id.split('/')[-1]
resource_group_name = resourc... | AzureTRE/api_app/services/azure_resource_status.py/0 | {
"file_path": "AzureTRE/api_app/services/azure_resource_status.py",
"repo_id": "AzureTRE",
"token_count": 704
} | 94 |
from unittest.mock import AsyncMock
import pytest
import pytest_asyncio
from mock import patch
from models.domain.resource import ResourceType
from db.migrations.workspaces import WorkspaceMigration
pytestmark = pytest.mark.asyncio
@pytest_asyncio.fixture
async def workspace_migrator():
with patch('api.dependen... | AzureTRE/api_app/tests_ma/test_db/test_migrations/test_workspace_migration.py/0 | {
"file_path": "AzureTRE/api_app/tests_ma/test_db/test_migrations/test_workspace_migration.py",
"repo_id": "AzureTRE",
"token_count": 792
} | 95 |
###
# Get all workspace templates (admin)
GET {{baseUrl}}/workspace-templates
Accept: {{contentType}}
Authorization: Bearer {{token}}
###
# Get details about the 'my-tre-workspace' template (admin)
GET {{baseUrl}}/workspace-templates/{{workspaceTemplate}}
Accept: {{contentType}}
Authorization: Bearer {{token}}
###
# ... | AzureTRE/api_http_requests/API Template GET Endpoints.http/0 | {
"file_path": "AzureTRE/api_http_requests/API Template GET Endpoints.http",
"repo_id": "AzureTRE",
"token_count": 341
} | 96 |
import logging
import click
from tre.api_client import ApiClient
@click.command(name="api", help="Call an API endpoint")
@click.option("--url",
required=True,
help="The API URL to call, e.g. /api/workspaces")
@click.option("--scope",
required=False,
help="The lo... | AzureTRE/cli/tre/commands/api_call.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/api_call.py",
"repo_id": "AzureTRE",
"token_count": 225
} | 97 |
import click
import json
import logging
from tre.api_client import ApiClient
from tre.commands.operation import default_operation_table_query_single, operation_show
from tre.output import output, output_option, query_option
@click.group(help="List/add shared_services")
def shared_services() -> None:
pass
@clic... | AzureTRE/cli/tre/commands/shared_services/shared_services.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/shared_services/shared_services.py",
"repo_id": "AzureTRE",
"token_count": 732
} | 98 |
import click
import logging
from tre.api_client import ApiClient
from tre.commands.workspaces.airlock.contexts import WorkspaceAirlockContext, pass_workspace_airlock_context
from tre.output import output, output_option, query_option
_default_table_query_item = r"airlockRequest.{id:id,workspace_id:workspaceId,type:typ... | AzureTRE/cli/tre/commands/workspaces/airlock/request.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/workspaces/airlock/request.py",
"repo_id": "AzureTRE",
"token_count": 2525
} | 99 |
import json
import logging
import click
from tre.api_client import ApiClient
from tre.commands.operation import default_operation_table_query_single, operation_show
from tre.output import output, output_option, query_option
from .contexts import WorkspaceServiceContext, pass_workspace_service_context
from .operation i... | AzureTRE/cli/tre/commands/workspaces/workspace_services/workspace_service.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/workspaces/workspace_services/workspace_service.py",
"repo_id": "AzureTRE",
"token_count": 4204
} | 100 |
variable "tre_id" {
type = string
}
variable "location" {
type = string
}
variable "resource_group_name" {
type = string
}
variable "airlock_storage_subnet_id" {
type = string
}
variable "airlock_events_subnet_id" {
type = string
}
variable "enable_local_debugging" {
type = bool
}
variable "myip" {
type =... | AzureTRE/core/terraform/airlock/variables.tf/0 | {
"file_path": "AzureTRE/core/terraform/airlock/variables.tf",
"repo_id": "AzureTRE",
"token_count": 657
} | 101 |
variable "tre_id" {
type = string
}
variable "location" {
type = string
}
variable "resource_group_name" {
type = string
}
variable "shared_subnet_id" {
type = string
}
variable "azure_monitor_dns_zone_id" {
type = string
}
variable "azure_monitor_oms_opinsights_dns_zone_id" {
type = string
}
variable "azur... | AzureTRE/core/terraform/azure-monitor/variables.tf/0 | {
"file_path": "AzureTRE/core/terraform/azure-monitor/variables.tf",
"repo_id": "AzureTRE",
"token_count": 231
} | 102 |
locals {
core_services_vnet_subnets = cidrsubnets(var.core_address_space, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4)
# Addresses examples are based on /22 CIDR
# .0
firewall_subnet_address_space = local.core_services_vnet_subnets[0] # .0 - .63
app_gw_subnet_address_prefix = local.core_services_vnet_subnets[1] # ... | AzureTRE/core/terraform/network/locals.tf/0 | {
"file_path": "AzureTRE/core/terraform/network/locals.tf",
"repo_id": "AzureTRE",
"token_count": 633
} | 103 |
resource "azurerm_servicebus_namespace" "sb" {
name = "sb-${var.tre_id}"
location = azurerm_resource_group.core.location
resource_group_name = azurerm_resource_group.core.name
sku = "Premium"
capacity = "1"
tags = local.tre_core_tags
# B... | AzureTRE/core/terraform/servicebus.tf/0 | {
"file_path": "AzureTRE/core/terraform/servicebus.tf",
"repo_id": "AzureTRE",
"token_count": 1642
} | 104 |
#!/bin/bash
# This script is designed to be `source`d to create reusable helper functions
# This script polls looking for an app registration with the given ID.
# If after the number of retries no app registration is found, the function exits.
function wait_for_new_service_principal()
{
servicePrincipalId=$1
retr... | AzureTRE/devops/scripts/aad/wait_for_new_service_principal.sh/0 | {
"file_path": "AzureTRE/devops/scripts/aad/wait_for_new_service_principal.sh",
"repo_id": "AzureTRE",
"token_count": 345
} | 105 |
#!/bin/bash
if [[ -z ${TRE_ID:-} ]]; then
echo "TRE_ID environment variable must be set."
exit 1
fi
echo "DEBUG: Check keyvault and secrets exist"
echo "az keyvault show"
az keyvault show --name kv-${TRE_ID}
echo "az keyvault secret list"
az keyvault secret list --vault-name kv-${TRE_ID}
echo "az keyvault ... | AzureTRE/devops/scripts/key_vault_list.sh/0 | {
"file_path": "AzureTRE/devops/scripts/key_vault_list.sh",
"repo_id": "AzureTRE",
"token_count": 157
} | 106 |
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
# Baseline Azure resources
echo -e "\n\e[34m»»» 🤖 \e[96mCreating resource group and storage account\e[0m..."
# shellcheck disable=SC2154
az group create --resource-group "$TF_VAR_mgmt_resource_group_name" --location "$LOCATION" -o table
# shellcheck disable=SC... | AzureTRE/devops/terraform/bootstrap.sh/0 | {
"file_path": "AzureTRE/devops/terraform/bootstrap.sh",
"repo_id": "AzureTRE",
"token_count": 788
} | 107 |
# Registering Templates
To enable users to deploy Workspaces, Workspace Services or User Resources, we need to register their Templates. This can be done wither by running `make` commands; using the API or devops scripts. In this article both approaches are described.
!!! info
Templates are encapsulated in [Porte... | AzureTRE/docs/tre-admins/registering-templates.md/0 | {
"file_path": "AzureTRE/docs/tre-admins/registering-templates.md",
"repo_id": "AzureTRE",
"token_count": 1105
} | 108 |
# Start/Stop Azure TRE
Once you've provisioned an Azure TRE instance it will begin to incur running costs of the underlying Azure services.
Within evaluation or development, you may want to "pause" the TRE environment during out of office hours or weekends, to reduce costs without having to completely destroy the env... | AzureTRE/docs/tre-admins/start-stop.md/0 | {
"file_path": "AzureTRE/docs/tre-admins/start-stop.md",
"repo_id": "AzureTRE",
"token_count": 2726
} | 109 |
# Pipeline Template Schema
This document will help you write a valid `pipeline: {}` block in your template.
> For a working example, see `./templates/shared-services/sonatype-nexus/template_schema.json`.
## Schema
```json
"pipeline": {
"install": [ // <-- [install | upgrade | uninstall]
{
"stepId": ... | AzureTRE/docs/tre-templates/pipeline-templates/pipeline-schema.md/0 | {
"file_path": "AzureTRE/docs/tre-templates/pipeline-templates/pipeline-schema.md",
"repo_id": "AzureTRE",
"token_count": 1220
} | 110 |
# Operations Debugging and Troubleshooting guide
This guide explains how to go about finding the root cause of why a workspace resource might not have been deployed.
The topics included in this section should be followed in order as that is how the message also flows in the system.
| AzureTRE/docs/troubleshooting-faq/index.md/0 | {
"file_path": "AzureTRE/docs/troubleshooting-faq/index.md",
"repo_id": "AzureTRE",
"token_count": 59
} | 111 |
IMPORT = "import"
EXPORT = "export"
DRAFT_STATUS = "draft"
SUBMITTED_STATUS = "submitted"
IN_REVIEW_STATUS = "in_review"
APPROVED_STATUS = "approved"
REJECTED_STATUS = "rejected"
CANCELLED_STATUS = "cancelled"
BLOCKED_STATUS = "blocked_by_scan"
FAILED_STATUS = "failed"
AIRLOCK_REQUEST = "airlockRequest"
AIRLOCK_REQUE... | AzureTRE/e2e_tests/airlock/strings.py/0 | {
"file_path": "AzureTRE/e2e_tests/airlock/strings.py",
"repo_id": "AzureTRE",
"token_count": 162
} | 112 |
import pytest
from httpx import AsyncClient
import config
from resources import strings
pytestmark = pytest.mark.asyncio
@pytest.mark.smoke
async def test_health() -> None:
async with AsyncClient(verify=False) as client:
url = f"{config.TRE_URL}{strings.API_HEALTH}"
response = await client.get(... | AzureTRE/e2e_tests/test_provisioned_health_api.py/0 | {
"file_path": "AzureTRE/e2e_tests/test_provisioned_health_api.py",
"repo_id": "AzureTRE",
"token_count": 252
} | 113 |
from http.server import HTTPServer, BaseHTTPRequestHandler
from socketserver import ThreadingMixIn
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
"""Handle requests in a separate... | AzureTRE/resource_processor/resources/httpserver.py/0 | {
"file_path": "AzureTRE/resource_processor/resources/httpserver.py",
"repo_id": "AzureTRE",
"token_count": 150
} | 114 |
# syntax=docker/dockerfile:1
FROM python:3.8-slim-bullseye
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
# Install Azure CLI
ARG AZURE_CLI_VERSION=2.50.0-1~bullseye
COPY scripts/azure-... | AzureTRE/resource_processor/vmss_porter/Dockerfile/0 | {
"file_path": "AzureTRE/resource_processor/vmss_porter/Dockerfile",
"repo_id": "AzureTRE",
"token_count": 1263
} | 115 |
data "azurerm_application_insights" "core" {
name = "appi-${var.tre_id}"
resource_group_name = local.core_resource_group_name
}
data "azurerm_servicebus_namespace" "core" {
name = "sb-${var.tre_id}"
resource_group_name = local.core_resource_group_name
}
data "azurerm_storage_acc... | AzureTRE/templates/shared_services/airlock_notifier/terraform/data.tf/0 | {
"file_path": "AzureTRE/templates/shared_services/airlock_notifier/terraform/data.tf",
"repo_id": "AzureTRE",
"token_count": 594
} | 116 |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/microsoft/AzureTRE/templates/shared_services/certs/template_schema.json",
"type": "object",
"title": "Certificate Service",
"description": "Provides SSL Certs for a specified internal domain",
"required": [
"domain_prefix"... | AzureTRE/templates/shared_services/certs/template_schema.json/0 | {
"file_path": "AzureTRE/templates/shared_services/certs/template_schema.json",
"repo_id": "AzureTRE",
"token_count": 2693
} | 117 |
resource "random_string" "username" {
length = 4
upper = true
lower = true
numeric = true
min_numeric = 1
min_lower = 1
special = false
}
resource "random_password" "password" {
length = 16
lower = true
min_lower = 1
upper = true... | AzureTRE/templates/shared_services/cyclecloud/terraform/cyclecloud.tf/0 | {
"file_path": "AzureTRE/templates/shared_services/cyclecloud/terraform/cyclecloud.tf",
"repo_id": "AzureTRE",
"token_count": 1843
} | 118 |
locals {
address_space = cidrsubnets("10.28.0.0/23", 1, 1)
container_subnet_address_space = local.address_space[0] # private
host_subnet_address_space = local.address_space[1] # public
short_service_id = substr(var.tre_resource_id, -4, -1)
service_resource_name_suffix = "... | AzureTRE/templates/shared_services/databricks-auth/terraform/locals.tf/0 | {
"file_path": "AzureTRE/templates/shared_services/databricks-auth/terraform/locals.tf",
"repo_id": "AzureTRE",
"token_count": 532
} | 119 |
locals {
core_resource_group_name = "rg-${var.tre_id}"
firewall_name = "fw-${var.tre_id}"
firewall_diagnostic_categories_enabled = [
"AZFWApplicationRule",
"AZFWNetworkRule",
"AZFWDnsProxy",
]
tre_shared_service_tags = {
tre_id = var.tre_id
tre_shared_service_id =... | AzureTRE/templates/shared_services/firewall/terraform/locals.tf/0 | {
"file_path": "AzureTRE/templates/shared_services/firewall/terraform/locals.tf",
"repo_id": "AzureTRE",
"token_count": 259
} | 120 |
[
"NexusAuthenticatingRealm",
"NexusAuthorizingRealm",
"DockerToken"
]
| AzureTRE/templates/shared_services/sonatype-nexus-vm/scripts/nexus_realms_config.json/0 | {
"file_path": "AzureTRE/templates/shared_services/sonatype-nexus-vm/scripts/nexus_realms_config.json",
"repo_id": "AzureTRE",
"token_count": 33
} | 121 |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/microsoft/AzureTRE/templates/shared_services/sonatype-nexus-vm/template_schema.json",
"type": "object",
"title": "Sonatype Nexus Repository Manager",
"description": "Sonatype Nexus is a repository manager that helps you manage c... | AzureTRE/templates/shared_services/sonatype-nexus-vm/template_schema.json/0 | {
"file_path": "AzureTRE/templates/shared_services/sonatype-nexus-vm/template_schema.json",
"repo_id": "AzureTRE",
"token_count": 3614
} | 122 |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/microsoft/AzureTRE/templates/workspace_services/azureml/template_schema.json",
"type": "object",
"title": "Azure Machine Learning",
"description": "Azure Machine Learning",
"required": [],
"properties": {
"display_name":... | AzureTRE/templates/workspace_services/azureml/template_schema.json/0 | {
"file_path": "AzureTRE/templates/workspace_services/azureml/template_schema.json",
"repo_id": "AzureTRE",
"token_count": 8032
} | 123 |
PARENT_SERVICE_ID=__CHANGE_ME__
WORKSPACE_ID=__CHANGE_ME__
ID=__CHANGE_ME__
AZURE_LOCATION=__CHANGE_ME__
VM_SIZE="Standard_D2s_v3"
AAD_TENANT_ID=__CHANGE_ME__
USER_OBJECT_ID=__CHANGE_ME__
ARM_CLIENT_ID=__CHANGE_ME__
ARM_CLIENT_SECRET=__CHANGE_ME__
ARM_TENANT_ID=__CHANGE_ME__
| AzureTRE/templates/workspace_services/azureml/user_resources/aml_compute/.env.sample/0 | {
"file_path": "AzureTRE/templates/workspace_services/azureml/user_resources/aml_compute/.env.sample",
"repo_id": "AzureTRE",
"token_count": 139
} | 124 |
{
"schemaType": "ParameterSet",
"schemaVersion": "1.0.1",
"namespace": "",
"name": "tre-service-databricks",
"parameters": [
{
"name": "id",
"source": {
"env": "ID"
}
},
{
"name": "tre_id",
"source": {
"env": "TRE_ID"
}
},
{
"name":... | AzureTRE/templates/workspace_services/databricks/parameters.json/0 | {
"file_path": "AzureTRE/templates/workspace_services/databricks/parameters.json",
"repo_id": "AzureTRE",
"token_count": 626
} | 125 |
resource "azurerm_storage_account" "gitea" {
name = local.storage_name
resource_group_name = data.azurerm_resource_group.ws.name
location = data.azurerm_resource_group.ws.location
account_tier = "Standard"
account_replication_type = "GRS"
tags ... | AzureTRE/templates/workspace_services/gitea/terraform/storage.tf/0 | {
"file_path": "AzureTRE/templates/workspace_services/gitea/terraform/storage.tf",
"repo_id": "AzureTRE",
"token_count": 743
} | 126 |
#!/usr/bin/with-contenv sh
echo >&2 "starting sshd"
mkdir -p /run/sshd
exec /usr/sbin/sshd -D | AzureTRE/templates/workspace_services/guacamole/guacamole-server/docker/services/sshd/run/0 | {
"file_path": "AzureTRE/templates/workspace_services/guacamole/guacamole-server/docker/services/sshd/run",
"repo_id": "AzureTRE",
"token_count": 43
} | 127 |
/**
*
*/
package org.apache.guacamole.auth.azuretre.user;
| AzureTRE/templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/src/main/java/org/apache/guacamole/auth/azuretre/user/package-info.java/0 | {
"file_path": "AzureTRE/templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/src/main/java/org/apache/guacamole/auth/azuretre/user/package-info.java",
"repo_id": "AzureTRE",
"token_count": 25
} | 128 |
#!/bin/bash
set -e
export TF_LOG=""
# This script assumes you have created an .env from the sample and the variables
# will come from there.
# shellcheck disable=SC2154
terraform init -input=false -backend=true -reconfigure \
-backend-config="resource_group_name=$TF_VAR_mgmt_resource_group_name" \
-backend-con... | AzureTRE/templates/workspace_services/guacamole/terraform/deploy.sh/0 | {
"file_path": "AzureTRE/templates/workspace_services/guacamole/terraform/deploy.sh",
"repo_id": "AzureTRE",
"token_count": 210
} | 129 |
FROM --platform=linux/amd64 debian:bullseye-slim
# PORTER_INIT
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
# Git is required for terraform_azurerm_environment_configuration
RUN --mo... | AzureTRE/templates/workspace_services/innereye/Dockerfile.tmpl/0 | {
"file_path": "AzureTRE/templates/workspace_services/innereye/Dockerfile.tmpl",
"repo_id": "AzureTRE",
"token_count": 315
} | 130 |
data "azurerm_app_service_plan" "workspace" {
name = "plan-${var.workspace_id}"
resource_group_name = data.azurerm_resource_group.ws.name
}
resource "random_uuid" "inference_auth_key" {
}
resource "azurerm_app_service" "inference" {
name = "app-inf-${local.service_resource_name_su... | AzureTRE/templates/workspace_services/innereye/terraform/web_app.tf/0 | {
"file_path": "AzureTRE/templates/workspace_services/innereye/terraform/web_app.tf",
"repo_id": "AzureTRE",
"token_count": 1335
} | 131 |
data "azurerm_storage_share" "shared_storage" {
name = local.shared_storage_share
storage_account_name = local.storage_name
}
data "template_file" "mlflow_windows_config" {
template = file("${path.module}/../mlflow-vm-config/windows/template_config.ps1")
vars = {
MLFlow_Connection_String = ... | AzureTRE/templates/workspace_services/mlflow/terraform/data.tf/0 | {
"file_path": "AzureTRE/templates/workspace_services/mlflow/terraform/data.tf",
"repo_id": "AzureTRE",
"token_count": 344
} | 132 |
locals {
short_service_id = substr(var.tre_resource_id, -4, -1)
short_workspace_id = substr(var.workspace_id, -4, -1)
workspace_resource_name_suffix = "${var.tre_id}-ws-${local.short_workspace_id}"
service_resource_name_suffix = "${var.tre_id}-ws-${local.short_workspace_id}-svc-${loc... | AzureTRE/templates/workspace_services/mysql/terraform/locals.tf/0 | {
"file_path": "AzureTRE/templates/workspace_services/mysql/terraform/locals.tf",
"repo_id": "AzureTRE",
"token_count": 430
} | 133 |
CREATE SCHEMA ${SCHEMA_NAME}
AUTHORIZATION ${OHDSI_ADMIN_ROLE};
COMMENT ON SCHEMA ${SCHEMA_NAME} IS 'Schema containing tables to support WebAPI functionality';
GRANT USAGE ON SCHEMA ${SCHEMA_NAME} TO PUBLIC;
GRANT ALL ON SCHEMA ${SCHEMA_NAME} TO GROUP ${OHDSI_ADMIN_ROLE};
GRANT USAGE ON SCHEMA ${SCHEMA_NAME} TO GRO... | AzureTRE/templates/workspace_services/ohdsi/sql/atlas_create_schema.sql/0 | {
"file_path": "AzureTRE/templates/workspace_services/ohdsi/sql/atlas_create_schema.sql",
"repo_id": "AzureTRE",
"token_count": 320
} | 134 |
locals {
short_service_id = substr(var.tre_resource_id, -4, -1)
short_workspace_id = substr(var.workspace_id, -4, -1)
workspace_resource_name_suffix = "${var.tre_id}-ws-${local.short_workspace_id}"
core_resource_group_name = "rg-${var.tre_id}"
service_suffix = "... | AzureTRE/templates/workspace_services/ohdsi/terraform/locals.tf/0 | {
"file_path": "AzureTRE/templates/workspace_services/ohdsi/terraform/locals.tf",
"repo_id": "AzureTRE",
"token_count": 1751
} | 135 |
resource "azurerm_service_plan" "workspace" {
count = var.deploy_app_service_plan ? 1 : 0
name = "plan-${var.tre_resource_id}"
location = azurerm_resource_group.ws.location
resource_group_name = azurerm_resource_group.ws.name
os_type = "Linux"
sku_name = var... | AzureTRE/templates/workspaces/base/terraform/appserviceplan.tf/0 | {
"file_path": "AzureTRE/templates/workspaces/base/terraform/appserviceplan.tf",
"repo_id": "AzureTRE",
"token_count": 201
} | 136 |
resource "azurerm_network_security_group" "ws" {
location = var.location
name = "nsg-ws"
resource_group_name = var.ws_resource_group_name
tags = var.tre_workspace_tags
lifecycle { ignore_changes = [tags] }
}
resource "azurerm_subnet_network_security_group_association... | AzureTRE/templates/workspaces/base/terraform/network/security.tf/0 | {
"file_path": "AzureTRE/templates/workspaces/base/terraform/network/security.tf",
"repo_id": "AzureTRE",
"token_count": 5125
} | 137 |
import { Spinner, SpinnerSize, Stack } from '@fluentui/react';
import React, { useContext, useEffect, useRef, useState } from 'react';
import { Route, Routes } from 'react-router-dom';
import { Admin } from '../../App';
import { ApiEndpoint } from '../../models/apiEndpoints';
import { Workspace } from '../../models/wor... | AzureTRE/ui/app/src/components/root/RootLayout.tsx/0 | {
"file_path": "AzureTRE/ui/app/src/components/root/RootLayout.tsx",
"repo_id": "AzureTRE",
"token_count": 2592
} | 138 |
import React from 'react';
import { Resource } from '../../models/resource';
import config from '../../config.json';
interface ResourceDebugProps {
resource: Resource
}
export const ResourceDebug: React.FunctionComponent<ResourceDebugProps> = (props: ResourceDebugProps) => {
return (
config.debug === true ? ... | AzureTRE/ui/app/src/components/shared/ResourceDebug.tsx/0 | {
"file_path": "AzureTRE/ui/app/src/components/shared/ResourceDebug.tsx",
"repo_id": "AzureTRE",
"token_count": 396
} | 139 |
import { MessageBar, MessageBarType, Pivot, PivotItem, PrimaryButton, Stack, TextField, TooltipHost } from "@fluentui/react";
import React, { useCallback, useEffect, useState } from "react";
import { HttpMethod, useAuthApiCall } from "../../../hooks/useAuthApiCall";
import { AirlockRequest, AirlockRequestStatus } from ... | AzureTRE/ui/app/src/components/shared/airlock/AirlockRequestFilesSection.tsx/0 | {
"file_path": "AzureTRE/ui/app/src/components/shared/airlock/AirlockRequestFilesSection.tsx",
"repo_id": "AzureTRE",
"token_count": 2332
} | 140 |
import React, { useContext, useEffect, useState } from 'react';
import { Nav, INavLinkGroup, INavStyles } from '@fluentui/react/lib/Nav';
import { useNavigate } from 'react-router-dom';
import { ApiEndpoint } from '../../models/apiEndpoints';
import { WorkspaceService } from '../../models/workspaceService';
import { Wo... | AzureTRE/ui/app/src/components/workspaces/WorkspaceLeftNav.tsx/0 | {
"file_path": "AzureTRE/ui/app/src/components/workspaces/WorkspaceLeftNav.tsx",
"repo_id": "AzureTRE",
"token_count": 2002
} | 141 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.