python_code stringlengths 0 4.04M | repo_name stringlengths 8 58 | file_path stringlengths 5 147 |
|---|---|---|
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import nump... | daqa-master | daqa-gen/qpas/compare_integer.py |
# coding=utf-8
# Copyright 2020- The Google AI Language Team Authors and The HuggingFace Inc. team and Facebook Inc.
# 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... | bio-lm-main | biolm/utils_sequence_labelling.py |
# Copyright (c) 2020-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# | bio-lm-main | biolm/__init__.py |
# coding=utf-8
# Copyright 2020- The Google AI Language Team Authors and The HuggingFace Inc. team and Facebook Inc.
# 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... | bio-lm-main | biolm/utils_classification.py |
# coding=utf-8
# Copyright 2020- The Google AI Language Team Authors and The HuggingFace Inc. team and Facebook Inc.
# 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... | bio-lm-main | biolm/run_sequence_labelling.py |
# coding=utf-8
# Copyright 2020- The Google AI Language Team Authors and The HuggingFace Inc. team and Facebook Inc.
# 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... | bio-lm-main | biolm/run_classification.py |
# Copyright (c) 2020-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from transformers import AutoTokenizer
import argparse
from tqdm import tqdm
def main(args):
"""Inputs and cleans and ensu... | bio-lm-main | preprocessing/clean_conll_file.py |
# Copyright (c) 2020-present Emily Alsentzer and Facebook Inc.
# Copyright (c) 2019 Emily Alsentzer
# All rights reserved.
#
# This source code is licensed under the MIT license, which can be found here https://github.com/EmilyAlsentzer/clinicalBERT/blob/master/LICENSE
#
"""Adapted from clinicalBERT preprocessing noteb... | bio-lm-main | preprocessing/preprocess_i2b2_2012_ner.py |
# Copyright (c) 2020-present Emily Alsentzer and Facebook Inc.
# Copyright (c) 2019 Emily Alsentzer
# All rights reserved.
#
# This source code is licensed under the MIT license, which can be found here https://github.com/EmilyAlsentzer/clinicalBERT/blob/master/LICENSE
#
"""Adapted from clinicalBERT preprocessing noteb... | bio-lm-main | preprocessing/preprocess_i2b2_2010_ner.py |
# Copyright (c) 2020-present Emily Alsentzer and Facebook Inc.
# Copyright (c) 2019 Emily Alsentzer
# All rights reserved.
#
# This source code is licensed under the MIT license, which can be found here https://github.com/EmilyAlsentzer/clinicalBERT/blob/master/LICENSE
#
"""Adapted from clinicalBERT preprocessing noteb... | bio-lm-main | preprocessing/preprocess_i2b2_2014_ner.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
from crlapi.benchmark import StreamTrainer
import hydra
from omegaconf import DictConfig, OmegaConf
def ... | alma-main | configs/mnist/run.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
from crlapi.benchmark import StreamTrainer
import hydra
from omegaconf import DictConfig, OmegaConf
def ... | alma-main | configs/cifar10/run.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from crlapi import instantiate_class,get_class,get_arguments
class StreamTrainer:
def create_logger(self, logger_a... | alma-main | crlapi/benchmark.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def instantiate_class(arguments):
from importlib import import_module
d = dict(arguments)
if "classname" in... | alma-main | crlapi/__init__.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import copy
class TaskResources:
""" Describe resources for a task (e.g a dataset, and environments, etc...)
"... | alma-main | crlapi/core.py |
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from torch.utils.tensorboard import SummaryWriter
import sqlite3
import os
import os.path
import csv
import copy
from datetime import date... | alma-main | crlapi/logger.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from crlapi.core import TaskResources, Stream, Task
import torchvision.datasets
import torchvision.transforms
import num... | alma-main | crlapi/sl/streams/cifar10.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from crlapi.core import TaskResources, Stream, Task
import torchvision.datasets
import torchvision.transforms
import nump... | alma-main | crlapi/sl/streams/emnist.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from crlapi.core import TaskResources, Stream, Task
import torchvision.datasets
import torchvision.transforms
import num... | alma-main | crlapi/sl/streams/mnist.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import numpy as np
from copy import deepcopy
from crlapi.sl.architectures.mixture_mod... | alma-main | crlapi/sl/architectures/vgg.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
import copy
import random
import numpy as np
class So... | alma-main | crlapi/sl/architectures/mixture_model.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
from crlapi.sl.architectures.mixture_model import MixtureLayer,SoftMaxGateModule,HardS... | alma-main | crlapi/sl/architectures/mlp.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import math
import logging
import numpy as np
import torch
from torch import nn
import torch.utils.data
from torch.nn im... | alma-main | crlapi/sl/architectures/resnet.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import math
import copy
import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional a... | alma-main | crlapi/sl/architectures/sp_vgg.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from torch import nn
from functools import partial
from einops.layers.torch import Rearrange, Reduce
import torch.nn as n... | alma-main | crlapi/sl/architectures/mlpmixer.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import numpy as np
import time
im... | alma-main | crlapi/sl/architectures/firefly_vgg/models.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# *** MODULES taken from original code https://github.com/klightz/Firefly
import numpy as np
import time
import torch... | alma-main | crlapi/sl/architectures/firefly_vgg/sp/net.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# *** MODULES taken from original code https://github.com/klightz/Firefly
from .conv import Conv2d
from .net import SpN... | alma-main | crlapi/sl/architectures/firefly_vgg/sp/__init__.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# *** MODULES taken from original code https://github.com/klightz/Firefly
import numpy as np
import torch
import torch... | alma-main | crlapi/sl/architectures/firefly_vgg/sp/module.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# *** MODULES taken from original code https://github.com/klightz/Firefly
import math
import numpy as np
import torch... | alma-main | crlapi/sl/architectures/firefly_vgg/sp/conv.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import sys
import copy
import time
from pydoc import locate
import numpy as np
import torch
import torch.nn as nn
import... | alma-main | crlapi/sl/clmodels/firefly.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/adaboost.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/agg_ensemble.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/bagging.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/boosting.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import copy
import numpy as np
from pydoc import locate
from random import shuffle
from crlapi.core import CLModel
from f... | alma-main | crlapi/sl/clmodels/core.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/ensemble.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/debug_ensemble.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/k_ensemble.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import copy
import torch
import numpy as np
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.... | alma-main | crlapi/sl/clmodels/finetune_grow.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import torch.nn as nn
import torch.nn.functional as F
from crlapi.core import CLModel
from crlapi.sl.clmodel... | alma-main | crlapi/sl/clmodels/finetune.py |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import json
import re
from datetime import datetime
import requests
def get_ad_archive_id(data):... | Ad-Library-API-Script-Repository-main | python/fb_ads_library_api.py |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import datetime
import json
from collections import Counter
def get_operators():
"""
Feel... | Ad-Library-API-Script-Repository-main | python/fb_ads_library_api_operators.py |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from iso3166 import countries
supported_countries = [
"AT",
"BE",
"BG",
"CA",
... | Ad-Library-API-Script-Repository-main | python/fb_ads_library_api_utils.py |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import sys
from fb_ads_library_api import FbAdsLibraryTraversal
from fb_ads_library... | Ad-Library-API-Script-Repository-main | python/fb_ads_library_api_cli.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
from pathlib import Path
import setuptools
requirements = [
r for r in Path("requ... | AugLy-main | setup.py |
# 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:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | AugLy-main | docs/source/conf.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
| AugLy-main | augly/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import random
from typing import Any, Callable, Dict, List, Optional, Tuple
import nump... | AugLy-main | augly/video/transforms.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from augly.video.composition import Compose, OneOf
from augly.video.functional import (
add_no... | AugLy-main | augly/video/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import functools
import math
import os
import shutil
import tempfile
from typing import Any, Calla... | AugLy-main | augly/video/functional.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import functools
import os
import shutil
import tempfile
from typing import Callable, Dict, List, ... | AugLy-main | augly/video/utils.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import random
import shutil
from typing import Any, Dict, List, Optional
from augly.video.helpers... | AugLy-main | augly/video/composition.py |
AugLy-main | augly/video/augmenters/__init__.py | |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""
Implementation of base class for FFMPEG-based video augmenters
- Method to override:
- `g... | AugLy-main | augly/video/augmenters/ffmpeg/base_augmenter.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
from typing import List, Union
from augly.video.augmenters.ffmpeg.base_augmenter impo... | AugLy-main | augly/video/augmenters/ffmpeg/aspect_ratio.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.utils import is_image_file, is_video_file, pathmgr
from augly.... | AugLy-main | augly/video/augmenters/ffmpeg/overlay.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/grayscale.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/fps.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import logging
from dataclasses import dataclass
from enum import Enum
from math import ceil
from ... | AugLy-main | augly/video/augmenters/ffmpeg/concat.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/speed.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from augly.video.augmenters.ffmpeg.aspect_ratio import VideoAugmenterByAspectRatio
from augly.vide... | AugLy-main | augly/video/augmenters/ffmpeg/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVi... | AugLy-main | augly/video/augmenters/ffmpeg/trim.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/color_jitter.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/crop.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/no_audio.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/hflip.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/loops.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Tuple
from augly.utils import validate_rgb_color
from augly.video.augmen... | AugLy-main | augly/video/augmenters/ffmpeg/pad.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/blur.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Union
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidge... | AugLy-main | augly/video/augmenters/ffmpeg/resize.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.utils import pathmgr
from augly.video.augmenters.ffmpeg.base_a... | AugLy-main | augly/video/augmenters/ffmpeg/stack.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/noise.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.utils import pathmgr
from augly.video.augmenters.ffmpeg.base_a... | AugLy-main | augly/video/augmenters/ffmpeg/audio_swap.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/vflip.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/brightness.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/resolution.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import Base... | AugLy-main | augly/video/augmenters/ffmpeg/rotate.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/quality.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import List
from augly.video.augmenters.ffmpeg.base_augmenter import BaseVidgearFFMPE... | AugLy-main | augly/video/augmenters/ffmpeg/contrast.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""
Implementation of base class for video distractors
- Interface:
- `augment(self, video_te... | AugLy-main | augly/video/augmenters/cv2/base_augmenter.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import random
from typing import Iterator, List, Optional, Tuple
import cv2
import numpy as np
fr... | AugLy-main | augly/video/augmenters/cv2/shapes.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import logging
import cv2
import numpy as np
from augly.video.augmenters.cv2.base_augmenter impor... | AugLy-main | augly/video/augmenters/cv2/dots.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from augly.video.augmenters.cv2.base_augmenter import BaseCV2Augmenter
from augly.video.augmenters... | AugLy-main | augly/video/augmenters/cv2/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import pickle
import random
import string
from typing import Any, Iterator, List, Optional, Tuple
... | AugLy-main | augly/video/augmenters/cv2/text.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from copy import deepcopy
from typing import Any, Dict, List, Optional, Tuple
from augly import u... | AugLy-main | augly/video/helpers/metadata.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Dict, List, Optional, Tuple
import numpy as np
from augly.image import in... | AugLy-main | augly/video/helpers/intensity.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
import os
import shutil
import tempfile
from typing import Any, Dict, List, Optional
... | AugLy-main | augly/video/helpers/ffmpeg.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from augly.video.helpers.ffmpeg import (
add_silent_audio,
combine_frames_and_audio_to_fil... | AugLy-main | augly/video/helpers/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
import os
import shutil
import tempfile
from typing import Any, Dict, List, Optional, ... | AugLy-main | augly/video/helpers/utils.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from augly.tests.base_configs import AudioAugConfig, ImageAugConfig, VideoAugConfig
__all__ = [
... | AugLy-main | augly/tests/__init__.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
from dataclasses import dataclass
from typing import Optional, Sequence, Tuple
from aug... | AugLy-main | augly/tests/base_configs.py |
AugLy-main | augly/tests/image_tests/__init__.py | |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from augly import image as imaugs
from augly.tests.image_tests.base_unit_test imp... | AugLy-main | augly/tests/image_tests/functional_unit_test.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import unittest
import torch
import torchvision.transforms as transforms # @manual
from augly im... | AugLy-main | augly/tests/image_tests/pytorch_test.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import tempfile
import unittest
from typing import Any, Callable, Dict, List, Optional
... | AugLy-main | augly/tests/image_tests/base_unit_test.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import json
import random
import unittest
from augly import image as imaugs
from augly.tests.imag... | AugLy-main | augly/tests/image_tests/transforms_unit_test.py |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import unittest
import numpy as np
from augly import audio as audaugs
class IntensityAudioUnitT... | AugLy-main | augly/tests/audio_tests/intensity_unit_test.py |
AugLy-main | augly/tests/audio_tests/__init__.py | |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from augly import audio as audaugs
from augly.tests.audio_tests.base_unit_test im... | AugLy-main | augly/tests/audio_tests/functional_unit_test.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.