repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperopt-sklearn/hpsklearn/tests/test_ts.py | training/helpers/hyperopt-sklearn/hpsklearn/tests/test_ts.py | """
Unit tests for time series forecast using sklearn and hyperopt
In this file, a simulated time series dataset is used to demonstrate the
use of hpsklearn for time series forecasting problems. More specifically,
it shows: how a time series dataset can be converted into an sklearn
compatible format; the use of the ... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/scikit-small-ensemble/setup.py | training/helpers/scikit-small-ensemble/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
setup(
name='scikit-small-ensemble',
version='0.0.2',
author='Stewart Park',
url='https://github.com/stewartpark/scikit-small-ensemble',
author_email='hello@stewartjpark.com',
license='MIT',
install_re... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/scikit-small-ensemble/scikit_small_ensemble/scikit_ensemble.py | training/helpers/scikit-small-ensemble/scikit_small_ensemble/scikit_ensemble.py | import lz4 as zlib
import tempfile
import joblib
import os
try:
import _pickle as pickle
except ImportError:
try:
import cPickle as pickle
except ImportError:
print('cPickle is not installed. Using the builtin pickle instead.')
import pickle
class CompressedEstimators(object):
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/scikit-small-ensemble/scikit_small_ensemble/__init__.py | training/helpers/scikit-small-ensemble/scikit_small_ensemble/__init__.py | from __future__ import absolute_import
from scikit_small_ensemble.scikit_ensemble import CompressedEstimators, DiskEstimators
def compress(model, ratio=0.5):
if isinstance(model.estimators_, CompressedEstimators):
raise Exception("The model is already compressed.")
model.estimators_ = CompressedEstima... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/devol/setup.py | training/helpers/devol/setup.py | from setuptools import setup, find_packages
setup(name='devol',
version='0.02',
description='Genetic search for CNN classifier in Keras',
url='https//github.com/joedav/devol',
author='Joe Davison',
author_email='josephddavison@gmail.com',
license='MIT',
classifiers=[
# How mature i... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/devol/devol/__init__.py | training/helpers/devol/devol/__init__.py | from .devol import DEvol
from .genome_handler import GenomeHandler
__all__ = ['DEvol', 'GenomeHandler']
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/devol/devol/genome_handler.py | training/helpers/devol/devol/genome_handler.py | import numpy as np
import random as rand
import math
from keras.models import Sequential
from keras.layers import Activation, Dense, Dropout, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
class GenomeHandler:
"""
Defines the... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/devol/devol/devol.py | training/helpers/devol/devol/devol.py | """
Run a genetic algorithm to find an appropriate architecture for some image
classification task with Keras+TF.
To use, define a `GenomeHandler` defined in genomehandler.py. Then pass it, with
training data, to a DEvol instance to run the genetic algorithm. See the readme
for more detailed instructions.
"""
from __... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/devol/example/demo.py | training/helpers/devol/example/demo.py | from __future__ import print_function
from keras.datasets import mnist
from keras.utils.np_utils import to_categorical
import numpy as np
from keras import backend as K
from devol import DEvol, GenomeHandler
# **Prepare dataset**
# This problem uses mnist, a handwritten digit classification problem used
# for many in... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/setup.py | training/helpers/autobazaar/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
with open('README.md') as readme_file:
readme = readme_file.read()
with open('HISTORY.md') as history_file:
history = history_file.read()
install_requires = [
'baytune>=0.2.1,<0.3',
'mlblocks>=0.3.2,<0.4',
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/autobazaar/search.py | training/helpers/autobazaar/autobazaar/search.py | # -*- coding: utf-8 -*-
"""AutoBazaar Search Module.
This module contains the PipelineSearcher, which is the class that
contains the main logic of the Auto Machine Learning process.
"""
import gc
import itertools
import json
import logging
import os
import signal
import warnings
from collections import defaultdict
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/autobazaar/__main__.py | training/helpers/autobazaar/autobazaar/__main__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""AutoBazaar Command Line Module."""
import argparse
import gc
import json
import os
import shutil
import socket
import sys
import traceback
import warnings
from datetime import datetime
import cloudpickle
import pandas as pd
from mit_d3m import metrics
from mit_d3m.dat... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/autobazaar/utils.py | training/helpers/autobazaar/autobazaar/utils.py | # -*- coding: utf-8 -*-
import os
import tempfile
from collections import defaultdict
from datetime import datetime
import numpy as np
from sklearn.preprocessing import LabelEncoder
def encode_score(scorer, expected, observed):
if expected.dtype == 'object':
le = LabelEncoder()
expected = le.fit... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/autobazaar/pipeline.py | training/helpers/autobazaar/autobazaar/pipeline.py | # -*- coding: utf-8 -*-
"""AutoBazaar Pipeline Module."""
import json
import logging
import os
import random
import uuid
from collections import Counter
import cloudpickle
import numpy as np
import pandas as pd
from mit_d3m.loaders import get_loader
from mit_d3m.metrics import METRICS_DICT
from mlblocks import MLPip... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/autobazaar/__init__.py | training/helpers/autobazaar/autobazaar/__init__.py | # -*- coding: utf-8 -*-
"""
AutoBazaar top module.
AutoBazaar is an AutoML system created to execute the experiments associated with the
[The Machine Learning Bazaar Paper: Harnessing the ML Ecosystem for Effective System
Development](https://arxiv.org/pdf/1905.08942.pdf)
by the [Human-Data Interaction (HDI) Project]... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autobazaar/docs/conf.py | training/helpers/autobazaar/docs/conf.py | # -*- coding: utf-8 -*-
#
# AutoBazaar documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 6 13:06:48 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/train_autobazaar_old.py | training/helpers/archived/train_autobazaar_old.py | import warnings, datetime, uuid, os, json, shutil, pickle, random
warnings.filterwarnings('ignore')
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.metrics import r2_score, mean_squared_error
from sklearn.ensemble import RandomForestRegressor
from sklearn.e... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/train_autobazaar.py | training/helpers/archived/train_autobazaar.py | import warnings, datetime, uuid, os, json, shutil, pickle, random
warnings.filterwarnings('ignore')
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from sklearn.metrics import r2_score, mean_squared_error
from sklearn.ensemble import RandomForestRegressor
from sklearn.e... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/WIP_train_mlbox-WIP.py | training/helpers/archived/WIP_train_mlbox-WIP.py | import os, json, shutil, pickle
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, mean_squared_log_error
import pandas as pd
print('installing library')
os.system('pip3 install mlbox==0.8.4')
from mlbox.preprocessing import *
from mlbox.optimisation import *
from mlbox.p... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/train_pLDA.py | training/helpers/archived/train_pLDA.py | '''
PLDA implementation from
https://github.com/RaviSoji/plda/blob/master/mnist_demo/mnist_demo.ipynb
'''
import os, sys, pickle
import helpers.plda.plda as plda
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/train_autosklearn.py | training/helpers/archived/train_autosklearn.py | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.model_selection import GridSearchCV, train_test_split
import autosklearn.classification as asklc
import sklearn.metrics
import os, shutil
def train_autosklearn(alldata, labels, mtype, jsonfile, problemtype, default_features):
fold... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/archived/train_autokeras.py | training/helpers/archived/train_autokeras.py | '''
@Train_autokeras script.
Take in a dataset,
convert it to pytorch dataloader format,
ingest it in autokeras,
output model in './models directory'
This will make it easier to deploy automated machine learning models
into the future.
Note that grid search can be expensive + take up to 24 hours on most
GPUs / CP... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/setup.py | training/helpers/hyperband/setup.py | from __future__ import print_function
import sys
from setuptools import setup, find_packages
with open('requirements.txt') as f:
INSTALL_REQUIRES = [l.strip() for l in f.readlines() if l]
try:
import numpy
except ImportError:
print('numpy is required during installation')
sys.exit(1)
try:
import... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/hyperband/search.py | training/helpers/hyperband/hyperband/search.py | """
=========
Hyperband
=========
This module contains a scikit-learn compatible implementation of the hyperband
algorithm[^1].
Compared to the civismlext implementation, this supports multimetric scoring,
and the option to turn the last round of hyperband (the randomized search
round) off.
References
----------
..... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/hyperband/__init__.py | training/helpers/hyperband/hyperband/__init__.py | """
"""
from .search import HyperbandSearchCV
__all__ = ['HyperbandSearchCV']
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/hyperband/tests/__init__.py | training/helpers/hyperband/hyperband/tests/__init__.py | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false | |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/hyperband/tests/test_validation.py | training/helpers/hyperband/hyperband/tests/test_validation.py | from nose.tools import raises
from hyperband import HyperbandSearchCV
from sklearn.ensemble import RandomForestClassifier
from scipy.stats import randint as sp_randint
def setup():
model = RandomForestClassifier()
param_dist = {"max_depth": [3, None],
"max_features": sp_randint(1, 11),
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/hyperband/tests/test_hyperband.py | training/helpers/hyperband/hyperband/tests/test_hyperband.py | from nose.tools import raises
from hyperband import HyperbandSearchCV
from sklearn.ensemble import RandomForestClassifier
from scipy.stats import randint as sp_randint
from sklearn.datasets import load_digits
from sklearn.utils import check_random_state
def setup():
model = RandomForestClassifier()
rng = ch... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/examples/random_forest_example.py | training/helpers/hyperband/examples/random_forest_example.py | """
==================================================================
Tuning the hyperparameters of a random forest model with hyperband
==================================================================
"""
from hyperband import HyperbandSearchCV
from scipy.stats import randint as sp_randint
from sklearn.datasets im... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/hyperband/doc/conf.py | training/helpers/hyperband/doc/conf.py | # -*- coding: utf-8 -*-
#
# project-template documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 18 14:44:12 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/gender_tpot_regression/model/gender_tpot_regression.py | training/helpers/gender_tpot_regression/model/gender_tpot_regression.py | import numpy as np
import json, pickle
import pandas as pd
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.feature_selection import SelectPercentile, f_regression
from sklearn.linear_model import ElasticNetCV
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline,... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/gender_tpot_classifier/model/gender_tpot_classifier.py | training/helpers/gender_tpot_classifier/model/gender_tpot_classifier.py | import numpy as np
import json, pickle
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import Normalizer
from sklearn.svm import LinearSVC
# NOTE: Make sure that the outcome column is labeled 'target' in the data file
g=jso... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autokaggle/tabular_supervised.py | training/helpers/autokaggle/tabular_supervised.py | from abc import abstractmethod
import os
from lightgbm import LGBMClassifier, LGBMRegressor
from sklearn.model_selection import RandomizedSearchCV
from sklearn.model_selection import StratifiedKFold, KFold
from sklearn.metrics import roc_auc_score, f1_score, mean_squared_error
import numpy as np
import random
from au... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autokaggle/utils.py | training/helpers/autokaggle/utils.py | import os
import tempfile
import string
import random
def ensure_dir(directory):
"""Create directory if it does not exist."""
if not os.path.exists(directory):
os.makedirs(directory)
def temp_path_generator():
sys_temp = tempfile.gettempdir()
path = os.path.join(sys_temp, 'autokaggle')
r... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/autokaggle/tabular_preprocessor.py | training/helpers/autokaggle/tabular_preprocessor.py | import numpy as np
from pandas import DataFrame
from scipy.stats import pearsonr
LEVEL_HIGH = 32
def parallel_function(labels, first_batch_keys, task):
if task == 'label':
if min(labels) > first_batch_keys:
labels = labels - np.min(labels)
return labels.reshape(labels.shape[0], 1)
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/plda/__init__.py | training/helpers/plda/__init__.py | # Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/plda/plda/model.py | training/helpers/plda/plda/model.py | # Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/plda/plda/optimizer.py | training/helpers/plda/plda/optimizer.py | # Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/plda/plda/__init__.py | training/helpers/plda/plda/__init__.py | # Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/plda/plda/classifier.py | training/helpers/plda/plda/classifier.py | # Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/setup.py | training/helpers/keras_compressor/setup.py | from setuptools import find_packages, setup
setup(
name='keras_compressor',
version='0.0.1',
packages=find_packages(
exclude=['example'],
),
url='',
license='Apache License v2',
author='Kosuke Kusano',
author_email='kosuke_kusano@dwango.co.jp',
description='',
install_re... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/bin/keras-compressor.py | training/helpers/keras_compressor/bin/keras-compressor.py | #!/usr/bin/env python
import argparse
import logging
import keras
import keras.backend as K
import numpy
from keras.models import load_model
from keras_compressor.compressor import compress
def count_total_params(model):
"""Counts the number of parameters in a model
See:
https://github.com/fchollet... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/cifar10/train.py | training/helpers/keras_compressor/example/cifar10/train.py | from keras import backend as K
from keras.callbacks import EarlyStopping
from keras.datasets import cifar10
from keras.layers import BatchNormalization, Conv2D, Dense, Dropout, Flatten, Input, MaxPool2D
from keras.models import Model
from keras.preprocessing.image import ImageDataGenerator
from keras.utils.np_utils imp... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/cifar10/compress.py | training/helpers/keras_compressor/example/cifar10/compress.py | import logging
from keras.models import load_model
from keras_compressor.compressor import compress
logging.basicConfig(
level=logging.INFO,
)
model = load_model('./model_raw.h5')
model = compress(model, 3e-1)
model.save('./model_compressed.h5')
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/cifar10/finetune.py | training/helpers/keras_compressor/example/cifar10/finetune.py | import keras.backend as K
import keras.callbacks as C
from keras.datasets import cifar10
from keras.models import load_model
from keras.utils.np_utils import to_categorical
from keras_compressor import custom_objects
def preprocess(X):
return X.astype('float32') / 255 * 2 - 1
class_num = 10
batch_size = 128
epoc... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/cifar10/evaluate.py | training/helpers/keras_compressor/example/cifar10/evaluate.py | import sys
from keras import backend as K
from keras.datasets import cifar10
from keras.models import load_model
from keras.utils import to_categorical
from keras_compressor import custom_objects
def preprocess(X):
return X.astype('float32') / 255 * 2 - 1
def usage():
print('{} model.h5'.format(sys.argv[0]... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/mnist/train.py | training/helpers/keras_compressor/example/mnist/train.py | from keras import backend as K
from keras.callbacks import EarlyStopping
from keras.datasets import mnist
from keras.layers import Conv2D, Dense, Dropout, Flatten, Input, MaxPool2D
from keras.models import Model
from keras.utils.np_utils import to_categorical
def preprocess(X):
return X.astype('float32') / 255
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/mnist/compress.py | training/helpers/keras_compressor/example/mnist/compress.py | import logging
from keras.models import load_model
from keras_compressor.compressor import compress
logging.basicConfig(
level=logging.INFO,
)
model = load_model('./model_raw.h5')
model = compress(model, 7e-1)
model.save('./model_compressed.h5')
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/mnist/finetune.py | training/helpers/keras_compressor/example/mnist/finetune.py | from keras import backend as K
from keras.callbacks import EarlyStopping
from keras.datasets import mnist
from keras.models import load_model
from keras.utils.np_utils import to_categorical
from keras_compressor.layers import custom_layers
def preprocess(X):
return X.astype('float32') / 255
class_num = 10
batch... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/example/mnist/evaluate.py | training/helpers/keras_compressor/example/mnist/evaluate.py | import sys
from keras import backend as K
from keras.datasets import mnist
from keras.models import load_model
from keras.utils import to_categorical
from keras_compressor import custom_objects
def preprocess(X):
return X.astype('float32') / 255
def usage():
print('{} model.h5'.format(sys.argv[0]))
def l... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/utils.py | training/helpers/keras_compressor/keras_compressor/utils.py | from typing import Any, Dict, List
from keras.engine.topology import Layer, Node
def swap_layer_connection(old_layer: Layer, new_layer: Layer) -> None:
'''connect nodes of calc graph for new_layer and disconnect ones for old_layers
Keras manages calculation graph by nodes which hold connection between
l... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/__init__.py | training/helpers/keras_compressor/keras_compressor/__init__.py | from .layers import custom_layers
__all__ = ['custom_objects']
custom_objects = dict(custom_layers.items()) # shallow copy
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/compressor.py | training/helpers/keras_compressor/keras_compressor/compressor.py | import logging
from collections import defaultdict
from typing import Dict, List, Type
from keras.engine import Layer, Model
from .factorizer import Factorizer
from .factorizers.svd import SVDFactorizer
from .factorizers.tucker import TuckerFactorizer
from .utils import swap_layer_connection
logger = logging.getLogg... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/factorizer.py | training/helpers/keras_compressor/keras_compressor/factorizer.py | from typing import List, Optional, Type
from keras.layers import Layer
class Factorizer:
factorize_target_layers = [] # type: List[Type[Layer]]
@classmethod
def compress(cls, layer: Layer, acceptable_error: float) -> Optional[Layer]:
"""try to compress the layer under acceptable_error.
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/layers.py | training/helpers/keras_compressor/keras_compressor/layers.py | from keras import backend as K
from keras import activations, constraints, initializers, regularizers
from keras.engine import InputSpec, Layer
from keras.layers import Dense
from keras.utils import conv_utils
class FactorizedDense(Layer):
"""Just your regular densely-connected NN layer.
This layer based on ... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/factorizers/tucker.py | training/helpers/keras_compressor/keras_compressor/factorizers/tucker.py | import itertools
import logging
import math
from queue import PriorityQueue
from typing import Optional, Tuple
import numpy as np
from keras import backend as K
from keras.layers import Conv2D
from keras_compressor.factorizer import Factorizer
from keras_compressor.layers import FactorizedConv2DTucker
from keras_compr... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/factorizers/svd.py | training/helpers/keras_compressor/keras_compressor/factorizers/svd.py | import logging
import math
from typing import Optional, Tuple
import numpy as np
from keras import backend as K
from keras.engine import Layer
from keras.layers import Dense
from sklearn.utils.extmath import randomized_svd
from ..factorizer import Factorizer
from ..layers import FactorizedDense
from ..utils import co... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/training/helpers/keras_compressor/keras_compressor/factorizers/__init__.py | training/helpers/keras_compressor/keras_compressor/factorizers/__init__.py | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false | |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/create_csv.py | annotation/create_csv.py | '''
annotate.py
Annotate audio, text, image, or video files for use with regression modeling in Allie.
All you need is a folder, which identifies the type of file within it, and then it goes
through each file to annotate (as .JSON)
'''
import os, sys, datetime, json, time
import pandas as pd
from optparse import Opti... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/annotate.py | annotation/annotate.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/annotate_audio.py | annotation/helpers/annotate_audio.py | import os, time, shutil
from tqdm import tqdm
listdir=os.listdir()
try:
os.mkdir('coconut')
except:
pass
try:
os.mkdir('other')
except:
pass
wavfiles=list()
for i in range(len(listdir)):
if listdir[i].endswith('.wav'):
wavfiles.append(listdir[i])
for i in tqdm(range(len(wavfiles))):
wavfile=wavfiles[i]
os... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/balancedelete.py | annotation/helpers/helpers/balancedelete.py | import os, random, shutil
## helper functions
def get_wav():
# get all .WAV or .MP3 files in folder and count the number of them
listdir=os.listdir()
count=0
for i in range(len(listdir)):
if listdir[i][-4:] in ['.wav', '.mp3']:
count = count+1
return count
def random_remov... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/data-preprocess.py | annotation/helpers/helpers/data-preprocess.py | '''
Data pre-processing for keras and sklearn
(good tutorial here)
'''
import numpy as np
from numpy import argmax, array
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import OneHotEncoder
from keras.utils import to_categorical
# define example
data = ['cold', 'cold', 'warm', 'cold', 'hot'... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/musicgenre_download.py | annotation/helpers/helpers/musicgenre_download.py | import os
import json
import pafy
import json
import time
import wave
import random
import ffmpy
import soundfile as sf
import getpass
os.chdir("/Users/"+getpass.getuser()+"/Desktop/genres")
optionlist=list()
one="'Feel it Still' by Portugal. The Man. https://www.youtube.com/watch?v=pBkHHoOIIn8"
#tone=duration of... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | true |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/deletejsonfolders.py | annotation/helpers/helpers/deletejsonfolders.py | import os
from tqdm import tqdm
os.chdir('/Users/jimschwoebel/desktop/deletejson')
hostdir=os.getcwd()
listdir=os.listdir()
folders=list()
for i in range(len(listdir)):
if listdir[i].find('.') < 0:
folders.append(listdir[i])
for i in tqdm(range(len(folders))):
os.chdir(folders[i])
listdir=os.listdir()
for j in... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/random20secsplice.py | annotation/helpers/helpers/random20secsplice.py | import soundfile as sf
import os
import ffmpy
import random
import getpass
genre=input('what folder do you want to create 20 sec splices for?')
dir1='/Users/'+getpass.getuser()+'/Desktop/genres/'+genre
dir2='/Users/'+getpass.getuser()+'/Desktop/genres/'+genre+'_snipped'
os.chdir(dir1)
os.mkdir(dir2)
listdir=os.lis... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/make_controls.py | annotation/helpers/helpers/make_controls.py | '''
Make_controls.py
Generate control data from a list of folders filled with .wav files.
'''
import soundfile as sf
import os, ffmpy, random, shutil
# CONVERT FILE
def convert_file(filename):
#take in an audio file and convert with ffpeg file type
#types of input files: .ogg
#output file type: .w... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/audio-network.py | annotation/helpers/helpers/audio-network.py | '''
Draw graphs to visualize audio data with network theory.
Network theory - https://github.com/networkx/networkx
Documentation - https://networkx.github.io/documentation/networkx-1.10/tutorial/tutorial.html#drawing-graphs
>>> import networkx as nx
>>> G = nx.Graph()
>>> G.add_edge('A', 'B', weight=4)
>>> G.add_edge... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/yscrape.py | annotation/helpers/helpers/yscrape.py | import os
import json
import pafy
import json
import time
import wave
import ffmpy
import pandas as pd
import soundfile as sf
import shutil
filename=input('what is the file name? \n')
desktop="/Users/jim/Desktop/"
os.chdir(desktop)
foldername=filename[0:-5]
destfolder=desktop+foldername+'/'
try:
os.mkdir(foldern... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/remove_json.py | annotation/helpers/helpers/remove_json.py | '''
Remove_json.py
Remove all json files in sub-directories.
Useful when you are cloning directories that have already been featurized
to get new feature embeddings with nlx-model repo.
'''
import os
def removejson(listdir):
for i in range(len(listdir)):
if listdir[i][-5:]=='.json':
os.remov... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/pickclass_byprobability.py | annotation/helpers/helpers/pickclass_byprobability.py | import pickle, os, json
import numpy as np
def pick_class(classlist):
names=['teens','twenties','thirties','fourties','fifties','sixties','seventies']
probabilities=[.0666,.48888,.2296296,.08888,.08888,.0296,.0074]
freqs=list()
for i in range(len(classlist)):
try:
index=names.inde... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/automata.py | annotation/helpers/helpers/automata.py | ''' Cellular automata
Could be useful for audio applications.
REFERENCES
https://faingezicht.com/articles/2017/01/23/wolfram/
http://mathworld.wolfram.com/Rule30.html
'''
def window(iterable, stride=3):
for index in range(len(iterable) - stride + 1):
yield iterable[index:index + stride]
def generate_pat... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/githubtable.py | annotation/helpers/helpers/githubtable.py | '''
Load all model accuracies, names, and standard deviations
and output them in a spreadsheet.
This is intended for any model file directory using the nlx-model repository.'''
import json, os, xlsxwriter, getpass
def sort_list(list1, list2):
zipped_pairs = zip(list2, list1)
z = [x for _, x in sorted(zipped_... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/facedetect.py | annotation/helpers/helpers/facedetect.py | import numpy as np
import cv2
#put these files on the desktop
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
img = cv2.imread('face.png')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/excel2json.py | annotation/helpers/helpers/excel2json.py | import librosa
import os
import soundfile as sf
import xlsxwriter
import pandas as pd
import time
import json
exceldirectory='/Users/jim/Desktop/neurolex/voicemails/'
jsondirectory='/Users/jim/Desktop/neurolex/voicemails/jsonfiles/'
jsonexceldirectory='/Users/jim/Desktop/neurolex/voicemails/jsonfiles-excel/'
os.chdi... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/markov-chain.py | annotation/helpers/helpers/markov-chain.py | '''
Make markov chain.
Following tutorial on Datacamp
https://www.datacamp.com/community/tutorials/markov-chains-python-tutorial
'''
import numpy as np
import random
# the statespace
states = ["Sleep","Icecream","Run"]
# Possible sequences of events
transitionName = [["SS","SR","SI"],["RS","RR","RI"],["IS","IR","I... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/visualizemodels.py | annotation/helpers/helpers/visualizemodels.py | '''
Load all model accuracies, names, and standard deviations
and output them in a spreadsheet.
This is intended for any model file directory using the nlx-model repository.'''
import json, os, xlsxwriter, getpass
os.chdir('/Users/'+getpass.getuser()+'/nlx-model/nlx-audiomodel/models')
listdir=os.listdir()
names=l... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/helpers/extract_noise.py | annotation/helpers/helpers/extract_noise.py | import shutil, os, random
from pydub import AudioSegment
try:
os.mkdir('noise')
except:
shutil.rmtree('noise')
os.mkdir('noise')
def extract_noise(filename, length):
song = AudioSegment.from_mp3(filename)
first = song[100:100+length]
first.export(filename[0:-4]+'_noise.mp3')
shutil.move(os.getcwd()+'/'+filename[... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/youtube_scrape/download_playlist.py | annotation/helpers/youtube_scrape/download_playlist.py | '''
================================================
YOUTUBE_SCRAPE REPOSITORY
================================================
repository name: youtube_scrape
repository version: 1.0
repository link: https://github.com/jim-schwoebel/youtube_scrape
author: Jim Schwoebel
author cont... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/youtube_scrape/make_playlist.py | annotation/helpers/youtube_scrape/make_playlist.py | '''
================================================
YOUTUBE_SCRAPE REPOSITORY
================================================
repository name: youtube_scrape
repository version: 1.0
repository link: https://github.com/jim-schwoebel/youtube_scrape
author: Jim Schwoebel
author cont... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/youtube_scrape/archived/get_audio.py | annotation/helpers/youtube_scrape/archived/get_audio.py | '''
get audio from each file (for processing)
'''
import os
folder=input('what playlist do you want audio?')
os.chdir(folder)
listdir=os.listdir()
for i in range(len(listdir)):
if listdir[i][-4:]=='.mp4':
os.system('ffmpeg -i %s %s'%(listdir[i],listdir[i][0:-4]+'.wav'))
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/youtube_scrape/archived/download_playlist_url.py | annotation/helpers/youtube_scrape/archived/download_playlist_url.py | '''
Extract playlist URLs
(for further processing)
'''
import requests, json, os
from bs4 import BeautifulSoup
from pytube import YouTube
base='https://www.youtube.com/watch?v='
playlist_name=input('what do you want to name this playlist (e.g. angry)?')
#angry
playlist=input('what is the playlist url?')
#https://www... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/annotation/helpers/youtube_scrape/archived/download_playlist_id.py | annotation/helpers/youtube_scrape/archived/download_playlist_id.py | '''
Extract playlist URLs
(for further processing)
'''
import requests, json, os
from bs4 import BeautifulSoup
from pytube import YouTube
base='https://www.youtube.com/watch?v='
playlist_name=input('what do you want to name this playlist (e.g. angry)?')
#angry
playlist=input('what is the playlist id?')
playlist='htt... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/visualize/visualize.py | visualize/visualize.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | true |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/augment_vidaug.py | augmentation/video_augmentation/augment_vidaug.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/augment.py | augmentation/video_augmentation/augment.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/setup.py | augmentation/video_augmentation/helpers/vidaug/setup.py | import setuptools
setuptools.setup(name='vidaug',
version='0.1',
description='Video Augmentation Library',
url='https://github.com/okankop/vidaug',
author='Okan Kopuklu',
author_email='okankopuklu@gmail.com',
license=... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/__init__.py | augmentation/video_augmentation/helpers/vidaug/vidaug/__init__.py | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false | |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/flip.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/flip.py | """
Augmenters that apply video flipping horizontally and
vertically.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.HorizontalFlip(),
va.VerticalFlip() ])
List of augmenters:
* HorizontalFlip
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/crop.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/crop.py | """
Augmenters that apply video flipping horizontally and
vertically.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.HorizontalFlip(),
va.VerticalFlip() ])
List of augmenters:
* CenterCrop
* Co... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/geometric.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/geometric.py | """
Augmenters that apply geometric transformations.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.RandomRotate(30),
va.RandomResize(0.2) ])
List of augmenters:
* GaussianBlur
* ElasticTransf... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/temporal.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/temporal.py | """
Augmenters that apply temporal transformations.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.RandomRotate(30),
va.RandomResize(0.2) ])
List of augmenters:
* TemporalBeginCrop
* TemporalC... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/group.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/group.py | """
Augmenters that apply to a group of augmentations, like selecting
an augmentation from a list, or applying all the augmentations in
a list sequentially
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.HorizontalFlip(),
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/__init__.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/__init__.py | from __future__ import absolute_import
from .affine import *
from .crop import *
from .flip import *
from .group import *
from .temporal import *
from .intensity import *
from .geometric import *
| python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/affine.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/affine.py | """
Augmenters that apply affine transformations.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.RandomRotate(30),
va.RandomResize(0.2) ])
List of augmenters:
* RandomRotate
* RandomResize
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/intensity.py | augmentation/video_augmentation/helpers/vidaug/vidaug/augmentors/intensity.py | """
Augmenters that apply transformations on the pixel intensities.
To use the augmenters, clone the complete repo and use
`from vidaug import augmenters as va`
and then e.g. :
seq = va.Sequential([ va.RandomRotate(30),
va.RandomResize(0.2) ])
List of augmenters:
* InvertColor
*... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/text_augmentation/augment_textacy.py | augmentation/text_augmentation/augment_textacy.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/text_augmentation/augment.py | augmentation/text_augmentation/augment.py | '''
AAA lllllll lllllll iiii
A:::A l:::::l l:::::l i::::i
A:::::A l:::::l l:::::l iiii
A:::::::A l:::::l l:::::l
... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/text_augmentation/helpers/augment_eda.py | augmentation/text_augmentation/helpers/augment_eda.py | import os, sys, shutil
def augment_eda(textfile, basedir):
arg_num= 1
text='1\t'+open(os.getcwd()+'/'+textfile).read()
textfile2=open(textfile,'w')
textfile2.write(text)
textfile2.close()
shutil.copy(os.getcwd()+'/'+textfile,basedir+'/helpers/eda_nlp/data/'+textfile)
newfile='augmented_'+textfile
os.system... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
jim-schwoebel/allie | https://github.com/jim-schwoebel/allie/blob/b89f1403f63033ad406d0606b7c7a45000b43481/augmentation/text_augmentation/helpers/eda_nlp/experiments/b_1_data_process.py | augmentation/text_augmentation/helpers/eda_nlp/experiments/b_1_data_process.py | from methods import *
from b_config import *
if __name__ == "__main__":
#generate the augmented data sets
for dataset_folder in dataset_folders:
#pre-existing file locations
train_orig = dataset_folder + '/train_orig.txt'
#file to be created
train_aug_st = dataset_folder + '/train_aug_st.txt'
#standard... | python | Apache-2.0 | b89f1403f63033ad406d0606b7c7a45000b43481 | 2026-01-05T07:09:07.495102Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.