text
stringlengths
0
1.05M
meta
dict
from fcntl import LOCK_EX, LOCK_UN, flock from os import statvfs from django.conf import settings from .pathlib import Path settings.FORUM_LOCKROOT_PATH.mkdir(exist_ok=True) PATH_TEMPLOCK_CONTEXT = Path(settings.FORUM_LOCKROOT_PATH, 'temp-context-lock') PATH_TEMPLOCK_CONTEXT.touch(exist_ok=True) PATH_TEMPLOCK_DIR = ...
{ "repo_name": "karolyi/forum-django", "path": "backend/forum/utils/locking.py", "copies": "1", "size": "2498", "license": "mit", "hash": -2394451668117843000, "line_mean": 30.6202531646, "line_max": 79, "alpha_frac": 0.6441152922, "autogenerated": false, "ratio": 3.488826815642458, "config_test...
from .fdc import FDC from .classify import CLF import numpy as np import pickle from scipy.cluster.hierarchy import dendrogram as scipydendroed from scipy.cluster.hierarchy import to_tree from .hierarchy import compute_linkage_matrix import copy from collections import OrderedDict as OD from collections import Counter ...
{ "repo_name": "alexandreday/fast_density_clustering", "path": "fdc/tree.py", "copies": "2", "size": "30579", "license": "bsd-3-clause", "hash": -8028933816038772000, "line_mean": 37.7579214195, "line_max": 173, "alpha_frac": 0.5500506884, "autogenerated": false, "ratio": 3.8791069389826207, "co...
from fds.auth.common import Common from fds.galaxy_fds_client_exception import GalaxyFDSClientException class FDSObjectMetadata(object): """ The FDS object metadata class. """ USER_DEFINED_METADATA_PREFIX = "x-xiaomi-meta-" PRE_DEFINED_METADATA = [ Common.CACHE_CONTROL, Common.CONTENT_ENCODING, ...
{ "repo_name": "XiaoMi/galaxy-fds-sdk-python", "path": "fds/model/fds_object_metadata.py", "copies": "1", "size": "1278", "license": "apache-2.0", "hash": 2080177487261055700, "line_mean": 24.56, "line_max": 68, "alpha_frac": 0.6924882629, "autogenerated": false, "ratio": 3.380952380952381, "con...
from .fds_object_summary import FDSObjectSummary from .permission import Owner class FDSObjectListing(dict): ''' The FDS Object Listing class. ''' def __init__(self, json): dict.__init__(self, json) self._objects = [] for obj in self['objects']: summary = FDSObjectSummary() summary.bu...
{ "repo_name": "XiaoMi/galaxy-fds-sdk-python", "path": "fds/model/fds_object_listing.py", "copies": "1", "size": "2299", "license": "apache-2.0", "hash": -3465371127361400300, "line_mean": 20.4859813084, "line_max": 73, "alpha_frac": 0.6568073075, "autogenerated": false, "ratio": 3.738211382113821...
from fea_extractor import FeaExtractor from fea_extractor import SKETCH, IMAGE import numpy as np import os import cv2 import time from sklearn.svm import LinearSVC from sklearn.externals import joblib from scipy.cluster.vq import * from sklearn.preprocessing import StandardScaler train_path = 'resize_img...
{ "repo_name": "Just-CJ/SketchRetrieval", "path": "python/offline_process.py", "copies": "1", "size": "2290", "license": "mit", "hash": -4903147120370980000, "line_mean": 27.358974359, "line_max": 86, "alpha_frac": 0.6624454148, "autogenerated": false, "ratio": 2.8271604938271606, "config_test":...
from fea_extractor import FeaExtractor from fea_extractor import SKETCH, IMAGE import argparse as ap import numpy as np import os import cv2 from sklearn.svm import LinearSVC from sklearn.externals import joblib from scipy.cluster.vq import * from scipy.spatial.distance import cdist from scipy import stats ...
{ "repo_name": "Just-CJ/SketchRetrieval", "path": "python/online_process.py", "copies": "1", "size": "1819", "license": "mit", "hash": -7682392263322716000, "line_mean": 27.8196721311, "line_max": 84, "alpha_frac": 0.6866410115, "autogenerated": false, "ratio": 2.92443729903537, "config_test": t...
from feasta.models import Session,Absent, Student, NonStudent, Meal from django.utils.timezone import now, timedelta def currentSession(): session = Session.objects.filter(startdate__lte=now(), enddate__gte=now()) if len(session) > 0: session = session[0] else: session = Session.objects.all()[-1] return sess...
{ "repo_name": "IIITS/Feasta", "path": "feasta/methods.py", "copies": "1", "size": "1199", "license": "mit", "hash": -4225538367844530000, "line_mean": 24.5106382979, "line_max": 108, "alpha_frac": 0.6955796497, "autogenerated": false, "ratio": 2.6823266219239374, "config_test": false, "has_no...
from feather.dispatcher import Dispatcher class InvalidApplication(Exception): pass class Application(object): """An application is defined as a set of messages that will be generated and responded to by plugins, and a Dispatcher that handles communication between plugins. Applications expect, at...
{ "repo_name": "jdodds/feather", "path": "feather/application.py", "copies": "1", "size": "2058", "license": "bsd-3-clause", "hash": 1539938843363058000, "line_mean": 35.1052631579, "line_max": 80, "alpha_frac": 0.6350826045, "autogenerated": false, "ratio": 4.604026845637584, "config_test": fal...
from featmap import give_features, give_distance, give_direction, give_surrounding_information import codecs class Arc: def __init__(self, mode="sparse", head=None, dependent=None, head_form=None, dependent_form=None, head_lemma=None, dependent_lemma=None, head_pos=None, dependent_pos=None, s=0.0...
{ "repo_name": "YNedderhoff/cle-dependency-parser", "path": "modules/graphs.py", "copies": "1", "size": "13231", "license": "mit", "hash": 2216659244523017700, "line_mean": 41.0031746032, "line_max": 120, "alpha_frac": 0.4866601164, "autogenerated": false, "ratio": 4.4911744738628645, "config_te...
from FeatureBuilder import FeatureBuilder #import Stemming.PorterStemmer as PorterStemmer class TokenFeatureBuilder(FeatureBuilder): def __init__(self, featureSet): FeatureBuilder.__init__(self, featureSet) def buildLinearOrderFeatures(self, tokenIndex, sentenceGraph, rangePos = 999, rangeNeg = 99...
{ "repo_name": "rothadamg/UPSITE", "path": "ExampleBuilders/FeatureBuilders/TokenFeatureBuilder.py", "copies": "2", "size": "3719", "license": "mit", "hash": 7033334160445664000, "line_mean": 49.9589041096, "line_max": 110, "alpha_frac": 0.5525678946, "autogenerated": false, "ratio": 3.71528471528...
from FeatureBuilder import FeatureBuilder # Amino acids from http://www.bio.davidson.edu/courses/genomics/jmol/aatable.html #amino acid three letter code single letter code subcomponent = set(["region", "promoter", "upstream", "fragment", "site", "sequence", "segment", "repeat", "repeat", "eleme...
{ "repo_name": "ashishbaghudana/mthesis-ashish", "path": "resources/tees/ExampleBuilders/FeatureBuilders/RELFeatureBuilder.py", "copies": "2", "size": "6349", "license": "mit", "hash": -5608566802513027000, "line_mean": 41.6174496644, "line_max": 127, "alpha_frac": 0.565600882, "autogenerated": fals...
from FeatureBuilder import FeatureBuilder class NodalidaFeatureBuilder(FeatureBuilder): def __init__(self, featureSet): FeatureBuilder.__init__(self, featureSet) def buildShortestPaths(self, graph, tokenPath, position=0, newPath=None): if newPath == None: assert(position == 0) ...
{ "repo_name": "ashishbaghudana/mthesis-ashish", "path": "resources/tees/ExampleBuilders/FeatureBuilders/NodalidaFeatureBuilder.py", "copies": "2", "size": "3350", "license": "mit", "hash": -7829988480522952000, "line_mean": 41.417721519, "line_max": 121, "alpha_frac": 0.5280597015, "autogenerated":...
from feature.extract import ThresholdLogExtractor from feature.generate import SimpleNGramGenerator from model.record_manage import EntryTagManager, LabelTagManager from model.common import PathGetter from model.data_manage import ArticleManager class DataMaker: def __init__(self, feature_generator, feature_extrac...
{ "repo_name": "duckingod/news_analysis", "path": "data_maker.py", "copies": "1", "size": "2834", "license": "apache-2.0", "hash": -568398714942177800, "line_mean": 35.8051948052, "line_max": 68, "alpha_frac": 0.6107974594, "autogenerated": false, "ratio": 4.320121951219512, "config_test": false...
from FeatureExtractionAlgorithms import FEA from pathlib import Path import sys class AutomizedFEA(): """ Automatically applies FEA on a whole directory with some options @parameters: directory string directory for normalized files are stored target string directory where JSON files will be stored prefi...
{ "repo_name": "weidler/tyrex", "path": "fea/AutomizedFEA.py", "copies": "1", "size": "2460", "license": "mit", "hash": 5559763890895741000, "line_mean": 31.8, "line_max": 106, "alpha_frac": 0.6967479675, "autogenerated": false, "ratio": 3.0865746549560855, "config_test": false, "has_no_keywor...
from feature_extraction import feature_extraction_driver from model_training import training_driver from util.log import Log import sys class CommandEnum: PRE_PROCESSING = "-pre" POST_PROCESSING = "-post" TRAIN_FACTS = '-train' class Command: @staticmethod def execute(command_list): """ ...
{ "repo_name": "Cyberjusticelab/JusticeAI", "path": "src/ml_service/main.py", "copies": "1", "size": "1143", "license": "mit", "hash": 5508604840597966000, "line_mean": 26.2142857143, "line_max": 67, "alpha_frac": 0.624671916, "autogenerated": false, "ratio": 4.156363636363636, "config_test": fa...
from feature_extraction.post_processing.regex.regex_lib import RegexLib import re import datetime import time import unicodedata from util.log import Log import math class EntityExtraction: regex_bin = None one_month = 86400 * 30 # unix time for 1 month month_dict = { 'janvier': 1, 'fevri...
{ "repo_name": "Cyberjusticelab/JusticeAI", "path": "src/ml_service/feature_extraction/post_processing/regex/regex_entity_extraction.py", "copies": "1", "size": "7500", "license": "mit", "hash": 8145534708138904000, "line_mean": 35.9458128079, "line_max": 109, "alpha_frac": 0.5870666667, "autogenera...
from feature_extractor import FeatureExtractor from data_utils.featured_frame import * import pywt class WaveletFeatureExtractor(FeatureExtractor): def __init__(self, derivative=True): super(WaveletFeatureExtractor, self).__init__(derivative) def extract_features(self, frame): if not isinstan...
{ "repo_name": "BavoGoosens/Gaiter", "path": "feature_extraction/wavelet_feature_extractor.py", "copies": "1", "size": "1033", "license": "mit", "hash": -1427550094634096400, "line_mean": 38.7692307692, "line_max": 98, "alpha_frac": 0.6940948693, "autogenerated": false, "ratio": 3.840148698884758,...
from .feature_extractor import FeatureExtractor from .regressor import Regressor class FeatureExtractorRegressor(object): def __init__(self, workflow_element_names=[ 'feature_extractor', 'regressor']): self.element_names = workflow_element_names self.feature_extractor_workflow = Featur...
{ "repo_name": "paris-saclay-cds/ramp-workflow", "path": "rampwf/workflows/feature_extractor_regressor.py", "copies": "1", "size": "1228", "license": "bsd-3-clause", "hash": -2450706008659051000, "line_mean": 41.3448275862, "line_max": 75, "alpha_frac": 0.6473941368, "autogenerated": false, "ratio...
from feature_extractor import * from data_utils.featured_frame import * from matplotlib.mlab import entropy as en import scipy.fftpack as ff import numpy as np class FrequencyDomainFeatureExtractor(FeatureExtractor): def __init__(self, derivative=True): super(FrequencyDomainFeatureExtractor, self).__init_...
{ "repo_name": "BavoGoosens/Gaiter", "path": "feature_extraction/frequency_domain_feature_extractor.py", "copies": "1", "size": "7795", "license": "mit", "hash": -7606390606884634000, "line_mean": 41.1351351351, "line_max": 184, "alpha_frac": 0.6062860808, "autogenerated": false, "ratio": 3.458296...
from featureflow import Feature from zounds.persistence.arraywithunits import \ ArrayWithUnitsDecoder, ArrayWithUnitsEncoder from zounds.timeseries import audio_sample_rate, AudioSamples class AudioSamplesDecoder(ArrayWithUnitsDecoder): def __init__(self): super(ArrayWithUnitsDecoder, self).__init__()...
{ "repo_name": "JohnVinyard/zounds", "path": "zounds/persistence/audiosamples.py", "copies": "1", "size": "1081", "license": "mit", "hash": 5819348829782147000, "line_mean": 29.8857142857, "line_max": 76, "alpha_frac": 0.5957446809, "autogenerated": false, "ratio": 4.619658119658119, "config_tes...
from featureflow import Node, Aggregator import os from soundfile import SoundFile import requests import json import io from urllib.parse import urlparse import featureflow as ff class AudioMetaData(object): """ Encapsulates metadata about a source audio file, including things like text descriptions and ...
{ "repo_name": "JohnVinyard/zounds", "path": "zounds/soundfile/audio_metadata.py", "copies": "1", "size": "4290", "license": "mit", "hash": -8640199707355042000, "line_mean": 28.1836734694, "line_max": 78, "alpha_frac": 0.5722610723, "autogenerated": false, "ratio": 4.450207468879668, "config_te...
from featureflow import Node, NotEnoughData from zounds.core import ArrayWithUnits, IdentityDimension import numpy as np from multiprocessing.pool import ThreadPool from os import cpu_count class Reservoir(object): def __init__(self, nsamples, dtype=None): super(Reservoir, self).__init__() if not...
{ "repo_name": "JohnVinyard/zounds", "path": "zounds/learn/random_samples.py", "copies": "1", "size": "9298", "license": "mit", "hash": 329920780244728260, "line_mean": 32.3261648746, "line_max": 80, "alpha_frac": 0.5746397075, "autogenerated": false, "ratio": 4.134281903068031, "config_test": f...
from featureflow import Node, NotEnoughData import marshal import types from collections import OrderedDict import hashlib import numpy as np from .functional import hyperplanes from zounds.loudness import log_modulus, inverse_log_modulus class Op(object): def __init__(self, func, **kwargs): super(Op, sel...
{ "repo_name": "JohnVinyard/zounds", "path": "zounds/learn/preprocess.py", "copies": "1", "size": "24462", "license": "mit", "hash": 3458871176541839000, "line_mean": 28.2607655502, "line_max": 86, "alpha_frac": 0.5755457444, "autogenerated": false, "ratio": 4.08926780341023, "config_test": fals...
from featureforge.feature import output_schema @output_schema({str}) def bag_of_left_entity_IOB_chain(datapoint): print (hash(datapoint)) eo = datapoint.left_entity_occurrence return set() def _bag_of_eo_IOB_chain(datapoint, eo): tokens = datapoint.segment.tokens eo_tokens = tokens[eo.segment_of...
{ "repo_name": "machinalis/iepy", "path": "lex_features.py", "copies": "2", "size": "2037", "license": "bsd-3-clause", "hash": 7057611381186861000, "line_mean": 27.6901408451, "line_max": 64, "alpha_frac": 0.5920471281, "autogenerated": false, "ratio": 3.542608695652174, "config_test": false, ...
from FeatureGenerator import * import cPickle import pandas as pd from helpers import * class TargetFeatureGenerator(FeatureGenerator): ''' doing nothing other than returning the target variables ''' def __init__(self, name='targetFeatureGenerator'): super(TargetFeatureGenerator, sel...
{ "repo_name": "Cisco-Talos/fnc-1", "path": "tree_model/TargetFeatureGenerator.py", "copies": "1", "size": "1562", "license": "apache-2.0", "hash": 83005447501958110, "line_mean": 29.0384615385, "line_max": 77, "alpha_frac": 0.6568501921, "autogenerated": false, "ratio": 4.326869806094183, "conf...
from FeatureGenerator import * import pandas as pd import numpy as np import cPickle import gensim from sklearn.preprocessing import normalize from helpers import * class Word2VecFeatureGenerator(FeatureGenerator): def __init__(self, name='word2vecFeatureGenerator'): super(Word2VecFeatureGenerator, self...
{ "repo_name": "Cisco-Talos/fnc-1", "path": "tree_model/Word2VecFeatureGenerator.py", "copies": "1", "size": "6317", "license": "apache-2.0", "hash": 1729871280789272000, "line_mean": 39.4935897436, "line_max": 127, "alpha_frac": 0.6366946335, "autogenerated": false, "ratio": 3.746737841043891, ...
from feature import AbstractFeature import numpy as np class FeatureOperator(AbstractFeature): """ A FeatureOperator operates on two feature models. Args: model1 [AbstractFeature] model2 [AbstractFeature] """ def __init__(self,model1,model2): if (not isinstance(model1,A...
{ "repo_name": "revan/facerecserver", "path": "operators.py", "copies": "1", "size": "3673", "license": "bsd-3-clause", "hash": -8337206848147066000, "line_mean": 31.2192982456, "line_max": 121, "alpha_frac": 0.5750068064, "autogenerated": false, "ratio": 3.6693306693306695, "config_test": false...
from ..feature import Feature from .format import Format import re class KML(Format): """KML Writer""" url = "/" layername = "layer" title_property = None def encode(self, features, **kwargs): url = "%s/%s/%s-data.kml" % (self.url, self.layername, self.layername) results = ["""<...
{ "repo_name": "iocast/vectorformats", "path": "vectorformats/formats/kml.py", "copies": "2", "size": "7800", "license": "mit", "hash": -1360154734300992500, "line_mean": 40.935483871, "line_max": 139, "alpha_frac": 0.5558974359, "autogenerated": false, "ratio": 4.248366013071895, "config_test":...
from ..feature import Feature from .format import Format try: from cjson import encode as json_dumps from cjson import decode as json_loads except: try: from simplejson import dumps as json_dumps from simplejson import loads as json_loads except Exception, E: raise Exception("si...
{ "repo_name": "iocast/vectorformats", "path": "vectorformats/formats/geojson.py", "copies": "2", "size": "3847", "license": "mit", "hash": 5270916192450976000, "line_mean": 33.3482142857, "line_max": 154, "alpha_frac": 0.5469196777, "autogenerated": false, "ratio": 4.473255813953489, "config_te...
from feature import Feature from geogig import NULL_ID TYPE_MODIFIED = "Modified" TYPE_ADDED = "Added" TYPE_REMOVED = "Removed" ATTRIBUTE_DIFF_MODIFIED, ATTRIBUTE_DIFF_ADDED, ATTRIBUTE_DIFF_REMOVED, ATTRIBUTE_DIFF_UNCHANGED = ["M", "A", "R", "U"] class Diffentry(object): '''A difference between two referenc...
{ "repo_name": "roscoeZA/GeoGigSync", "path": "src/geogigpy/diff.py", "copies": "1", "size": "1676", "license": "cc0-1.0", "hash": -7583681114178966000, "line_mean": 27.9137931034, "line_max": 118, "alpha_frac": 0.5662291169, "autogenerated": false, "ratio": 3.6673960612691467, "config_test": fa...
from feature import * from prelib import preprocess import os from operator import itemgetter import time import sys import pickle as pickle imagelocation = "" #Input Image path indir = "" #Directory Path class Image(object): def __init__(self, path): self.path = path img = cv2.imread(self.path,0...
{ "repo_name": "devashishp/Content-Based-Image-Retrieval", "path": "Initial.py", "copies": "1", "size": "2535", "license": "mit", "hash": 2357126531059848000, "line_mean": 29.9146341463, "line_max": 84, "alpha_frac": 0.6390532544, "autogenerated": false, "ratio": 3.050541516245487, "config_test"...
from feature import * from pymongo import MongoClient from bson.binary import Binary as BsonBinary import pickle import os from operator import itemgetter import time import sys imagelocation = "" #Input Image path indir = "" #Directory Path client = MongoClient('mongodb://localhost:27017') db = client.coil #Inser...
{ "repo_name": "devashishp/Content-Based-Image-Retrieval", "path": "optimized.py", "copies": "1", "size": "3209", "license": "mit", "hash": -3684637194031888000, "line_mean": 28.4403669725, "line_max": 84, "alpha_frac": 0.6572140854, "autogenerated": false, "ratio": 2.971296296296296, "config_te...
from feature import * @feature_with("my_function") def my_function(): print "Hello feature" @feature_with("my_function1") def my_function1(): print "Hello feature1" @feature_with("STANDARD") def my_function2(): print "Hello feature2" @feature_with("my_function3") def my_function3(): print "Hello fea...
{ "repo_name": "cyrilthomas/feature", "path": "feature_test.py", "copies": "1", "size": "1301", "license": "mit", "hash": -8416787259105373000, "line_mean": 23.1111111111, "line_max": 104, "alpha_frac": 0.6464258263, "autogenerated": false, "ratio": 3.441798941798942, "config_test": false, "ha...
from feature import simple import graph from nltk.corpus import brown def calc_readability(corpus): texts = [] results = [] for fileid in corpus.fileids(): sentlist = brown.sents(fileids=[fileid]) text = ' '.join([ ' '.join(ss) for ss in sentlist ]) texts.append(text) for text...
{ "repo_name": "worldwise001/stylometry", "path": "main/readability_graph_brown.py", "copies": "1", "size": "2563", "license": "mit", "hash": 6360011412488530000, "line_mean": 37.8484848485, "line_max": 109, "alpha_frac": 0.5860319938, "autogenerated": false, "ratio": 3.3547120418848166, "config...
from feature.model import db from feature.model.logic import to_json_dump class Transaction: def __init__(self): self.INSERT = 'insert' self.UPDATE = 'update' self.DELETE = 'delete' # map transaction types to actual transaction to commit # only accessible via co...
{ "repo_name": "parejadan/feature-center", "path": "feature/model/transaction.py", "copies": "1", "size": "1618", "license": "mit", "hash": 692930753092179800, "line_mean": 25.8965517241, "line_max": 89, "alpha_frac": 0.5185414091, "autogenerated": false, "ratio": 4.60968660968661, "config_test"...
from features.cards import prettify_name from fuzzywuzzy import fuzz from fuzzywuzzy import process import urllib import requests import discord import json import logging logger = logging.getLogger('discord') DESCRIPTION_TEXT = 'Click the links for more information' TITLE_TEXT = 'Rulings from fiveringsdb.com' def...
{ "repo_name": "MyrionPhoenixmoon/l5r-discord-bot", "path": "features/rulings.py", "copies": "1", "size": "4930", "license": "mit", "hash": 1095336481457842600, "line_mean": 38.126984127, "line_max": 130, "alpha_frac": 0.5557809331, "autogenerated": false, "ratio": 3.774885145482389, "config_tes...
from features_helpers import score_differences def get_postranscriptional_modification_features(uniprot_exon_indices_location, uniprot_ptm_db_location, output_file_location): """ Reads uniprot PTM file and generates post translational modification site features...
{ "repo_name": "wonjunetai/pulse", "path": "features/uniprot_ptm.py", "copies": "1", "size": "2241", "license": "mit", "hash": 7246974326774252000, "line_mean": 35.1451612903, "line_max": 112, "alpha_frac": 0.5586791611, "autogenerated": false, "ratio": 3.281112737920937, "config_test": false, ...
from features_helpers import score_differences def get_transmembrane_region_features(uniprot_exon_indices_location, uniprot_tm_indices_db_location, output_file_location): """ Reads uniprot TM indices DB and generates transmembrane scores. :param uniprot_exon_indices_...
{ "repo_name": "wonjunetai/pulse", "path": "features/uniprot_transmem.py", "copies": "1", "size": "2393", "license": "mit", "hash": 6164278022846013000, "line_mean": 36.390625, "line_max": 112, "alpha_frac": 0.5578771417, "autogenerated": false, "ratio": 3.3751763046544427, "config_test": false,...
from features_helpers import score_differences def get_uniprot_elm_features(uniprot_exon_indices_location, uniprot_elm_db_location, output_location): """ Reads uniprot ELM file and generates ELM features. :param uniprot_exon_indices_location: :param uniprot_elm_db_location: :param output_location...
{ "repo_name": "wonjunetai/pulse", "path": "features/uniprot_elm_read.py", "copies": "1", "size": "2201", "license": "mit", "hash": -408927224886734700, "line_mean": 34.5, "line_max": 112, "alpha_frac": 0.5529304861, "autogenerated": false, "ratio": 3.2704309063893016, "config_test": false, "h...
from ..features import build_features from ..visualization import visualize import numpy as np import scipy.stats as stats import scipy.signal import numpy.matlib import pdb import matplotlib.pyplot as plt from sklearn.covariance import GraphLasso import sys def detect_changes(data_retina, params): res=params['...
{ "repo_name": "curious-abhinav/change-point", "path": "src/models/train_model.py", "copies": "1", "size": "6323", "license": "mit", "hash": 1881065939020273000, "line_mean": 40.3267973856, "line_max": 217, "alpha_frac": 0.6893879488, "autogenerated": false, "ratio": 3.0679281901989324, "config_...
from .features import Dictionary, RegexMatches name = "catalan" try: import enchant dictionary = enchant.Dict("ca") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ca'. " + "Consider installing 'myspell-ca'.") dictionary = Dic...
{ "repo_name": "he7d3r/revscoring", "path": "revscoring/languages/catalan.py", "copies": "2", "size": "2618", "license": "mit", "hash": 8084260928345393000, "line_mean": 16.7755102041, "line_max": 82, "alpha_frac": 0.5407577497, "autogenerated": false, "ratio": 2.5542521994134897, "config_test":...
from .features import Dictionary, RegexMatches name = "hindi" try: import enchant dictionary = enchant.Dict("hi") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'hi'. " + "Consider installing 'aspell-hi'.") dictionary = Dictio...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/hindi.py", "copies": "1", "size": "3648", "license": "mit", "hash": -3933073790271755300, "line_mean": 17.3661971831, "line_max": 76, "alpha_frac": 0.4313650307, "autogenerated": false, "ratio": 1.84571...
from .features import Dictionary, RegexMatches name = "tamil" try: import enchant dictionary = enchant.Dict("ta") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ta'. " + "Consider installing 'aspell-ta'.") dictionary = Dictio...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/tamil.py", "copies": "1", "size": "1601", "license": "mit", "hash": 3493561712741730000, "line_mean": 25.2830188679, "line_max": 76, "alpha_frac": 0.5577889447, "autogenerated": false, "ratio": 2.133231...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords from .features.dictionary import MultiDictChecker, load_dict name = "german" multi_dict = MultiDictChecker( load_dict('de_DE', 'myspell-de-de'), load_dict('de_CH', 'myspell-de-ch'), load_dict('de_AT', 'myspell-de-at')) dictionary = Dicti...
{ "repo_name": "he7d3r/revscoring", "path": "revscoring/languages/german.py", "copies": "2", "size": "3953", "license": "mit", "hash": -4222095942622481000, "line_mean": 21, "line_max": 77, "alpha_frac": 0.5713560183, "autogenerated": false, "ratio": 2.462789243277048, "config_test": false, "h...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords from .features.dictionary import MultiDictChecker, load_dict, utf16_cleanup name = "portuguese" multi_dict = MultiDictChecker( load_dict('pt_PT', 'myspell-pt-pt'), load_dict('pt_BR', 'myspell-pt-br')) def safe_dictionary_check(word): re...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/portuguese.py", "copies": "2", "size": "7303", "license": "mit", "hash": -1016060191203864800, "line_mean": 36.0255102041, "line_max": 81, "alpha_frac": 0.5936337329, "autogenerated": false, "ratio": 2.3074721780604133, "config_t...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords from .features.dictionary import utf16_cleanup name = "english" try: import enchant enchant_dict = enchant.Dict("en") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'en'. " + ...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/english.py", "copies": "1", "size": "5658", "license": "mit", "hash": -5476355383395473000, "line_mean": 26.0669856459, "line_max": 79, "alpha_frac": 0.5105179424, "autogenerated": false, "ratio": 2.243...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "dutch" try: import enchant dictionary = enchant.Dict("nl") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'nl'. " + "Consider installing 'myspell-nl'.")...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/dutch.py", "copies": "1", "size": "3534", "license": "mit", "hash": 6653611434397299000, "line_mean": 20.5487804878, "line_max": 77, "alpha_frac": 0.5738539898, "autogenerated": false, "ratio": 2.604274...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "french" try: import enchant dictionary = enchant.Dict("fr") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'fr'. " + "Consider installing 'myspell-fr'."...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/french.py", "copies": "1", "size": "3116", "license": "mit", "hash": -5546052718434120000, "line_mean": 22.5151515152, "line_max": 77, "alpha_frac": 0.5914948454, "autogenerated": false, "ratio": 2.7323...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "german" try: import enchant dictionary = enchant.Dict("de") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'de'. " + "Consider installing 'myspell-de-de...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/german.py", "copies": "1", "size": "3956", "license": "mit", "hash": -5546473051391101000, "line_mean": 21.0167597765, "line_max": 77, "alpha_frac": 0.5658462319, "autogenerated": false, "ratio": 2.5133...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "italian" try: import enchant dictionary = enchant.Dict("it") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'it'. " + "Consider installing 'myspell-it'....
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/italian.py", "copies": "1", "size": "3540", "license": "mit", "hash": 2190063359505002000, "line_mean": 21.4050632911, "line_max": 77, "alpha_frac": 0.5858757062, "autogenerated": false, "ratio": 2.6696...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "portuguese" try: import enchant dictionary = enchant.Dict("pt") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'pt'. " + "Consider installing 'myspell-p...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/portuguese.py", "copies": "1", "size": "4890", "license": "mit", "hash": -2451336717139108400, "line_mean": 32.3287671233, "line_max": 77, "alpha_frac": 0.5698725853, "autogenerated": false, "ratio": 2....
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "romanian" try: import enchant dictionary = enchant.Dict("ro") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ro'. " + "Consider installing 'aspell-ro'....
{ "repo_name": "he7d3r/revscoring", "path": "revscoring/languages/romanian.py", "copies": "2", "size": "2379", "license": "mit", "hash": -8449267774722949000, "line_mean": 26.3448275862, "line_max": 81, "alpha_frac": 0.6469104666, "autogenerated": false, "ratio": 3.003787878787879, "config_test"...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "russian" try: import enchant dictionary = enchant.Dict("ru") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ru'. " + "Consider installing 'myspell-ru'....
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/russian.py", "copies": "1", "size": "4074", "license": "mit", "hash": 8312734406041299000, "line_mean": 24.7196969697, "line_max": 77, "alpha_frac": 0.6120765832, "autogenerated": false, "ratio": 2.0853...
from .features import Dictionary, RegexMatches, Stemmed, Stopwords name = "spanish" try: import enchant dictionary = enchant.Dict("es") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'es'. " + "Consider installing 'myspell-es'....
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/spanish.py", "copies": "1", "size": "9750", "license": "mit", "hash": 7972672393237075000, "line_mean": 30.7973856209, "line_max": 77, "alpha_frac": 0.538643371, "autogenerated": false, "ratio": 2.31446...
from .features import Dictionary, RegexMatches, Stopwords name = "arabic" try: import enchant dictionary = enchant.Dict("ar") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ar'. " + "Consider installing 'aspell-ar'.") diction...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/arabic.py", "copies": "1", "size": "7735", "license": "mit", "hash": 3327037906869582300, "line_mean": 16.2561307902, "line_max": 76, "alpha_frac": 0.4834991315, "autogenerated": false, "ratio": 1.85555...
from .features import Dictionary, RegexMatches, Stopwords name = "bosnian" try: import enchant dictionary = enchant.Dict("bs") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'bs'. " + "Consider installing 'hunspell-bs'.") dict...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/bosnian.py", "copies": "2", "size": "4482", "license": "mit", "hash": -8429181799444585000, "line_mean": 27.2038216561, "line_max": 82, "alpha_frac": 0.5749774164, "autogenerated": false, "ratio": 2.3354430379746836, "config_test...
from .features import Dictionary, RegexMatches, Stopwords name = "croatian" try: import enchant dictionary = enchant.Dict("hr") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'hr'. " + "Consider installing 'myspell-hr'.") dict...
{ "repo_name": "he7d3r/revscoring", "path": "revscoring/languages/croatian.py", "copies": "2", "size": "5408", "license": "mit", "hash": -4275901099600983600, "line_mean": 24.2735849057, "line_max": 81, "alpha_frac": 0.5472191116, "autogenerated": false, "ratio": 2.2703389830508476, "config_test...
from .features import Dictionary, RegexMatches, Stopwords name = "czech" try: import enchant dictionary = enchant.Dict("cs") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'cs'. " + "Consider installing 'myspell-cs'.") diction...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/czech.py", "copies": "1", "size": "8482", "license": "mit", "hash": -3000436442441569300, "line_mean": 14.3508442777, "line_max": 76, "alpha_frac": 0.4833781472, "autogenerated": false, "ratio": 2.13128...
from .features import Dictionary, RegexMatches, Stopwords name = "estonian" try: import enchant dictionary = enchant.Dict("et") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'et'. " + "Consider installing 'myspell-et'.") dict...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/estonian.py", "copies": "1", "size": "3979", "license": "mit", "hash": -489107026439916100, "line_mean": 33.0603448276, "line_max": 78, "alpha_frac": 0.5616299671, "autogenerated": false, "ratio": 2.333...
from .features import Dictionary, RegexMatches, Stopwords name = "galician" try: import enchant dictionary = enchant.Dict("gl") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'gl'. " + "Consider installing 'hunspell-gl'.") d...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/galician.py", "copies": "2", "size": "5275", "license": "mit", "hash": -3900662200902580000, "line_mean": 15.1411042945, "line_max": 83, "alpha_frac": 0.4986697073, "autogenerated": false, "ratio": 2.5506543868153173, "config_tes...
from .features import Dictionary, RegexMatches, Stopwords name = "hungarian" try: import enchant dictionary = enchant.Dict("hu") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'hu'. " + "Consider installing 'aspell-hu'.") dict...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/hungarian.py", "copies": "1", "size": "5545", "license": "mit", "hash": 7921676118048240000, "line_mean": 15.7975077882, "line_max": 76, "alpha_frac": 0.5300445104, "autogenerated": false, "ratio": 2.19...
from .features import Dictionary, RegexMatches, Stopwords name = "icelandic" try: import enchant dictionary = enchant.Dict("is") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'is'. " + "Consider installing 'aspell-is'.") dict...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/icelandic.py", "copies": "2", "size": "3556", "license": "mit", "hash": 6768823638874780000, "line_mean": 22.2364864865, "line_max": 81, "alpha_frac": 0.5774934574, "autogenerated": false, "ratio": 2.26996699669967, "config_test"...
from .features import Dictionary, RegexMatches, Stopwords name = "indonesian" try: import enchant dictionary = enchant.Dict("id") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'id'. " + "Consider installing 'aspell-id'.") dic...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/indonesian.py", "copies": "1", "size": "7378", "license": "mit", "hash": -1372205066020292000, "line_mean": 40.9204545455, "line_max": 77, "alpha_frac": 0.6047709406, "autogenerated": false, "ratio": 2....
from .features import Dictionary, RegexMatches, Stopwords name = "latvian" try: import enchant dictionary = enchant.Dict("lv") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'lv'. " + "Consider installing 'myspell-lv'.") dicti...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/latvian.py", "copies": "2", "size": "5954", "license": "mit", "hash": 4817386503650379000, "line_mean": 14.6166219839, "line_max": 81, "alpha_frac": 0.4925321888, "autogenerated": false, "ratio": 2.172696754942186, "config_test":...
from .features import Dictionary, RegexMatches, Stopwords name = "norwegian" try: import enchant dictionary = enchant.Dict("nb") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'nb'. " + "Consider installing 'myspell-nb'.") dic...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/norwegian.py", "copies": "1", "size": "5462", "license": "mit", "hash": -4057480912740400000, "line_mean": 14.3796033994, "line_max": 76, "alpha_frac": 0.4866457911, "autogenerated": false, "ratio": 2.3...
from .features import Dictionary, RegexMatches, Stopwords name = "persian" try: import enchant dictionary = enchant.Dict("fa") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'fa'. " + "Consider installing 'myspell-fa'.") dicti...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/persian.py", "copies": "1", "size": "11092", "license": "mit", "hash": 4754782982746866000, "line_mean": 36.265560166, "line_max": 79, "alpha_frac": 0.5522770293, "autogenerated": false, "ratio": 1.7301...
from .features import Dictionary, RegexMatches, Stopwords name = "polish" try: import enchant dictionary = enchant.Dict("pl") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'pl'. " + "Consider installing 'aspell-pl'.") diction...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/polish.py", "copies": "1", "size": "7047", "license": "mit", "hash": -6257997089928375000, "line_mean": 14.4422222222, "line_max": 76, "alpha_frac": 0.487120449, "autogenerated": false, "ratio": 2.17224...
from .features import Dictionary, RegexMatches, Stopwords name = "serbian" try: import enchant dictionary = enchant.Dict("sr") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'sr'. " + "Consider installing 'hunspell-sr'.") dict...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/serbian.py", "copies": "2", "size": "7803", "license": "mit", "hash": -2960437621536685000, "line_mean": 15.5870786517, "line_max": 83, "alpha_frac": 0.5219305673, "autogenerated": false, "ratio": 1.692947247706422, "config_test"...
from .features import Dictionary, RegexMatches, Stopwords name = "swedish" try: import enchant dictionary = enchant.Dict("sv") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'sv'. " + "Consider installing 'aspell-sv'.") dictio...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/swedish.py", "copies": "1", "size": "7589", "license": "mit", "hash": 7920417548475634000, "line_mean": 13.8198019802, "line_max": 76, "alpha_frac": 0.4639230358, "autogenerated": false, "ratio": 2.3773...
from .features import Dictionary, RegexMatches, Stopwords name = "ukrainian" try: import enchant dictionary = enchant.Dict("uk") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'uk'. " + "Consider installing 'aspell-uk'.") dict...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/ukrainian.py", "copies": "2", "size": "7547", "license": "mit", "hash": 8354568600757106000, "line_mean": 35.0130718954, "line_max": 82, "alpha_frac": 0.5468239564, "autogenerated": false, "ratio": 1.5573770491803278, "config_tes...
from .features import Dictionary, RegexMatches, Stopwords name = "vietnamese" try: import enchant dictionary = enchant.Dict("vi") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'vi'. " + "Consider installing 'hunspell-vi'.") d...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/vietnamese.py", "copies": "1", "size": "2546", "license": "mit", "hash": -3918965121493440000, "line_mean": 34.4029850746, "line_max": 145, "alpha_frac": 0.6112984823, "autogenerated": false, "ratio": 1...
from features import Features import sys def read_data(file_in): data = [] with open(file_in, 'rb') as f: for line in f: line = line.strip() upper, lower = line.split("\t") data.append((upper, lower)) return data Sigma, Sigma_inv = {}, {} data = read...
{ "repo_name": "se4u/neural_wfst", "path": "src/python/transducer/src/test_features.py", "copies": "1", "size": "1097", "license": "mit", "hash": -248822642493512060, "line_mean": 23.9318181818, "line_max": 53, "alpha_frac": 0.5788514129, "autogenerated": false, "ratio": 3.324242424242424, "conf...
from .features import * from .castle import * from maze_builder.util import timed, is_verbose POV_FILENAME = 'out.pov' class CastleBuilder(object): def __init__(self, illustrator, features=None, castle_class=CastleTwoLevel): self.illustrator = illustrator self.castle_class = castle_class ...
{ "repo_name": "kcsaff/maze-builder", "path": "maze_builder/castles/builder.py", "copies": "1", "size": "1435", "license": "mit", "hash": 5301676582519078000, "line_mean": 35.7948717949, "line_max": 90, "alpha_frac": 0.587456446, "autogenerated": false, "ratio": 3.7467362924281984, "config_test"...
from .features import overlaps from .features import contains from .features import contains_point from .utils.codons import synonymous from .utils.codons import nonsynonymous from .utils.codons import initiator_codon from .utils.codons import stop_codon def upstream_transcript_variant(variant, transcript): upst...
{ "repo_name": "solvebio/veppy", "path": "veppy/functions.py", "copies": "1", "size": "13331", "license": "mit", "hash": -2975478017902180000, "line_mean": 29.0247747748, "line_max": 89, "alpha_frac": 0.6048308454, "autogenerated": false, "ratio": 3.840679919331605, "config_test": false, "has_...
from features import proportion,coda,clusters word = u'z\u016bgusyaa' consonant_proportion = proportion.consonant_proportion(word) print "consonant proportion for %s: %.2f" % (word, consonant_proportion) vowel_proportion = proportion.vowel_proportion(word) print "vowels proportion for %s: %.2f" % (word, vowel_proporti...
{ "repo_name": "russmatney/unicode-classification-engine", "path": "main.py", "copies": "1", "size": "1090", "license": "mit", "hash": 322502587595232700, "line_mean": 39.3703703704, "line_max": 72, "alpha_frac": 0.752293578, "autogenerated": false, "ratio": 2.665036674816626, "config_test": fal...
from .features import RegexMatches name = "japanese" # Copied from https://gist.github.com/whym/b5ac3feb2a78797c9d98 # Yusuke Matsubara (CCO) badword_regexes = [ r"死ね", r"しね", r"シネ", r"あほ", r"アホ", r"ばか", r"バカ", r"やりまん", r"ヤリマン", r"まんこ", r"マンコ", r"うんこ", r"ウンコ", r...
{ "repo_name": "he7d3r/revscoring", "path": "revscoring/languages/japanese.py", "copies": "3", "size": "2074", "license": "mit", "hash": 58761757471332450, "line_mean": 15.18, "line_max": 75, "alpha_frac": 0.4913473424, "autogenerated": false, "ratio": 1.8261851015801354, "config_test": false, ...
from .features import RegexMatches name = "tamil" ''' try: import enchant dictionary = enchant.Dict("ta") except enchant.errors.DictNotFoundError: raise ImportError("No enchant-compatible dictionary found for 'ta'. " + "Consider installing 'aspell-ta'.") dictionary = Dictionary(nam...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/tamil.py", "copies": "2", "size": "8839", "license": "mit", "hash": -6343661090608819000, "line_mean": 34.8304347826, "line_max": 81, "alpha_frac": 0.6072078631, "autogenerated": false, "ratio": 2.1239690721649485, "config_test":...
from .features import RegexMatches, Stopwords name = "finnish" # No dictionary # No stemmer try: from nltk.corpus import stopwords as nltk_stopwords stopwords = set(nltk_stopwords.words('finnish')) except LookupError: raise ImportError("Could not load stopwords for {0}. ".format(__name__) + ...
{ "repo_name": "wiki-ai/revscoring", "path": "revscoring/languages/finnish.py", "copies": "2", "size": "1984", "license": "mit", "hash": -902036748637909900, "line_mean": 18.66, "line_max": 78, "alpha_frac": 0.5910478128, "autogenerated": false, "ratio": 2.6389261744966444, "config_test": false,...
from .features import RegexMatches, Stopwords name = "turkish" try: from nltk.corpus import stopwords as nltk_stopwords stopwords = set(nltk_stopwords.words('turkish')) except LookupError: raise ImportError("Could not load stopwords for {0}. ".format(__name__) + "You may need to inst...
{ "repo_name": "yafeunteun/wikipedia-spam-classifier", "path": "revscoring/revscoring/languages/turkish.py", "copies": "1", "size": "5465", "license": "mit", "hash": 5482987141369030000, "line_mean": 25.28, "line_max": 77, "alpha_frac": 0.5899923896, "autogenerated": false, "ratio": 2.083234244946...
from ..features import word class peptide: def __init__(self, sequence, rt): self.pre = sequence[0] self.post = sequence[-1] self.sequence = sequence[2:-2] self.rt = rt self.amino_acids = self.get_amino_acids() self.aa_indices = [] def build_amino_acid_indices(s...
{ "repo_name": "statisticalbiotechnology/GPTime", "path": "GPTime/peptides/peptide.py", "copies": "1", "size": "1888", "license": "apache-2.0", "hash": 8002474304632711000, "line_mean": 27.6060606061, "line_max": 53, "alpha_frac": 0.4846398305, "autogenerated": false, "ratio": 3.110378912685338, ...
from features.models import Attempt, Feature from jury.models import JudgeRequestAssignment, JudgeRequest from teams.models import Team for team in Team.objects.all(): for feature in Feature.objects.all(): request = JudgeRequest.objects.filter(team=team, feature=feature).last() total, num = 0, 0 ...
{ "repo_name": "Kianoosh76/webelopers-scoreboard", "path": "scripts/check_attempts.py", "copies": "1", "size": "1052", "license": "mit", "hash": -6735251866529486000, "line_mean": 46.8181818182, "line_max": 91, "alpha_frac": 0.5836501901, "autogenerated": false, "ratio": 4.347107438016529, "conf...
from features.numpy_sift import SIFTDescriptor import numpy as np import features.feature_utils from features.DetectorDescriptorTemplate import DetectorAndDescriptor class np_sift(DetectorAndDescriptor): def __init__(self, peak_thresh=10.0): super( np_sift, self).__init__( ...
{ "repo_name": "spongezhang/vlb", "path": "python/features/np_sift.py", "copies": "2", "size": "1251", "license": "bsd-2-clause", "hash": 5817871934851282000, "line_mean": 30.275, "line_max": 75, "alpha_frac": 0.6011191047, "autogenerated": false, "ratio": 4.022508038585209, "config_test": false...
from FeatureSplitConfig import eshop_better_config_names from consts import METRICS_MAXIMIZE, METRICS_MINIMIZE from featuresplitGIA import getBestFeatures, getZ3Feature, \ generateConsumerConstraints, extractWeights, getWeightRanges, \ getConstraintFromFile from npGIAforZ3 import GuidedImprovementAlgorithm, \ ...
{ "repo_name": "ai-se/parGALE", "path": "epoal_src/distributed_npGIA.py", "copies": "1", "size": "2895", "license": "unlicense", "hash": 71528078444893060, "line_mean": 30.1290322581, "line_max": 91, "alpha_frac": 0.6835924007, "autogenerated": false, "ratio": 3.683206106870229, "config_test": f...
from featuretools.entityset.relationship import RelationshipPath def feature_with_name(features, name): for f in features: if f.get_name() == name: return True return False def backward_path(es, entity_ids): """ Create a backward RelationshipPath through the given entities. Assu...
{ "repo_name": "Featuretools/featuretools", "path": "featuretools/tests/testing_utils/features.py", "copies": "1", "size": "1255", "license": "bsd-3-clause", "hash": -4656735567847818000, "line_mean": 31.1794871795, "line_max": 79, "alpha_frac": 0.6430278884, "autogenerated": false, "ratio": 4.141...
from featuretools.entityset.relationship import Relationship, RelationshipPath def test_relationship_path(es): log_to_sessions = Relationship(es['sessions']['id'], es['log']['session_id']) sessions_to_customers = Relationship(es['customers']['id'], ...
{ "repo_name": "Featuretools/featuretools", "path": "featuretools/tests/entityset_tests/test_relationship.py", "copies": "1", "size": "3335", "license": "bsd-3-clause", "hash": -8617281157929818000, "line_mean": 40.6875, "line_max": 95, "alpha_frac": 0.6113943028, "autogenerated": false, "ratio": ...
from featuretools import list_primitives from featuretools.primitives import ( Day, GreaterThan, Last, NumCharacters, get_aggregation_primitives, get_transform_primitives ) from featuretools.primitives.utils import _get_descriptions def test_list_primitives_order(): df = list_primitives() ...
{ "repo_name": "Featuretools/featuretools", "path": "featuretools/tests/utils_tests/test_list_primitives.py", "copies": "1", "size": "1228", "license": "bsd-3-clause", "hash": -1712432361529430500, "line_mean": 34.0857142857, "line_max": 97, "alpha_frac": 0.6669381107, "autogenerated": false, "rat...
from featuretools import Relationship, Timedelta, primitives from featuretools.entityset.relationship import RelationshipPath from featuretools.primitives.base import ( AggregationPrimitive, PrimitiveBase, TransformPrimitive ) from featuretools.primitives.utils import serialize_primitive from featuretools.u...
{ "repo_name": "Featuretools/featuretools", "path": "featuretools/feature_base/feature_base.py", "copies": "1", "size": "31464", "license": "bsd-3-clause", "hash": 8525751523607173000, "line_mean": 37.7011070111, "line_max": 139, "alpha_frac": 0.6013221459, "autogenerated": false, "ratio": 4.49678...
from featuretools.utils import Trie def test_get_node(): t = Trie(default=lambda: 'default') t.get_node([1, 2, 3]).value = '123' t.get_node([1, 2, 4]).value = '124' sub = t.get_node([1, 2]) assert sub.get_node([3]).value == '123' assert sub.get_node([4]).value == '124' sub.get_node([4, 5...
{ "repo_name": "Featuretools/featuretools", "path": "featuretools/tests/utils_tests/test_trie.py", "copies": "1", "size": "1309", "license": "bsd-3-clause", "hash": -3473034067104268000, "line_mean": 26.2708333333, "line_max": 63, "alpha_frac": 0.5225362872, "autogenerated": false, "ratio": 2.7384...
from featuring import db from featuring.entities.user.models import User from featuring.entities.client.models import Client from featuring.entities.product.models import Product from featuring.entities.ticket.models import Ticket def insert_mandatory_data(): db.session.add(User(username='root', password='root', ...
{ "repo_name": "ccortezia/featuring", "path": "featuring-flask-api/featuring/initdata.py", "copies": "1", "size": "1972", "license": "mit", "hash": 9109742310000129000, "line_mean": 33.5964912281, "line_max": 90, "alpha_frac": 0.6318458418, "autogenerated": false, "ratio": 3.502664298401421, "co...
from featuring import db from featuring.utilities.common import iso_tomorrow from featuring.entities.client.models import Client from featuring.entities.product.models import Product class Ticket(db.Model): __tablename__ = 'tickets' ticket_id = db.Column(db.Integer, primary_key=True, autoincrement=True) ...
{ "repo_name": "ccortezia/featuring", "path": "featuring-flask-api/featuring/entities/ticket/models.py", "copies": "1", "size": "1043", "license": "mit", "hash": 4966855580914204000, "line_mean": 33.7666666667, "line_max": 89, "alpha_frac": 0.6337488015, "autogenerated": false, "ratio": 3.99616858...
from .featurizer import Extractor import typing from collections import Counter class ValueCalculator: def calculate(self, feature_dict: [typing.Dict[str, float], Counter]) -> typing.Dict[str, float]: raise NotImplementedError class BinaryValueCalculator(ValueCalculator): def calculate(self, feature...
{ "repo_name": "dbracewell/pyHermes", "path": "hermes/ml/features.py", "copies": "1", "size": "1828", "license": "apache-2.0", "hash": -6830636876691524000, "line_mean": 35.56, "line_max": 107, "alpha_frac": 0.6690371991, "autogenerated": false, "ratio": 4.17351598173516, "config_test": false, ...
from federal_spending.usaspending.management.base.importer import BaseImporter from django.db.models.fields import CharField from federal_spending.usaspending.utils.ucsv import UnicodeDictReader, UnicodeWriter from django.conf import settings import os.path import re class BaseUSASpendingConverter(BaseImporter): ...
{ "repo_name": "unitedstates/federal_spending", "path": "federal_spending/usaspending/management/base/usaspending_importer.py", "copies": "1", "size": "5058", "license": "cc0-1.0", "hash": -4058004569437011000, "line_mean": 37.037593985, "line_max": 125, "alpha_frac": 0.5889679715, "autogenerated": ...
from federal_spending.usaspending.models import Contract, Grant from federal_spending.usaspending.scripts.usaspending.contracts_loader import Loader from django.core.management.base import BaseCommand from federal_spending.usaspending.management.commands.create_indexes import contracts_idx, grants_idx from federal_spen...
{ "repo_name": "unitedstates/federal_spending", "path": "federal_spending/usaspending/management/commands/fresh_import.py", "copies": "1", "size": "3672", "license": "cc0-1.0", "hash": -3036297512889628000, "line_mean": 39.3516483516, "line_max": 161, "alpha_frac": 0.6530501089, "autogenerated": fal...
from federal_spending.usaspending.models import Contract, Grant from federal_spending.usaspending.scripts.usaspending.contracts_loader import Loader from federal_spending.usaspending.scripts.usaspending.fpds import FIELDS as CONTRACT_FIELDS, CALCULATED_FIELDS as CONTRACT_CALCULATED_FIELDS from federal_spending.usaspend...
{ "repo_name": "unitedstates/federal_spending", "path": "federal_spending/usaspending/management/commands/import_updates.py", "copies": "1", "size": "9934", "license": "cc0-1.0", "hash": -7807684489507780000, "line_mean": 39.0564516129, "line_max": 140, "alpha_frac": 0.5516408295, "autogenerated": f...
from federal_spending.usaspending.models import Contract from federal_spending.usaspending.grants.models import Grant from federal_spending.usaspending.management.base.importer import BaseImporter from django.db.models.fields import CharField import csv import faads import fpds import os import os.path import re import...
{ "repo_name": "unitedstates/federal_spending", "path": "federal_spending/usaspending/scripts/usaspending/converter.py", "copies": "1", "size": "5017", "license": "cc0-1.0", "hash": 3750415599564744700, "line_mean": 33.8402777778, "line_max": 112, "alpha_frac": 0.5696631453, "autogenerated": false, ...
from federatedml.cipher_compressor.compressor import CipherCompressor, NormalCipherPackage, CipherDecompressor from federatedml.util import consts from federatedml.util import LOGGER from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.splitter import SplitInfo def get_g_h_info(task_type, max_sample_wei...
{ "repo_name": "FederatedAI/FATE", "path": "python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/splitinfo_cipher_compressor.py", "copies": "1", "size": "8239", "license": "apache-2.0", "hash": -4857751697031869000, "line_mean": 41.0357142857, "line_max": 122, "alpha_frac": 0.637456001...
from federatedml.transfer_variable.transfer_class.homo_label_encoder_transfer_variable \ import HomoLabelEncoderTransferVariable from federatedml.util import consts from federatedml.util import LOGGER class HomoLabelEncoderClient(object): def __init__(self): self.transvar = HomoLabelEncoderTransferVa...
{ "repo_name": "FederatedAI/FATE", "path": "python/federatedml/util/homo_label_encoder.py", "copies": "1", "size": "1607", "license": "apache-2.0", "hash": 2622214577926814700, "line_mean": 40.2051282051, "line_max": 98, "alpha_frac": 0.6851275669, "autogenerated": false, "ratio": 3.66894977168949...
from federatedml.util import consts class PerformanceRecorder(object): """ This class record performance(single value metrics during the training process) """ def __init__(self): # all of them are single value metrics self.allowed_metric = [consts.AUC, ...
{ "repo_name": "FederatedAI/FATE", "path": "python/federatedml/evaluation/performance_recorder.py", "copies": "1", "size": "2724", "license": "apache-2.0", "hash": -2136121770146537500, "line_mean": 33.9230769231, "line_max": 87, "alpha_frac": 0.4673274596, "autogenerated": false, "ratio": 4.46557...
from federatedml.util import LOGGER from federatedml.framework.homo.blocks import secure_sum_aggregator, loss_scatter, has_converged class HomoBoostArbiterAggregator(object): def __init__(self,): """ Args: transfer_variable: converge_type: see federatedml/optim/convergence...
{ "repo_name": "FederatedAI/FATE", "path": "python/federatedml/ensemble/boosting/boosting_core/homo_boosting_aggregator.py", "copies": "1", "size": "1402", "license": "apache-2.0", "hash": 2883901769878932000, "line_mean": 34.075, "line_max": 96, "alpha_frac": 0.6690442225, "autogenerated": false, ...
__author__ = 'maurizio' #from fednodes.dummy_classes import DummyFedMessage import fed_logging from fed_logging import * import logging logger = logging.getLogger("federation.core.federator") class MessageScheduler(object): def __init__(self, message_class, producer,configuration): self._pr=producer ...
{ "repo_name": "INFN-Catania/FedManager", "path": "fednodes/messaging.py", "copies": "1", "size": "2095", "license": "apache-2.0", "hash": 429236851188116200, "line_mean": 37.7962962963, "line_max": 127, "alpha_frac": 0.6558472554, "autogenerated": false, "ratio": 4.4957081545064375, "config_tes...