text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import random
from pathlib import Path
from typing import List, Optional
from overrides import overrides
from tqdm import tqdm
from archai.common.ordered_dict_logger import OrderedDictLogger
from archai.discrete_search.api.archai_model import A... | archai/archai/discrete_search/algos/evolution_pareto.py/0 | {
"file_path": "archai/archai/discrete_search/algos/evolution_pareto.py",
"repo_id": "archai",
"token_count": 5288
} | 318 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Callable, Optional
from overrides import overrides
from archai.api.dataset_provider import DatasetProvider
from archai.discrete_search.api.archai_model import ArchaiModel
from archai.discrete_search.api.model_evaluator import... | archai/archai/discrete_search/evaluators/functional.py/0 | {
"file_path": "archai/archai/discrete_search/evaluators/functional.py",
"repo_id": "archai",
"token_count": 357
} | 319 |
from .backbones import *
from .model import LanguageModel
from .search_space import TfppSearchSpace
| archai/archai/discrete_search/search_spaces/nlp/tfpp/__init__.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/__init__.py",
"repo_id": "archai",
"token_count": 26
} | 320 |
from typing import Optional
import torch
from torch import nn
from transformers.models.reformer.modeling_reformer import ReformerConfig
from .lsh_utils.modeling_reformer import ReformerAttention
from archai.discrete_search.search_spaces.config import ArchConfig
class LSHAttention(nn.Module):
def __init__(self,... | archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/lsh_attn.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/lsh_attn.py",
"repo_id": "archai",
"token_count": 1250
} | 321 |
# TD [2023-01-05]: Copied from https://github.com/HazyResearch/state-spaces/blob/06dbbdfd0876501a7f12bf3262121badbc7658af/src/models/functional/vandermonde.py
# We add the interface to the log vandermonde CUDA code
"""pykeops implementations of the Vandermonde matrix multiplication kernel used in the S4D kernel."""
im... | archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/ssm_utils/ssm_ops/vandermonde.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/ssm_utils/ssm_ops/vandermonde.py",
"repo_id": "archai",
"token_count": 2551
} | 322 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
#
# Copyright (c) 2018, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0.
from typing import List, Optional, Tuple
import torch
import torch.nn as nn
from transformers.file_utils import ModelOutput
from transformers.models.tr... | archai/archai/discrete_search/search_spaces/nlp/transformer_flex/models/modeling_mem_transformer.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/transformer_flex/models/modeling_mem_transformer.py",
"repo_id": "archai",
"token_count": 6023
} | 323 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import List, Optional, Tuple
from onnx import GraphProto, ModelProto, NodeProto, TensorProto, ValueInfoProto, helper
from onnxruntime.transformers.fusion_attention import AttentionMask, FusionAttention
from onnxruntime.transformers.f... | archai/archai/onnx/optimization_utils/transfo_xl_onnx_model.py/0 | {
"file_path": "archai/archai/onnx/optimization_utils/transfo_xl_onnx_model.py",
"repo_id": "archai",
"token_count": 5921
} | 324 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import Iterator
import torch
from torch import Tensor, autograd, nn
from torch.nn.modules.loss import _Loss
from torch.optim.optimizer import Optimizer
from archai.common import ml_utils
from archai.common.config import ... | archai/archai/supergraph/algos/darts/bilevel_optimizer_slow.py/0 | {
"file_path": "archai/archai/supergraph/algos/darts/bilevel_optimizer_slow.py",
"repo_id": "archai",
"token_count": 3185
} | 325 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
class Wmr:
""" Implements the Randomized Weighted Majority algorithm by Littlestone and Warmuth
We use the version in Fig 1 in The Multiplicative Weight Update with the gain version """
def __init__(self, num_item... | archai/archai/supergraph/algos/divnas/wmr.py/0 | {
"file_path": "archai/archai/supergraph/algos/divnas/wmr.py",
"repo_id": "archai",
"token_count": 526
} | 326 |
# Copyright 2019 The Google Research 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 applicable law or agree... | archai/archai/supergraph/algos/nasbench101/graph_util.py/0 | {
"file_path": "archai/archai/supergraph/algos/nasbench101/graph_util.py",
"repo_id": "archai",
"token_count": 1989
} | 327 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import List
# latest verion of ray works on Windows as well
import ray
from overrides import overrides
from archai.common import common
from archai.common.common import CommonState
from archai.common.config import Config... | archai/archai/supergraph/algos/petridish/searcher_petridish.py/0 | {
"file_path": "archai/archai/supergraph/algos/petridish/searcher_petridish.py",
"repo_id": "archai",
"token_count": 6199
} | 328 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from torch.utils.data import Dataset
class MetaDataset(Dataset):
def __init__(self, source:Dataset, transform=None, target_transform=None) -> None:
self._source = source
self.transform = transform if transform is not None el... | archai/archai/supergraph/datasets/meta_dataset.py/0 | {
"file_path": "archai/archai/supergraph/datasets/meta_dataset.py",
"repo_id": "archai",
"token_count": 257
} | 329 |
import torch
from torch import nn
from torch.nn import DataParallel
from .densenet import *
from .googlenet import *
from .inception import *
from .mobilenetv2 import *
from .pyramidnet import PyramidNet
from .resnet import *
from .resnet_orig import *
from .shakeshake.shake_resnet import ShakeResNet
from .shakeshake.... | archai/archai/supergraph/models/__init__.py/0 | {
"file_path": "archai/archai/supergraph/models/__init__.py",
"repo_id": "archai",
"token_count": 828
} | 330 |
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
def conv3x3(in_planes, out_planes, stride=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=True)
def conv_init(m):
classname = m.__class__.__name__
if classname.... | archai/archai/supergraph/models/wideresnet.py/0 | {
"file_path": "archai/archai/supergraph/models/wideresnet.py",
"repo_id": "archai",
"token_count": 1420
} | 331 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import math
import os
from typing import Iterator, Optional, Tuple
import yaml
from overrides import overrides
from archai.common import utils
from archai.common.config import Config
from archai.common.ordered_dict_logger import get_global_logg... | archai/archai/supergraph/nas/search_combinations.py/0 | {
"file_path": "archai/archai/supergraph/nas/search_combinations.py",
"repo_id": "archai",
"token_count": 4168
} | 332 |
# Copyright (c) 2019 abhuse.
# Licensed under the MIT license.
# https://github.com/abhuse/cyclic-cosine-decay/blob/master/scheduler.py
from collections.abc import Iterable
from math import cos, floor, log, pi
from typing import List, Optional, Union
import torch
from torch.optim.lr_scheduler import _LRScheduler
cl... | archai/archai/trainers/cyclic_cosine_scheduler.py/0 | {
"file_path": "archai/archai/trainers/cyclic_cosine_scheduler.py",
"repo_id": "archai",
"token_count": 3670
} | 333 |
__include__: "darts.yaml" # just use darts defaults
nas:
eval:
loader:
train_batch: 68
search:
# options are mutual information based 'mi', 'mi_ranked' or 'random' or 'default'.
# NOTE: 'default' is not compatible with 'noalpha' trainer as 'default' uses
# the darts finalizer and needs alpha... | archai/confs/algos/divnas.yaml/0 | {
"file_path": "archai/confs/algos/divnas.yaml",
"repo_id": "archai",
"token_count": 206
} | 334 |
common:
checkpoint:
freq: 10
dataset:
max_batches: -1
autoaug:
loader:
epochs: 600
batch: 2048
optimizer:
type: "cocob"
alpha: 100
lr_schedule:
type: null
min_lr: null
model:
type: 'resnet50'
| archai/confs/aug/aug_cifar_cocob_resnet50.yaml/0 | {
"file_path": "archai/confs/aug/aug_cifar_cocob_resnet50.yaml",
"repo_id": "archai",
"token_count": 161
} | 335 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
from archai.datasets.cv.mnist_dataset_provider import MnistDatasetProvider
def main():
""" This script is in a different folder from the other scripts because this way ensures
maximum reuse of the output dataset... | archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/data_prep/prep_data_store.py/0 | {
"file_path": "archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/data_prep/prep_data_store.py",
"repo_id": "archai",
"token_count": 365
} | 336 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import sys
import json
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import TQDMProgressBar
from model import MyModel
from mnist_data_module import MNistDataModule
from archai.common.store import ... | archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/train.py/0 | {
"file_path": "archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/train.py",
"repo_id": "archai",
"token_count": 1904
} | 337 |
<jupyter_start><jupyter_text>Implementing a Custom Dataset ProviderAbstract base classes (ABCs) define a blueprint for a class, specifying its methods and attributes, but not its implementation. They are important in implementing a consistent interface, as they enforce a set of requirements on implementing classes and ... | archai/docs/getting_started/notebooks/api/dataset_provider.ipynb/0 | {
"file_path": "archai/docs/getting_started/notebooks/api/dataset_provider.ipynb",
"repo_id": "archai",
"token_count": 1383
} | 338 |
Common Packages
===============
APEX Utilities
--------------
.. automodule:: archai.common.apex_utils
:members:
:undoc-members:
Atomic File Handler
-------------------
.. automodule:: archai.common.atomic_file_handler
:members:
:undoc-members:
AzureML Helper
--------------
.. automodule:: archai.comm... | archai/docs/reference/api/archai.common.rst/0 | {
"file_path": "archai/docs/reference/api/archai.common.rst",
"repo_id": "archai",
"token_count": 793
} | 339 |
Computer Vision
===============
.. toctree::
:maxdepth: 2
archai.discrete_search.search_spaces.cv.segmentation_dag
| archai/docs/reference/api/archai.discrete_search.search_spaces.cv.rst/0 | {
"file_path": "archai/docs/reference/api/archai.discrete_search.search_spaces.cv.rst",
"repo_id": "archai",
"token_count": 45
} | 340 |
Manual
======
Evaluater
---------
.. automodule:: archai.supergraph.algos.manual.manual_evaluater
:members:
:undoc-members:
Experiment Runner
-----------------
.. automodule:: archai.supergraph.algos.manual.manual_exp_runner
:members:
:undoc-members:
Searcher
--------
.. automodule:: archai.supergraph... | archai/docs/reference/api/archai.supergraph.algos.manual.rst/0 | {
"file_path": "archai/docs/reference/api/archai.supergraph.algos.manual.rst",
"repo_id": "archai",
"token_count": 147
} | 341 |
Changelog
=========
This section of the documentation is designed to provide a clear and concise overview of the changes that have been made to Archai, allowing users to stay informed about the latest developments and improvements.
The changelog is organized by version, with the most recent changes appearing at the t... | archai/docs/reference/changelog.rst/0 | {
"file_path": "archai/docs/reference/changelog.rst",
"repo_id": "archai",
"token_count": 140
} | 342 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
from transformers.generation.stopping_criteria import StoppingCriteria
class MultipleTokenStoppingCriteria(StoppingCriteria):
def __init__(self, stop_tokens: torch.LongTensor) -> None:
self.stop_tokens = stop_tokens
... | archai/research/lm_eval_harness/lm_eval_harness/utils/multiple_token_stopping_criteria.py/0 | {
"file_path": "archai/research/lm_eval_harness/lm_eval_harness/utils/multiple_token_stopping_criteria.py",
"repo_id": "archai",
"token_count": 299
} | 343 |
import json
from archai.common.common import common_init, expdir_abspath
from archai.common.ordered_dict_logger import get_global_logger
from archai.supergraph.utils.augmented_trainer import train_and_eval
logger = get_global_logger()
if __name__ == "__main__":
conf = common_init(
config_filepath="confs... | archai/scripts/supergraph/augmented_train.py/0 | {
"file_path": "archai/scripts/supergraph/augmented_train.py",
"repo_id": "archai",
"token_count": 582
} | 344 |
# Experiment: {exp_name}
Results dir: {results_dir}
Report dir {out_dir}
Job count: {job_count}
{summary_text}
{details_text} | archai/scripts/supergraph/reports/details.md/0 | {
"file_path": "archai/scripts/supergraph/reports/details.md",
"repo_id": "archai",
"token_count": 50
} | 345 |
# Face Segmentation
The purpose of this example/tutorial is to demonstrate how to perform multi-objective NAS for image segmentation models
using Archai. This approach allows us to optimize the model's performance with respect to multiple objectives, such as
Intersection Over Union (IOU) and inference time for various... | archai/tasks/face_segmentation/README.md/0 | {
"file_path": "archai/tasks/face_segmentation/README.md",
"repo_id": "archai",
"token_count": 6121
} | 346 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import sys
from archai.common.store import ArchaiStore
CONNECTION_NAME = 'MODEL_STORAGE_CONNECTION_STRING'
def status(con_str, experiment_name):
parser = argparse.ArgumentParser(description='Print status in .csv f... | archai/tasks/face_segmentation/aml/azure/status.py/0 | {
"file_path": "archai/tasks/face_segmentation/aml/azure/status.py",
"repo_id": "archai",
"token_count": 610
} | 347 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
from test_snpe import download_results
from shutil import rmtree
SNPE_OUTPUT_DIR = 'snpe_output'
files = [x for x in os.listdir('data/test') if x.endswith(".bin")]
files.sort()
output_dir = SNPE_OUTPUT_DIR
if os.path.isdir(output_dir)... | archai/tasks/face_segmentation/aml/snpe/fetch_results.py/0 | {
"file_path": "archai/tasks/face_segmentation/aml/snpe/fetch_results.py",
"repo_id": "archai",
"token_count": 167
} | 348 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import numpy as np
import sys
import tempfile
from pathlib import Path
from archai.discrete_search.api import ArchaiModel
from archai.discrete_search.search_spaces.config import ArchConfig
from archai.common.config import... | archai/tasks/face_segmentation/train_pareto.py/0 | {
"file_path": "archai/tasks/face_segmentation/train_pareto.py",
"repo_id": "archai",
"token_count": 1536
} | 349 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""Search space for facial landmark detection task"""
import copy
import json
import math
import random
import re
import sys
from hashlib import sha1
from typing import List
import numpy as np
import pandas as pd
import torch
from overrides.ove... | archai/tasks/facial_landmark_detection/search_space.py/0 | {
"file_path": "archai/tasks/facial_landmark_detection/search_space.py",
"repo_id": "archai",
"token_count": 7081
} | 350 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Any
from unittest.mock import MagicMock
from overrides import overrides
from archai.api.dataset_provider import DatasetProvider
class MyDatasetProvider(DatasetProvider):
def __init__(self) -> None:
super().__ini... | archai/tests/api/test_dataset_provider.py/0 | {
"file_path": "archai/tests/api/test_dataset_provider.py",
"repo_id": "archai",
"token_count": 370
} | 351 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import shutil
from archai.datasets.nlp.nvidia_dataset_provider import NvidiaDatasetProvider
def test_nvidia_dataset_provider():
# make sure tests can run in parallel and not clobber each other's dataroot.
unique_data_root = '... | archai/tests/datasets/nlp/test_nvidia_dataset_provider.py/0 | {
"file_path": "archai/tests/datasets/nlp/test_nvidia_dataset_provider.py",
"repo_id": "archai",
"token_count": 489
} | 352 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
import torch
from archai.discrete_search.api.archai_model import ArchaiModel
from archai.discrete_search.api.search_objectives import SearchObjectives
from archai.discrete_search.api.search_results import SearchResults
from ar... | archai/tests/discrete_search/api/test_search_results.py/0 | {
"file_path": "archai/tests/discrete_search/api/test_search_results.py",
"repo_id": "archai",
"token_count": 582
} | 353 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
import torch
from archai.discrete_search.api.archai_model import ArchaiModel
from archai.discrete_search.api.search_objectives import SearchObjectives
from archai.discrete_search.evaluators.functional import EvaluationFunction... | archai/tests/discrete_search/utils/test_multi_objective.py/0 | {
"file_path": "archai/tests/discrete_search/utils/test_multi_objective.py",
"repo_id": "archai",
"token_count": 867
} | 354 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
import pytest
import torch
from archai.quantization.modules import FakeDynamicQuantLinear
from archai.quantization.qat import (
DYNAMIC_QAT_MODULE_MAP,
ONNX_DYNAMIC_QAT_MODULE_MAP,
float_to_qat_modules,
prepare_with_... | archai/tests/quantization/test_qat.py/0 | {
"file_path": "archai/tests/quantization/test_qat.py",
"repo_id": "archai",
"token_count": 788
} | 355 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
import torch
from torch.optim import SGD
from archai.trainers.cyclic_cosine_scheduler import CyclicCosineDecayLR
INITIAL_LR = 1.0
@pytest.fixture
def optimizer():
return SGD([torch.randn(2, 2, requires_grad=True)], INITIAL_L... | archai/tests/trainers/test_cyclic_cosine_scheduler.py/0 | {
"file_path": "archai/tests/trainers/test_cyclic_cosine_scheduler.py",
"repo_id": "archai",
"token_count": 1591
} | 356 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/task_agent/task_agent_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/task_agent/task_agent_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 30516
} | 357 |

# Azure Quantum #
[/_apis/build/status/microsoft.qdk-python?branchName=main)](https://dev.azure.com/ms-quantum-p... | azure-quantum-python/azure-quantum/README.md/0 | {
"file_path": "azure-quantum-python/azure-quantum/README.md",
"repo_id": "azure-quantum-python",
"token_count": 1362
} | 358 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | azure-quantum-python/azure-quantum/azure/quantum/_client/operations/__init__.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/_client/operations/__init__.py",
"repo_id": "azure-quantum-python",
"token_count": 291
} | 359 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
"""Defines Azure Quantum job model"""
from azure.quantum._client.models import JobDetails
from .base_job import BaseJob
from .filtered_job import FilteredJob
from .job import Job, ContentType
from .job_failed_with_results_error import JobF... | azure-quantum-python/azure-quantum/azure/quantum/job/__init__.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/job/__init__.py",
"repo_id": "azure-quantum-python",
"token_count": 253
} | 360 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
from collections import defaultdict
from typing import Any, Dict, List, Union
import numpy as np
try:
from qiskit.providers import JobV1, JobStatus
from qiskit.result import Result
except ImportError:
raise ImportError(
... | azure-quantum-python/azure-quantum/azure/quantum/qiskit/job.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/qiskit/job.py",
"repo_id": "azure-quantum-python",
"token_count": 5979
} | 361 |
"""Defines targets and helper functions for the Pasqal provider"""
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
__all__ = [
"InputParams",
"Result",
"Pasqal",
"PasqalTarget",
]
from .result import Result
from .target import InputParams, Pasqal, P... | azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/__init__.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/__init__.py",
"repo_id": "azure-quantum-python",
"token_count": 111
} | 362 |
# Resource estimator examples
This directory contains several standalone Python scripts that use the Azure
Quantum Resource Estimator through the `azure-quantum` Python API.
## Prerequisites
These scripts require access to an Azure Quantum workspace. Read [our
documentation](https://learn.microsoft.com/azure/quantu... | azure-quantum-python/azure-quantum/examples/resource_estimation/README.md/0 | {
"file_path": "azure-quantum-python/azure-quantum/examples/resource_estimation/README.md",
"repo_id": "azure-quantum-python",
"token_count": 755
} | 363 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
<#
.SYNOPSIS
Test: Run unit tests for given packages/environments
#>
param (
[bool] $SkipInstall
)
# For debug, print all relevant environment variables:
Get-ChildItem env:AZURE*, env:*VERSION, env:*OUTDIR | F... | azure-quantum-python/azure-quantum/tests.live/Run.ps1/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests.live/Run.ps1",
"repo_id": "azure-quantum-python",
"token_count": 1514
} | 364 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
import abc
import pytest
import unittest
from typing import TYPE_CHECKING, Protocol, Tuple, runtime_checkable
from import_qsharp import skip_if_no_qsharp
if TYPE_CHECKING:
import cirq
import qiskit
@runtime_checkable
class QirInp... | azure-quantum-python/azure-quantum/tests/unit/test_job_payload_factory.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/test_job_payload_factory.py",
"repo_id": "azure-quantum-python",
"token_count": 2155
} | 365 |
<jupyter_start><jupyter_text>👋🌍 Hello, world: Submit a Q job to IonQIn this notebook, we'll review the basics of Azure Quantum by submitting a simple *job*, or quantum program, to [IonQ](https://ionq.com/). We will use [Q](https://learn.microsoft.com/azure/quantum/user-guide/) to express the quantum job. Submit a si... | azure-quantum-python/samples/hello-world/HW-ionq-qsharp.ipynb/0 | {
"file_path": "azure-quantum-python/samples/hello-world/HW-ionq-qsharp.ipynb",
"repo_id": "azure-quantum-python",
"token_count": 1311
} | 366 |
<jupyter_start><jupyter_text>Introduction to SessionsIn this notebook, we'll get used to working with sessions in Azure Quantum by using a session to run multiple Qiskit jobs on a target. What is a session?A session is a logical grouping of one or more jobs submitted to a single target (backend). Each session has a un... | azure-quantum-python/samples/sessions/introduction-to-sessions.ipynb/0 | {
"file_path": "azure-quantum-python/samples/sessions/introduction-to-sessions.ipynb",
"repo_id": "azure-quantum-python",
"token_count": 943
} | 367 |
const path = require('path')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
module.exports = {
entry: './src/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [new CleanWebpackPlugin()],
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
... | azure-quantum-python/visualization/js-lib/webpack.config.js/0 | {
"file_path": "azure-quantum-python/visualization/js-lib/webpack.config.js",
"repo_id": "azure-quantum-python",
"token_count": 380
} | 368 |
export { default as SpaceDiagram } from "./SpaceDiagram";
export { default as TimeDiagram } from "./TimeDiagram";
| azure-quantum-python/visualization/react-lib/src/components/resource-estimator/index.ts/0 | {
"file_path": "azure-quantum-python/visualization/react-lib/src/components/resource-estimator/index.ts",
"repo_id": "azure-quantum-python",
"token_count": 32
} | 369 |
Introduction
============
Many operations commonly performed on text strings are destructive; that is, they lose some information about the original string.
Systems that deal with text will commonly perform many of these operations on their input, whether it's changing case, performing unicode normalization, collapsin... | bistring/docs/Introduction.rst/0 | {
"file_path": "bistring/docs/Introduction.rst",
"repo_id": "bistring",
"token_count": 767
} | 370 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path s... | bistring/docs/conf.py/0 | {
"file_path": "bistring/docs/conf.py",
"repo_id": "bistring",
"token_count": 891
} | 371 |
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT license.
*/
export { default as Alignment } from "./alignment";
export { default as BiString } from "./bistring";
export { default as BiStringBuilder } from "./builder";
export * from "./token";
export { default } from "./bist... | bistring/js/src/index.ts/0 | {
"file_path": "bistring/js/src/index.ts",
"repo_id": "bistring",
"token_count": 91
} | 372 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
from __future__ import annotations
__all__ = ['Alignment']
import bisect
from typing import Any, Callable, Iterable, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, cast, overload
from ._typing import AnyBounds,... | bistring/python/bistring/_alignment.py/0 | {
"file_path": "bistring/python/bistring/_alignment.py",
"repo_id": "bistring",
"token_count": 9075
} | 373 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
from bistring import bistr, Alignment, BistrBuilder
def test_chunk_words():
builder = BistrBuilder(' the quick brown fox ')
builder.discard(2)
builder.replace(3, 'the')
builder.skip(1)
builder.replace(... | bistring/python/tests/test_builder.py/0 | {
"file_path": "bistring/python/tests/test_builder.py",
"repo_id": "bistring",
"token_count": 1508
} | 374 |
#!/usr/bin/env python3
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
class DefaultConfig:
""" Bot Configuration """
PORT = 3978
APP_ID = os.environ.get("MicrosoftAppId", "")
APP_PASSWORD = os.environ.get("MicrosoftAppPassword", "")
APP_TYP... | botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/config.py/0 | {
"file_path": "botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/config.py",
"repo_id": "botbuilder-python",
"token_count": 256
} | 375 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.ai.luis import LuisApplication, LuisRecognizer
from botbuilder.core import Recognizer, RecognizerResult, TurnContext
from config import DefaultConfig
class FlightBookingRecognizer(Recognizer):
def __ini... | botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/flight_booking_recognizer.py/0 | {
"file_path": "botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/flight_booking_recognizer.py",
"repo_id": "botbuilder-python",
"token_count": 467
} | 376 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
class SlackClientOptions:
"""
Defines the implementation of the SlackClient options.
"""
def __init__(
self,
slack_verification_token: str,
slack_bot_token: str,
slack_client_... | botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_client_options.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_client_options.py",
"repo_id": "botbuilder-python",
"token_count": 458
} | 377 |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license.
from botbuilder.core import BotTelemetryClient, NullTelemetryClient
class LuisPredictionOptions:
"""
Optional parameters for a LUIS prediction request.
"""
def __init__(
self,
bing_spell_check_subscript... | botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/luis_prediction_options.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/luis_prediction_options.py",
"repo_id": "botbuilder-python",
"token_count": 485
} | 378 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from msrest.serialization import Model
class FeedbackRecords(Model):
"""Active learning feedback records."""
_attribute_map = {"records": {"key": "records", "type": "[FeedbackRecord]"}}
def __init__(self, **kw... | botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/models/feedback_records.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/models/feedback_records.py",
"repo_id": "botbuilder-python",
"token_count": 137
} | 379 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import ABC, abstractmethod
from typing import Dict
from botbuilder.core import BotTelemetryClient, TurnContext
from .qnamaker_options import QnAMakerOptions
class QnAMakerTelemetryClient(ABC):
def __init__(
... | botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker_telemetry_client.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker_telemetry_client.py",
"repo_id": "botbuilder-python",
"token_count": 328
} | 380 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Dict
from botbuilder.ai.luis import LuisRecognizer, LuisTelemetryConstants
from botbuilder.core import RecognizerResult, TurnContext
class OverrideFillRecognizer(LuisRecognizer):
def __init__(self, *... | botbuilder-python/libraries/botbuilder-ai/tests/luis/override_fill_recognizer.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/override_fill_recognizer.py",
"repo_id": "botbuilder-python",
"token_count": 502
} | 381 |
{
"query": "Book a table on Friday or tomorrow at 5 or tomorrow at 4",
"topScoringIntent": {
"intent": "None",
"score": 0.8785189
},
"intents": [
{
"intent": "None",
"score": 0.8785189
}
],
"entities": [
{
"entity": "fri... | botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/MultipleDateTimeEntities.json/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/MultipleDateTimeEntities.json",
"repo_id": "botbuilder-python",
"token_count": 1825
} | 382 |
{
"text": "3 inches long by 2 inches wide and 5% to 10% and are you between 6 years old and 8 years old and can i trade kb457 for kb922 and change 425-777-1212 to 206-666-4123 and did delta buy virgin and did the rain from hawaii get to redmond and http://foo.com changed to http://blah.com and i like between 68 degre... | botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/roles_v3.json/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/roles_v3.json",
"repo_id": "botbuilder-python",
"token_count": 30318
} | 383 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Flask Telemetry Bot Middleware."""
from io import BytesIO
from threading import current_thread
# Map of thread id => POST body text
_REQUEST_BODIES = {}
def retrieve_flask_body():
"""retrieve_flask_body
Retrieve... | botbuilder-python/libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/flask/flask_telemetry_middleware.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/flask/flask_telemetry_middleware.py",
"repo_id": "botbuilder-python",
"token_count": 656
} | 384 |
"""Implements a CosmosDB based storage provider.
"""
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from hashlib import sha256
from typing import Dict, List
from threading import Semaphore
import json
import warnings
from jsonpickle.pickler import Pickler
from jsonpickle.... | botbuilder-python/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py",
"repo_id": "botbuilder-python",
"token_count": 6122
} | 385 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import ABC, abstractmethod
from .turn_context import TurnContext
class Bot(ABC):
"""
Represents a bot that can operate on incoming activities.
"""
@abstractmethod
async def on_turn(self, conte... | botbuilder-python/libraries/botbuilder-core/botbuilder/core/bot.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/bot.py",
"repo_id": "botbuilder-python",
"token_count": 180
} | 386 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Any
from botbuilder.core import TurnContext
from botbuilder.schema import Activity, ConversationReference
from botframework.connector.aio import ConnectorClient
from botframework.connector.auth import Micr... | botbuilder-python/libraries/botbuilder-core/botbuilder/core/inspection/inspection_session.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/inspection/inspection_session.py",
"repo_id": "botbuilder-python",
"token_count": 374
} | 387 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import ABC, abstractmethod
from botframework.connector import ConnectorClient
from botframework.connector.auth import ClaimsIdentity
class ConnectorClientBuilder(ABC):
"""
Abstraction to build connector cli... | botbuilder-python/libraries/botbuilder-core/botbuilder/core/oauth/connector_client_builder.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/oauth/connector_client_builder.py",
"repo_id": "botbuilder-python",
"token_count": 265
} | 388 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from logging import Logger
from botbuilder.core import BotAdapter, Bot, CloudChannelServiceHandler
from botbuilder.schema import Activity, ResourceResponse
from botframework.connector.auth import BotFrameworkAuthentication, C... | botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/cloud_skill_handler.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/cloud_skill_handler.py",
"repo_id": "botbuilder-python",
"token_count": 1897
} | 389 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.schema import Activity
from botbuilder.schema.teams import (
NotificationInfo,
TeamsChannelData,
TeamInfo,
TeamsMeetingInfo,
)
def teams_get_channel_data(activity: Activity) -> TeamsChannelDa... | botbuilder-python/libraries/botbuilder-core/botbuilder/core/teams/teams_activity_extensions.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/teams/teams_activity_extensions.py",
"repo_id": "botbuilder-python",
"token_count": 632
} | 390 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import unittest
from typing import List, Tuple, Awaitable, Callable
from botbuilder.core import BotAdapter, TurnContext
from botbuilder.schema import (
Activity,
ConversationReference,
ResourceResponse,
Conver... | botbuilder-python/libraries/botbuilder-core/tests/simple_adapter.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/tests/simple_adapter.py",
"repo_id": "botbuilder-python",
"token_count": 1237
} | 391 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import aiounittest
from botbuilder.core import ChannelServiceHandler
from botframework.connector.auth import (
AuthenticationConfiguration,
ClaimsIdentity,
SimpleCredentialProvider,
JwtTokenValidation,
Aut... | botbuilder-python/libraries/botbuilder-core/tests/test_channel_service_handler.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-core/tests/test_channel_service_handler.py",
"repo_id": "botbuilder-python",
"token_count": 577
} | 392 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
class ModelResult:
"""Contains recognition result information."""
def __init__(
self, text: str, start: int, end: int, type_name: str, resolution: object
):
"""
Parameters:
------... | botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/model_result.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/model_result.py",
"repo_id": "botbuilder-python",
"token_count": 286
} | 393 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from .dialog_instance import DialogInstance
class DialogState:
"""
Contains state information for the dialog stack.
"""
def __init__(self, stack: List[DialogInstance] = None):
... | botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py",
"repo_id": "botbuilder-python",
"token_count": 421
} | 394 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .alias_path_resolver import AliasPathResolver
class HashPathResolver(AliasPathResolver):
def __init__(self):
super().__init__(alias="#", prefix="turn.recognized.intents.")
| botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/path_resolvers/hash_path_resolver.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/path_resolvers/hash_path_resolver.py",
"repo_id": "botbuilder-python",
"token_count": 88
} | 395 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Dict
from .persisted_state_keys import PersistedStateKeys
class PersistedState:
def __init__(self, keys: PersistedStateKeys = None, data: Dict[str, object] = None):
if keys and data:
... | botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/persisted_state.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/persisted_state.py",
"repo_id": "botbuilder-python",
"token_count": 315
} | 396 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import unittest
from botbuilder.dialogs.choices import ChoiceFactoryOptions
class ChoiceFactoryOptionsTest(unittest.TestCase):
def test_inline_separator_round_trips(self) -> None:
choice_factor_options = Choice... | botbuilder-python/libraries/botbuilder-dialogs/tests/choices/test_choice_factory_options.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/tests/choices/test_choice_factory_options.py",
"repo_id": "botbuilder-python",
"token_count": 454
} | 397 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import aiounittest
from botbuilder.dialogs import DialogSet
from botbuilder.core import MemoryStorage, ConversationState
class PromptValidatorContextTests(aiounittest.AsyncTestCase):
async def test_prompt_validator_cont... | botbuilder-python/libraries/botbuilder-dialogs/tests/test_prompt_validator_context.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-dialogs/tests/test_prompt_validator_context.py",
"repo_id": "botbuilder-python",
"token_count": 333
} | 398 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from logging import Logger
from botbuilder.core import InvokeResponse
from botbuilder.integration.aiohttp import BotFrameworkHttpClient
from botbuilder.core.skills import (
ConversationIdFactoryBase,
SkillConversatio... | botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/skills/skill_http_client.py/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/skills/skill_http_client.py",
"repo_id": "botbuilder-python",
"token_count": 1052
} | 399 |
include *.rst
include azure_bdist_wheel.py | botbuilder-python/libraries/botbuilder-schema/MANIFEST.in/0 | {
"file_path": "botbuilder-python/libraries/botbuilder-schema/MANIFEST.in",
"repo_id": "botbuilder-python",
"token_count": 15
} | 400 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import requests
from msrest.authentication import Authentication
from .authentication_constants import AuthenticationConstants
class AppCredentials(Authentication):
"""
Base class for token retrieval. Subclasses M... | botbuilder-python/libraries/botframework-connector/botframework/connector/auth/app_credentials.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/app_credentials.py",
"repo_id": "botbuilder-python",
"token_count": 1548
} | 401 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import ABC
class GovernmentConstants(ABC):
"""
Government Channel Service property value
"""
CHANNEL_SERVICE = "https://botframework.azure.us"
"""
TO CHANNEL FROM BOT: Login URL
DEPR... | botbuilder-python/libraries/botframework-connector/botframework/connector/auth/government_constants.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/government_constants.py",
"repo_id": "botbuilder-python",
"token_count": 668
} | 402 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .http_client_base import HttpClientBase
class HttpClientFactory:
def create_client(self) -> HttpClientBase:
pass
| botbuilder-python/libraries/botframework-connector/botframework/connector/http_client_factory.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/http_client_factory.py",
"repo_id": "botbuilder-python",
"token_count": 69
} | 403 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------------... | botbuilder-python/libraries/botframework-connector/botframework/connector/token_api/_token_api_client.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/token_api/_token_api_client.py",
"repo_id": "botbuilder-python",
"token_count": 623
} | 404 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
from setuptools import setup
NAME = "botframework-connector"
VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.16.0"
REQUIRES = [
"msrest==0.7.*",
# "requests>=2.23.0,<2.26",
... | botbuilder-python/libraries/botframework-connector/setup.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/setup.py",
"repo_id": "botbuilder-python",
"token_count": 809
} | 405 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import base64
import asyncio
import pytest
import msrest
from botbuilder.schema import AttachmentData, ErrorResponseException
from botframework.connector import ConnectorClient
from botframework.connector.auth impo... | botbuilder-python/libraries/botframework-connector/tests/test_attachments.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-connector/tests/test_attachments.py",
"repo_id": "botbuilder-python",
"token_count": 2020
} | 406 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import traceback
from asyncio import Queue, ensure_future
from typing import Awaitable, Callable
class SendQueue:
def __init__(self, action: Callable[[object], Awaitable], timeout: int = 30):
self._action = act... | botbuilder-python/libraries/botframework-streaming/botframework/streaming/payload_transport/send_queue.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payload_transport/send_queue.py",
"repo_id": "botbuilder-python",
"token_count": 555
} | 407 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from uuid import UUID
from botframework.streaming.transport import TransportConstants
class Header:
# pylint: disable=invalid-name
def __init__(self, *, type: str = None, id: UUID = None, end: bool = None):
... | botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/models/header.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/models/header.py",
"repo_id": "botbuilder-python",
"token_count": 418
} | 408 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
from http import HTTPStatus
from uuid import UUID, uuid4
from typing import List, Union
from msrest.serialization import Model
from botframework.streaming.payloads import ResponseMessageStream
from botframework.s... | botbuilder-python/libraries/botframework-streaming/botframework/streaming/streaming_response.py/0 | {
"file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/streaming_response.py",
"repo_id": "botbuilder-python",
"token_count": 815
} | 409 |
trigger: none # no ci trigger
pr: none # no pr trigger
pool:
vmImage: 'ubuntu-latest'
steps:
- task: AzurePowerShell@5
displayName: 'Create container'
inputs:
azureSubscription: 'FUSE Temporary (174c5021-8109-4087-a3e2-a1de20420569)'
ScriptType: 'InlineScript'
Inline: |
Set-PSDebug -Trace 1;
... | botbuilder-python/pipelines/experimental-create-azure-container-registry.yml/0 | {
"file_path": "botbuilder-python/pipelines/experimental-create-azure-container-registry.yml",
"repo_id": "botbuilder-python",
"token_count": 551
} | 410 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
FROM mcr.microsoft.com/oryx/python:3.10
RUN mkdir /functionaltestbot
EXPOSE 443
# EXPOSE 2222
COPY ./functionaltestbot /functionaltestbot
COPY setup.py /
COPY test.sh /
# RUN ls -ltr
# RUN cat prestart.sh
# RUN cat mai... | botbuilder-python/tests/functional-tests/functionaltestbot/Dockerfile/0 | {
"file_path": "botbuilder-python/tests/functional-tests/functionaltestbot/Dockerfile",
"repo_id": "botbuilder-python",
"token_count": 477
} | 411 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
To run the Flask bot app, in a py virtual environment,
```bash
pip install -r requirements.txt
python runserver.py
```
"""
from flask_bot_app import APP
if __name__ == "__main__":
APP.run(host="0.0.0.0")
| botbuilder-python/tests/functional-tests/functionaltestbot/runserver.py/0 | {
"file_path": "botbuilder-python/tests/functional-tests/functionaltestbot/runserver.py",
"repo_id": "botbuilder-python",
"token_count": 102
} | 412 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="acutetonecomb" format="2">
<unicode hex="0341"/>
<outline>
<component base="acutecomb"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>alignment</key>
<integer>... | cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/acutetonecomb.glif/0 | {
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/acutetonecomb.glif",
"repo_id": "cascadia-code",
"token_count": 310
} | 413 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="ainThreedots-ar.init" format="2">
<advance width="1200"/>
<guideline x="210" y="624" angle="0"/>
<outline>
<component base="ain-ar.init"/>
<component base="threedotsupabove-ar" xOffset="61" yOffset="373"/>
</outline>
<lib>
<dict>
<key>publi... | cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ainT_hreedots-ar.init.glif/0 | {
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/ainT_hreedots-ar.init.glif",
"repo_id": "cascadia-code",
"token_count": 185
} | 414 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="anoteleia" format="2">
<advance width="1200"/>
<unicode hex="0387"/>
<outline>
<component base="period" yOffset="735"/>
</outline>
<lib>
<dict>
<key>com.schriftgestaltung.Glyphs.ComponentInfo</key>
<array>
<dict>
<key>al... | cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/anoteleia.glif/0 | {
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/anoteleia.glif",
"repo_id": "cascadia-code",
"token_count": 278
} | 415 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="baht.BRACKET.600" format="2">
<advance width="1200"/>
<outline>
<contour>
<point x="457" y="1281" type="line"/>
<point x="710" y="1281" type="line"/>
<point x="710" y="1740" type="line"/>
<point x="457" y="1740" type="line"/>
</cont... | cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/baht.B_R_A_C_K_E_T_.600.glif/0 | {
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/baht.B_R_A_C_K_E_T_.600.glif",
"repo_id": "cascadia-code",
"token_count": 506
} | 416 |
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="cent" format="2">
<advance width="1200"/>
<unicode hex="00A2"/>
<outline>
<contour>
<point x="534" y="-334" type="line"/>
<point x="792" y="-334" type="line"/>
<point x="792" y="1394" type="line"/>
<point x="534" y="1394" type="line"/... | cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/cent.glif/0 | {
"file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/cent.glif",
"repo_id": "cascadia-code",
"token_count": 372
} | 417 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.