text
stringlengths
5
22M
id
stringlengths
12
177
metadata
dict
__index_level_0__
int64
0
1.37k
import json import numpy as np import pandas as pd import pytest import torch from pytorch_lightning.trainer import Trainer from tensordict import TensorDict from causica.datasets.causica_dataset_format import Variable, VariablesMetadata from causica.lightning.data_modules.variable_spec_data import VariableSpecDataMo...
causica/test/lightning/test_variable_spec_data.py/0
{ "file_path": "causica/test/lightning/test_variable_spec_data.py", "repo_id": "causica", "token_count": 3839 }
1,107
from typing import Tuple import torch from .basisbladeorder import ShortLexBasisBladeOrder, construct_gmt class CliffordAlgebra: def __init__(self, metric): self.metric = torch.as_tensor(metric, dtype=torch.float32) self.num_bases = len(metric) self.bbo = ShortLexBasisBladeOrder(self.num_...
cliffordlayers/cliffordlayers/cliffordalgebra.py/0
{ "file_path": "cliffordlayers/cliffordlayers/cliffordalgebra.py", "repo_id": "cliffordlayers", "token_count": 1715 }
1,108
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Callable, Optional, Union import torch import torch.nn as nn def clifford_convnd( conv_fn: Callable, x: torch.Tensor, output_blades: int, weight: torch.Tensor, bias: Optional[torch.Tensor] = None, **k...
cliffordlayers/cliffordlayers/nn/functional/utils.py/0
{ "file_path": "cliffordlayers/cliffordlayers/nn/functional/utils.py", "repo_id": "cliffordlayers", "token_count": 1398 }
1,109
[data-md-color-scheme="clifford"] { --md-primary-fg-color: #204E4A; --md-primary-fg-color--light: #2E933C; --md-primary-fg-color--dark: #160C28; --md-primary-bg-color: #F4F1DE; --md-accent-fg-color: #2E933C; --md-accent-fg-color--transparent: hsla(93, 49%, 53%, 0.1)...
cliffordlayers/docs/css/extra.css/0
{ "file_path": "cliffordlayers/docs/css/extra.css", "repo_id": "cliffordlayers", "token_count": 180 }
1,110
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import torch import torch.nn.functional as F from cliffordlayers.models.basic.threed import ( CliffordMaxwellNet3d, CliffordFourierBasicBlock3d, ) def test_clifford_fourier_resnet(): """Test shape compatibility of CliffordMaxwellNet...
cliffordlayers/tests/test_CliffordMaxwellNet3d.py/0
{ "file_path": "cliffordlayers/tests/test_CliffordMaxwellNet3d.py", "repo_id": "cliffordlayers", "token_count": 669 }
1,111
from utils import * from copy import deepcopy import random # Generate the mask based on the valences and adjacent matrix so far # For a (node_in_focus, neighbor, edge_type) to be valid, neighbor's color < 2 and # there is no edge so far between node_in_focus and neighbor and it satisfy the valence constraint # and n...
constrained-graph-variational-autoencoder/data_augmentation.py/0
{ "file_path": "constrained-graph-variational-autoencoder/data_augmentation.py", "repo_id": "constrained-graph-variational-autoencoder", "token_count": 4133 }
1,112
FROM node:10.17 LABEL maintainer="Justin D. Harris (https://github.com/juharris)" LABEL org.label-schema.vendor="Microsoft" LABEL org.label-schema.url="https://github.com/microsoft/0xDeCA10B/tree/main/demo" LABEL org.label-schema.vcs-url="https://github.com/microsoft/0xDeCA10B/tree/main/demo" WORKDIR /root/workspace/...
0xDeCA10B/demo/Dockerfile/0
{ "file_path": "0xDeCA10B/demo/Dockerfile", "repo_id": "0xDeCA10B", "token_count": 228 }
0
import Link from '@material-ui/core/Link' import { withStyles } from '@material-ui/core/styles' import Typography from '@material-ui/core/Typography' import React from 'react' const styles = theme => ({ footer: { backgroundColor: theme.palette.background.paper, marginTop: theme.spacing(1), padding: theme.spacin...
0xDeCA10B/demo/client/src/Footer.js/0
{ "file_path": "0xDeCA10B/demo/client/src/Footer.js", "repo_id": "0xDeCA10B", "token_count": 750 }
1
pragma solidity ^0.6; pragma experimental ABIEncoderV2; import {Classifier64} from "./Classifier.sol"; /** * A Perceptron where the data given for updating and predicting is sparse. * `update` and `predict` methods take `data` that holds the indices of the features that are present. */ contract SparsePerceptron is...
0xDeCA10B/demo/client/src/contracts/classification/SparsePerceptron.sol/0
{ "file_path": "0xDeCA10B/demo/client/src/contracts/classification/SparsePerceptron.sol", "repo_id": "0xDeCA10B", "token_count": 2235 }
2
import React from 'react' import ReactDOM from 'react-dom' import './index.css' import App from './App' import registerServiceWorker from './registerServiceWorker' ReactDOM.render(<App />, document.getElementById('root')) registerServiceWorker()
0xDeCA10B/demo/client/src/index.js/0
{ "file_path": "0xDeCA10B/demo/client/src/index.js", "repo_id": "0xDeCA10B", "token_count": 74 }
3
/// <reference types="react-scripts" />
0xDeCA10B/demo/client/src/react-app-env.d.ts/0
{ "file_path": "0xDeCA10B/demo/client/src/react-app-env.d.ts", "repo_id": "0xDeCA10B", "token_count": 11 }
4
const Classifier = artifacts.require("./classification/DensePerceptron") const { normalizeArray } = require('../../../src/ml-models/tensor-utils-node') const { convertData, convertNum } = require('../../../src/float-utils-node') contract('DensePerceptron', function (accounts) { const toFloat = 1E9 const classifica...
0xDeCA10B/demo/client/test/contracts/classification/denseperceptron.js/0
{ "file_path": "0xDeCA10B/demo/client/test/contracts/classification/denseperceptron.js", "repo_id": "0xDeCA10B", "token_count": 1658 }
5
# For deployment to an Azure Web Service # First get permission to push 0xdeca10bcontainerreg.azurecr.io, then: # docker login 0xdeca10bcontainerreg.azurecr.io # docker build --file service.Dockerfile -t 0xdeca10bcontainerreg.azurecr.io/public/samples/blockchain-ai/0xdeca10b-demo-prod . # docker push 0xdeca10bcontainer...
0xDeCA10B/demo/service.Dockerfile/0
{ "file_path": "0xDeCA10B/demo/service.Dockerfile", "repo_id": "0xDeCA10B", "token_count": 488 }
6
import logging from abc import ABC, abstractmethod from typing import List from decai.simulation.contract.objects import SmartContract from decai.simulation.data.featuremapping.feature_index_mapper import FeatureIndexMapping class Classifier(ABC, SmartContract): """ A classifier that can take a data sample a...
0xDeCA10B/simulation/decai/simulation/contract/classification/classifier.py/0
{ "file_path": "0xDeCA10B/simulation/decai/simulation/contract/classification/classifier.py", "repo_id": "0xDeCA10B", "token_count": 1046 }
7
from dataclasses import dataclass, field from logging import Logger from typing import List import numpy as np from injector import ClassAssistedBuilder, Module, inject, provider, singleton from keras.datasets import imdb from .data_loader import DataLoader @inject @dataclass class ImdbDataLoader(DataLoader): "...
0xDeCA10B/simulation/decai/simulation/data/imdb_data_loader.py/0
{ "file_path": "0xDeCA10B/simulation/decai/simulation/data/imdb_data_loader.py", "repo_id": "0xDeCA10B", "token_count": 737 }
8
import os import sys import math from injector import inject, Injector from decai.simulation.contract.balances import Balances from decai.simulation.contract.classification.perceptron import PerceptronModule from decai.simulation.contract.collab_trainer import DefaultCollaborativeTrainerModule from decai.simulation.c...
0xDeCA10B/simulation/decai/simulation/simulate_prediction_market.py/0
{ "file_path": "0xDeCA10B/simulation/decai/simulation/simulate_prediction_market.py", "repo_id": "0xDeCA10B", "token_count": 2560 }
9
# Lab 8 - 自动机器学习系统练习 ## 实验目的 通过试用 NNI 了解自动机器学习,熟悉自动机器学习中的基本概念 ## 实验环境 * Ubuntu * Python==3.7.6 * NNI==1.8 * PyTorch==1.5.0 ## 实验原理 在本实验中,我们将处理 CIFAR-10 图片分类数据集。基于一个表现较差的基准模型和训练方法,我们将使用自动机器学习的方法进行模型选择和优化、超参数调优,从而得到一个准确率较高的模型。 ## 实验内容 ### 实验流程图 ![](/imgs/Lab8-flow.png "Lab8 flow chat") ### 具体步骤 1. 熟悉 PyTorch 和...
AI-System/Labs/AdvancedLabs/Lab8/README.md/0
{ "file_path": "AI-System/Labs/AdvancedLabs/Lab8/README.md", "repo_id": "AI-System", "token_count": 3240 }
10
# Lab 1 - 框架及工具入门示例 ## 实验目的 1. 了解深度学习框架及工作流程(Deep Learning Workload) 2. 了解在不同硬件和批大小(batch_size)条件下,张量运算产生的开销 ## 实验环境 * PyTorch==1.5.0 * TensorFlow>=1.15.0 * 【可选环境】 单机Nvidia GPU with CUDA 10.0 ## 实验原理 通过在深度学习框架上调试和运行样例程序,观察不同配置下的运行结果,了解深度学习系统的工作流程。 ## 实验内容 ### 实验流程图 ![](/imgs/Lab1-flow.png "Lab1 flow chat")...
AI-System/Labs/BasicLabs/Lab1/README.md/0
{ "file_path": "AI-System/Labs/BasicLabs/Lab1/README.md", "repo_id": "AI-System", "token_count": 2109 }
11
// 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, modif...
AI-System/Labs/BasicLabs/Lab3/mylinear_cuda_extension/mylinear_cuda_kernel.cu/0
{ "file_path": "AI-System/Labs/BasicLabs/Lab3/mylinear_cuda_extension/mylinear_cuda_kernel.cu", "repo_id": "AI-System", "token_count": 1756 }
12
# 进阶学习 ## 1. [在GPU服务器安装nvidia-docker](https://github.com/NVIDIA/nvidia-docker) ## 2. 使用含有CUDA和cuDNN的基础镜像 [Horovod基础镜像Dockerfile](https://github.com/horovod/horovod/blob/master/Dockerfile.gpu) [PyTorch训练任务Dockerfile](Dockerfile.gpu) [PyTorch推理任务Dockerfile](Dockerfile.infer.gpu) ## 3. [将打包好的镜像部署到AI平台OpenPAI](https://...
AI-System/Labs/BasicLabs/Lab5/extend.md/0
{ "file_path": "AI-System/Labs/BasicLabs/Lab5/extend.md", "repo_id": "AI-System", "token_count": 239 }
13
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 10.1 强化学习的基本概念 - [10.1 强化学习](#101-强化学习) - [10.1.1 强化学习是什么?](#1011-强化学习是什么) - [10.1.2 强化学习概念](#1012-强化学习概念) - [10.1.3 强化学习用来解决什么问题呢?](#1013-强化学习用来解决什么问题呢) - [10.1.4 强化学习...
AI-System/Textbook/第10章-强化学习系统/10.1 强化学习的基本概念.md/0
{ "file_path": "AI-System/Textbook/第10章-强化学习系统/10.1 强化学习的基本概念.md", "repo_id": "AI-System", "token_count": 9500 }
14
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 11.1 模型压缩简介 自深度学习爆发以来,其模型的大小增长了千倍以上,而代表性硬件GPU的算力却仅增长了大约十倍。 深度学习算力的需求和供给之间存在着巨大的差距,突出了对模型进行压缩加速的必要性和重要性。 本小节将首先介绍模型压缩的背景,进而介绍常用的几种模型压缩方法。 - [11.1 模型压缩简介](#111-模型压缩简介) - [11....
AI-System/Textbook/第11章-模型压缩与加速/11.1-模型压缩简介.md/0
{ "file_path": "AI-System/Textbook/第11章-模型压缩与加速/11.1-模型压缩简介.md", "repo_id": "AI-System", "token_count": 15099 }
15
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 人工智能优化计算机系统 # 前言 “The world runs on software” —— 我们生活中依赖的各种服务都离不开计算机系统。比如搜索、购物、聊天,视频流应用,和新闻推荐服务等,背后都是由超大规模的计算机系统来提供服务的。随着用户的需求和场景增多,这些系统的复杂度和规模也在不断增加。这复杂度和规模不仅仅体现在其巨大的代码量,更体现在...
AI-System/Textbook/第13章-人工智能优化计算机系统/13-前言.md/0
{ "file_path": "AI-System/Textbook/第13章-人工智能优化计算机系统/13-前言.md", "repo_id": "AI-System", "token_count": 963 }
16
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 异构计算集群调度与资源管理系统 (Heterogeneous Computing Cluster Scheduling and Resource Management System) # 简介 你不能在薄弱的基础上建造一座伟大的建筑。如果你要拥有一个强大的上层建筑,你必须有一个坚实的基础。“You can’t build a great bu...
AI-System/Textbook/第7章-异构计算集群调度与资源管理系统/7-前言.md/0
{ "file_path": "AI-System/Textbook/第7章-异构计算集群调度与资源管理系统/7-前言.md", "repo_id": "AI-System", "token_count": 2013 }
17
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 8.6 推理专有芯片 <center> <img src="./img/6/8-6-1-inferarchchip.png" /></center> <center>图 8.6.1 推理专有芯片 </center> 如图 8.6.1 所示,推理系统最终将任务提交到推理专有芯片进行计算,软件层的优化上限在硬件层,本小节我们将围绕面向深度学习负载的推...
AI-System/Textbook/第8章-深度学习推理系统/8.6-推理专有芯片.md/0
{ "file_path": "AI-System/Textbook/第8章-深度学习推理系统/8.6-推理专有芯片.md", "repo_id": "AI-System", "token_count": 19035 }
18
<!--Copyright © Microsoft Corporation. All rights reserved. 适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可--> # 自动机器学习系统 (AutoML System) # 简介 自动机器学习(AutoML)是自动化得将机器学习应用到物理世界中的可以由AI驱动的各类场景中的一种技术。它涵盖了从处理原始数据集(Raw Dataset)到产生一个满足需求可部署的机器学习模型(Machine Learning Model)并部署维护的整个过程。自动机器学习可以将模型开...
AI-System/Textbook/第9章-自动化机器学习系统/9-前言.md/0
{ "file_path": "AI-System/Textbook/第9章-自动化机器学习系统/9-前言.md", "repo_id": "AI-System", "token_count": 1006 }
19
theme: jekyll-theme-cayman
AI-System/docs/_config.yml/0
{ "file_path": "AI-System/docs/_config.yml", "repo_id": "AI-System", "token_count": 11 }
20
# AMLBatchScoringPipeline Pipeline trigger: batch: true branches: include: - master variables: - group: AzureKeyVault jobs: - job: AMLBatchScoringPipelineJob timeoutInMinutes: 300 cancelTimeoutInMinutes: 2 pool: vmImage: 'Ubuntu-16.04' steps: - bash: | source /usr/share/minicond...
AI/.ci/python-ml-scoring.yml/0
{ "file_path": "AI/.ci/python-ml-scoring.yml", "repo_id": "AI", "token_count": 922 }
21
parameters: Agent: Hosted Ubuntu 1604 Demands: "python3" stageName: 'defaultStageName' jobDisplayName: 'defaultDisplayName' jobTimeoutInMinutes: 15 DefaultWorkingDirectory: # pypi_artifactFeeds: # pypi_pythonDownloadServiceConnections: # module: src candidate: # dependsOn: [] environment: # be...
AI/.ci/stage/python_candidate_stage.yml/0
{ "file_path": "AI/.ci/stage/python_candidate_stage.yml", "repo_id": "AI", "token_count": 1632 }
22
parameters: azureSubscription: 'x' azure_subscription: 'x' location: '.' azureresourcegroup: 'x' workspacename: 'x' azureregion: westus2 aksimagename: 'x' aks_name: 'x' aks_service_name: 'x' conda: 'MLHyperparameterTuning' doCleanup: true python_path: 'x' max_total_runs: 1 flighting_release:...
AI/.ci/steps/MLTrainDeployAMLJob.yml/0
{ "file_path": "AI/.ci/steps/MLTrainDeployAMLJob.yml", "repo_id": "AI", "token_count": 969 }
23
parameters: root: C:\Anaconda\envs\ conda_env: # this param must be set clean_conda: true steps: - script: | call conda env remove -n ${{parameters.conda_env}} -y if exist ${{parameters.root}}${{parameters.conda_env}} rmdir /s /q ${{parameters.root}}${{parameters.conda_env}} workingDirectory: tests d...
AI/.ci/steps/reco_conda_clean_win.yml/0
{ "file_path": "AI/.ci/steps/reco_conda_clean_win.yml", "repo_id": "AI", "token_count": 254 }
24
# This script is for training the warmup checkpoint for ANCE data_dir="../data/raw_data/" output_dir="" cmd="python3 -m torch.distributed.launch --nproc_per_node=1 ../drivers/run_warmup.py --train_model_type rdot_nll \ --model_name_or_path roberta-base \ --task_name MSMarco --do_train --evaluate_during_training --d...
ANCE/commands/run_train_warmup.sh/0
{ "file_path": "ANCE/commands/run_train_warmup.sh", "repo_id": "ANCE", "token_count": 297 }
25
import torch import torch.nn as nn import torch.nn.functional as F import math import torch.onnx.operators from typing import Callable, Optional, Dict, Tuple, Any, NamedTuple, List from torch import Tensor, nn from torch.nn import Parameter import uuid try: from apex.normalization import FusedLayerNorm as _Fused...
ANCE/model/SEED_Encoder/modules.py/0
{ "file_path": "ANCE/model/SEED_Encoder/modules.py", "repo_id": "ANCE", "token_count": 32009 }
26
""" Code for self-training with weak supervision. Author: Giannis Karamanolakis (gkaraman@cs.columbia.edu) """ import os from model import LogRegTrainer, BertTrainer, DefaultModelTrainer preprocessed_dataset_list = ['trec', 'youtube', 'sms', 'census', 'mitr'] supported_trainers = { 'logreg': LogRegTrainer, 'b...
ASTRA/astra/Student.py/0
{ "file_path": "ASTRA/astra/Student.py", "repo_id": "ASTRA", "token_count": 1797 }
27
.PHONY: deps_table_update modified_only_fixup extra_quality_checks quality style fixup fix-copies test test-examples docs check_dirs := examples tests src utils modified_only_fixup: $(eval modified_py_files := $(shell python utils/get_modified_files.py $(check_dirs))) @if test -n "$(modified_py_files)"; then \ e...
AdaMix/Makefile/0
{ "file_path": "AdaMix/Makefile", "repo_id": "AdaMix", "token_count": 781 }
28
__author__='thiagocastroferreira' """ Author: Organizers of the 2nd WebNLG Challenge Date: 23/04/2020 Description: This script aims to evaluate the output of data-to-text NLG models by computing popular automatic metrics such as BLEU (two implementations), METEOR, chrF++, TER and BERT-Score. ARG...
AdaMix/NLG/eval/eval.py/0
{ "file_path": "AdaMix/NLG/eval/eval.py", "repo_id": "AdaMix", "token_count": 6096 }
29
. ./venv/bin/activate seed=110 n_experts=8 python -m torch.distributed.launch --nproc_per_node=1 src/gpt2_ft.py \ --train_data ./data/webnlg_challenge_2017/train.jsonl \ --valid_data ./data/webnlg_challenge_2017/valid.jsonl \ --train_batch_size 8 \ --grad_acc 1 \ --valid_batch_size 4 \ --seq_len 512 \ --model_card gp...
AdaMix/NLG/run_train_webnlg.sh/0
{ "file_path": "AdaMix/NLG/run_train_webnlg.sh", "repo_id": "AdaMix", "token_count": 379 }
30
# ------------------------------------------------------------------------------------------ # Copyright (c). All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -----------------------------------------------------------------------------------------...
AdaMix/NLG/src/model.py/0
{ "file_path": "AdaMix/NLG/src/model.py", "repo_id": "AdaMix", "token_count": 9630 }
31
.. 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/bertgeneration.rst/0
{ "file_path": "AdaMix/docs/source/model_doc/bertgeneration.rst", "repo_id": "AdaMix", "token_count": 1349 }
32
.. 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/fsmt.rst/0
{ "file_path": "AdaMix/docs/source/model_doc/fsmt.rst", "repo_id": "AdaMix", "token_count": 854 }
33
.. 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/pegasus.rst/0
{ "file_path": "AdaMix/docs/source/model_doc/pegasus.rst", "repo_id": "AdaMix", "token_count": 1745 }
34
.. 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/xlnet.rst/0
{ "file_path": "AdaMix/docs/source/model_doc/xlnet.rst", "repo_id": "AdaMix", "token_count": 1984 }
35
{ "fp16": { "enabled": true, "initial_scale_power": 12 }, "zero_optimization": { "stage": 2, "reduce_bucket_size": 5e7, "allgather_bucket_size": 1.25e9, "overlap_comm": true, "contiguous_gradients": true }, "zero_allow_untested_optimizer": true }
AdaMix/ds_config.json/0
{ "file_path": "AdaMix/ds_config.json", "repo_id": "AdaMix", "token_count": 134 }
36
<!--- 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/examples/legacy/README.md/0
{ "file_path": "AdaMix/examples/legacy/README.md", "repo_id": "AdaMix", "token_count": 204 }
37
#!/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/legacy/run_swag.py/0
{ "file_path": "AdaMix/examples/legacy/run_swag.py", "repo_id": "AdaMix", "token_count": 12551 }
38
#!/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/pack_dataset.py/0
{ "file_path": "AdaMix/examples/legacy/seq2seq/pack_dataset.py", "repo_id": "AdaMix", "token_count": 1358 }
39
if ! [ -f ./dev.txt ]; then echo "Download dev dataset...." curl -L -o ./dev.txt 'https://github.com/UniversalDependencies/UD_English-EWT/raw/master/en_ewt-ud-dev.conllu' fi if ! [ -f ./test.txt ]; then echo "Download test dataset...." curl -L -o ./test.txt 'https://github.com/UniversalDependencies/UD_English-...
AdaMix/examples/legacy/token-classification/run_pos.sh/0
{ "file_path": "AdaMix/examples/legacy/token-classification/run_pos.sh", "repo_id": "AdaMix", "token_count": 416 }
40
# 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/question-answering/utils_qa.py/0
{ "file_path": "AdaMix/examples/question-answering/utils_qa.py", "repo_id": "AdaMix", "token_count": 9145 }
41
# 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/examples/research_projects/bertabs/convert_bertabs_original_pytorch_checkpoint.py/0
{ "file_path": "AdaMix/examples/research_projects/bertabs/convert_bertabs_original_pytorch_checkpoint.py", "repo_id": "AdaMix", "token_count": 2412 }
42
from __future__ import absolute_import, division, print_function, unicode_literals import torch.nn as nn from torch.nn import CrossEntropyLoss, MSELoss from transformers import RobertaConfig from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward from transformers.models.robert...
AdaMix/examples/research_projects/deebert/src/modeling_highway_roberta.py/0
{ "file_path": "AdaMix/examples/research_projects/deebert/src/modeling_highway_roberta.py", "repo_id": "AdaMix", "token_count": 3079 }
43
<!--- 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/examples/research_projects/mlm_wwm/README.md/0
{ "file_path": "AdaMix/examples/research_projects/mlm_wwm/README.md", "repo_id": "AdaMix", "token_count": 1133 }
44
# 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 a...
AdaMix/examples/research_projects/movement-pruning/emmental/modules/masked_nn.py/0
{ "file_path": "AdaMix/examples/research_projects/movement-pruning/emmental/modules/masked_nn.py", "repo_id": "AdaMix", "token_count": 1924 }
45
#! /usr/bin/env python3 # coding=utf-8 # Copyright (c) 2019 Uber Technologies, 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 ...
AdaMix/examples/research_projects/pplm/run_pplm_discrim_train.py/0
{ "file_path": "AdaMix/examples/research_projects/pplm/run_pplm_discrim_train.py", "repo_id": "AdaMix", "token_count": 8796 }
46
import json import os import shutil import sys import tempfile import unittest from unittest import TestCase from unittest.mock import patch import numpy as np from datasets import Dataset import faiss from transformers import BartConfig, BartTokenizer, DPRConfig, DPRQuestionEncoderTokenizer, RagConfig from transform...
AdaMix/examples/research_projects/rag/test_distributed_retriever.py/0
{ "file_path": "AdaMix/examples/research_projects/rag/test_distributed_retriever.py", "repo_id": "AdaMix", "token_count": 6637 }
47
# Script for verifying that run_bart_sum can be invoked from its directory # Get tiny dataset with cnn_dm format (4 examples for train, val, test) wget https://cdn-datasets.huggingface.co/summarization/cnn_tiny.tgz tar -xzvf cnn_tiny.tgz rm cnn_tiny.tgz export OUTPUT_DIR_NAME=bart_utest_output export CURRENT_DIR=${PW...
AdaMix/examples/research_projects/seq2seq-distillation/finetune_bart_tiny.sh/0
{ "file_path": "AdaMix/examples/research_projects/seq2seq-distillation/finetune_bart_tiny.sh", "repo_id": "AdaMix", "token_count": 333 }
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 applicable law or ...
AdaMix/examples/text-classification/README.md/0
{ "file_path": "AdaMix/examples/text-classification/README.md", "repo_id": "AdaMix", "token_count": 3948 }
49
# 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/src/transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py/0
{ "file_path": "AdaMix/src/transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py", "repo_id": "AdaMix", "token_count": 1132 }
50
# coding=utf-8 # Copyright 2020 The Google AI Language Team Authors, Facebook AI Research authors and 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 L...
AdaMix/src/transformers/generation_utils.py/0
{ "file_path": "AdaMix/src/transformers/generation_utils.py", "repo_id": "AdaMix", "token_count": 58253 }
51
# 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/albert/__init__.py/0
{ "file_path": "AdaMix/src/transformers/models/albert/__init__.py", "repo_id": "AdaMix", "token_count": 1574 }
52
# 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.py/0
{ "file_path": "AdaMix/src/transformers/models/bart/tokenization_bart.py", "repo_id": "AdaMix", "token_count": 1162 }
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/bert/convert_bert_original_tf_checkpoint_to_pytorch.py/0
{ "file_path": "AdaMix/src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py", "repo_id": "AdaMix", "token_count": 727 }
54
# coding=utf-8 # Copyright 2021 The Facebook Inc. 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/LI...
AdaMix/src/transformers/models/blenderbot/tokenization_blenderbot.py/0
{ "file_path": "AdaMix/src/transformers/models/blenderbot/tokenization_blenderbot.py", "repo_id": "AdaMix", "token_count": 1573 }
55
# 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 r...
AdaMix/src/transformers/models/convbert/modeling_tf_convbert.py/0
{ "file_path": "AdaMix/src/transformers/models/convbert/modeling_tf_convbert.py", "repo_id": "AdaMix", "token_count": 25698 }
56
# coding=utf-8 # Copyright 2010, DPR authors, The Hugging Face 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 ...
AdaMix/src/transformers/models/dpr/configuration_dpr.py/0
{ "file_path": "AdaMix/src/transformers/models/dpr/configuration_dpr.py", "repo_id": "AdaMix", "token_count": 2647 }
57
# coding=utf-8 # Copyright 2020 The Google AI Team, Stanford University 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/L...
AdaMix/src/transformers/models/electra/tokenization_electra.py/0
{ "file_path": "AdaMix/src/transformers/models/electra/tokenization_electra.py", "repo_id": "AdaMix", "token_count": 1066 }
58
# coding=utf-8 # Copyright 2019-present, 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 # # Un...
AdaMix/src/transformers/models/flaubert/modeling_tf_flaubert.py/0
{ "file_path": "AdaMix/src/transformers/models/flaubert/modeling_tf_flaubert.py", "repo_id": "AdaMix", "token_count": 17843 }
59
# coding=utf-8 # Copyright 2018 The OpenAI Team Authors 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...
AdaMix/src/transformers/models/gpt2/modeling_tf_gpt2.py/0
{ "file_path": "AdaMix/src/transformers/models/gpt2/modeling_tf_gpt2.py", "repo_id": "AdaMix", "token_count": 20294 }
60
# coding=utf-8 # Copyright 2021 The I-BERT Authors (Sehoon Kim, Amir Gholami, Zhewei Yao, # Michael Mahoney, Kurt Keutzer - UC Berkeley) and The HuggingFace Inc. team. # Copyright (c) 20121, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
AdaMix/src/transformers/models/ibert/quant_modules.py/0
{ "file_path": "AdaMix/src/transformers/models/ibert/quant_modules.py", "repo_id": "AdaMix", "token_count": 13858 }
61
# 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.py/0
{ "file_path": "AdaMix/src/transformers/models/longformer/tokenization_longformer.py", "repo_id": "AdaMix", "token_count": 1242 }
62
# 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_rag.py/0
{ "file_path": "AdaMix/src/transformers/models/rag/modeling_rag.py", "repo_id": "AdaMix", "token_count": 36632 }
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/roberta/convert_roberta_original_pytorch_checkpoint_to_pytorch.py/0
{ "file_path": "AdaMix/src/transformers/models/roberta/convert_roberta_original_pytorch_checkpoint_to_pytorch.py", "repo_id": "AdaMix", "token_count": 3215 }
64
# 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 r...
AdaMix/src/transformers/models/speech_to_text/tokenization_speech_to_text.py/0
{ "file_path": "AdaMix/src/transformers/models/speech_to_text/tokenization_speech_to_text.py", "repo_id": "AdaMix", "token_count": 4311 }
65
# coding=utf-8 # Copyright 2019-present, 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 # # Un...
AdaMix/src/transformers/models/xlm/modeling_xlm.py/0
{ "file_path": "AdaMix/src/transformers/models/xlm/modeling_xlm.py", "repo_id": "AdaMix", "token_count": 23286 }
66
# 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/trainer_sm.py/0
{ "file_path": "AdaMix/src/transformers/sagemaker/trainer_sm.py", "repo_id": "AdaMix", "token_count": 6369 }
67
# 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 agreed...
AdaMix/src/transformers/utils/notebook.py/0
{ "file_path": "AdaMix/src/transformers/utils/notebook.py", "repo_id": "AdaMix", "token_count": 6210 }
68
# 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_fast_{{cookiecutter.lowercase_modelname}}.py/0
{ "file_path": "AdaMix/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/tokenization_fast_{{cookiecutter.lowercase_modelname}}.py", "repo_id": "AdaMix", "token_count": 3036 }
69
# coding=utf-8 # Copyright 2021 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 ag...
AdaMix/tests/test_feature_extraction_wav2vec2.py/0
{ "file_path": "AdaMix/tests/test_feature_extraction_wav2vec2.py", "repo_id": "AdaMix", "token_count": 2433 }
70
# 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_bert_generation.py/0
{ "file_path": "AdaMix/tests/test_modeling_bert_generation.py", "repo_id": "AdaMix", "token_count": 5516 }
71
# 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_modeling_flax_common.py/0
{ "file_path": "AdaMix/tests/test_modeling_flax_common.py", "repo_id": "AdaMix", "token_count": 2769 }
72
# 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_openai.py/0
{ "file_path": "AdaMix/tests/test_modeling_openai.py", "repo_id": "AdaMix", "token_count": 4712 }
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_tf_mobilebert.py/0
{ "file_path": "AdaMix/tests/test_modeling_tf_mobilebert.py", "repo_id": "AdaMix", "token_count": 7026 }
74
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team, The Microsoft Research 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/tests/test_modeling_xlm_prophetnet.py/0
{ "file_path": "AdaMix/tests/test_modeling_xlm_prophetnet.py", "repo_id": "AdaMix", "token_count": 3630 }
75
# coding=utf-8 # Copyright 2018 Salesforce and 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_tokenization_bertweet.py/0
{ "file_path": "AdaMix/tests/test_tokenization_bertweet.py", "repo_id": "AdaMix", "token_count": 1115 }
76
# 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_marian.py/0
{ "file_path": "AdaMix/tests/test_tokenization_marian.py", "repo_id": "AdaMix", "token_count": 1563 }
77
# 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_tokenization_transfo_xl.py/0
{ "file_path": "AdaMix/tests/test_tokenization_transfo_xl.py", "repo_id": "AdaMix", "token_count": 1961 }
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_dummies.py/0
{ "file_path": "AdaMix/utils/check_dummies.py", "repo_id": "AdaMix", "token_count": 2719 }
79
from argparse import ArgumentParser import airsimdroneracinglab as airsim import cv2 import threading import time import utils import numpy as np import math # drone_name should match the name in ~/Document/AirSim/settings.json class BaselineRacer(object): def __init__( self, drone_name="drone_1", ...
AirSim-Drone-Racing-Lab/baselines/baseline_racer.py/0
{ "file_path": "AirSim-Drone-Racing-Lab/baselines/baseline_racer.py", "repo_id": "AirSim-Drone-Racing-Lab", "token_count": 8753 }
80
{ "ClockSpeed": 1, "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings.md", "SettingsVersion": 1.2, "SimMode": "Multirotor", "ViewMode": "NoDisplay", "Vehicles": { "drone_1": { "Cameras": { "fpv_cam": { "CaptureSettings": [ { "FOV...
AirSim-Drone-Racing-Lab/settings/settings_no_view.json/0
{ "file_path": "AirSim-Drone-Racing-Lab/settings/settings_no_view.json", "repo_id": "AirSim-Drone-Racing-Lab", "token_count": 582 }
81
import tensorflow as tf import os import sys import matplotlib.pyplot as plt import numpy as np # imports curr_dir = os.path.dirname(os.path.abspath(__file__)) import_path = os.path.join(curr_dir, '..') sys.path.insert(0, import_path) import racing_models.cmvae import racing_utils # DEFINE TESTING META PARAMETERS dat...
AirSim-Drone-Racing-VAE-Imitation/cmvae/eval_cmvae.py/0
{ "file_path": "AirSim-Drone-Racing-VAE-Imitation/cmvae/eval_cmvae.py", "repo_id": "AirSim-Drone-Racing-VAE-Imitation", "token_count": 2720 }
82
from .cmvae import * from .decoders import * from .dronet import * from .bc_full import * from .bc_latent import * from .transformer import *
AirSim-Drone-Racing-VAE-Imitation/racing_models/__init__.py/0
{ "file_path": "AirSim-Drone-Racing-VAE-Imitation/racing_models/__init__.py", "repo_id": "AirSim-Drone-Racing-VAE-Imitation", "token_count": 47 }
83
import numpy as np # Plots gate centers def plot_gates_2d(ax, gate_poses): gate_pos = np.array([pose.position.to_numpy_array() for pose in gate_poses]) ax.plot(gate_pos[:, 1], gate_pos[:, 0], 'x') def plot_track_arrows(ax, track): # Plot gates for i in range(track.n_gates): ax.arrow(track.gate...
AirSim-NeurIPS2019-Drone-Racing/baselines/gtp_visualize.py/0
{ "file_path": "AirSim-NeurIPS2019-Drone-Racing/baselines/gtp_visualize.py", "repo_id": "AirSim-NeurIPS2019-Drone-Racing", "token_count": 1172 }
84
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """ An example to show how to use the track_event api to send custom events to Application Insights. """ from azure.monitor.events.extension import track_event from azure.monitor.opentelemetry import configure_azure_monitor c...
ApplicationInsights-Python/azure-monitor-events-extension/samples/events.py/0
{ "file_path": "ApplicationInsights-Python/azure-monitor-events-extension/samples/events.py", "repo_id": "ApplicationInsights-Python", "token_count": 143 }
85
#!/bin/bash set -o errexit set -o pipefail set -o nounset # Uncomment this line to see each command for debugging (careful: this will show secrets!) # set -o xtrace # docker socket fixup sudo bash ./devops/scripts/set_docker_sock_permission.sh
AzureTRE/.devcontainer/scripts/post-create.sh/0
{ "file_path": "AzureTRE/.devcontainer/scripts/post-create.sh", "repo_id": "AzureTRE", "token_count": 81 }
86
{ "version": "2.0", "logging": { "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" } } }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[4.0.0, 5.0.0)" } }
AzureTRE/airlock_processor/host.json/0
{ "file_path": "AzureTRE/airlock_processor/host.json", "repo_id": "AzureTRE", "token_count": 141 }
87
from fastapi import APIRouter from resources import strings from _version import __version__ from core import config from models.schemas.metadata import Metadata router = APIRouter() @router.get("/.metadata", name=strings.API_GET_PING) def metadata() -> Metadata: return Metadata( api_version=__version__,...
AzureTRE/api_app/api/routes/metadata.py/0
{ "file_path": "AzureTRE/api_app/api/routes/metadata.py", "repo_id": "AzureTRE", "token_count": 179 }
88
import asyncio from azure.mgmt.cosmosdb import CosmosDBManagementClient from core.config import SUBSCRIPTION_ID, RESOURCE_GROUP_NAME, RESOURCE_LOCATION, COSMOSDB_ACCOUNT_NAME, STATE_STORE_DATABASE, STATE_STORE_RESOURCES_CONTAINER, STATE_STORE_RESOURCE_TEMPLATES_CONTAINER, STATE_STORE_RESOURCES_HISTORY_CONTAINER, STATE...
AzureTRE/api_app/db/events.py/0
{ "file_path": "AzureTRE/api_app/db/events.py", "repo_id": "AzureTRE", "token_count": 943 }
89
--- version: '3' services: app: build: "" restart: on-failure ports: - "8000:8000" env_file: - .env
AzureTRE/api_app/docker-compose.yml/0
{ "file_path": "AzureTRE/api_app/docker-compose.yml", "repo_id": "AzureTRE", "token_count": 68 }
90
from typing import Dict, Any, List, Optional, Union from pydantic import Field from models.domain.azuretremodel import AzureTREModel from models.domain.resource import ResourceType class Property(AzureTREModel): type: str = Field(title="Property type") title: str = Field("", title="Property description") ...
AzureTRE/api_app/models/domain/resource_template.py/0
{ "file_path": "AzureTRE/api_app/models/domain/resource_template.py", "repo_id": "AzureTRE", "token_count": 1346 }
91
from typing import Dict, List, Optional from pydantic import BaseModel, Field from models.domain.resource_template import CustomAction, ResourceTemplate, Property class ResourceTemplateInCreate(BaseModel): name: str = Field(title="Template name") version: str = Field(title="Template version") current: b...
AzureTRE/api_app/models/schemas/resource_template.py/0
{ "file_path": "AzureTRE/api_app/models/schemas/resource_template.py", "repo_id": "AzureTRE", "token_count": 680 }
92
#!/bin/bash # 1. Remove any previously run failed flag # 2. Run pytest, but capture the exit code so we always succeed # 3. Output a file if the tests are not successful. rm -f ../test-results/pytest_api* mkdir -p ../test-results if ! pytest --junit-xml ../test-results/pytest_api_unit.xml --ignore e2e_tests -W ignore...
AzureTRE/api_app/run_tests_and_exit_succesfully.sh/0
{ "file_path": "AzureTRE/api_app/run_tests_and_exit_succesfully.sh", "repo_id": "AzureTRE", "token_count": 148 }
93