index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
17,104
EmanuelAlogna/IAML-Ass03
refs/heads/master
/As301_cnn.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,105
EmanuelAlogna/IAML-Ass03
refs/heads/master
/As301_pca_visualization.py
#<!---------------------------------------------------------------------------> #<!-- File : As301_pca_visualization --> #<!---------------------------------------------------------------------------> __version__ = "$Revision: 2018042401 $" ######################################...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,106
EmanuelAlogna/IAML-Ass03
refs/heads/master
/As301_pca_viz_compare.py
#<!---------------------------------------------------------------------------> #<!-- File : As301_pca_viz_compare --> #<!---------------------------------------------------------------------------> __version__ = "$Revision: 2018042401 $" ######################################...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,107
EmanuelAlogna/IAML-Ass03
refs/heads/master
/As301_classifier.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,108
EmanuelAlogna/IAML-Ass03
refs/heads/master
/As301_detector.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,109
EmanuelAlogna/IAML-Ass03
refs/heads/master
/Ex10TemplateCode/Ex1001_svm_training.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,110
EmanuelAlogna/IAML-Ass03
refs/heads/master
/Ex10TemplateCode/Ex1002_pedestrian_detector.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,111
EmanuelAlogna/IAML-Ass03
refs/heads/master
/warmUpAnnotations.py
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhage --> #<!-- Computer Science Department --> #<!-- Eye Information Research Group --> ...
{"/As301_pca_visualization.py": ["/As301_classifier.py"], "/As301_pca_viz_compare.py": ["/As301_classifier.py"], "/As301_detector.py": ["/As301_classifier.py"]}
17,120
maana-io/IRIS-Classification
refs/heads/master
/app/resolvers.py
import logging from app.logic.helpers import * from app.logic.active_learning import * from app.logic.classify import * from app.logic.feature_selection import * from app.logic.model_selection import * from app.logic.train import * logger = logging.getLogger(__name__) resolvers = { 'Query': { #'train': l...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,121
maana-io/IRIS-Classification
refs/heads/master
/app/logic/helpers.py
import pandas as pd from app.core.main.Classifier import Classifier from app.core.main.tokenizer.BaseTokenizer import BaseTokenizer from app.core.main.tokenizer.PorterTokenizer import PorterTokenizer from app.core.main.tokenizer.LemmaTokenizer import LemmaTokenizer from sklearn.feature_extraction.stop_words import E...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,122
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/tokenizer/BaseTokenizer.py
''' Base Tokenizer ''' from nltk import word_tokenize class BaseTokenizer(object): def __init__(self): pass def __call__(self, doc): return self.tokenize(doc) def tokenize(self, doc): tokens = [t for t in word_tokenize(doc)] return tokens def __str__(self): ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,123
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/tokenizer/LemmaTokenizer.py
''' WordNet Lemmatizer ''' from nltk.stem import WordNetLemmatizer from app.core.main.tokenizer.BaseTokenizer import BaseTokenizer class LemmaTokenizer(object): def __init__(self): self.__wnl = WordNetLemmatizer() self.__basetokenizer = BaseTokenizer() def __call__(self, doc): return ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,124
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/classifier/Ensemble.py
''' Ensemble model ''' import numpy as np import copy class Ensemble(object): def __init__(self, base_model, group_index): self.__base_model = base_model self.__group_index = group_index self.__models = [] self.__labels = [] self.__num_features = 0 #required by ba...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,125
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/classifier/LSVC.py
''' SVM ''' from sklearn.svm import SVC import numpy as np class LSVC(object): def __init__(self, class_weighting='balanced', C=1.0, max_iter=2): self.__class_weight = class_weighting self.__C = C self.__kernel = 'linear' self.__probability = True self.__decision_func_sha...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,126
maana-io/IRIS-Classification
refs/heads/master
/app/core/test/Classifier.py
# coding: utf-8 import sys import unittest import pandas as pd import random as rd from app.core.main.classifier.LR import LR from app.core.main.classifier.LSVC import LSVC from app.core.main.classifier.Ensemble import Ensemble from app.core.main.featurizer.Featurizer import Featurizer from app.core.main.tokenizer.B...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,127
maana-io/IRIS-Classification
refs/heads/master
/app/test/classify.py
# coding: utf-8 import unittest import sys from app.logic.helpers import * from app.test.setup import * from app.logic.classify import classify from app.logic.train import * modelTypes = [Classifier.LR_MODEL_TYPE, Classifier.SVC_MODEL_TYPE, Classifier.ENSEMBLE_LR_MODEL_TYPE, Classifier.ENSEMBLE_SVC_MODEL_TYPE] tes...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,128
maana-io/IRIS-Classification
refs/heads/master
/app/logic/model_selection.py
import sys import numpy as np import pandas as pd import datetime import logging from pathlib import Path import pickle import os from app.logic.train import * from app.logic.helpers import * from app.settings import * logger = logging.getLogger(__name__) logging.basicConfig(stream=sys.stdout, level=LOG_LEVEL) ca...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,129
maana-io/IRIS-Classification
refs/heads/master
/app/logic/train.py
import json import numpy as np #import pprint from app.core.main.tokenizer.BaseTokenizer import BaseTokenizer from app.core.main.tokenizer.PorterTokenizer import PorterTokenizer from app.core.main.tokenizer.LemmaTokenizer import LemmaTokenizer from app.core.main.featurizer.Doc2Vector import Doc2Vector from app.core.m...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,130
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/evaluator/ModelEvaluator.py
''' Leave one out model evaluator ''' import numpy as np import pandas as pd from sklearn.model_selection import LeaveOneOut, StratifiedKFold from sklearn.metrics import confusion_matrix from sklearn.metrics import classification_report class ModelEvaluator(object): ME_LeaveOneOut = "LEAVE_ONE_OUT" ME_KFol...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,131
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/featurizer/Doc2Vector.py
import os import numpy as np from numpy.linalg import norm from app.settings import W2VEC_MODEL_DIR class Doc2Vector(object): # # Pre-trained word2vec models of various languages with Creative Commons Attribution-Share-Alike License 3.0: # https://github.com/facebookresearch/fastText/blob/mast...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,132
maana-io/IRIS-Classification
refs/heads/master
/app/settings.py
import os from dotenv import load_dotenv import logging PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) load_dotenv(verbose=True, dotenv_path=os.path.join(PROJECT_ROOT, '.env')) LOG_LEVEL = logging.DEBUG NLTK_DATA_DIR = os.getenv('NLTK_DATA_DIR') W2VEC_MODEL_DIR = os.getenv('W2VEC_MODEL_DIR') CLASSIFICAT...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,133
maana-io/IRIS-Classification
refs/heads/master
/app/test/train.py
import unittest import sys from app.logic.helpers import * from app.test.setup import * from app.logic.train import evaluate, train, loadTrainedModel from app.core.main.Classifier import Classifier modelTypes = [Classifier.LR_MODEL_TYPE, Classifier.SVC_MODEL_TYPE, Classifier.ENSEMBLE_LR_MODEL_TYPE, Classifier.ENS...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,134
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/tokenizer/PorterTokenizer.py
''' Porter Tokenizer ''' from nltk.stem.porter import PorterStemmer from app.core.main.tokenizer.BaseTokenizer import BaseTokenizer class PorterTokenizer(object): def __init__(self): self.__wnl = PorterStemmer() self.__basetokenizer = BaseTokenizer() def __call__(self, doc): return ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,135
maana-io/IRIS-Classification
refs/heads/master
/app/test/feature_selection.py
import unittest import sys from app.test.setup import * from app.logic.feature_selection import * modelTypes = [Classifier.LR_MODEL_TYPE, Classifier.SVC_MODEL_TYPE, Classifier.ENSEMBLE_LR_MODEL_TYPE, Classifier.ENSEMBLE_SVC_MODEL_TYPE] testModelType = modelTypes[0] class FeatureSelectionTest(unittest.TestCase...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,136
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/tokenizer/__init__.py
import nltk from app.settings import NLTK_DATA_DIR nltk.data.path = [NLTK_DATA_DIR]
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,137
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/Classifier.py
''' Main process for Assisted Categorization ''' import pandas as pd import numpy as np from scipy.special import entr from app.core.main.classifier.LR import LR from app.core.main.classifier.LSVC import LSVC from app.core.main.classifier.Ensemble import Ensemble from app.core.main.featurizer.Featurizer import Featur...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,138
maana-io/IRIS-Classification
refs/heads/master
/app/logic/feature_selection.py
import pandas as pd import math from app.logic.helpers import defaultFeatures, datasetToDataframe, defaultFeaturizers, defaultModelConfiguration from app.core.main.Classifier import Classifier from app.core.main.tokenizer.BaseTokenizer import BaseTokenizer from app.core.main.tokenizer.PorterTokenizer import PorterTok...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,139
maana-io/IRIS-Classification
refs/heads/master
/app/test/helpers.py
# coding: utf-8 import unittest import pandas as pd from pandas.util.testing import assert_frame_equal from app.logic.helpers import ( dataframeToDataset, datasetToDataframe, getDataFieldName, inferFeatureType, id ) class TestHelpers(unittest.TestCase): @classmethod def setUpClass(cls)...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,140
maana-io/IRIS-Classification
refs/heads/master
/app/logic/classify.py
import pandas as pd import datetime from app.logic.helpers import datasetToDataframe, dataframeToDataset, id from app.core.main.Classifier import Classifier from app.logic.train import loadTrainedModel from app.logic.model_selection import cachedMSR def unpackProbs(prob): res_dict = {} all_labels_list = [] ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,141
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/feature_selection/LabelCorrelation.py
''' Rank features by its correlation with label scikit learn methods: SelectKBest SelectPercentile SelectFdr SelectFpr SelectFwe GenericUnivariateSelect ''' from sklearn.feature_selection import GenericUnivariateSelect from sklearn.feature_selection import chi2 import numpy...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,142
maana-io/IRIS-Classification
refs/heads/master
/app/test/setup.py
import random as rd from app.logic.helpers import id words = ''' The distribution of oil and gas reserves among the world's 50 largest oil companies. The reserves of the privately owned companies are grouped together. The oil produced by the "supermajor" companies accounts for less than 15% of ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,143
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/feature_selection/BackwardStepwise.py
''' Backward stepwise feature selection ''' from sklearn.feature_selection import RFE class BackwardStepwise(object): def __init__(self, n, estimator, step = 100): assert type(n) is int and n > 0, "Invalid parameter type or value %s (number of features)" % n assert type(step) is int and step > ...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,144
maana-io/IRIS-Classification
refs/heads/master
/app/test/model_selection.py
import unittest from app.logic.helpers import * from app.test.setup import * from app.logic.model_selection import model_selection from app.logic.train import train modelTypes = [Classifier.LR_MODEL_TYPE, Classifier.SVC_MODEL_TYPE] class ModelSelectionTest(unittest.TestCase): def test_model_selection(sel...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,145
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/classifier/LR.py
''' Logistic Regression ''' from sklearn.linear_model import LogisticRegression import numpy as np class LR(object): def __init__(self, penalty=None, dual=None, solver=None, multi_class=None, class_weight=None, fit_intercept=None): self.__penalty = penalty self.__dual = dual self.__solve...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,146
maana-io/IRIS-Classification
refs/heads/master
/app/core/main/featurizer/Featurizer.py
''' Featurizer ''' import numpy as np import pandas as pd from scipy.sparse import issparse from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.preprocessing import * from app.core.main.featurizer.Doc2Vector import Doc2Vector class Featurizer(object): FT_Numeric = "NUMERICAL" FT_Stri...
{"/app/resolvers.py": ["/app/logic/helpers.py", "/app/logic/classify.py", "/app/logic/feature_selection.py", "/app/logic/model_selection.py", "/app/logic/train.py"], "/app/logic/helpers.py": ["/app/core/main/Classifier.py", "/app/core/main/tokenizer/BaseTokenizer.py", "/app/core/main/tokenizer/PorterTokenizer.py", "/ap...
17,148
Affirm/promise
refs/heads/master
/tests/test_issues.py
# This tests reported issues in the Promise package from promise import Promise def test_issue_11(): # https://github.com/syrusakbary/promise/issues/11 def test(x): def my(resolve, reject): ...
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,149
Affirm/promise
refs/heads/master
/tests/test_complex_threads.py
import time import concurrent.futures from promise import Promise executor = concurrent.futures.ThreadPoolExecutor(max_workers=40000); def combine(r,n): return r * n def promise_factorial(n): if n < 2: return 1 time.sleep(.02) a = executor.submit(promise_factorial, n - 1) return Promise....
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,150
Affirm/promise
refs/heads/master
/tests/test_extra.py
# This exercises some capabilities above and beyond # the Promises/A+ test suite import time import pytest from promise import ( Promise, is_thenable, promisify as free_promisify, promise_for_dict as free_promise_for_dict, ) from concurrent.futures import Future from threading import Thread from .util...
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,151
Affirm/promise
refs/heads/master
/promise/__init__.py
from .promise import Promise, promise_for_dict, promisify, is_thenable __all__ = ['Promise', 'promise_for_dict', 'promisify', 'is_thenable']
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,152
Affirm/promise
refs/heads/master
/tests/conftest.py
import sys collect_ignore = [] if sys.version_info[:2] < (3, 4): collect_ignore.append('test_awaitable.py') if sys.version_info[:2] < (3, 5): collect_ignore.append('test_awaitable_35.py')
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,153
Affirm/promise
refs/heads/master
/tests/utils.py
def assert_exception(exception, expected_exception_cls, expected_message): assert isinstance(exception, expected_exception_cls) assert str(exception) == expected_message
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,154
Affirm/promise
refs/heads/master
/tests/test_awaitable_35.py
import pytest import asyncio from promise import Promise, promisify, is_thenable @pytest.mark.asyncio async def test_await(): assert await Promise.resolve(True) @pytest.mark.asyncio async def test_promisify_coroutine(): async def my_coroutine(): await asyncio.sleep(.01) return True asse...
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,155
Affirm/promise
refs/heads/master
/promise/promise.py
import functools from threading import Event, RLock from .compat import Future, iscoroutine, ensure_future, iterate_promise # type: ignore from typing import Callable, Optional, Iterator, Any, Dict, Tuple, Union # flake8: noqa class CountdownLatch(object): __slots__ = ('_lock', 'count') def __init__(self,...
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,156
Affirm/promise
refs/heads/master
/tests/test_awaitable.py
import asyncio import pytest import time from promise import Promise @pytest.mark.asyncio @asyncio.coroutine def test_await(): yield from Promise.resolve(True) @pytest.mark.asyncio @asyncio.coroutine def test_await_time(): def resolve_or_reject(resolve, reject): time.sleep(.1) resolve(True) ...
{"/tests/test_issues.py": ["/promise/__init__.py"], "/tests/test_complex_threads.py": ["/promise/__init__.py"], "/tests/test_extra.py": ["/promise/__init__.py", "/tests/utils.py"], "/promise/__init__.py": ["/promise/promise.py"], "/tests/test_awaitable_35.py": ["/promise/__init__.py"], "/tests/test_awaitable.py": ["/pr...
17,157
PEtab-dev/petab_web_validator
refs/heads/main
/petab_web_validator.py
from typing import Optional import libsbml import pandas as pd import petab from app import app def get_petab_problem(sbml_str: str = None, condition_df: Optional[pd.DataFrame] = None, measurement_df: Optional[pd.DataFrame] = None, parameter_df: Opti...
{"/petab_web_validator.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/forms.py"]}
17,158
PEtab-dev/petab_web_validator
refs/heads/main
/app/forms.py
from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed from wtforms.fields import SubmitField class PEtabForm(FlaskForm): sbml_file = FileField( ' sbml file', validators=[ FileAllowed(['xml'], 'Only files with the *.xml extension are a...
{"/petab_web_validator.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/forms.py"]}
17,159
PEtab-dev/petab_web_validator
refs/heads/main
/app/__init__.py
from flask import Flask from flask_bootstrap import Bootstrap app = Flask(__name__) bootstrap = Bootstrap(app) app.secret_key = 'secret password' from app import routes, errors
{"/petab_web_validator.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/forms.py"]}
17,160
PEtab-dev/petab_web_validator
refs/heads/main
/app/routes.py
import logging import os import re import tempfile from petab.C import * from petab.lint import lint_problem import petab from flask import render_template, flash from markupsafe import Markup import libsbml import pandas as pd from app import app from app.forms import PEtabForm @app.route('/', methods=['GET', 'POS...
{"/petab_web_validator.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/forms.py"]}
17,161
MariaAfanaseva/mini_jobninja
refs/heads/main
/tests/test_model_methods.py
import unittest from create_app import create_app from fill_db import UpdateDb from databases.sql_db import db from models.category import Category from models.vacancy import Vacancy class ModelMethodsTestCase(unittest.TestCase): def setUp(self): """Define test variables and initialize app.""" se...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,162
MariaAfanaseva/mini_jobninja
refs/heads/main
/fill_db.py
from xml.dom import minidom from databases.sql_db import db from models.category import Category from models.vacancy import Vacancy from create_app import create_app import datetime class UpdateDb: def __init__(self, xml_file_path): self.xml_file_path = xml_file_path @staticmethod def clear_db()...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,163
MariaAfanaseva/mini_jobninja
refs/heads/main
/job_app/views.py
from flask import Blueprint, render_template, redirect, url_for from models.vacancy import Vacancy job_page = Blueprint('job_page', __name__, url_prefix='/jobs', static_folder='static', static_url_path='/', template_folder='templates'...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,164
MariaAfanaseva/mini_jobninja
refs/heads/main
/create_app.py
from flask import Flask from flask_cors import CORS from databases.sql_db import db from configs.app_configs.config import app_config from search_app.views import search_page from job_app.views import job_page def create_app(config_name): flask_app = Flask(__name__) flask_app.config.from_object(app_config[co...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,165
MariaAfanaseva/mini_jobninja
refs/heads/main
/tests/tests.py
import unittest from tests.test_search_page import SearchPageTestCase from tests.test_model_methods import ModelMethodsTestCase if __name__ == "__main__": search = unittest.TestLoader().loadTestsFromModule(SearchPageTestCase) models = unittest.TestLoader().loadTestsFromModule(ModelMethodsTestCase) unittest...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,166
MariaAfanaseva/mini_jobninja
refs/heads/main
/models/category.py
from databases.sql_db import db vacancy_categories = db.Table('vacancy_categories', db.Column('vacancy_id', db.Integer, db.ForeignKey('vacancies.id'), primary_key=True),...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,167
MariaAfanaseva/mini_jobninja
refs/heads/main
/migrations/versions/c539d02f890a_rename_workplace_to_location.py
"""Rename workplace to location. Revision ID: c539d02f890a Revises: Create Date: 2021-03-12 09:33:21.267981 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c539d02f890a' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### com...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,168
MariaAfanaseva/mini_jobninja
refs/heads/main
/app.py
from flask import render_template, jsonify, request, redirect, url_for from create_app import create_app from models.category import Category from models.vacancy import Vacancy app = create_app('development') @app.errorhandler(404) def page_not_found(error): return redirect(url_for('search_page.index')) if __n...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,169
MariaAfanaseva/mini_jobninja
refs/heads/main
/search_app/views.py
from flask import Blueprint, render_template, request, jsonify from models.vacancy import Vacancy search_page = Blueprint('search_page', __name__, static_folder='static/search/dist/', static_url_path='/') @search_page.route('/') def index(): return search_page.sen...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,170
MariaAfanaseva/mini_jobninja
refs/heads/main
/tests/test_search_page.py
import unittest import json from create_app import create_app from fill_db import UpdateDb from databases.sql_db import db from models.category import Category class SearchPageTestCase(unittest.TestCase): def setUp(self): """Define test variables and initialize app.""" self.app = create_app("test...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,171
MariaAfanaseva/mini_jobninja
refs/heads/main
/configs/app_configs/config.py
import os from dotenv import load_dotenv load_dotenv('configs/env_configs/.env') class Config(object): """Parent configuration class.""" DEBUG = False SECRET = os.getenv('SECRET') user = os.getenv("POSTGRES_USER") password = os.getenv("POSTGRES_PASSWORD") hostname = os.getenv("POSTGRES_HOSTNA...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,172
MariaAfanaseva/mini_jobninja
refs/heads/main
/manage.py
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import app from databases.sql_db import db """ To create migrations folder: python manage.py db init To make migrations: python manage.py db migrate To update database: python manage.py db upgrade """ migrate = Migrate(app,...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,173
MariaAfanaseva/mini_jobninja
refs/heads/main
/models/vacancy.py
from databases.sql_db import db class Vacancy(db.Model): __tablename__ = "vacancies" id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(255), nullable=False) firm = db.Column(db.String(128), nullable=False) description = db.Column(db.Text(), nullable=False) location_post...
{"/tests/test_model_methods.py": ["/create_app.py", "/fill_db.py", "/models/category.py", "/models/vacancy.py"], "/fill_db.py": ["/models/category.py", "/models/vacancy.py", "/create_app.py"], "/job_app/views.py": ["/models/vacancy.py"], "/create_app.py": ["/configs/app_configs/config.py", "/search_app/views.py", "/job...
17,186
allenyang79/member-system
refs/heads/master
/app/auth.py
# -*- coding: utf-8 -*- import functools import json import os import sys import time import traceback import binascii import flask #from flask_jwt import JWT, jwt_required, current_identity from werkzeug.security import safe_str_cmp import jwt import jwt.exceptions from app.error import InvalidError #from app.auth i...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,187
allenyang79/member-system
refs/heads/master
/app/models/orm.py
# -*- coding: utf-8 -*- import copy import functools import os import sys import weakref import datetime import bson import logging from collections import namedtuple from app.error import InvalidError from app.db import db logger = logging.getLogger() class ModelError(InvalidError): """Base model operator err...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,188
allenyang79/member-system
refs/heads/master
/app/models/models.py
# -*- coding: utf-8 -*- from collections import namedtuple import app.error as error from passlib.hash import pbkdf2_sha256 from app.db import db from . import Base from . import IDField, StringField, DateField, BoolField, ListField, TupleField class Admin(Base): _table = 'admins' _primary_key = 'admin_id' ...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,189
allenyang79/member-system
refs/heads/master
/app/logger.py
# -*- coding: utf-8 -*- import os import sys import argparse import logging import logging.handlers # import RotatingFileHandler logger = logging.getLogger('') logger.setLevel(logging.DEBUG) formatter = logging.Formatter( '%(asctime)s %(filename)s:%(lineno)d\t[%(thread)8.8s][%(levelname)5.5s] - %(message)s', ...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,190
allenyang79/member-system
refs/heads/master
/tests/test_db.py
# -*- coding: utf-8 -*- import os import sys from app.config import config #from app.db import db from app.db import db import unittest class TestDB(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_db(self): db.tests.insert_one({'_id': '1234'}) ...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,191
allenyang79/member-system
refs/heads/master
/app/db.py
import os import sys import functools import pymongo from werkzeug.local import LocalProxy from app.config import config _db = None _client = None def _init_db(): client = pymongo.MongoClient(config['DB_HOST'], config['DB_PORT']) db = client[config['DB_NAME']] return client, db def find_db(): glob...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,192
allenyang79/member-system
refs/heads/master
/app/config.py
# -*- coding: utf-8 -*- import os import sys import argparse config = {} parser = argparse.ArgumentParser( description='custom config' ) parser.add_argument( '--config', '-f', help='load custom config in configs', default='default' ) parser.add_argument( '--debug', action='store_true', ...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,193
allenyang79/member-system
refs/heads/master
/tests/__init__.py
# -*- coding: utf-8 -*- import os, sys import atexit import re import unittest import mock #import app.config as config from app.config import parser, config import app.server box = None def setup(): print "custom config" def side_effect(): return parser.parse_args(['--config', 'test', '--debug'])#f...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,194
allenyang79/member-system
refs/heads/master
/configs/test.py
import os, sys config = { }
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,195
allenyang79/member-system
refs/heads/master
/app/server.py
# -*- coding: utf-8 -*- import json import sys from flask import Flask from flask import current_app, g from flask import request, jsonify import app.config as config import app.utils as utils import app.auth as auth from app.logger import logger from app.error import InvalidError from app.auth import AuthManager ...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,196
allenyang79/member-system
refs/heads/master
/configs/default.py
import os, sys config = { 'MODE': 'development', #'DB_PATH': os.path.join(os.path.dirname(__file__),'../db') 'DB_HOST': 'localhost', 'DB_PORT': 27017, 'DB_NAME': 'church', 'DEFAULT_ADMIN_USERNAME': 'admin', 'DEFAULT_ADMIN_PASSWORD': '1234', 'JWT_SECRET': '1&2,s@#sa;jd9', 'JWT_EXPI...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,197
allenyang79/member-system
refs/heads/master
/tests/test_server.py
# -*- coding: utf-8 -*- import os import sys import json import unittest import bson from app.config import config from app.server import main from app.db import db from app.models.models import Person from app.models.models import Group class TestServer(unittest.TestCase): @classmethod def setUpClass(self...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,198
allenyang79/member-system
refs/heads/master
/app/view.py
# -*- coding: utf-8 -*- import re from flask import Blueprint#, render_template, abort from flask import request, jsonify from app.logger import logger from app.error import InvalidError from app.models.models import Person, Group blueprint = Blueprint('view', __name__) ###################### # Person ############...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,199
allenyang79/member-system
refs/heads/master
/tests/test_models.py
# -*- coding: utf-8 -*- import os import sys import datetime import unittest from app.config import config from app.db import db from app.models.models import Person from app.models.models import Group class TestModel(unittest.TestCase): def setUp(self): pass def tearDown(self): pass de...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,200
allenyang79/member-system
refs/heads/master
/app/utils.py
# -*- coding: utf-8 -*- from werkzeug.routing import BaseConverter import json import bson import bson.json_util class BSONJSONEncoder(json.JSONEncoder): def default(self, o): try: return bson.json_util.default(o) except Exception as e: return super(BSONJSONEncoder, self)....
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,201
allenyang79/member-system
refs/heads/master
/app/models/__init__.py
# -*- coding: utf-8 -*- from .orm import *
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,202
allenyang79/member-system
refs/heads/master
/tests/test_auth.py
# -*- coding: utf-8 -*- import Cookie import os import sys import json import unittest import bson import werkzeug.http import jwt import app.server as server from app.config import config from app.db import db from app.error import InvalidError from app.auth import UnauthorizedError, LoginFailError from app.models....
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,203
allenyang79/member-system
refs/heads/master
/tests/test_orm.py
# -*- coding: utf-8 -*- import json import os import sys import datetime from collections import namedtuple import unittest from app.config import config from app.db import db from app.models import ModelError, ModelInvaldError, ModelDeclareError from app.models import Meta, Base, ClassReadonlyProperty from app.models...
{"/app/auth.py": ["/app/models/models.py"], "/app/models/orm.py": ["/app/db.py"], "/app/models/models.py": ["/app/db.py", "/app/models/__init__.py"], "/tests/test_db.py": ["/app/config.py", "/app/db.py"], "/app/db.py": ["/app/config.py"], "/app/server.py": ["/app/config.py", "/app/utils.py", "/app/auth.py", "/app/logge...
17,205
mhussainphys/J.A.R.V.I.S.
refs/heads/master
/AutoPilot.py
import ParseFunctions as pf import TCP_com as tp #in-built 5s delay in all of them import AllModules as am ################################### Important ######################################### ######## This parameter defines at what time it is safe to start a new run ############ ######## It should be about 30 seco...
{"/ProcessExec.py": ["/ProcessCMDs.py", "/ParseFunctions.py"], "/ProcessCMDs.py": ["/ParseFunctions.py"]}
17,206
mhussainphys/J.A.R.V.I.S.
refs/heads/master
/ProcessExec.py
import AllModules as am import ProcessCMDs as pc import ParseFunctions as pf def ProcessLog(ProcessName, RunNumber, ProcessOutput): ProcessFile_handle = open("/home/daq/fnal_tb_18_11/ProcessLog/%s/run%d.txt" % (ProcessName, RunNumber), "a+") ...
{"/ProcessExec.py": ["/ProcessCMDs.py", "/ParseFunctions.py"], "/ProcessCMDs.py": ["/ParseFunctions.py"]}
17,207
mhussainphys/J.A.R.V.I.S.
refs/heads/master
/TCP_com.py
import socket import sys import time import os import AllModules as am def init_ots(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) MESSAGE = "OtherRuns0,Initialize" sock.sendto(MESSAGE, (am.ip_address, am.use_socket)) ...
{"/ProcessExec.py": ["/ProcessCMDs.py", "/ParseFunctions.py"], "/ProcessCMDs.py": ["/ParseFunctions.py"]}
17,208
mhussainphys/J.A.R.V.I.S.
refs/heads/master
/ProcessCMDs.py
import ParseFunctions as pf import ProcessRuns as pr import AllModules as am ################################################################################################################################################################################################################ ...
{"/ProcessExec.py": ["/ProcessCMDs.py", "/ParseFunctions.py"], "/ProcessCMDs.py": ["/ParseFunctions.py"]}
17,209
mhussainphys/J.A.R.V.I.S.
refs/heads/master
/ParseFunctions.py
import AllModules as am ################################################################################################################################################################################################################ #############...
{"/ProcessExec.py": ["/ProcessCMDs.py", "/ParseFunctions.py"], "/ProcessCMDs.py": ["/ParseFunctions.py"]}
17,215
Alesia099/skill4u
refs/heads/master
/registration/models.py
from django.db import models from django.core.mail import send_mail from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.utils.translation import ugettext_lazy as _ from .validators import validate_birthday, FullNameValidator fro...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,216
Alesia099/skill4u
refs/heads/master
/olympiad/migrations/0002_auto_20190703_2136.py
# Generated by Django 2.2.2 on 2019-07-03 21:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('olympiad', '0001_initial'), ] operations = [ migrations.RenameField( ...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,217
Alesia099/skill4u
refs/heads/master
/registration/trash.py
class UserManager(BaseUserManager): use_in_migrations = True def _create_user( self, email, username, full_name, birthday, region, city, phone, password, **extra_fields ): email = self.normalize_email(email) ful...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,218
Alesia099/skill4u
refs/heads/master
/olympiad/migrations/0001_initial.py
# Generated by Django 2.2.2 on 2019-06-29 18:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,219
Alesia099/skill4u
refs/heads/master
/olympiad/views.py
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions from rest_framework.authentication import TokenAuthentication from .serializers import (TaskSerializer, TeamSerializer, OlympiadSerializer) from .models import...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,220
Alesia099/skill4u
refs/heads/master
/registration/serializer.py
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): password = serializers.CharField(write_only=True, style={'input_type': 'password'}) password_confirm = serializers.CharField(write_only=True, style={'input_type': 'password'}) class Meta: ...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,221
Alesia099/skill4u
refs/heads/master
/olympiad/models.py
from django.db import models from registration.models import User from django.utils.translation import ugettext_lazy as _ class Task(models.Model): """"Olympiad task""" task = models.TextField(blank=False) creater = models.ForeignKey(User, verbose_name=_("creater"), on_delete=models.CASCADE) input_dat...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,222
Alesia099/skill4u
refs/heads/master
/olympiad/apps.py
from django.apps import AppConfig class OlympiadConfig(AppConfig): name = 'olympiad'
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,223
Alesia099/skill4u
refs/heads/master
/registration/views.py
from .models import User from rest_framework.decorators import api_view, authentication_classes, permission_classes from rest_framework.response import Response from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated, AllowAny from registration.serializer imp...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,224
Alesia099/skill4u
refs/heads/master
/registration/migrations/0002_auto_20190628_1837.py
# Generated by Django 2.2.2 on 2019-06-28 18:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('registration', '0001_initial'), ] operations = [ migrations.AlterField( model_name='user', name='full_name', ...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,225
Alesia099/skill4u
refs/heads/master
/olympiad/serializers.py
from rest_framework import serializers from .models import Task, Team, Olympiad from registration.serializer import UserSerializer class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ('task', 'input_data') class TeamSerializer(serializers.ModelSerializer): ...
{"/olympiad/views.py": ["/olympiad/serializers.py", "/olympiad/models.py", "/registration/models.py"], "/registration/serializer.py": ["/registration/models.py"], "/olympiad/models.py": ["/registration/models.py"], "/registration/views.py": ["/registration/models.py", "/registration/serializer.py"], "/olympiad/serializ...
17,226
myoung859/Tank_Attack_580.200
refs/heads/master
/TankAttack.py
import pygame import random as rd from helpers import Tank from helpers import Shell import helpers as TA #Initial parameter setup filer=open('options.csv', 'r',newline = '') x_dim = int(filer.readline()) y_dim = int(filer.readline()) gravity = float(filer.readline()) drag = float(filer.readline()) wind_ma...
{"/TankAttack.py": ["/helpers.py"]}
17,227
myoung859/Tank_Attack_580.200
refs/heads/master
/helpers.py
# -*- coding: utf-8 -*- """ Created on Sun May 13 17:35:38 2018 @author: Mike """ import pygame from math import radians,sin,cos import csv import random def options_prompt(filename, x_dim, y_dim, gravity, drag,wind_max): filew = open(filename, 'w',newline = '') output = csv.writer(filew) ou...
{"/TankAttack.py": ["/helpers.py"]}
17,231
hybby/sreport
refs/heads/main
/tests/test_urls.py
""" Unit tests for the sreport.py utility relating to URL processing """ import pytest import requests from sreport import validate_url, process_url def test_valid_url(): """ Tests whether the url validator correctly identifies valid URLs """ url = "https://www.google.com" assert validate_url(url)...
{"/tests/test_urls.py": ["/sreport.py"], "/tests/test_io.py": ["/sreport.py"], "/tests/test_summary.py": ["/sreport.py"]}
17,232
hybby/sreport
refs/heads/main
/sreport.py
#!/usr/bin/env python3 """ A utility to make HTTP(S) requests to specified URLs and report on the results """ import sys import json import requests from validator_collection import checkers USAGE = "Usage: ./sreport.py < urls.txt" def parse_input(input_): """ Given an input string, return a list of strings s...
{"/tests/test_urls.py": ["/sreport.py"], "/tests/test_io.py": ["/sreport.py"], "/tests/test_summary.py": ["/sreport.py"]}
17,233
hybby/sreport
refs/heads/main
/tests/test_io.py
""" Unit tests for the sreport.py utility relating to input/output operations """ import pytest from sreport import parse_input, output_json def test_split_newlines_input(): """ Tests that newline separated input is split into a list of strings """ sample_input = "foo\nbar" assert parse_input(samp...
{"/tests/test_urls.py": ["/sreport.py"], "/tests/test_io.py": ["/sreport.py"], "/tests/test_summary.py": ["/sreport.py"]}