text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
const axios = require('axios')
const fs = require('fs')
const pjson = require('../package.json')
const { convertData, convertNum } = require('../src/float-utils-node.js')
const CollaborativeTrainer64 = artifacts.require("./CollaborativeTrainer64")
const DataHandler64 = artifacts.require("./data/DataHandler64")
const ... | 0xDeCA10B/demo/client/migrations/2_deploy_sentiment_classifier.js/0 | {
"file_path": "0xDeCA10B/demo/client/migrations/2_deploy_sentiment_classifier.js",
"repo_id": "0xDeCA10B",
"token_count": 1284
} | 0 |
import Button from '@material-ui/core/Button'
import CircularProgress from '@material-ui/core/CircularProgress'
import Container from '@material-ui/core/Container'
import IconButton from '@material-ui/core/IconButton'
import Link from '@material-ui/core/Link'
import List from '@material-ui/core/List'
import ListItem fr... | 0xDeCA10B/demo/client/src/containers/modelList.js/0 | {
"file_path": "0xDeCA10B/demo/client/src/containers/modelList.js",
"repo_id": "0xDeCA10B",
"token_count": 3691
} | 1 |
/**
* Possible types of encoders.
* The string values can be stored in smart contracts on public blockchains so do not make changes to the values.
* Changing the casing of a value should be fine.
*/
export enum Encoder {
// Simple encoders:
None = "none",
Mult1E9Round = "Multiply by 1E9, then round",
// Hash e... | 0xDeCA10B/demo/client/src/encoding/encoder.ts/0 | {
"file_path": "0xDeCA10B/demo/client/src/encoding/encoder.ts",
"repo_id": "0xDeCA10B",
"token_count": 213
} | 2 |
const fs = require('fs')
const path = require('path')
const mobilenet = require('@tensorflow-models/mobilenet')
const tf = require('@tensorflow/tfjs-node')
const { createCanvas, loadImage } = require('canvas')
const { normalize1d } = require('../tensor-utils-node')
const dataPath = path.join(__dirname, './seefood')
... | 0xDeCA10B/demo/client/src/ml-models/hot_dog-not/train-classifier.js/0 | {
"file_path": "0xDeCA10B/demo/client/src/ml-models/hot_dog-not/train-classifier.js",
"repo_id": "0xDeCA10B",
"token_count": 5504
} | 3 |
import { DataStore, DataStoreHealthStatus, ModelInformation, ModelsResponse, OriginalData, RemoveResponse } from './data-store'
export class LocalDataStore implements DataStore {
errorOpening?: boolean
db?: IDBDatabase
private readonly dataStoreName = 'data'
private readonly modelStoreName = 'model'
constructo... | 0xDeCA10B/demo/client/src/storage/local-data-store.ts/0 | {
"file_path": "0xDeCA10B/demo/client/src/storage/local-data-store.ts",
"repo_id": "0xDeCA10B",
"token_count": 1893
} | 4 |
const Environment = require('jest-environment-jsdom')
/**
* A custom environment to set the TextEncoder that is required by TensorFlow.js.
*/
module.exports = class CustomTestEnvironment extends Environment {
// Following https://stackoverflow.com/a/57713960/1226799
async setup() {
await super.setup()
if (type... | 0xDeCA10B/demo/client/test/custom-test-env.js/0 | {
"file_path": "0xDeCA10B/demo/client/test/custom-test-env.js",
"repo_id": "0xDeCA10B",
"token_count": 356
} | 5 |
import random
import unittest
import numpy as np
from injector import Injector
from decai.simulation.contract.balances import Balances
from decai.simulation.contract.classification.classifier import Classifier
from decai.simulation.contract.classification.perceptron import PerceptronModule
from decai.simulation.contr... | 0xDeCA10B/simulation/decai/simulation/contract/classification/tests/test_perceptron.py/0 | {
"file_path": "0xDeCA10B/simulation/decai/simulation/contract/classification/tests/test_perceptron.py",
"repo_id": "0xDeCA10B",
"token_count": 3780
} | 6 |
import unittest
from typing import cast
from injector import Injector
from decai.simulation.data.data_loader import DataLoader
from decai.simulation.data.ttt_data_loader import TicTacToeDataLoader, TicTacToeDataModule
from decai.simulation.logging_module import LoggingModule
class TestTicTacToeDataLoader(unittest.T... | 0xDeCA10B/simulation/decai/simulation/data/tests/test_ttt_data_loader.py/0 | {
"file_path": "0xDeCA10B/simulation/decai/simulation/data/tests/test_ttt_data_loader.py",
"repo_id": "0xDeCA10B",
"token_count": 633
} | 7 |
# MIT License
# Copyright (c) Microsoft Corporation.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | AI-System/Labs/AdvancedLabs/Lab8/nas/ops.py/0 | {
"file_path": "AI-System/Labs/AdvancedLabs/Lab8/nas/ops.py",
"repo_id": "AI-System",
"token_count": 2296
} | 8 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 12.3 人工智能服务安全与隐私
- [12.3 人工智能服务安全与隐私](#122-人工智能训练安全与隐私)
- [12.3.1 服务时安全](#1221-服务时安全)
- [12.3.2 服务时的用户隐私](#1222-服务时的用户隐私)
- [12.3.3 服务时的模型隐私](#1223-服务时的模型隐私)
- [小结与讨论](... | AI-System/Textbook/第12章-人工智能安全与隐私/12.3-人工智能服务安全与隐私.md/0 | {
"file_path": "AI-System/Textbook/第12章-人工智能安全与隐私/12.3-人工智能服务安全与隐私.md",
"repo_id": "AI-System",
"token_count": 11352
} | 9 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
## 2.3 解决回归问题
本小节主要围绕解决回归问题中的各个环节和知识点展开,包含提出问题,万能近似定力,定义神经网络结构,前向计算和反向传播等内容。
- [2.3 解决回归问题](#23-解决回归问题)
- [2.3.1 提出问题](#231-提出问题)
- [2.3.2 万能近似定理](#232-万能近似定理)
- [2.3.3 ... | AI-System/Textbook/第2章-神经网络基础/2.3-解决回归问题.md/0 | {
"file_path": "AI-System/Textbook/第2章-神经网络基础/2.3-解决回归问题.md",
"repo_id": "AI-System",
"token_count": 8848
} | 10 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 5.3 内存优化
- [5.3 内存优化](#53-内存优化)
- [5.3.1 基于拓扑序的最小内存分配](#531-基于拓扑序的最小内存分配)
- [5.3.2 张量换入换出](#532-张量换入换出)
- [5.3.3 张量重计算](#533-张量重计算)
- [小结与讨论](#小结与讨论)
- [参考文献](#参考文献)
... | AI-System/Textbook/第5章-深度学习框架的编译与优化/5.3-内存优化.md/0 | {
"file_path": "AI-System/Textbook/第5章-深度学习框架的编译与优化/5.3-内存优化.md",
"repo_id": "AI-System",
"token_count": 5392
} | 11 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 6.4 分布式训练系统简介
- [6.4 分布式训练系统简介](#64-分布式训练系统简介)
- [6.4.1 TensorFlow 中的分布式支持](#641-tensorflow-中的分布式支持)
- [6.4.2 PyTorch 中的分布式支持](#642-pytorch-中的分布式支持)
- [6.4.3 通用的数据并行系统Ho... | AI-System/Textbook/第6章-分布式训练算法与系统/6.4-分布式训练系统简介.md/0 | {
"file_path": "AI-System/Textbook/第6章-分布式训练算法与系统/6.4-分布式训练系统简介.md",
"repo_id": "AI-System",
"token_count": 12272
} | 12 |
#!/usr/bin/python3
import argparse
from azure.keyvault import KeyVaultClient
from azure.common.client_factory import get_client_from_cli_profile
from dotenv import load_dotenv
import os
def set_secret(kv_endpoint, secret_name, secret_value):
client = get_client_from_cli_profile(KeyVaultClient)
client.set_sec... | AI/.ci/scripts/set_secret.py/0 | {
"file_path": "AI/.ci/scripts/set_secret.py",
"repo_id": "AI",
"token_count": 408
} | 13 |
parameters:
notebook: # defaults for any parameters that aren't specified
location: "."
azureSubscription: 'x'
azure_subscription: 'x'
timeoutInMinutes: 90
steps:
- task: AzureCLI@1
displayName: ${{parameters.notebook}}
inputs:
azureSubscription: ${{parameters.azureSubscription}}
scriptLocation:... | AI/.ci/steps/azure_r.yml/0 | {
"file_path": "AI/.ci/steps/azure_r.yml",
"repo_id": "AI",
"token_count": 212
} | 14 |
parameters:
deployment_name: ''
template: ''
azureSubscription: ''
azure_subscription: ''
azureresourcegroup: ''
workspacename: ''
azureregion: ''
aksimagename: ''
environment: 'tridant-ai'
doCleanup: True
alias: '-'
project: '-'
expires : "2019-08-01"
agent: 'AI-GPU'
conda: ''
python_pa... | AI/.ci/steps/deploy_rts.yml/0 | {
"file_path": "AI/.ci/steps/deploy_rts.yml",
"repo_id": "AI",
"token_count": 1402
} | 15 |
variables:
TridentWorkloadTypeShort: dsdevito
DeployLocation: eastus
ProjectLocation: "contrib/examples/imaging/azureml_devito/notebooks/"
PythonPath: "environment/anaconda/local/"
Template: DevitoDeployAMLJob.yml
| AI/.ci/vars/deep_seismic_devito.yml/0 | {
"file_path": "AI/.ci/vars/deep_seismic_devito.yml",
"repo_id": "AI",
"token_count": 75
} | 16 |
# Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
Lee Xiong*, Chenyan Xiong*, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul Bennett, Junaid Ahmed, Arnold Overwijk
This repo provides the code for reproducing the experiments in [Approximate Nearest Neighbor Negative Contrastive Learning for... | ANCE/README.md/0 | {
"file_path": "ANCE/README.md",
"repo_id": "ANCE",
"token_count": 4664
} | 17 |
import sys
sys.path += ["../"]
import pandas as pd
from transformers import glue_compute_metrics as compute_metrics, glue_output_modes as output_modes, glue_processors as processors
from transformers import (
AdamW,
RobertaConfig,
RobertaForSequenceClassification,
RobertaTokenizer,
get_linear_schedu... | ANCE/drivers/run_warmup.py/0 | {
"file_path": "ANCE/drivers/run_warmup.py",
"repo_id": "ANCE",
"token_count": 11644
} | 18 |
import sys
sys.path += ["../"]
from utils.msmarco_eval import quality_checks_qids, compute_metrics, load_reference
import torch.distributed as dist
import gzip
import faiss
import numpy as np
from data.process_fn import dual_process_fn
from tqdm import tqdm
import torch
import os
from utils.util import concat_key, is_f... | ANCE/utils/eval_mrr.py/0 | {
"file_path": "ANCE/utils/eval_mrr.py",
"repo_id": "ANCE",
"token_count": 3642
} | 19 |
# Self-Training with Weak Supervision
This repo holds the code for our weak supervision framework, ASTRA, described in our NAACL 2021 paper: "[Self-Training with Weak Supervision](https://www.microsoft.com/en-us/research/publication/leaving-no-valuable-knowledge-behind-weak-supervision-with-self-training-and-domain-sp... | ASTRA/README.md/0 | {
"file_path": "ASTRA/README.md",
"repo_id": "ASTRA",
"token_count": 1498
} | 20 |
from .LogReg import LogRegTrainer
from .BERT import BertTrainer
from .default_model import DefaultModelTrainer | ASTRA/astra/model/__init__.py/0 | {
"file_path": "ASTRA/astra/model/__init__.py",
"repo_id": "ASTRA",
"token_count": 29
} | 21 |
. ./venv/bin/activate
sudo apt install default-jre -y
seed=110
n_experts=8
vv=lora_adamix
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--seed)
seed=$2
shift
shift
;;
--n_experts)
n_experts=$2
shift
shift
;;
--vv)
vv=$2
shift
shift
;;
esac
done
python -m to... | AdaMix/NLG/run_eval_e2e.sh/0 | {
"file_path": "AdaMix/NLG/run_eval_e2e.sh",
"repo_id": "AdaMix",
"token_count": 605
} | 22 |
# ------------------------------------------------------------------------------------------
# Copyright (c). All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -----------------------------------------------------------------------------------------... | AdaMix/NLG/src/format_converting_dart.py/0 | {
"file_path": "AdaMix/NLG/src/format_converting_dart.py",
"repo_id": "AdaMix",
"token_count": 597
} | 23 |
<!---
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 applicable law or ... | AdaMix/docs/README.md/0 | {
"file_path": "AdaMix/docs/README.md",
"repo_id": "AdaMix",
"token_count": 3321
} | 24 |
..
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 ... | AdaMix/docs/source/custom_datasets.rst/0 | {
"file_path": "AdaMix/docs/source/custom_datasets.rst",
"repo_id": "AdaMix",
"token_count": 11369
} | 25 |
<!---
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 applicable law or ... | AdaMix/docs/source/installation.md/0 | {
"file_path": "AdaMix/docs/source/installation.md",
"repo_id": "AdaMix",
"token_count": 2341
} | 26 |
..
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 ... | AdaMix/docs/source/main_classes/tokenizer.rst/0 | {
"file_path": "AdaMix/docs/source/main_classes/tokenizer.rst",
"repo_id": "AdaMix",
"token_count": 1233
} | 27 |
..
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 ... | AdaMix/docs/source/model_doc/deberta.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/deberta.rst",
"repo_id": "AdaMix",
"token_count": 1039
} | 28 |
..
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 ... | AdaMix/docs/source/model_doc/longformer.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/longformer.rst",
"repo_id": "AdaMix",
"token_count": 2558
} | 29 |
..
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 ... | AdaMix/docs/source/model_doc/squeezebert.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/squeezebert.rst",
"repo_id": "AdaMix",
"token_count": 1251
} | 30 |
..
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 ... | AdaMix/docs/source/preprocessing.rst/0 | {
"file_path": "AdaMix/docs/source/preprocessing.rst",
"repo_id": "AdaMix",
"token_count": 9253
} | 31 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
# Copyright (c) 2020, 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 copy of the License a... | AdaMix/examples/benchmarking/run_benchmark_tf.py/0 | {
"file_path": "AdaMix/examples/benchmarking/run_benchmark_tf.py",
"repo_id": "AdaMix",
"token_count": 724
} | 32 |
#!/usr/bin/env bash
# for seqeval metrics import
pip install -r ../requirements.txt
## The relevant files are currently on a shared Google
## drive at https://drive.google.com/drive/folders/1kC0I2UGl2ltrluI9NqDjaQJGw5iliw_J
## Monitor for changes and eventually migrate to nlp dataset
curl -L 'https://drive.google.com... | AdaMix/examples/legacy/pytorch-lightning/run_ner.sh/0 | {
"file_path": "AdaMix/examples/legacy/pytorch-lightning/run_ner.sh",
"repo_id": "AdaMix",
"token_count": 719
} | 33 |
#!/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/examples/legacy/seq2seq/finetune_trainer.py/0 | {
"file_path": "AdaMix/examples/legacy/seq2seq/finetune_trainer.py",
"repo_id": "AdaMix",
"token_count": 5583
} | 34 |
#!/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/examples/legacy/seq2seq/save_randomly_initialized_model.py/0 | {
"file_path": "AdaMix/examples/legacy/seq2seq/save_randomly_initialized_model.py",
"repo_id": "AdaMix",
"token_count": 498
} | 35 |
# 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/examples/legacy/seq2seq/train_distilbart_cnn.sh/0 | {
"file_path": "AdaMix/examples/legacy/seq2seq/train_distilbart_cnn.sh",
"repo_id": "AdaMix",
"token_count": 541
} | 36 |
#!/usr/bin/env python
# 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.
... | AdaMix/examples/multiple-choice/run_tf_multiple_choice.py/0 | {
"file_path": "AdaMix/examples/multiple-choice/run_tf_multiple_choice.py",
"repo_id": "AdaMix",
"token_count": 2933
} | 37 |
# coding=utf-8
# Copyright 2020 Google AI, Google Brain, the HuggingFace Inc. team and 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/lic... | AdaMix/examples/research_projects/bert-loses-patience/pabee/modeling_pabee_albert.py/0 | {
"file_path": "AdaMix/examples/research_projects/bert-loses-patience/pabee/modeling_pabee_albert.py",
"repo_id": "AdaMix",
"token_count": 6256
} | 38 |
#!/usr/bin/env python3
""" This script is adapted from the Bertology pruning code (https://github.com/huggingface/transformers/blob/783d7d2629e97c5f0c5f9ef01b8c66410275c204/examples/research_projects/bertology/run_bertology.py)
to prune GPT-like models. The author is @altsoph.
"""
import argparse
import logging
import... | AdaMix/examples/research_projects/bertology/run_prune_gpt.py/0 | {
"file_path": "AdaMix/examples/research_projects/bertology/run_prune_gpt.py",
"repo_id": "AdaMix",
"token_count": 6310
} | 39 |
# 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/distillation/run_squad_w_distillation.py/0 | {
"file_path": "AdaMix/examples/research_projects/distillation/run_squad_w_distillation.py",
"repo_id": "AdaMix",
"token_count": 15414
} | 40 |
# LXMERT DEMO
1. make a virtualenv: ``virtualenv venv`` and activate ``source venv/bin/activate``
2. install reqs: ``pip install -r ./requirements.txt``
3. usage is as shown in demo.ipynb
| AdaMix/examples/research_projects/lxmert/README.md/0 | {
"file_path": "AdaMix/examples/research_projects/lxmert/README.md",
"repo_id": "AdaMix",
"token_count": 65
} | 41 |
<jupyter_start><jupyter_text>Saving PruneBERTThis notebook aims at showcasing how we can leverage standard tools to save (and load) an extremely sparse model fine-pruned with [movement pruning](https://arxiv.org/abs/2005.07683) (or any other unstructured pruning mehtod).In this example, we used BERT (base-uncased, but ... | AdaMix/examples/research_projects/movement-pruning/Saving_PruneBERT.ipynb/0 | {
"file_path": "AdaMix/examples/research_projects/movement-pruning/Saving_PruneBERT.ipynb",
"repo_id": "AdaMix",
"token_count": 5972
} | 42 |
# 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 require... | AdaMix/examples/research_projects/performer/run_mlm_performer.py/0 | {
"file_path": "AdaMix/examples/research_projects/performer/run_mlm_performer.py",
"repo_id": "AdaMix",
"token_count": 11240
} | 43 |
""" Evaluation script for RAG models."""
import argparse
import ast
import logging
import os
import sys
import pandas as pd
import torch
from tqdm import tqdm
from transformers import BartForConditionalGeneration, RagRetriever, RagSequenceForGeneration, RagTokenForGeneration
from transformers import logging as trans... | AdaMix/examples/research_projects/rag/eval_rag.py/0 | {
"file_path": "AdaMix/examples/research_projects/rag/eval_rag.py",
"repo_id": "AdaMix",
"token_count": 4752
} | 44 |
import logging
from pathlib import Path
import numpy as np
import pytorch_lightning as pl
import torch
from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
from pytorch_lightning.utilities import rank_zero_only
from utils import save_json
def count_trainable_parameters(model):
model_parameters... | AdaMix/examples/research_projects/seq2seq-distillation/callbacks.py/0 | {
"file_path": "AdaMix/examples/research_projects/seq2seq-distillation/callbacks.py",
"repo_id": "AdaMix",
"token_count": 1930
} | 45 |
import re
from filelock import FileLock
try:
import nltk
NLTK_AVAILABLE = True
except (ImportError, ModuleNotFoundError):
NLTK_AVAILABLE = False
if NLTK_AVAILABLE:
with FileLock(".lock") as lock:
nltk.download("punkt", quiet=True)
def add_newline_to_end_of_each_sentence(x: str) -> str:
... | AdaMix/examples/research_projects/seq2seq-distillation/sentence_splitter.py/0 | {
"file_path": "AdaMix/examples/research_projects/seq2seq-distillation/sentence_splitter.py",
"repo_id": "AdaMix",
"token_count": 247
} | 46 |
# 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/hubconf.py/0 | {
"file_path": "AdaMix/hubconf.py",
"repo_id": "AdaMix",
"token_count": 2719
} | 47 |
# 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/activations_tf.py/0 | {
"file_path": "AdaMix/src/transformers/activations_tf.py",
"repo_id": "AdaMix",
"token_count": 1111
} | 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/train.py/0 | {
"file_path": "AdaMix/src/transformers/commands/train.py",
"repo_id": "AdaMix",
"token_count": 2557
} | 49 |
# 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/data/datasets/squad.py/0 | {
"file_path": "AdaMix/src/transformers/data/datasets/squad.py",
"repo_id": "AdaMix",
"token_count": 3917
} | 50 |
# THIS FILE HAS BEEN AUTOGENERATED. To update:
# 1. modify the `_deps` dict in setup.py
# 2. run `make deps_table_update``
deps = {
"black": "black>=20.8b1",
"cookiecutter": "cookiecutter==1.7.2",
"dataclasses": "dataclasses",
"datasets": "datasets",
"faiss-cpu": "faiss-cpu",
"fastapi": "fastapi... | AdaMix/src/transformers/dependency_versions_table.py/0 | {
"file_path": "AdaMix/src/transformers/dependency_versions_table.py",
"repo_id": "AdaMix",
"token_count": 965
} | 51 |
# 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/src/transformers/modeling_tf_pytorch_utils.py/0 | {
"file_path": "AdaMix/src/transformers/modeling_tf_pytorch_utils.py",
"repo_id": "AdaMix",
"token_count": 7093
} | 52 |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain 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
#
# U... | AdaMix/src/transformers/models/albert/modeling_albert.py/0 | {
"file_path": "AdaMix/src/transformers/models/albert/modeling_albert.py",
"repo_id": "AdaMix",
"token_count": 23191
} | 53 |
# coding=utf-8
# Copyright 2018 Salesforce and 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 copy of the License at
#
# htt... | AdaMix/src/transformers/models/ctrl/configuration_ctrl.py/0 | {
"file_path": "AdaMix/src/transformers/models/ctrl/configuration_ctrl.py",
"repo_id": "AdaMix",
"token_count": 2249
} | 54 |
# 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/distilbert/tokenization_distilbert.py/0 | {
"file_path": "AdaMix/src/transformers/models/distilbert/tokenization_distilbert.py",
"repo_id": "AdaMix",
"token_count": 1155
} | 55 |
from torch import nn
from transformers.activations import get_activation
import torch
from torch import Tensor
import torch.distributed as dist
from torch.nn import Module, ModuleList
import torch.nn.functional as F
import copy
import typing
class MixtureSoup(torch.nn.Module):
def __init__(self, expert, num_lo... | AdaMix/src/transformers/models/expert_soup.py/0 | {
"file_path": "AdaMix/src/transformers/models/expert_soup.py",
"repo_id": "AdaMix",
"token_count": 2254
} | 56 |
# 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/fsmt/convert_fsmt_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "AdaMix/src/transformers/models/fsmt/convert_fsmt_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "AdaMix",
"token_count": 4589
} | 57 |
# coding=utf-8
# Copyright 2020 The Google AI Language Team Authors, Allegro.pl, 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://ww... | AdaMix/src/transformers/models/herbert/tokenization_herbert_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/herbert/tokenization_herbert_fast.py",
"repo_id": "AdaMix",
"token_count": 2828
} | 58 |
# coding=utf-8
# Copyright 2018 The Microsoft Research Asia LayoutLM 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/... | AdaMix/src/transformers/models/layoutlm/modeling_layoutlm.py/0 | {
"file_path": "AdaMix/src/transformers/models/layoutlm/modeling_layoutlm.py",
"repo_id": "AdaMix",
"token_count": 22171
} | 59 |
# coding=utf-8
# Copyright 2018, Hao Tan, Mohit Bansal
#
# 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... | AdaMix/src/transformers/models/lxmert/configuration_lxmert.py/0 | {
"file_path": "AdaMix/src/transformers/models/lxmert/configuration_lxmert.py",
"repo_id": "AdaMix",
"token_count": 3802
} | 60 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team, Microsoft Corporation.
# 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 copy of the License ... | AdaMix/src/transformers/models/mpnet/configuration_mpnet.py/0 | {
"file_path": "AdaMix/src/transformers/models/mpnet/configuration_mpnet.py",
"repo_id": "AdaMix",
"token_count": 2093
} | 61 |
# coding=utf-8
# Copyright 2021, Google 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/LICENSE-2.0
... | AdaMix/src/transformers/models/pegasus/modeling_pegasus.py/0 | {
"file_path": "AdaMix/src/transformers/models/pegasus/modeling_pegasus.py",
"repo_id": "AdaMix",
"token_count": 31334
} | 62 |
# coding=utf-8
# Copyright 2020 The Microsoft 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
#
# Unl... | AdaMix/src/transformers/models/prophetnet/tokenization_prophetnet.py/0 | {
"file_path": "AdaMix/src/transformers/models/prophetnet/tokenization_prophetnet.py",
"repo_id": "AdaMix",
"token_count": 5476
} | 63 |
# 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/retribert/tokenization_retribert_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/retribert/tokenization_retribert_fast.py",
"repo_id": "AdaMix",
"token_count": 814
} | 64 |
# coding=utf-8
# Copyright 2020 The SqueezeBert 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
#
# U... | AdaMix/src/transformers/models/squeezebert/modeling_squeezebert.py/0 | {
"file_path": "AdaMix/src/transformers/models/squeezebert/modeling_squeezebert.py",
"repo_id": "AdaMix",
"token_count": 18614
} | 65 |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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 Lice... | AdaMix/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py/0 | {
"file_path": "AdaMix/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py",
"repo_id": "AdaMix",
"token_count": 22597
} | 66 |
# coding=utf-8
# Copyright 2020 The Microsoft 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
#
# Unl... | AdaMix/src/transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py/0 | {
"file_path": "AdaMix/src/transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py",
"repo_id": "AdaMix",
"token_count": 2529
} | 67 |
from collections.abc import Iterable
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union
import numpy as np
from ..data import SquadExample, SquadFeatures, squad_convert_examples_to_features
from ..file_utils import PaddingStrategy, add_end_docstrings, is_tf_available, is_torch_available
from ..model... | AdaMix/src/transformers/pipelines/question_answering.py/0 | {
"file_path": "AdaMix/src/transformers/pipelines/question_answering.py",
"repo_id": "AdaMix",
"token_count": 11275
} | 68 |
# coding=utf-8
# Copyright 2020-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 ap... | AdaMix/src/transformers/trainer_pt_utils.py/0 | {
"file_path": "AdaMix/src/transformers/trainer_pt_utils.py",
"repo_id": "AdaMix",
"token_count": 11864
} | 69 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..file_utils import requires_pytorch
class PyTorchBenchmark:
def __init__(self, *args, **kwargs):
requires_pytorch(self)
class PyTorchBenchmarkArguments:
def __init__(self, *args, **kwargs):
requires_pytorch(sel... | AdaMix/src/transformers/utils/dummy_pt_objects.py/0 | {
"file_path": "AdaMix/src/transformers/utils/dummy_pt_objects.py",
"repo_id": "AdaMix",
"token_count": 25432
} | 70 |
# 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/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/__init__.py/0 | {
"file_path": "AdaMix/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/__init__.py",
"repo_id": "AdaMix",
"token_count": 3443
} | 71 |
{
"modelname": "NewENCDEC",
"uppercase_modelname": "NEW_ENC_DEC",
"lowercase_modelname": "new_enc_dec",
"camelcase_modelname": "NewEncDec",
"authors": "The HuggingFace Team",
"checkpoint_identifier": "new-enc-dec-base",
"tokenizer_type": "Based on BART",
"generate_tensorflow_and_pytorch": "PyTorch",
"... | AdaMix/templates/adding_a_new_model/tests/pt-seq-2-seq-bart-tokenizer.json/0 | {
"file_path": "AdaMix/templates/adding_a_new_model/tests/pt-seq-2-seq-bart-tokenizer.json",
"repo_id": "AdaMix",
"token_count": 144
} | 72 |
# 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_benchmark_tf.py/0 | {
"file_path": "AdaMix/tests/test_benchmark_tf.py",
"repo_id": "AdaMix",
"token_count": 4144
} | 73 |
# 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_hf_argparser.py/0 | {
"file_path": "AdaMix/tests/test_hf_argparser.py",
"repo_id": "AdaMix",
"token_count": 3394
} | 74 |
# coding=utf-8
# Copyright 2018 Microsoft 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 ... | AdaMix/tests/test_modeling_deberta.py/0 | {
"file_path": "AdaMix/tests/test_modeling_deberta.py",
"repo_id": "AdaMix",
"token_count": 5617
} | 75 |
# 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_longformer.py/0 | {
"file_path": "AdaMix/tests/test_modeling_longformer.py",
"repo_id": "AdaMix",
"token_count": 14442
} | 76 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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/tests/test_modeling_tf_flaubert.py/0 | {
"file_path": "AdaMix/tests/test_modeling_tf_flaubert.py",
"repo_id": "AdaMix",
"token_count": 5919
} | 77 |
# 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_conversational.py/0 | {
"file_path": "AdaMix/tests/test_pipelines_conversational.py",
"repo_id": "AdaMix",
"token_count": 7444
} | 78 |
# 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/tests/test_skip_decorators.py/0 | {
"file_path": "AdaMix/tests/test_skip_decorators.py",
"repo_id": "AdaMix",
"token_count": 1214
} | 79 |
# coding=utf-8
# Copyright 2020 Huggingface
#
# 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 agreed ... | AdaMix/tests/test_tokenization_dpr.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_dpr.py",
"repo_id": "AdaMix",
"token_count": 1261
} | 80 |
# 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_rag.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_rag.py",
"repo_id": "AdaMix",
"token_count": 3158
} | 81 |
# 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_trainer_callback.py/0 | {
"file_path": "AdaMix/tests/test_trainer_callback.py",
"repo_id": "AdaMix",
"token_count": 4105
} | 82 |
# 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/utils/link_tester.py/0 | {
"file_path": "AdaMix/utils/link_tester.py",
"repo_id": "AdaMix",
"token_count": 1044
} | 83 |
## API overview
We added some new APIs (marked with 💚) to [AirSim](https://github.com/Microsoft/Airsim) for the NeurIPS competition binaries.
#### Loading Unreal Engine environments
- [`simLoadLevel(level_name)`](https://microsoft.github.io/AirSim-Drone-Racing-Lab/autoapi/airsimdroneracinglab/client/index.ht... | AirSim-Drone-Racing-Lab/docs/api_overview.md/0 | {
"file_path": "AirSim-Drone-Racing-Lab/docs/api_overview.md",
"repo_id": "AirSim-Drone-Racing-Lab",
"token_count": 3388
} | 84 |
import cv2
import numpy as np
import os
import sys
import airsimdroneracingvae as airsim
# print(os.path.abspath(airsim.__file__))
from airsimdroneracingvae.types import Pose, Vector3r, Quaternionr
import airsimdroneracingvae.types
import airsimdroneracingvae.utils
import time
# import utils
curr_dir = os.path.dirna... | AirSim-Drone-Racing-VAE-Imitation/datagen/img_generator/pose_sampler.py/0 | {
"file_path": "AirSim-Drone-Racing-VAE-Imitation/datagen/img_generator/pose_sampler.py",
"repo_id": "AirSim-Drone-Racing-VAE-Imitation",
"token_count": 2019
} | 85 |
import os
import h5py
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import random
import os
import matplotlib.pyplot as plt
import glob
from PIL import Image
import cv2
from sklearn.model_selection import train_test_split
def convert_bgr2rgb(img_bgr):
return cv2.cvtColor(img_bgr, cv2.C... | AirSim-Drone-Racing-VAE-Imitation/racing_utils/dataset_utils.py/0 | {
"file_path": "AirSim-Drone-Racing-VAE-Imitation/racing_utils/dataset_utils.py",
"repo_id": "AirSim-Drone-Racing-VAE-Imitation",
"token_count": 6838
} | 86 |
#!/bin/bash
wget -c https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/releases/download/v1.0-linux/AirSim.zip;
mkdir -p /home/$USER/Documents/AirSim;
unzip AirSim.zip;
mv AirSim AirSim_Qualification;
wget --directory-prefix=AirSim_Qualification/AirSimExe/Content/Paks -c https://github.com/microsoft/AirSim-Ne... | AirSim-NeurIPS2019-Drone-Racing/download_qualification_binaries.sh/0 | {
"file_path": "AirSim-NeurIPS2019-Drone-Racing/download_qualification_binaries.sh",
"repo_id": "AirSim-NeurIPS2019-Drone-Racing",
"token_count": 286
} | 87 |
# Azure Monitor Events Extension
The Azure Monitor Events Extension allows users to send custom events to Application Insights in conjunction with the [Azure Monitor OpenTelemetry Distro](https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-enable?tabs=python).
## Install the package
Install the `Azure ... | ApplicationInsights-Python/azure-monitor-events-extension/README.md/0 | {
"file_path": "ApplicationInsights-Python/azure-monitor-events-extension/README.md",
"repo_id": "ApplicationInsights-Python",
"token_count": 337
} | 88 |
[tox]
skipsdist = True
skip_missing_interpreters = True
envlist =
py3{7,8,9,10,11}-events-ext
lint
[testenv]
deps =
-r test-requirements.txt
changedir =
events-ext: azure-monitor-events-extension/tests
commands_pre =
py3{7,8,9,10,11}: python -m pip install -U pip setuptools wheel
events-ext: pip ins... | ApplicationInsights-Python/tox.ini/0 | {
"file_path": "ApplicationInsights-Python/tox.ini",
"repo_id": "ApplicationInsights-Python",
"token_count": 337
} | 89 |
{
"excludeFiles": [
".yaspeller*",
"**/*devcontainer*",
".git",
".gitignore",
".gitattributes",
"node_modules",
"LICENSE",
"Makefile",
"**/.dockerignore",
"**/Dockerfile",
"**/*.tf*",
"**/*.terraform*",
"**/requi... | AzureTRE/.yaspellerrc.json/0 | {
"file_path": "AzureTRE/.yaspellerrc.json",
"repo_id": "AzureTRE",
"token_count": 1590
} | 90 |
{
"scriptFile": "__init__.py",
"entryPoint": "main",
"bindings": [
{
"name": "msg",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "%AIRLOCK_DATA_DELETION_QUEUE_NAME%",
"connection": "SB_CONNECTION_STRING"
}
]
}
| AzureTRE/airlock_processor/DataDeletionTrigger/function.json/0 | {
"file_path": "AzureTRE/airlock_processor/DataDeletionTrigger/function.json",
"repo_id": "AzureTRE",
"token_count": 130
} | 91 |
from collections import namedtuple
import json
import pytest
from mock import MagicMock, patch
from shared_code.blob_operations import get_blob_info_from_topic_and_subject, get_blob_info_from_blob_url, copy_data, get_blob_url, get_storage_endpoint_suffix
from exceptions import TooManyFilesInRequestException, NoFilesIn... | AzureTRE/airlock_processor/tests/shared_code/test_blob_operations.py/0 | {
"file_path": "AzureTRE/airlock_processor/tests/shared_code/test_blob_operations.py",
"repo_id": "AzureTRE",
"token_count": 2051
} | 92 |
from fastapi import HTTPException
from fastapi import Request
from fastapi.responses import PlainTextResponse
def http_error_handler(_: Request, exc: HTTPException) -> PlainTextResponse:
return PlainTextResponse(exc.detail, status_code=exc.status_code)
| AzureTRE/api_app/api/errors/http_error.py/0 | {
"file_path": "AzureTRE/api_app/api/errors/http_error.py",
"repo_id": "AzureTRE",
"token_count": 69
} | 93 |
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, status
from pydantic import parse_obj_as
from api.routes.resource_helpers import get_template
from db.errors import EntityVersionExist, InvalidInput
from api.helpers import get_repository
from db.repositories.resource_templates import R... | AzureTRE/api_app/api/routes/workspace_service_templates.py/0 | {
"file_path": "AzureTRE/api_app/api/routes/workspace_service_templates.py",
"repo_id": "AzureTRE",
"token_count": 908
} | 94 |
from datetime import datetime
import uuid
from typing import List
from pydantic import parse_obj_as
from db.repositories.resource_templates import ResourceTemplateRepository
from resources import strings
from models.domain.request_action import RequestAction
from models.domain.resource import ResourceType
from db.repo... | AzureTRE/api_app/db/repositories/operations.py/0 | {
"file_path": "AzureTRE/api_app/db/repositories/operations.py",
"repo_id": "AzureTRE",
"token_count": 4318
} | 95 |
from enum import Enum
from typing import List, Dict
from models.domain.azuretremodel import AzureTREModel
from pydantic import Field, validator
from pydantic.schema import Optional
from resources import strings
class AirlockRequestStatus(str, Enum):
"""
Airlock Resource status
"""
Draft = strings.AIR... | AzureTRE/api_app/models/domain/airlock_request.py/0 | {
"file_path": "AzureTRE/api_app/models/domain/airlock_request.py",
"repo_id": "AzureTRE",
"token_count": 1326
} | 96 |
import uuid
from datetime import datetime
from typing import List
from pydantic import BaseModel, Field
from models.domain.operation import Operation
from models.schemas.operation import get_sample_operation
from models.domain.airlock_request import AirlockActions, AirlockRequest, AirlockRequestType
def get_sample_ai... | AzureTRE/api_app/models/schemas/airlock_request.py/0 | {
"file_path": "AzureTRE/api_app/models/schemas/airlock_request.py",
"repo_id": "AzureTRE",
"token_count": 1910
} | 97 |
from models.domain.resource import ResourceType
from models.domain.resource_template import ResourceTemplate, Property, CustomAction
from models.schemas.resource_template import ResourceTemplateInCreate, ResourceTemplateInResponse
def get_sample_workspace_service_template_object(template_name: str = "tre-workspace-se... | AzureTRE/api_app/models/schemas/workspace_service_template.py/0 | {
"file_path": "AzureTRE/api_app/models/schemas/workspace_service_template.py",
"repo_id": "AzureTRE",
"token_count": 1165
} | 98 |
import asyncio
import json
import uuid
from pydantic import ValidationError, parse_obj_as
from api.routes.resource_helpers import get_timestamp
from models.domain.resource import Output
from db.repositories.resources_history import ResourceHistoryRepository
from models.domain.request_action import RequestAction
from ... | AzureTRE/api_app/service_bus/deployment_status_updater.py/0 | {
"file_path": "AzureTRE/api_app/service_bus/deployment_status_updater.py",
"repo_id": "AzureTRE",
"token_count": 5855
} | 99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.