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
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/sequence_classifier.py
import logging import os import cudf from cudf.core.subword_tokenizer import SubwordTokenizer import cupy import torch from clx.utils.data.dataloader import DataLoader from clx.utils.data.dataset import Dataset from torch.utils.dlpack import to_dlpack from tqdm import trange from torch.optim import AdamW from abc imp...
8,757
35.953586
256
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/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...
2,265
23.630435
80
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/periodicity_detection.py
import cupy as cp def to_periodogram(signal): """ Returns periodogram of signal for finding frequencies that have high energy. :param signal: signal (time domain) :type signal: cudf.Series :return: CuPy array representing periodogram :rtype: cupy.ndarray """ # convert cudf series to ...
1,507
24.133333
111
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/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...
9,636
36.644531
99
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/detector.py
import logging import torch import torch.nn as nn from abc import ABC, abstractmethod log = logging.getLogger(__name__) GPU_COUNT = torch.cuda.device_count() class Detector(ABC): def __init__(self, lr=0.001): self.lr = lr self._model = None self._optimizer = None self._criterion ...
2,728
25.495146
92
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/perfect_hash.py
import numpy as np import argparse np.random.seed(1243342) PRIME = np.uint64(281474976710677) # Coefficients ranges for inner hash - This are important to set to be # large so that we have randomness in the bottom bits when modding A_SECOND_LEVEL_POW = np.uint8(48) B_SECOND_LEVEL_POW = np.uint8(7) A_LBOUND_SECOND_L...
7,731
34.145455
149
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/anomaly_detection.py
import cudf import cuml def dbscan(feature_dataframe, min_samples=3, eps=0.3): """ Pass a feature dataframe to this function to detect anomalies in your feature dataframe. This function uses ``cuML`` DBSCAN to detect anomalies and outputs associated labels 0,1,-1. Parameters ---------- :param...
1,563
33.755556
147
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/loda.py
import cupy as cp class Loda: """ Anomaly detection using Lightweight Online Detector of Anomalies (LODA). LODA detects anomalies in a dataset by computing the likelihood of data points using an ensemble of one-dimensional histograms. :param n_bins: Number of bins for each histogram. If None a heuris...
7,680
39.856383
112
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/dga_detector.py
import cudf import torch import logging from tqdm import trange from torch.utils.dlpack import from_dlpack from clx.utils.data import utils from clx.analytics.detector import Detector from clx.utils.data.dataloader import DataLoader from clx.analytics.dga_dataset import DGADataset from clx.analytics.model.rnn_classifie...
10,504
38.197761
189
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/multiclass_sequence_classifier.py
import logging import cudf from cudf.core.subword_tokenizer import SubwordTokenizer import cupy 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 impor...
3,867
38.876289
256
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/model/rnn_classifier.py
# Original code at https://github.com/spro/practical-pytorch import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence DROPOUT = 0.0 class RNNClassifier(nn.Module): def __init__( self, input_size, hidden_size, output_size, n_layers, bidirectional=True ): super(RNN...
2,067
31.3125
82
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/model/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/analytics/model/tabular_model.py
# Original code at https://github.com/spro/practical-pytorch import torch import torch.nn as nn class TabularModel(nn.Module): "Basic model for tabular data" def __init__(self, emb_szs, n_cont, out_sz, layers, drops, emb_drop, use_bn, is_reg, is_multi): super().__init__() se...
1,858
38.553191
116
py
clx-branch-23.04
clx-branch-23.04/python/clx/utils/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/utils/data/dataloader.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,779
31.363636
102
py
clx-branch-23.04
clx-branch-23.04/python/clx/utils/data/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...
1,846
33.203704
133
py
clx-branch-23.04
clx-branch-23.04/python/clx/utils/data/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...
968
27.5
74
py
clx-branch-23.04
clx-branch-23.04/python/clx/utils/data/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/heuristics/ports.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,278
34.957983
124
py
clx-branch-23.04
clx-branch-23.04/python/clx/heuristics/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/workflow/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...
4,970
34.007042
112
py
clx-branch-23.04
clx-branch-23.04/python/clx/workflow/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/workflow/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...
952
34.296296
74
py
clx-branch-23.04
clx-branch-23.04/python/clx/workflow/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...
7,402
35.112195
122
py
clx-branch-23.04
clx-branch-23.04/python/clx/parsers/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...
3,949
33.649123
156
py
clx-branch-23.04
clx-branch-23.04/python/clx/parsers/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...
4,209
36.927928
107
py
clx-branch-23.04
clx-branch-23.04/python/clx/parsers/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...
3,763
40.822222
119
py
clx-branch-23.04
clx-branch-23.04/python/clx/parsers/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/python/clx/parsers/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...
1,809
27.730159
122
py
clx-branch-23.04
clx-branch-23.04/docs/source/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
5,409
28.725275
89
py
clx-branch-23.04
clx-branch-23.04/notebooks/ids_detection/util.py
import numpy as np from cuml.metrics import precision_recall_curve, roc_auc_score from sklearn.metrics import roc_curve import cupy as cp import matplotlib.pylab as plt def average_precision_score(y_true, y_score): """ Compute average precision score using precision and recall computed from cuml. """ ...
2,069
38.807692
88
py
clx-branch-23.04
clx-branch-23.04/ci/utils/nbtestlog2junitxml.py
# Generate a junit-xml file from parsing a nbtest log import re from xml.etree.ElementTree import Element, ElementTree from os import path import string from enum import Enum startingPatt = re.compile("^STARTING: ([\w\.\-]+)$") skippingPatt = re.compile("^SKIPPING: ([\w\.\-]+)\s*(\(([\w\.\-\ \,]+)\))?\s*$") exitCode...
5,526
32.907975
141
py
clx-branch-23.04
clx-branch-23.04/ci/integration_tests/run_integration_test.py
import sys import time import logging import threading from confluent_kafka.admin import ( AdminClient, NewTopic, NewPartitions, ConfigResource, ConfigSource, ) from confluent_kafka import Producer, Consumer from clx.workflow import netflow_workflow logging.basicConfig(stream=sys.stdout, level=logg...
5,141
31.751592
111
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query/bin/clx_query.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,076
30.469697
82
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query/bin/clx_query_conf.py
import splunk.admin as admin import splunk.entity as en """ Copyright (C) 2005 - 2010 Splunk Inc. All Rights Reserved. Description: This skeleton python script handles the parameters in the configuration page. handleList method: lists configurable parameters in the configuration page corresponds to handl...
1,473
30.361702
94
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/manage.py
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "clx_query_service.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: ra...
637
28
81
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/blazingsql_helper.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,049
32.064516
81
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/tests.py
from django.test import TestCase # Create your tests here.
60
14.25
32
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/views.py
import re import os import logging from clxquery import utils from clxquery.blazingsql_helper import BlazingSQLHelper from django.http import HttpResponse, JsonResponse from rest_framework.generics import CreateAPIView log = logging.getLogger(__name__) class ExecuteClxQuery(CreateAPIView): file_path = os.enviro...
2,655
44.016949
194
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/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...
753
28
74
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/admin.py
from django.contrib import admin # Register your models here.
63
15
32
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/models.py
from django.db import models # Create your models here.
57
13.5
28
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/apps.py
from django.apps import AppConfig class ClxQueryConfig(AppConfig): name = "clxquery"
91
14.333333
33
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/urls.py
from django.conf.urls import re_path from clxquery import views urlpatterns = [re_path("clxquery/$", views.ExecuteClxQuery.as_view())]
135
33
70
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clxquery/migrations/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clx_query_service/settings.py
""" Django settings for clx_query_service project. Generated by 'django-admin startproject' using Django 2.2.6. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ im...
3,140
25.846154
90
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clx_query_service/wsgi.py
""" WSGI config for clx_query_service project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJ...
411
23.235294
78
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clx_query_service/__init__.py
0
0
0
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/clx_query_service/clx_query_service/urls.py
from django.urls import path, include urlpatterns = [path("", include("clxquery.urls"))]
90
21.75
50
py
clx-branch-23.04
clx-branch-23.04/siem_integrations/splunk2kafka/export2kafka/bin/export2kafka.py
from __future__ import print_function import sys import json #import pprint from splunklib.searchcommands import dispatch, StreamingCommand, Configuration, Option from confluent_kafka import Producer import confluent_kafka import time def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) @Configura...
2,439
33.857143
93
py
Most-frequented-locations
Most-frequented-locations-master/MFL.py
""" Extract Home and Work locations from individual spatio-temporal trajectories This script returns the location most frequented by an individual (called MFL) during weekdays' daytime and nighttime according to a certain time window. The MFL during a given time windows is defined as the location in which the individ...
15,425
40.579515
142
py
material-failure-prediction
material-failure-prediction-main/run_DML.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import scipy.io as sio import numpy as np from PIL import Image from DML import DML def read_image_as_tensor(filename): """ This function converts JPG image to numpy matrix format :param filename:...
1,022
25.230769
63
py
material-failure-prediction
material-failure-prediction-main/run_PH.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import imageio import numpy as np import homcloud.interface as hc import scipy.io as sio import os from CT_utils import CT_utils from CT_utils import ImageTDA from sklearn.preprocessing import MinMaxScaler de...
6,941
30.554545
107
py
material-failure-prediction
material-failure-prediction-main/CT_utils.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from PIL import Image import imageio import numpy as np import homcloud.interface as hc from scipy.stats import gaussian_kde import matplotlib.pyplot as plt import matplotlib.colors as colors class CT_utils(o...
5,560
32.299401
115
py
material-failure-prediction
material-failure-prediction-main/DML.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import tensorflow.python.util.deprecation as deprecation # Hide all the warning messages from TensorFlow deprecation._PRINT_DEPRECATION_WARNINGS = False os.environ['TF_CPP_MIN...
1,447
30.478261
68
py
pdarts
pdarts-master/test.py
import os import sys 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 model import NetworkCIFAR as Network parser = argparse.ArgumentParser("c...
3,279
31.475248
100
py
pdarts
pdarts-master/train_imagenet.py
import os import sys import numpy as np import time 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 torc...
10,818
38.922509
127
py
pdarts
pdarts-master/utils.py
import os import numpy as np import torch import shutil import torchvision.transforms as transforms from torch.autograd import Variable class AvgrageMeter(object): def __init__(self): self.reset() def reset(self): self.avg = 0 self.sum = 0 self.cnt = 0 def update(self, val, n=1): self.sum...
3,652
24.907801
105
py
pdarts
pdarts-master/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__() if reduction_prev: self.prep...
7,284
34.710784
95
py
pdarts
pdarts-master/model_search.py
import numpy as np 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, switch, p): super(MixedOp, self).__ini...
6,003
34.738095
147
py
pdarts
pdarts-master/train_search.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 torch.utils import torch.nn.functional as F import torchvision.datasets as dset import torch.backends.cudnn as cudnn import copy from model_search import Network from gen...
19,015
39.545842
215
py
pdarts
pdarts-master/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 model import Net...
3,334
31.378641
116
py
pdarts
pdarts-master/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,688
39.68254
113
py
pdarts
pdarts-master/visualize.py
import sys import genotypes from graphviz import Digraph def plot(genotype, filename): g = Digraph( format='pdf', edge_attr=dict(fontsize='20', fontname="times"), node_attr=dict(style='filled', shape='rect', align='center', fontsize='20', height='0.5', width='0.5', penwidth='2', fontname="times"),...
1,419
24.357143
141
py
pdarts
pdarts-master/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', 'sep_conv_3x3', 'sep_conv_5x5', 'dil_conv_3x3', 'dil_conv_5x5' ] NASNet = Genotype( normal = [ ...
2,818
34.2375
429
py
pdarts
pdarts-master/operations.py
import torch import torch.nn as nn 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, stride=stride, padding=1), 'skip_connect' : lambd...
4,144
32.97541
129
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/run_exp.py
########################################################## # pytorch-kaldi-gan # Walter Heymans # North West University # 2020 # Adapted from: # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## from __futur...
33,246
35.216776
152
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/quaternion_neural_networks.py
########################################################## # Quaternion Neural Networks # Titouan Parcollet, Xinchi Qiu, Mirco Ravanelli # University of Oxford and Mila, University of Montreal # May 2020 ########################################################## import torch import torch.nn.functional as F import torc...
24,754
37.20216
135
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/resample_files.py
import torch import torchaudio import numpy as np import matplotlib.pyplot as plt import configparser import os import sys import random import shutil # Reading global cfg file (first argument-mandatory file) cfg_file = sys.argv[1] if not (os.path.exists(cfg_file)): sys.stderr.write("ERROR: The config file %s does...
1,528
26.303571
107
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/core.py
########################################################## # pytorch-kaldi-gan # Walter Heymans # North West University # 2020 # Adapted from: # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import sys ...
22,371
33.793157
138
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/neural_networks.py
########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import torch import torch.nn.functional as F import torch.nn as nn import numpy as np from dist...
73,602
34.049048
226
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/multistyle_training.py
from augmentation_utils import * import configparser import sox import logging logging.getLogger('sox').setLevel(logging.ERROR) # Reading global cfg file (first argument-mandatory file) cfg_file = sys.argv[1] if not (os.path.exists(cfg_file)): sys.stderr.write("ERROR: The config file %s does not exist!\n" % (cfg_...
4,581
34.796875
111
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/utils.py
########################################################## # pytorch-kaldi-gan # Walter Heymans # North West University # 2020 # Adapted from: # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import conf...
110,615
36.598912
206
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/train_gan.py
########################################################## # pytorch-kaldi-gan # Walter Heymans # North West University # 2020 ########################################################## import sys import configparser import os import time import numpy import numpy as np import random import torch import torch.nn.func...
44,242
36.621599
191
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/gan_networks.py
import torch import torch.nn as nn from distutils.util import strtobool from torch.nn.utils import spectral_norm import math class LayerNorm(nn.Module): def __init__(self, features, eps=1e-6): super(LayerNorm, self).__init__() self.gamma = nn.Parameter(torch.ones(features)) self.beta = nn....
20,229
32.001631
111
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/tune_hyperparameters.py
#!/usr/bin/env python ########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 # # Description: # This scripts generates config files with the random hyperparamters specified by the user. # python tune_hyperparame...
3,100
35.916667
229
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/weights_and_biases.py
########################################################## # pytorch-kaldi-gan v.1.0 # Walter Heymans # North West University # 2020 ########################################################## import wandb import yaml import os from sys import exit def initialize_wandb(project, config, directory, resume, identity = ""...
1,414
22.983051
83
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/audio_processing.py
import torch import torchaudio import numpy as np import matplotlib.pyplot as plt import configparser import os import sys import random import shutil import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.spectral_norm as spectral_norm # Reading global cfg file (first argument-mandatory file) cf...
18,066
35.061876
144
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/data_io.py
########################################################## # pytorch-kaldi-gan # Walter Heymans # North West University # 2020 # Adapted from: # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import nump...
55,933
36.767725
142
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/parallel_dataset.py
import configparser import sox import logging import torch import torchaudio import numpy as np import matplotlib.pyplot as plt import os import random import shutil import subprocess import shlex import sys import math def validate_dir(dir_list): ''' Remove hidden files from directory list ''' for dir in dir...
17,550
34.031936
143
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/plot_acc_and_loss.py
########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 ########################################################## import sys import configparser import os from utils import create_curves # Checking arguments i...
1,203
30.684211
120
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/save_raw_fea.py
########################################################## # pytorch-kaldi v.0.1 # Mirco Ravanelli, Titouan Parcollet # Mila, University of Montreal # October 2018 # # Description: This script generates kaldi ark files containing raw features. # The file list must be a file containing "snt_id file.wav". # Note that onl...
4,010
31.877049
119
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/reverse_arpa.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 Mirko Hannemann BUT, mirko.hannemann@gmail.com import sys import codecs # for UTF-8/unicode if len(sys.argv) != 2: print 'usage: reverse_arpa arpa.in' sys.exit() arpaname = sys.argv[1] #\data\ #ngram 1=4 #ngram 2=2 #ngram 3=2 # #\1-grams: #-5.234...
5,846
29.936508
107
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/filt.py
#!/usr/bin/env python # Apache 2.0 from __future__ import print_function import sys vocab = set() with open(sys.argv[1]) as vocabfile: for line in vocabfile: vocab.add(line.strip()) with open(sys.argv[2]) as textfile: for line in textfile: print(" ".join(map(lambda word: word if word in voca...
360
21.5625
99
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/make_nnet_proto.py
#!/usr/bin/env python # Copyright 2014 Brno University of Technology (author: Karel Vesely) # 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 # ...
12,177
33.498584
161
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/gen_dct_mat.py
#!/usr/bin/env python # Copyright 2012 Brno University of Technology (author: Karel Vesely) # 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 # ...
2,057
29.264706
98
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/make_cnn2d_proto.py
#!/usr/bin/python # Copyright 2014 Brno University of Technology (author: Karel Vesely) # 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 # # TH...
12,637
30.994937
212
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/gen_hamm_mat.py
#!/usr/bin/env python # Copyright 2012 Brno University of Technology (author: Karel Vesely) # 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 # ...
1,639
27.77193
83
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/make_blstm_proto.py
#!/usr/bin/env python # Copyright 2015 Brno University of Technology (author: Karel Vesely) # 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 # ...
3,637
33.320755
111
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/make_lstm_proto.py
#!/usr/bin/env python # Copyright 2015 Brno University of Technology (author: Karel Vesely) # 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 # ...
3,614
33.103774
111
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/gen_splice.py
#!/usr/bin/env python # Copyright 2012 Brno University of Technology (author: Karel Vesely) # 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 # ...
1,730
29.368421
128
py
pytorch-kaldi-gan
pytorch-kaldi-gan-master/kaldi_decoding_scripts/utils/nnet/make_cnn_proto.py
#!/usr/bin/env python # Copyright 2014 Brno University of Technology (author: Katerina Zmolikova, Karel Vesely) # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
8,528
31.553435
166
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/src/Make.py
#!/usr/bin/env python # if necessary, edit preceding line to point to your Python # or launch as "python Make.py ..." # Purpose: manage LAMMPS packages, external libraries, and builds # create a version of LAMMPS specific to an input script(s) # Syntax: Make.py switch args ... # Help: type Make.py or Make.py ...
27,648
30.383655
80
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/python/install.py
#!/usr/bin/env python # copy LAMMPS src/liblammps.so and lammps.py to system dirs instructions = """ Syntax: python install.py [-h] [libdir] [pydir] libdir = target dir for src/liblammps.so, default = /usr/local/lib pydir = target dir for lammps.py, default = Python site-packages dir """ import sys,o...
2,034
28.926471
78
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/python/lammps.py
# ---------------------------------------------------------------------- # LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator # http://lammps.sandia.gov, Sandia National Laboratories # Steve Plimpton, sjplimp@sandia.gov # # Copyright (2003) Sandia Corporation. Under the terms of Contract # DE...
6,013
34.797619
78
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/python/examples/vizplotgui_atomeye.py
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # vizplotgui_atomeye.py # Purpose: viz running LAMMPS simulation via AtomEye with plot and GUI # Syntax: vizplotgui_atomeye.py in.lammps Nfreq compute-ID # in.lammps = LAMMPS input script # Nfreq = plot data point...
4,459
25.86747
75
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/python/examples/viz_gl.py
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # viz_gl.py # Purpose: viz running LAMMPS simulation via GL tool in Pizza.py # Syntax: viz_gl.py in.lammps Nfreq Nsteps # in.lammps = LAMMPS input script # Nfreq = dump and viz shapshot every this many steps # ...
1,846
20.988095
74
py
LIGGGHTS-WITH-BONDS
LIGGGHTS-WITH-BONDS-master/python/examples/simple.py
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # simple.py # Purpose: mimic operation of couple/simple/simple.cpp via Python # Syntax: simple.py in.lammps # in.lammps = LAMMPS input script import sys # parse command line argv = sys.argv if len(argv) != 2: print "S...
1,041
19.431373
65
py