repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
PIBConv | PIBConv-main/cnn/utils.py | import os
import numpy as np
import pandas as pd
import torch
import shutil
import torchvision.transforms as transforms
from torch.autograd import Variable
from torchvision.datasets.utils import check_integrity,\
extract_archive, verify_str_arg, download_and_extract_archive
from torchvision.datasets.folder import d... | 25,313 | 33.161943 | 111 | py |
PIBConv | PIBConv-main/cnn/model.py | import torch
import torch.nn as nn
from operations import *
from torch.autograd import Variable
from utils import drop_path
class Cell(nn.Module):
def __init__(self, genotype, C_prev_prev, C_prev, C, reduction, reduction_prev):
super(Cell, self).__init__()
print(C_prev_prev, C_prev, C)
i... | 10,318 | 33.627517 | 90 | py |
PIBConv | PIBConv-main/cnn/components.py | """
"""
from typing import NamedTuple, List
from dataclasses import dataclass
from enum import Enum
class LayerType(Enum):
CONV = 1
FC = 2
NON_CONV = 3
@dataclass
class LayerMetrics:
rank: float
KG: float
condition: float
@dataclass
class ConvLayerMetrics:
input_channel: LayerMetrics
... | 438 | 13.633333 | 35 | py |
PIBConv | PIBConv-main/cnn/model_search.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from operations import *
from torch.autograd import Variable
from genotypes import PRIMITIVES
from genotypes import Genotype
class MixedOp(nn.Module):
def __init__(self, C, stride, learnable_bn):
super(MixedOp, self).__init__()
self... | 7,707 | 36.057692 | 144 | py |
PIBConv | PIBConv-main/cnn/test_cifar.py | import os
import sys
import glob
import numpy as np
import pandas as pd
import torch
import utils
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from model import Netwo... | 4,431 | 34.456 | 106 | py |
PIBConv | PIBConv-main/cnn/plot_alpha.py | from venv import create
import matplotlib.pyplot as plt
import argparse
import os
import pandas as pd
import math
import re
import numpy as np
import glob
N_CELLS = 16
N_EDGES = 14
def create_cell_name_dict(path):
gpaths = glob.glob(os.path.join(path, 'weights_stat*.xlsx'))
print(gpaths)
fname = gpaths... | 2,831 | 26.764706 | 77 | py |
PIBConv | PIBConv-main/cnn/test_imagenet.py | import os
import sys
import numpy as np
import torch
import utils
import glob
import random
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torchvision.transforms as transforms
import torch.backends.cudnn as cudnn
from torch.autograd i... | 4,020 | 33.663793 | 104 | py |
PIBConv | PIBConv-main/cnn/plot_training.py | import matplotlib.pyplot as plt
import pickle
import glob
import os
def plot(error_dict, dir_path):
f = open(f"{dir_path}/loss_accuracies.txt", "w")
num_epochs = len(error_dict['train_acc_1'])
iters = list(range(num_epochs))
# Loss
plt.figure()
plt.title("Training Curve - Loss")
p... | 2,105 | 33.52459 | 92 | py |
PIBConv | PIBConv-main/cnn/train_cifar.py | import os
import sys
import time
import glob
import numpy as np
import torch
import utils
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from model import NetworkCIFAR ... | 7,720 | 37.412935 | 117 | py |
PIBConv | PIBConv-main/cnn/visualize.py | import sys
import os
import genotypes
from graphviz import Digraph
os.environ["PATH"] += os.pathsep + '/fs2/comm/kpgrp/mhosseini/venvs/venv-csearch/lib/python3.9/site-packages/graphviz'
print(os.environ["PATH"])
def plot(genotype, filename):
g = Digraph(
format='pdf',
edge_attr=dict(fontsize='20',... | 1,729 | 28.827586 | 118 | py |
PIBConv | PIBConv-main/cnn/genotypes.py | from collections import namedtuple
Genotype = namedtuple('Genotype', 'normal normal_concat reduce reduce_concat')
PRIMITIVES = [
'none',
'max_pool_3x3',
'avg_pool_3x3',
'skip_connect',
'pib_conv_3x3',
'pib_conv_5x5',
'dil_conv_3x3',
'dil_conv_5x5'
]
NASNet = Genotype(
normal=[
... | 4,906 | 22.146226 | 78 | py |
PIBConv | PIBConv-main/cnn/operations.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import math
OPS = {
'none': lambda C, stride, affine: Zero(stride),
'avg_pool_3x3': lambda C, stride, affine: nn.AvgPool2d(3, stride=stride, padding=1, count_include_pad=False),
'max_pool_3x3': lambda C, stride, affine: nn.MaxPool2d(3, stri... | 6,930 | 37.082418 | 115 | py |
PIBConv | PIBConv-main/cnn/adas/Adas.py | """
"""
from torch.optim.optimizer import Optimizer, required
import sys
import numpy as np
import torch
mod_name = vars(sys.modules[__name__])['__name__']
if 'adas.' in mod_name:
from .metrics import Metrics
else:
from .optim.metrics import Metrics
class Adas(Optimizer):
"""
Vectorized SGD from t... | 5,240 | 34.174497 | 78 | py |
PIBConv | PIBConv-main/cnn/adas/components.py | """
"""
from typing import NamedTuple, List
from dataclasses import dataclass
from enum import Enum
class LayerType(Enum):
CONV = 1
DEPTH_CONV = 2
FC = 3
NON_CONV = 4
@dataclass
class LayerMetrics:
rank: float
KG: float
condition: float
@dataclass
class ConvLayerMetrics:
input_chan... | 457 | 13.774194 | 35 | py |
PIBConv | PIBConv-main/cnn/adas/metrics.py | """
"""
from typing import List, Union, Tuple
import sys
import numpy as np
import torch
mod_name = vars(sys.modules[__name__])['__name__']
if 'adas.' in mod_name:
from .components import LayerMetrics, ConvLayerMetrics
from .matrix_factorization import EVBMF
else:
from optim.components import LayerMetric... | 7,146 | 43.391304 | 85 | py |
PIBConv | PIBConv-main/cnn/adas/__init__.py | """
"""
from .Adas import Adas
| 31 | 7 | 22 | py |
PIBConv | PIBConv-main/cnn/adas/matrix_factorization.py | from __future__ import division
import numpy as np
# from scipy.sparse.linalg import svds
from scipy.optimize import minimize_scalar
import torch
def EVBMF(Y, sigma2=None, H=None):
"""Implementation of the analytical solution to Empirical Variational
Bayes Matrix Factorization.
This function can be ... | 5,693 | 30.458564 | 91 | py |
PIBConv | PIBConv-main/cnn/ADP_utils/classesADP.py | # Classes from https://github.com/mahdihosseini/ADP/blob/5b2508e8c4c513f8a556d57fd312a1222e2dfe77/src/htt_def.py
# Using p classes
# TODO add non-p classes from ADP-Release-Flat
classesADP = {
"L1": {
"numClasses": 9,
"classesNames": ["E", "C", "H", "S", "A", "M", "N", "G", "T"]
},
"L2": {
... | 1,588 | 31.428571 | 112 | py |
PIBConv | PIBConv-main/cnn/ADP_utils/__init__.py | 0 | 0 | 0 | py | |
PIBConv | PIBConv-main/cnn/ADP_utils/thresholded_metrics.py | import os
import torch
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from .classesADP import classesADP
from sklearn.metrics import roc_curve
from sklearn.metrics import auc
class Thresholded_Metrics:
def __init__(self, targets, predictions, level, network, epoch):
se... | 6,205 | 46.738462 | 146 | py |
clx-branch-23.04 | clx-branch-23.04/examples/run_dga_training.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,926 | 31.522222 | 119 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/dga_detection.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,968 | 35.462963 | 82 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/phishing_detection.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,406 | 37.822581 | 83 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/setup.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 777 | 31.416667 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/cybert.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,443 | 36.030303 | 82 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/clx_streamz_tools/utils.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 7,863 | 30.709677 | 118 | py |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/clx_streamz_tools/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/examples/streamz/python/clx_streamz_tools/streamz_workflow.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 5,750 | 33.232143 | 106 | py |
clx-branch-23.04 | clx-branch-23.04/python/setup.py | from setuptools import setup, find_packages
import versioneer
setup(
name="clx",
version=versioneer.get_version(),
description="CLX",
author="NVIDIA Corporation",
packages=find_packages(include=["clx", "clx.*"]),
package_data={
"clx.analytics": ["resources/*.txt"],
"clx.parser... | 502 | 22.952381 | 53 | py |
clx-branch-23.04 | clx-branch-23.04/python/versioneer.py |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | 68,611 | 36.636862 | 79 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/ip.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 13,697 | 28.778261 | 1,529 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/features.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,510 | 31.509259 | 83 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/_version.py |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 18,499 | 34.508637 | 79 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/__init__.py | # Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 693 | 35.526316 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/kafka_factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,008 | 31.706522 | 180 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/abstract_factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 913 | 25.882353 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,104 | 29.955882 | 79 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/fs_factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,294 | 34 | 171 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/factory/dask_fs_factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,224 | 32.108108 | 143 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/writer/writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 760 | 28.269231 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/writer/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/writer/fs_writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,492 | 33.625 | 162 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/writer/file_writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 813 | 28.071429 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/writer/kafka_writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,648 | 30.915663 | 78 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,048 | 23.97619 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/dask_fs_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,077 | 31.984127 | 139 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/kafka_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,382 | 32.49505 | 127 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/fs_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,064 | 31.777778 | 160 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/io/reader/file_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,090 | 24.372093 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/osi/virus_total.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 10,955 | 37.307692 | 198 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/osi/whois.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,032 | 35.542169 | 111 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/osi/farsight.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 7,643 | 38.402062 | 345 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/osi/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/osi/slashnext.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 13,962 | 39.239193 | 182 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/dns/dns_extractor.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 13,134 | 38.326347 | 148 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/dns/__init__.py | 0 | 0 | 0 | py | |
clx-branch-23.04 | clx-branch-23.04/python/clx/eda/eda.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 4,160 | 30.285714 | 113 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/eda/analysis.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,681 | 31.346154 | 109 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/eda/__init__.py | from clx.eda.eda import EDA # noqa: F401
| 42 | 20.5 | 41 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/eda/summary_stats.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,423 | 37.47191 | 95 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_kafka_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,706 | 35.093333 | 80 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_anomaly_detection.py | import cudf
import clx.analytics.anomaly_detection
import clx.features
def test_anomaly_detection():
df = cudf.DataFrame(
{
"time": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
"user": [
"u1",
"u5",
"u4",
"u2",
... | 1,225 | 23.52 | 80 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_dga_dataset.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,491 | 26.62963 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_dga_detector.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 4,063 | 32.586777 | 97 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_virus_total.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 12,538 | 61.383085 | 1,890 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_event_parser.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,746 | 32.596154 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_ip.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,428 | 29.891892 | 77 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_eda.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,662 | 32.2875 | 85 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_asset_classification.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 4,887 | 38.104 | 202 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_factory.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 4,883 | 31.131579 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_loda.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,147 | 26.538462 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_fs_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,865 | 28.546392 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_slashnext.py | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 12,709 | 63.517766 | 1,088 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_features.py | import cudf
import pytest
import clx.features
df = cudf.DataFrame(
{
"time": [1, 2, 3, 4, 5, 6, 7],
"user": ["u1", "u2", "u3", "u1", "u1", "u2", "u1"],
"computer": ["c1", "c2", "c3", "c1", "c2", "c3", "c1"],
}
)
def test_binary_features():
actual = clx.features.binary(df, "user",... | 1,630 | 26.644068 | 87 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_dns_extractor.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 7,095 | 28.322314 | 83 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_dask_fs_reader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,572 | 30.765432 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_binary_sequence_classifier.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,113 | 32.12766 | 96 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_netflow_workflow.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,547 | 32.526316 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_windows_event_parser.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 80,401 | 109.139726 | 5,743 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_periodicity_detection.py | import cudf
import cupy as cp
from clx.analytics import periodicity_detection as pdd
def test_to_periodogram():
expected_periodogram = cp.array(
[
2.14782297e-30,
8.83086404e-02,
5.23325583e-02,
1.99054116e-01,
9.58452790e-01,
5.401... | 11,756 | 21.183019 | 64 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_workflow.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 8,619 | 33.618474 | 120 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_splunk_alert_workflow.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 19,130 | 192.242424 | 1,358 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_whois.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,727 | 31.603774 | 88 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_port_heuristic.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,786 | 35.194805 | 124 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_farsight.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 5,317 | 34.932432 | 175 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_zeek.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 4,483 | 45.708333 | 236 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_multiclass_sequence_classifier.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 3,132 | 32.329787 | 96 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_kafka_writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,512 | 34.186047 | 76 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_cybert.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 5,066 | 43.447368 | 88 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_fs_writer.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,667 | 28.644444 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_splunk_notable_parser.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 15,887 | 66.037975 | 1,362 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_dataloader.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,644 | 26.416667 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_stats.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,871 | 22.4 | 75 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/tests/test_utils.py | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,439 | 27.235294 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/analytics/dga_dataset.py | # Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 1,258 | 31.282051 | 74 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/analytics/asset_classification.py | import cudf
from cuml.model_selection import train_test_split
import torch
import torch.optim as torch_optim
import torch.nn.functional as F
import logging
from torch.utils.dlpack import from_dlpack
from clx.analytics.model.tabular_model import TabularModel
log = logging.getLogger(__name__)
class AssetClassification... | 9,402 | 34.217228 | 154 | py |
clx-branch-23.04 | clx-branch-23.04/python/clx/analytics/binary_sequence_classifier.py | import logging
import cudf
from cudf.core.subword_tokenizer import SubwordTokenizer
import torch
import torch.nn as nn
from torch.utils.dlpack import to_dlpack
from clx.analytics.sequence_classifier import SequenceClassifier
from clx.utils.data.dataloader import DataLoader
from clx.utils.data.dataset import Dataset
fr... | 3,848 | 37.878788 | 256 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.