text
stringlengths
0
1.05M
meta
dict
__author__ = 'mpetyx' SPECIFIC_VOCABULARY = """ PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> PREFIX dcterms:<http://purl.org/dc/terms/> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX owl:<http://www.w3.org/2002/07/owl#> PREFIX skos:<http://www.w3.o...
{ "repo_name": "LinDA-tools/LindaWorkbench", "path": "linda/graphdb/queries.py", "copies": "1", "size": "2760", "license": "mit", "hash": 5725837093971082000, "line_mean": 33.5125, "line_max": 106, "alpha_frac": 0.7231884058, "autogenerated": false, "ratio": 2.857142857142857, "config_test": fal...
__author__ = 'mpetyx' #!/usr/bin/env python #https://github.com/linkeddata/ldpy/blob/master/ld.py from RDF import NS, Uri, Node, Statement, Storage, Model, SPARQLQuery, Serializer, Parser class ns(object): rdf = NS('http://www.w3.org/1999/02/22-rdf-syntax-ns#') rdfs = NS('http://www.w3.org/2000/01/rdf-schema...
{ "repo_name": "Suite5/DataColibri", "path": "linkeddata/server/id.py", "copies": "1", "size": "7207", "license": "mit", "hash": -596799356259184300, "line_mean": 34.3333333333, "line_max": 127, "alpha_frac": 0.525045095, "autogenerated": false, "ratio": 3.3074804956402017, "config_test": false,...
__author__ = 'mramire8' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.1" __status__ = "Development" import sys import os sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("../aal_misc/samples/neutral")) import argparse import numpy as np from sklearn import metrics from sklearn import...
{ "repo_name": "mramire8/active", "path": "other/neutralmodeling.py", "copies": "1", "size": "6496", "license": "apache-2.0", "hash": 6422644362712941000, "line_mean": 35.0944444444, "line_max": 126, "alpha_frac": 0.5771243842, "autogenerated": false, "ratio": 3.1200768491834774, "config_test": ...
__author__ = 'mramire8' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.1" __status__ = "Development" import numpy as np import copy import random class BaseLearner(object): def __init__(self, model=None, cost_model=None, accuracy_model=None, budget=None, seed=1234567, subpool=None): self.cur...
{ "repo_name": "mramire8/active", "path": "strategy/baselearner.py", "copies": "1", "size": "1612", "license": "apache-2.0", "hash": 7678119458460675000, "line_mean": 29.4150943396, "line_max": 114, "alpha_frac": 0.6302729529, "autogenerated": false, "ratio": 3.893719806763285, "config_test": fa...
__author__ = 'mramire8' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.2" __status__ = "Development" import sys import os sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("../")) sys.path.append(os.path.abspath("../experiment/")) from experiment.experiment_utils import split_data_sen...
{ "repo_name": "mramire8/active", "path": "other/scoringsentences.py", "copies": "1", "size": "33085", "license": "apache-2.0", "hash": -2985856849839195600, "line_mean": 36.1741573034, "line_max": 188, "alpha_frac": 0.5984282908, "autogenerated": false, "ratio": 3.45679657298088, "config_test":...
__author__ = 'mramire8' __copyright__ = "Copyright 2014, ML Lab" __version__ = "0.1" __status__ = "Research" import sys import os sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("../")) sys.path.append(os.path.abspath("../experiment/")) from experiment.experiment_utils import * from datautil.lo...
{ "repo_name": "mramire8/active", "path": "sentences/sent_rnd2.py", "copies": "1", "size": "23728", "license": "apache-2.0", "hash": -1766486026976623000, "line_mean": 36.4258675079, "line_max": 159, "alpha_frac": 0.5777562374, "autogenerated": false, "ratio": 3.6781894279956595, "config_test": ...
__author__ = 'mramire8' import numpy as np def accuracy_coin(target, p, rnd): i = rnd.random_sample() if i < p: return target else: return 1 - target class BaseAccuracyModel(object): def __init__(self, seed=1234567): self.randgen = np.random.RandomState() self.randge...
{ "repo_name": "mramire8/active", "path": "strategy/base_models.py", "copies": "1", "size": "10827", "license": "apache-2.0", "hash": 5426257005642743000, "line_mean": 33.0471698113, "line_max": 118, "alpha_frac": 0.5630368523, "autogenerated": false, "ratio": 3.9601316752011706, "config_test": ...
__author__ = 'mramire8' import sys import os sys.path.append(os.path.abspath(".")) import argparse from sklearn.naive_bayes import MultinomialNB from datautil.textutils import StemTokenizer from datautil.load_data import * import ast ap = argparse.ArgumentParser(description=__doc__, for...
{ "repo_name": "mramire8/active", "path": "other/important.py", "copies": "1", "size": "3555", "license": "apache-2.0", "hash": -8655789874278006000, "line_mean": 31.027027027, "line_max": 135, "alpha_frac": 0.5918424754, "autogenerated": false, "ratio": 3.174107142857143, "config_test": false, ...
__author__ = 'mramire8' from collections import defaultdict import copy import numpy as np from sklearn.linear_model import LogisticRegression from baselearner import BaseLearner from sklearn.feature_extraction.text import CountVectorizer from datautil.textutils import StemTokenizer show_utilitly = False class Ra...
{ "repo_name": "mramire8/active", "path": "strategy/randomsampling.py", "copies": "1", "size": "21847", "license": "apache-2.0", "hash": -7264529368545010000, "line_mean": 36.863084922, "line_max": 172, "alpha_frac": 0.5888222639, "autogenerated": false, "ratio": 3.5627853881278537, "config_test...
__author__ = 'mramire8' from sklearn.linear_model import LogisticRegression from sklearn.cross_validation import train_test_split, StratifiedKFold, KFold from sklearn.grid_search import GridSearchCV from sklearn.base import clone class LogisticRegressionAdaptive(LogisticRegression): def __init__(self, penalty='l...
{ "repo_name": "mramire8/active", "path": "learner/adaptive_lr.py", "copies": "1", "size": "5792", "license": "apache-2.0", "hash": -6720676041788742000, "line_mean": 34.103030303, "line_max": 108, "alpha_frac": 0.6132596685, "autogenerated": false, "ratio": 3.4211458948611932, "config_test": fa...
__author__ = 'mramire8' import nltk from scipy.sparse import diags from numpy.random import RandomState from randomsampling import * import random class AALStructuredFixk(AnytimeLearner): def __init__(self, model=None, accuracy_model=None, budget=None, seed=None, vcn=None, subpool=None, cost_mod...
{ "repo_name": "mramire8/active", "path": "strategy/structured.py", "copies": "1", "size": "47843", "license": "apache-2.0", "hash": 4439852097751341000, "line_mean": 40.7478184991, "line_max": 133, "alpha_frac": 0.5649311289, "autogenerated": false, "ratio": 3.7775759968416898, "config_test": f...
__author__ = 'mramire8' import numpy as np import sys import os sys.path.append(os.path.abspath('../strategy')) from strategy.base_models import * from sklearn.linear_model import LogisticRegression class BaseExpert(object): def __init__(self, model=None, seed=1234567): self.expert = model self....
{ "repo_name": "mramire8/active", "path": "expert/baseexpert.py", "copies": "1", "size": "8692", "license": "apache-2.0", "hash": 7235761762871049000, "line_mean": 35.5210084034, "line_max": 133, "alpha_frac": 0.6074551312, "autogenerated": false, "ratio": 3.8273888154997797, "config_test": fals...
__author__ = "mramire8" import os, sys sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("../")) from sklearn import metrics import utilities.experimentutils as exputil import utilities.datautils as datautil import utilities.configutils as cfgutil from sklearn import cross_validation import numpy...
{ "repo_name": "mramire8/structured", "path": "experiment/base.py", "copies": "1", "size": "17811", "license": "apache-2.0", "hash": 8834724219444173000, "line_mean": 36.4968421053, "line_max": 133, "alpha_frac": 0.5685250688, "autogenerated": false, "ratio": 3.6468058968058967, "config_test": t...
__author__ = 'mramire8' import Tkinter as tk import time class App(): def __init__(self): self.root = tk.Tk() self.label = tk.Label(text="") self.label.pack() self.update_clock() self.root.mainloop() def update_clock(self): now = time.strftime("%H:%M:%S") ...
{ "repo_name": "mramire8/active", "path": "gui/guitest.py", "copies": "1", "size": "1073", "license": "apache-2.0", "hash": -4733844226173008000, "line_mean": 23.4090909091, "line_max": 60, "alpha_frac": 0.5526561044, "autogenerated": false, "ratio": 3.625, "config_test": false, "has_no_keywor...
__author__ = 'mramire8' def unit_cost(query, cost_model=None): n = 1 if isinstance(query, dict): n = len(query.snippet) else: n = len(query) return [1.] * n def intra_cost(query, cost_model=None): if cost_model is None: raise ValueError("Cost model is not available.") ...
{ "repo_name": "mramire8/structured", "path": "utilities/costutils.py", "copies": "1", "size": "1140", "license": "apache-2.0", "hash": 8676457512245956000, "line_mean": 20.5094339623, "line_max": 77, "alpha_frac": 0.5412280702, "autogenerated": false, "ratio": 2.7941176470588234, "config_test":...
__author__ = 'mramire8' import sys, os sys.path.append(os.path.abspath(".")) import argparse from sklearn.feature_extraction.text import CountVectorizer from bunch import Bunch from datautil.textutils import StemTokenizer from datautil.load_data import * from strategy import randomsampling import codecs import random...
{ "repo_name": "mramire8/active", "path": "datautil/userstudy.py", "copies": "1", "size": "3986", "license": "apache-2.0", "hash": 5161713752565085000, "line_mean": 38.0784313725, "line_max": 156, "alpha_frac": 0.5960863021, "autogenerated": false, "ratio": 3.5149911816578485, "config_test": fal...
__author__ = 'mramire8' """ ZetCode Tkinter tutorial http://zetcode.com/gui/tkinter/ In this script, we show how to use the Listbox widget. author: Jan Bodar last modified: December 2010 website: www.zetcode.com """ from ttk import Frame, Label, Style from Tkinter import Tk, BOTH, Listbox, StringVar, END class Exam...
{ "repo_name": "mramire8/active", "path": "gui/guitest3.py", "copies": "1", "size": "1261", "license": "apache-2.0", "hash": -1302347219901735200, "line_mean": 18.71875, "line_max": 63, "alpha_frac": 0.5908009516, "autogenerated": false, "ratio": 3.2583979328165373, "config_test": false, "has_...
__author__ = 'mramire8' """ ZetCode Tkinter tutorial In this program, we use the tkFileDialog to select a file from a filesystem. author: Jan Bodar last modified: January 2011 website: www.zetcode.com """ from Tkinter import Frame, Tk, BOTH, Text, Menu, END import tkFileDialog class Example(Frame): def __init...
{ "repo_name": "mramire8/active", "path": "gui/guitest2.py", "copies": "1", "size": "1369", "license": "apache-2.0", "hash": -5343361164987633000, "line_mean": 19.1470588235, "line_max": 63, "alpha_frac": 0.5865595325, "autogenerated": false, "ratio": 3.4658227848101264, "config_test": false, ...
__author__ = "Mr.doob, Kikko" __url__ = ['http://mrdoob.com', 'http://github.com/kikko'] __version__ = "1" __bpydoc__ = """\ This script exports the selected object for the three.js engine. """ import bpy def rvec3d(v): return round(v[0], 6), round(v[1], 6), round(v[2], 6) def rvec2d(v): return round(v[0], 6...
{ "repo_name": "flyingoctopus/three.js", "path": "utils/exporters/blender/export_threejs_2.53b.py", "copies": "1", "size": "7404", "license": "mit", "hash": -459873962509379100, "line_mean": 33.9245283019, "line_max": 218, "alpha_frac": 0.5823878984, "autogenerated": false, "ratio": 2.995145631067...
__author__ = 'mrichardson, Hagen Telg' from math import fmod, sin, cos, asin import ephem import numpy as np import pandas as pd from atmPy.atmos.constants import a2r, r2a __julian = {"day": 0., "cent": 0.} class solar(object): def __init__(self, ltime): julian = solar.juliandates(l...
{ "repo_name": "msrconsulting/atm-py", "path": "atmPy/radiation/solar.py", "copies": "6", "size": "4605", "license": "mit", "hash": 2767169806084939000, "line_mean": 29.9791666667, "line_max": 106, "alpha_frac": 0.586102063, "autogenerated": false, "ratio": 3.376099706744868, "config_test": fals...
__author__ = 'mriegel' from gge_proxy_manager.models import UnitList, UnitListRelation, Unit from lib.core import DATA_IMPORT_LOCK_TIME from lib.cache import cache import logging logger = logging.getLogger(__name__) def import_unit_list(list, game, title="", unit_list=None): if unit_list: key = "-".join(...
{ "repo_name": "mrcrgl/gge-storage", "path": "lib/core/api2object/unit.py", "copies": "1", "size": "1155", "license": "mit", "hash": -450512731711734340, "line_mean": 32.0285714286, "line_max": 94, "alpha_frac": 0.6034632035, "autogenerated": false, "ratio": 3.701923076923077, "config_test": fal...
__author__ = 'mriegel' from datetime import datetime import urllib2 from pprint import pprint from app.helper.string import clear_quotation_marks from app.helper.integer import clear_float, clear_number from app.helper.date import string_to_datetime import re import urllib from datetime import datetime REMOTE_URLS =...
{ "repo_name": "mrcrgl/stockstore", "path": "app/remote/stocks.py", "copies": "1", "size": "7400", "license": "mit", "hash": -8077110803955787000, "line_mean": 27.0340909091, "line_max": 183, "alpha_frac": 0.5404054054, "autogenerated": false, "ratio": 3.3035714285714284, "config_test": false, ...
__author__ = 'mriegel' from django.contrib import admin from models import * class CurrencyAdmin(admin.ModelAdmin): list_display = ('name', 'sign', 'base_rate', ) pass class CurrencyExchangeRateAdmin(admin.ModelAdmin): list_display = ('date', 'rate', ) class CompanyAdmin(admin.ModelAdmin): list_d...
{ "repo_name": "mrcrgl/stockstore", "path": "app/admin.py", "copies": "1", "size": "1640", "license": "mit", "hash": -4318550882803070500, "line_mean": 24.2461538462, "line_max": 69, "alpha_frac": 0.6902439024, "autogenerated": false, "ratio": 3.4745762711864407, "config_test": false, "has_no_...
__author__ = 'mriegel' from django.db import models from datetime import datetime from django_countries import CountryField class Currency(models.Model): name = models.CharField(max_length=60, verbose_name="Name") sign = models.CharField(max_length=5, verbose_name="Sign") symbol = models.CharField(max_le...
{ "repo_name": "mrcrgl/stockstore", "path": "app/models.py", "copies": "1", "size": "4846", "license": "mit", "hash": 7507505403251735000, "line_mean": 39.731092437, "line_max": 112, "alpha_frac": 0.6927362773, "autogenerated": false, "ratio": 3.600297176820208, "config_test": false, "has_no_k...
__author__ = 'mriegel' from django import template register = template.Library() def unbound(form_field_obj): if form_field_obj.__class__.__name__ == "BoundField": return form_field_obj.field return form_field_obj @register.filter def is_checkbox_multi_field(form_field_obj): return unbound(form...
{ "repo_name": "mrcrgl/gge-storage", "path": "templated_forms/templatetags/bs3_forms_filters.py", "copies": "1", "size": "1642", "license": "mit", "hash": 3733172312162353700, "line_mean": 24.2769230769, "line_max": 81, "alpha_frac": 0.6881851401, "autogenerated": false, "ratio": 3.371663244353183...
__author__ = 'mriegel' from django.shortcuts import render_to_response, RequestContext, HttpResponseRedirect, Http404, HttpResponse from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from app.helper.string import is_isin, is_wkn from pprint import pprint @login_req...
{ "repo_name": "mrcrgl/stockstore", "path": "app/views.py", "copies": "1", "size": "5211", "license": "mit", "hash": 8039129480323479000, "line_mean": 26.7180851064, "line_max": 108, "alpha_frac": 0.5962387258, "autogenerated": false, "ratio": 4.0552529182879375, "config_test": false, "has_no_...
__author__ = 'mriegel' from gge_proxy_manager.models import Alliance from lib.cache import cache from lib.core import DATA_IMPORT_LOCK_TIME import logging logger = logging.getLogger(__name__) def import_alliance(oi, kingdom): response = import_alliance_(oi, kingdom) logger.info("Import alliance AID=%r respo...
{ "repo_name": "mrcrgl/gge-storage", "path": "lib/core/api2object/alliance.py", "copies": "1", "size": "1835", "license": "mit", "hash": -2444128635900033000, "line_mean": 37.25, "line_max": 122, "alpha_frac": 0.5427792916, "autogenerated": false, "ratio": 3.488593155893536, "config_test": false...
__author__ = 'mriegel' from gge_proxy_manager.models import Player, Castle, CastleEconomy, UnitList from lib.cache import cache from .unit import import_unit_list from lib.core import DATA_IMPORT_LOCK_TIME import logging logger = logging.getLogger(__name__) def import_castles(ais, kingdom): return [import_castle...
{ "repo_name": "mrcrgl/gge-storage", "path": "lib/core/api2object/castle.py", "copies": "1", "size": "3849", "license": "mit", "hash": 5656570705764611000, "line_mean": 26.690647482, "line_max": 101, "alpha_frac": 0.5674201091, "autogenerated": false, "ratio": 2.9584934665641813, "config_test": ...
__author__ = 'mriegel' from gge_proxy_manager.models import Player, PlayerEconomy, Kingdom from gge_proxy_manager.methods import clean_duplicate_players from lib.cache import cache from .alliance import import_alliance from lib.core import DATA_IMPORT_LOCK_TIME from django.db import IntegrityError, transaction from dj...
{ "repo_name": "mrcrgl/gge-storage", "path": "lib/core/api2object/player.py", "copies": "1", "size": "3302", "license": "mit", "hash": -7409026172246187000, "line_mean": 29.8691588785, "line_max": 100, "alpha_frac": 0.5820714718, "autogenerated": false, "ratio": 3.2372549019607844, "config_test"...
import sys import os.path import encrypt import decrypt def main(): print("---------------------------------------------------") print("Music Encrypt - Music Based Encryption") print("Author: Mrinal Pande") print("---------------------------------------------------") if len(sys.argv) < 2: ...
{ "repo_name": "mrinalpande/Music_Encrypt", "path": "main.py", "copies": "1", "size": "1949", "license": "mit", "hash": 641994562622039600, "line_mean": 37.2352941176, "line_max": 79, "alpha_frac": 0.4730631093, "autogenerated": false, "ratio": 3.898, "config_test": false, "has_no_keywords": f...
__author__ = 'mrr' __version__ = '2.0' import numpy as np; import time; import copy from .cocoeval import COCOeval import matplotlib.patches as mpatches import matplotlib.pyplot as plt plt.rcParams['xtick.labelsize'] = 16 plt.rcParams['ytick.labelsize'] = 16 plt.rcParams['font.family'] = 'monospace' from colour i...
{ "repo_name": "matteorr/coco-analyze", "path": "pycocotools/cocoanalyze.py", "copies": "1", "size": "47555", "license": "mit", "hash": -7841927442377336000, "line_mean": 48.639874739, "line_max": 148, "alpha_frac": 0.5138260961, "autogenerated": false, "ratio": 3.586079481185431, "config_test":...
__author__ = 'mrr' __version__ = '2.0' import numpy as np import datetime import time from collections import defaultdict from scipy.optimize import linear_sum_assignment from . import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # Th...
{ "repo_name": "matteorr/coco-analyze", "path": "pycocotools/cocoeval.py", "copies": "1", "size": "29775", "license": "mit", "hash": 4728772422877512000, "line_mean": 45.6692789969, "line_max": 124, "alpha_frac": 0.514256927, "autogenerated": false, "ratio": 3.4893941169576936, "config_test": fa...
__author__ = 'MrTrustworthy' from enum import Enum from math import pow, sqrt from typing import List, Union class Gender(Enum): MALE = 0 FEMALE = 1 class Position: """ Position is a simple helper object for 2d-positions with an x- and y-value """ def __init__(self, *args: List[Union[int, ...
{ "repo_name": "MrTrustworthy/game_of_life", "path": "gol/x_utils.py", "copies": "1", "size": "2071", "license": "mit", "hash": -1573268311661099800, "line_mean": 27.3698630137, "line_max": 110, "alpha_frac": 0.5562530179, "autogenerated": false, "ratio": 3.9750479846449136, "config_test": false...
__author__ = 'MrTrustworthy' from field import Field class Sudoku: """ Represents a Sudoku with rows, cols and boxes """ # defines the filer-functions to determine the boxes # box order is left->right then top->bottom box_definition = [ lambda fld: 0 <= fld.x < 3 and 0 <= fld.y < 3, ...
{ "repo_name": "MrTrustworthy/solvr", "path": "sudoku.py", "copies": "1", "size": "4327", "license": "mit", "hash": -3682082729855632400, "line_mean": 30.5839416058, "line_max": 114, "alpha_frac": 0.5528079501, "autogenerated": false, "ratio": 3.7658833768494344, "config_test": false, "has_no_...
__author__ = 'MrTrustworthy' from gol.grid import Field, Grid import unittest from gol.gameobject import GameObject from gol.x_utils import Position class TestGrid(unittest.TestCase): def test_field(self): g = GameObject((1, 2)) f = Field(Position(1, 2), True, 2, []) self.assertTrue(f.pa...
{ "repo_name": "MrTrustworthy/game_of_life", "path": "tests/test_grid.py", "copies": "1", "size": "6367", "license": "mit", "hash": 8671413965834448000, "line_mean": 51.1885245902, "line_max": 118, "alpha_frac": 0.6404900267, "autogenerated": false, "ratio": 3.3957333333333333, "config_test": tr...
__author__ = 'MrTrustworthy' from gol.x_utils import Position from typing import List, Union class Field: def __init__(self, position: Position, passable: bool, passing_cost: Union[int, None], objects): self.passable = passable self.passing_cost = passing_cost if passable else None if no...
{ "repo_name": "MrTrustworthy/game_of_life", "path": "gol/grid.py", "copies": "1", "size": "3674", "license": "mit", "hash": 1281650538361422300, "line_mean": 31.5132743363, "line_max": 100, "alpha_frac": 0.5337506805, "autogenerated": false, "ratio": 4.170261066969353, "config_test": false, "...
__author__ = 'MrTrustworthy' import inspect class Antenna: def __init__(self): self.listeners = {} def add_listener(self, channel, callback): if len(inspect.signature(callback).parameters) == 0: raise TypeError("Callback Function needs at least 1 parameter") if channel ...
{ "repo_name": "MrTrustworthy/game_of_life", "path": "gol/mtAntenna.py", "copies": "1", "size": "1086", "license": "mit", "hash": -2694550715857001000, "line_mean": 29.1666666667, "line_max": 75, "alpha_frac": 0.5976058932, "autogenerated": false, "ratio": 4.487603305785124, "config_test": false...
__author__ = 'MrTrustworthy' import pdb class Solver: """ The solver takes a sudoku and tries to solve it """ def __init__(self, sudoku): """ Basic constructor :param sudoku: a "Sudoku" Object :return: self """ self.sudoku = sudoku def solve(self)...
{ "repo_name": "MrTrustworthy/solvr", "path": "solver.py", "copies": "1", "size": "6533", "license": "mit", "hash": -7648774531242666000, "line_mean": 32.3367346939, "line_max": 114, "alpha_frac": 0.5591611817, "autogenerated": false, "ratio": 4.361148197596796, "config_test": false, "has_no_k...
__author__ = 'MrTrustworthy' import unittest from gol.person import Person from gol.stat import Stat from gol.x_utils import Position, Gender import uuid class TestPerson(unittest.TestCase): def setUp(self): self.person = Person((1, 3), 2, Gender.MALE, 1) def test_init(self): with self.ass...
{ "repo_name": "MrTrustworthy/game_of_life", "path": "tests/test_person.py", "copies": "1", "size": "2000", "license": "mit", "hash": -7748034996955142000, "line_mean": 43.4444444444, "line_max": 113, "alpha_frac": 0.6955, "autogenerated": false, "ratio": 3.629764065335753, "config_test": false,...
__author__ = 'MrTrustworthy' class Field: """ Represents a Field inside the Sudoku. A Field has: Value [Integer] X and Y Positions [Integer] possibles [Array] containing the possible values for a field solved [Boolean] Indicating whether it already has a fixed value """ def __init...
{ "repo_name": "MrTrustworthy/solvr", "path": "field.py", "copies": "1", "size": "1718", "license": "mit", "hash": 7912431467660162000, "line_mean": 28.1186440678, "line_max": 105, "alpha_frac": 0.5337601863, "autogenerated": false, "ratio": 3.9403669724770642, "config_test": false, "has_no_ke...
__author__ = 'mruskov' from estimator_interface import estimator_interface from numpy import genfromtxt from sklearn import tree import StringIO import cPickle class estimator_sklearn_tree(estimator_interface): def __init__(self): # columns in train_data and test CSV file: plen, psets, pdict, phist, pren...
{ "repo_name": "mapto/sprks", "path": "sim/estimator_sklearn_tree.py", "copies": "1", "size": "6466", "license": "mit", "hash": 5604162966741461000, "line_mean": 42.1133333333, "line_max": 139, "alpha_frac": 0.60392824, "autogenerated": false, "ratio": 3.694857142857143, "config_test": true, "...
__author__ = 'mruskov' from localsys.storage import db from models.policies import policies_model from models.incident import incident from sim.model_sklearn import classifier_sklearn from sim.model_sklearn import regression_sklearn from models.company import company class simulation: ordered_context = ['employee...
{ "repo_name": "mapto/sprks", "path": "models/simulation.py", "copies": "1", "size": "8168", "license": "mit", "hash": 2943068499493576000, "line_mean": 43.3967391304, "line_max": 136, "alpha_frac": 0.5963516161, "autogenerated": false, "ratio": 4.188717948717949, "config_test": false, "has_no...
__author__ = 'mruskov' from sklearn import svm from sklearn import __version__ as sklearn_ver import cPickle import numpy import glob import csv import json import os from localsys import storage from models.company import company from models.policies import policies_model as policy_model from sim.model_sklearn import...
{ "repo_name": "mapto/sprks", "path": "sim/train_sklearn.py", "copies": "1", "size": "12099", "license": "mit", "hash": 3892382578152172000, "line_mean": 36.9278996865, "line_max": 119, "alpha_frac": 0.5919497479, "autogenerated": false, "ratio": 4.3900580551523944, "config_test": false, "has_...
__author__ = 'mruskov' import web import json from localsys.environment import context from models.incident import incident as model from models.policies import policies_model from models.simulation import simulation as sim_model class incident_rest: def GET(self, id=0): """ If given ID, returns...
{ "repo_name": "mapto/sprks", "path": "controllers/incident.py", "copies": "1", "size": "1309", "license": "mit", "hash": 7503785933005297000, "line_mean": 36.4, "line_max": 98, "alpha_frac": 0.6424751719, "autogenerated": false, "ratio": 4.3344370860927155, "config_test": false, "has_no_keywo...
# Import CSV controls import csv # Uses 'deque' objects to handle first-in last out type queues from collections import deque # Uses randomisation controls from random import shuffle attVal = 1 attDesc = 0 gameDeck = [] # Declare the variable 'deck' as an empty Set deck = [] cardAtts = 0 # file name of where to find...
{ "repo_name": "the-mandeville-school/computerClub", "path": "super_heros.py", "copies": "1", "size": "5299", "license": "unlicense", "hash": 8094151560472618000, "line_mean": 35.7986111111, "line_max": 160, "alpha_frac": 0.6193621438, "autogenerated": false, "ratio": 2.9786396852164136, "config...
__author__ = 'mrx' import utils.pyutils as ut import operator #neuron interface def neuron_create(name, model_coeffs, features_order): model_coeffs_list = ut.dict_to_list(model_coeffs, features_order) return name, map(lambda x: float(x), model_coeffs_list) def neuron_name(neuron): return neuron[0] ...
{ "repo_name": "sayon/ignoreme", "path": "model.py", "copies": "1", "size": "1704", "license": "mit", "hash": -20410768582782304, "line_mean": 28.3793103448, "line_max": 99, "alpha_frac": 0.6531690141, "autogenerated": false, "ratio": 3.51340206185567, "config_test": false, "has_no_keywords": ...
__author__ = 'msei' import serial import random import time LF = serial.to_bytes([10]) CR = serial.to_bytes([13]) CRLF = serial.to_bytes([13, 10]) LENGTH = 4 * 60 * 3 TERM = 13 class LEDCommunication: def __init__(self, port, baudrate): self.port = serial.Serial(port=port, baudrate=baudrate, timeout=0....
{ "repo_name": "ma-ver-ick/pyaphrodite", "path": "led.py", "copies": "1", "size": "2080", "license": "mit", "hash": 2484243760541419000, "line_mean": 18.0917431193, "line_max": 76, "alpha_frac": 0.5283653846, "autogenerated": false, "ratio": 3.1137724550898205, "config_test": false, "has_no_ke...
__author__ = 'msei' import time import math class Point: def __init__(self, x, y, z): self.x = x self.y = y self.z = z def __sub__(self, other): return Point(self.x - other.x, self.y - other.y, self.z - other.z) def __add__(self, other): return Point(self.x + oth...
{ "repo_name": "ma-ver-ick/pyaphrodite", "path": "animation.py", "copies": "1", "size": "7054", "license": "mit", "hash": -7706735004581584000, "line_mean": 25.2230483271, "line_max": 117, "alpha_frac": 0.5620924298, "autogenerated": false, "ratio": 3.687401986408782, "config_test": false, "ha...
__author__ = 'msergeyx' from fixture.application import Application import pytest import json import importlib import jsonpickle import os.path from fixture.db import DbFixture fixture = None target = None def load_config(file): global target if target is None: config_file = os.path.join(os.path.dir...
{ "repo_name": "msergeyx/python_training", "path": "conftest.py", "copies": "1", "size": "2475", "license": "apache-2.0", "hash": -8297996971041053000, "line_mean": 29.1829268293, "line_max": 100, "alpha_frac": 0.6715151515, "autogenerated": false, "ratio": 3.7050898203592815, "config_test": tru...
__author__ = 'msergeyx' from model.contact import Contact from selenium.webdriver.support.ui import Select import re class ContactHelper: def __init__(self, app): self.app = app def return_to_homepage(self): wd = self.app.wd wd.find_element_by_link_text("home page").click() def g...
{ "repo_name": "msergeyx/python_training", "path": "fixture/contact.py", "copies": "1", "size": "10147", "license": "apache-2.0", "hash": -175313140686755600, "line_mean": 43.5043859649, "line_max": 137, "alpha_frac": 0.6143687789, "autogenerated": false, "ratio": 3.4061765693185633, "config_tes...
__author__ = 'msergeyx' from model.contact import Contact import random def test_full_modify_some_contact(app, db, check_ui): if len(db.get_cont_list()) == 0: app.contact.create(Contact(firstname="hghjdsfni4389")) old_contacts = db.get_cont_list() index = random.choice(old_contacts) contact = ...
{ "repo_name": "msergeyx/python_training", "path": "test/test_modify_contact.py", "copies": "1", "size": "2276", "license": "apache-2.0", "hash": -5983420327025120000, "line_mean": 51.9302325581, "line_max": 132, "alpha_frac": 0.5008787346, "autogenerated": false, "ratio": 4.021201413427562, "co...
__author__ = 'msergeyx' from model.group import Group import random def test_modify_some_group(app, db, check_ui): if len(db.get_group_list()) == 0: app.group.create(Group(gr_name="ghj", gr_header="gnkl", gr_footer="jhb")) old_groups = db.get_group_list() index = random.choice(old_groups) grou...
{ "repo_name": "msergeyx/python_training", "path": "test/test_modify_group.py", "copies": "1", "size": "1125", "license": "apache-2.0", "hash": 4832891583265652000, "line_mean": 39.2142857143, "line_max": 117, "alpha_frac": 0.6506666667, "autogenerated": false, "ratio": 2.8553299492385786, "conf...
__author__ = 'msergeyx' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def return_to_group_page(self): wd = self.app.wd wd.find_element_by_link_text("group page").click() def open_group_page(self): wd = self.app.wd if wd.c...
{ "repo_name": "msergeyx/python_training", "path": "fixture/group.py", "copies": "1", "size": "3905", "license": "apache-2.0", "hash": -4742568334723606000, "line_mean": 31.5416666667, "line_max": 94, "alpha_frac": 0.5825864277, "autogenerated": false, "ratio": 3.410480349344978, "config_test": ...
__author__ = 'msergeyx' from sys import maxsize class Contact: def __init__(self, firstname=None, middlename=None, lastname=None, nick=None, tytle=None, company=None, address=None, home_tel=None, mobile_tel=None, work_tel=None, fax=None, birth_day=None, birth_month=None, birth_year=None, second_a...
{ "repo_name": "msergeyx/python_training", "path": "model/contact.py", "copies": "1", "size": "1553", "license": "apache-2.0", "hash": 5406571084877045000, "line_mean": 38.8205128205, "line_max": 180, "alpha_frac": 0.6188023181, "autogenerated": false, "ratio": 3.435840707964602, "config_test": ...
__author__ = 'msergeyx' import mysql.connector from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = mys...
{ "repo_name": "msergeyx/python_training", "path": "fixture/db.py", "copies": "1", "size": "1618", "license": "apache-2.0", "hash": 106487683928804370, "line_mean": 36.6279069767, "line_max": 160, "alpha_frac": 0.6001236094, "autogenerated": false, "ratio": 4.0148883374689825, "config_test": fal...
__author__ = 'msergeyx' import re from random import randrange from model.contact import Contact def test_compare_contact_on_home_page(app): all_contacts = app.contact.get_cont_list() index = randrange(len(all_contacts)) cont_from_home_page = app.contact.get_contact_info_from_home_page(index) cont_fro...
{ "repo_name": "msergeyx/python_training", "path": "test/test_compare_contact.py", "copies": "1", "size": "2538", "license": "apache-2.0", "hash": 5883492409782247000, "line_mean": 54.1956521739, "line_max": 128, "alpha_frac": 0.5776201734, "autogenerated": false, "ratio": 3.683599419448476, "co...
__author__ = 'msergeyx' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_homepage() wd.find_element_by_name("user").click() wd.find_element_by_name("user").click() wd.find_element_b...
{ "repo_name": "msergeyx/python_training", "path": "fixture/session.py", "copies": "1", "size": "1401", "license": "apache-2.0", "hash": -9162125492706835000, "line_mean": 30.1333333333, "line_max": 73, "alpha_frac": 0.5731620271, "autogenerated": false, "ratio": 3.3759036144578314, "config_test...
__author__ = 'msimonin' import unittest import uuid as stdlib_uuid from nova.db.discovery import context from nova import db from nova import objects objects.register_all() class CommonMixin: def _create_instance(self, **kwargs): instance = db.instance_create(self.ctxt, kwargs) return instance['u...
{ "repo_name": "BeyondTheClouds/nova", "path": "nova/tests/unit/db/test_object_discovery.py", "copies": "1", "size": "3325", "license": "apache-2.0", "hash": 1782268010371766300, "line_mean": 36.7954545455, "line_max": 109, "alpha_frac": 0.6168421053, "autogenerated": false, "ratio": 3.89800703399...
__author__ = 'mslabicki' import numpy as np class maximalThroughputProblemRR: def __init__(self, networkInstance, dim, lowerTxLimit, upperTxLimit): self.dim = dim self.networkInstance = networkInstance self.lowerLimitsVector = [] self.upperLimitsVector = [] for i in range(d...
{ "repo_name": "iitis/PyLTEs", "path": "pyltes/powerOptimizationProblemsDef.py", "copies": "1", "size": "5265", "license": "mit", "hash": 8913924411922015000, "line_mean": 35.5694444444, "line_max": 102, "alpha_frac": 0.6685660019, "autogenerated": false, "ratio": 3.8628026412325753, "config_tes...
__author__ = 'mslabicki' import pygmo as pg # from pyltes.powerOptimizationProblemsDef import maximalThroughputProblemRR from pyltes.powerOptimizationProblemsDef import local_maximalThroughputProblemRR from pyltes.powerOptimizationProblemsDef import maximalMedianThrProblemRR from pyltes.powerOptimizationProblem...
{ "repo_name": "iitis/PyLTEs", "path": "pyltes/powerConfigurator.py", "copies": "1", "size": "5818", "license": "mit", "hash": -2458547869363342300, "line_mean": 43.811023622, "line_max": 222, "alpha_frac": 0.6172224132, "autogenerated": false, "ratio": 3.513285024154589, "config_test": false, ...
__author__ = 'm.stanford' import cv2 import cv2.cv as cv import numpy as np class Circles(): accumulator_threshold = 75 minCircleDist = 100 maxCannyThresh = 175 minRadius = 10 maxRadius = 0 def __init__(self): pass def getCircles(self, img): smoothed = cv2.medianBlur(im...
{ "repo_name": "MaStanford/PingPongOpenCV", "path": "shapes/Circles.py", "copies": "1", "size": "1235", "license": "apache-2.0", "hash": 3004479450862178000, "line_mean": 27.0681818182, "line_max": 71, "alpha_frac": 0.5190283401, "autogenerated": false, "ratio": 3.7652439024390243, "config_test"...
__author__ = 'm.stanford' import numpy as np import cv2 class Lines(): minEdge = 200 maxEdge = 300 minLineLength = 1000 maxLineGap = 100 p = 1 theta = np.pi/180 threshhold = 200 probability = False def __init__(self): pass def getLines(self, grayImage): edges ...
{ "repo_name": "MaStanford/PingPongOpenCV", "path": "shapes/Lines.py", "copies": "1", "size": "1653", "license": "apache-2.0", "hash": 1714953822255195000, "line_mean": 27.5172413793, "line_max": 116, "alpha_frac": 0.4736842105, "autogenerated": false, "ratio": 3.5472103004291844, "config_test":...
__author__ = 'm.stanford' __author__ = 'm.stanford' import string import json, httplib nameheader = 'Naming Words' pageheader = 'Page' maleheader = 'Male Names' femaleheader = 'Female Names' flushline = ' . ' lines = [] wordType = ['NameWord', 'FemaleName', 'MaleName'] section = wordType[0] def buildNameDef(proc...
{ "repo_name": "MaStanford/AnglishWordbook", "path": "Anglish/UploadNamingWords.py", "copies": "1", "size": "4626", "license": "apache-2.0", "hash": -7090787360318512000, "line_mean": 21.4611650485, "line_max": 87, "alpha_frac": 0.5214007782, "autogenerated": false, "ratio": 3.528604118993135, "...
__author__ = 'mstipanov' class ApiRequestErrorDetails(object): messageId = "" text = "" variables = "" additionalDescription = "" def __init__(self, text=""): self.text = text def __str__(self): return "ApiRequestErrorDetails: {" \ "messageId = \"" + str(self.m...
{ "repo_name": "infobip/infobip-api-python-client", "path": "infobip/util/exception.py", "copies": "1", "size": "1760", "license": "apache-2.0", "hash": 4972748802176346000, "line_mean": 35.6875, "line_max": 110, "alpha_frac": 0.4397727273, "autogenerated": false, "ratio": 5.191740412979351, "co...
__author__ = 'msullivan' import os import sys import json import contextlib import subprocess dot_dir = '~/.volt' #get_config['dot_dir'] volt_config_filename = 'config.json' def get_path_to_volt(): return os.path.dirname(os.path.realpath(sys.argv[0])) def get_dot_dir(): expanded_dot_dir = os.path.expanduser...
{ "repo_name": "MichaelSullivan/volt", "path": "volt_modules/utils.py", "copies": "1", "size": "1307", "license": "apache-2.0", "hash": 1845831266119618300, "line_mean": 26.2291666667, "line_max": 80, "alpha_frac": 0.635807192, "autogenerated": false, "ratio": 3.2271604938271605, "config_test": ...
__author__ = 'mtambos' from __future__ import division, print_function import os import pandas as pd from PIL import Image import numpy as np def to_gray_scale(img): img_array = np.asarray(img) luminosity = lambda x: 0.21*x[0] + 0.72*x[1] + 0.07*x[2] return np.apply_along_axis(func1d=luminosity, axis=2...
{ "repo_name": "mtambos/character_identification", "path": "src/knn_classifier.py", "copies": "1", "size": "4630", "license": "mit", "hash": -7843783641043690000, "line_mean": 37.2644628099, "line_max": 103, "alpha_frac": 0.6265658747, "autogenerated": false, "ratio": 3.457804331590739, "config_...
__author__ = 'mthompson' import base64 import httplib import json import mimetypes import random import string import urllib import urlparse class DeviceProxy(): def __init__(self, host, port, username, password, use_https=True, keep_alive=False, forwarded_ip=""): self.username = username self.pass...
{ "repo_name": "amwelch/a10sdk-python", "path": "a10sdk/common/device_proxy.py", "copies": "1", "size": "12572", "license": "apache-2.0", "hash": 6798103401894910000, "line_mean": 40.2196721311, "line_max": 149, "alpha_frac": 0.5679287305, "autogenerated": false, "ratio": 4.035955056179775, "con...
__author__ = 'mthompson' import copy import inspect import importlib import urllib import json from urlparse import urlparse import collections import re import os import keyword import sys reload(sys) sys.setdefaultencoding('utf-8') class A10BaseClass(object): is_POST = True def __init__(self): self...
{ "repo_name": "a10networks/a10sdk-python", "path": "a10sdk/common/A10BaseClass.py", "copies": "2", "size": "37904", "license": "apache-2.0", "hash": 8913666667968505000, "line_mean": 42.2200684151, "line_max": 120, "alpha_frac": 0.4406395103, "autogenerated": false, "ratio": 4.550846440148877, ...
__author__ = 'Mufid' # Every import needed, listed import numpy as np import pylab as pl import random import math from matplotlib.backends.backend_pdf import PdfPages # ------------------------ # All configuration. # ------------------------ # Alpha: manufacture-specific variable # Please use 1 as its base bound alp...
{ "repo_name": "mufid/berkilau", "path": "ws/fidz/velocitymodel/run.py", "copies": "1", "size": "3172", "license": "mit", "hash": -3007881703340357000, "line_mean": 29.7961165049, "line_max": 80, "alpha_frac": 0.6390290038, "autogenerated": false, "ratio": 2.8195555555555556, "config_test": fals...
from __future__ import division import logging import time import math import wiringpi as wp # Registers/etc: PCA9685_ADDRESS = 0x40 MODE1 = 0x00 MODE2 = 0x01 SUBADR1 = 0x02 SUBADR2 = 0x03 SUBADR3 = 0x04 PRESCALE = 0xFE LED0_ON_L = 0x06 LED0_ON_H = 0x07 LED0_OFF_L = 0x08 LED0_OFF_H = 0x09 ALL_LED_ON_L = 0xFA ALL_LED_O...
{ "repo_name": "IsmoilovMuhriddin/allgo", "path": "rasp/allgo_utils/raspcar.py", "copies": "1", "size": "9333", "license": "mit", "hash": -1481846949031950600, "line_mean": 33.5703703704, "line_max": 125, "alpha_frac": 0.6160934319, "autogenerated": false, "ratio": 2.9247884675650266, "config_te...
__author__ = "Muin Momin" from flask import Flask, request, render_template, redirect, url_for, session, jsonify from functools import wraps from controls import * # Initializing things app = Flask(__name__) app.secret_key = "secret" GPIO.setwarnings(False) initpins() error = None def login_required(f): @wraps...
{ "repo_name": "muinmomin/PiCar", "path": "main.py", "copies": "1", "size": "2343", "license": "mit", "hash": -6639280169600024000, "line_mean": 20.504587156, "line_max": 89, "alpha_frac": 0.5983781477, "autogenerated": false, "ratio": 3.6438569206842923, "config_test": false, "has_no_keywords...
__author__ = 'Muin' import RPi.GPIO as GPIO import time #SETUP GPIO PINS def initpins(): GPIO.setmode(GPIO.BOARD) GPIO.setup(7, GPIO.OUT) GPIO.setup(11, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(15, GPIO.OUT) #MOTOR CONTROL FUNCTIONS def forward(): initpins() GPIO.output(7, False) ...
{ "repo_name": "muinmomin/PiCar", "path": "controls.py", "copies": "1", "size": "1414", "license": "mit", "hash": -1759273112687791600, "line_mean": 18.3698630137, "line_max": 63, "alpha_frac": 0.6230551627, "autogenerated": false, "ratio": 3.0408602150537636, "config_test": false, "has_no_key...
__author__ = 'mukesh' # In this stock data is scrapped from one of the Indian markets website for any particular stock. import urllib from bs4 import BeautifulSoup import re base_url = 'http://money.rediff.com/companies/' class StockAPI: def __init__(self, symbol): self.symbol = symbol def get_con...
{ "repo_name": "mukeshthawani/StockAPI", "path": "StockAPI.py", "copies": "1", "size": "4464", "license": "mit", "hash": -7351187520658276000, "line_mean": 30.6595744681, "line_max": 97, "alpha_frac": 0.5591397849, "autogenerated": false, "ratio": 4.259541984732825, "config_test": false, "has_...
__author__ = 'mukesh' """ * * ================================ * * Author List: Mukesh P * Filename: Kinect.py * Date: June 20, 2015 * Functions: get_depth() filter_smooth() filter_noise() contours_re...
{ "repo_name": "eyantrainternship/eYSIP_2015_Depth_Mapping_Kinect", "path": "Research/Tests/Final.py", "copies": "2", "size": "19875", "license": "cc0-1.0", "hash": 7198903914902910000, "line_mean": 35.204007286, "line_max": 438, "alpha_frac": 0.5789685535, "autogenerated": false, "ratio": 3.16935...
__author__="Mukesh Tiwari" __date__ ="$Feb 10, 2010 1:35:26 AM$" import random from Queue import Queue def gcd(a,b): while b: a,b=b,a%b return a def rabin_miller(p): if(p<2): return False if(p!=2 and p%2==0): return False s=p-1 while(s%2==0): s>>=1 for i in xrange(10): a=random.randrange(...
{ "repo_name": "winxos/python", "path": "reptend/rho.py", "copies": "1", "size": "2107", "license": "mit", "hash": 8706870553441621000, "line_mean": 19.0666666667, "line_max": 75, "alpha_frac": 0.4323682962, "autogenerated": false, "ratio": 2.5446859903381642, "config_test": false, "has_no_key...
__author__ = 'multiangle' import datetime from ..Basehandler import BaseHandler from ..databases.tables import ActivCommitUser, Activity from ..return_code_config import codeTable from sqlalchemy.orm.exc import NoResultFound class HuoException(RuntimeError): def __init__(self, code): self.code = code c...
{ "repo_name": "HeraldStudio/HeraldAppApi", "path": "mod/huodong/HuodongCommit.py", "copies": "1", "size": "4023", "license": "mpl-2.0", "hash": -9198309401370789000, "line_mean": 40.0510204082, "line_max": 120, "alpha_frac": 0.5090728312, "autogenerated": false, "ratio": 4.4453038674033145, "co...
__author__ = 'muntaserahmed' import sys import Leap from Leap import ScreenTapGesture, SwipeGesture from pymouse import PyMouse from pykeyboard import PyKeyboard from numpy import interp import threading from threading import Thread # Initialize PyMouse object AERO_MOUSE = PyMouse() AERO_GESTURES = PyKeyboard() ...
{ "repo_name": "mantazer/AeroMouse", "path": "AeroMouse.py", "copies": "1", "size": "5926", "license": "mit", "hash": -7952635919148586000, "line_mean": 31.2065217391, "line_max": 117, "alpha_frac": 0.5919676004, "autogenerated": false, "ratio": 3.5828295042321643, "config_test": false, "has_n...
__author__ = 'Murat Derya Ozen' import glob import gzip import logging import os import shutil TEMP_DIR_NAME = "temp" OUTPUT_DIR_NAME = "diff" OUTPUT_DIFF_LEFT_FILENAME = "diff-left.gz" OUTPUT_DIFF_RIGHT_FILENAME = "diff-right.gz" BUCKET_FILE_NAME_PREFIX = "bucket-" def join_abs_path(x, y): """ Join two p...
{ "repo_name": "muratdozen/bigdiff", "path": "bigdiff/application.py", "copies": "1", "size": "10253", "license": "mit", "hash": -4530553772065472500, "line_mean": 36.6985294118, "line_max": 79, "alpha_frac": 0.651224032, "autogenerated": false, "ratio": 3.77087164398676, "config_test": false, ...
__author__ = 'Murat Derya Ozen' PROGRAM_DESCRIPTION = """ TODO !!! """ import argparse import logging import mmh3 from application import bigdiff def get_argparser(): """ Defines and returns the ArgumentParser for this program. """ parser = argparse.ArgumentParser(description=PROGRAM_DESCRIPTION) par...
{ "repo_name": "muratdozen/bigdiff", "path": "bigdiff/__main__.py", "copies": "1", "size": "1241", "license": "mit", "hash": 6391955631366602000, "line_mean": 27.8837209302, "line_max": 94, "alpha_frac": 0.5995165189, "autogenerated": false, "ratio": 4.235494880546075, "config_test": false, "h...
__author__ = 'Murat Derya Ozen' PROGRAM_DESCRIPTION = """ Spot the ugliest files in a code repository. Given a path to a file or a directory, this program parses source files to extract, pretty print and calculate the number of curly brackets, i.e braces. *** Samples usages *** > python pretty_print_braces file --pa...
{ "repo_name": "muratdozen/playground", "path": "scripts/pretty_print_braces/__main__.py", "copies": "1", "size": "9057", "license": "unlicense", "hash": 85368432466029760, "line_mean": 39.7972972973, "line_max": 115, "alpha_frac": 0.6297891134, "autogenerated": false, "ratio": 4.10934664246824, ...
import random import logging import sys, os import pprint logger = logging.getLogger(__name__) logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.INFO) debug = True class DNASegment(object): def __init__(self, contig_sequence, filename, bufferPlaces): self.sequence = contig_se...
{ "repo_name": "bakedintime/bioalignment", "path": "GenAlgorithm.py", "copies": "1", "size": "7306", "license": "mit", "hash": 2943325238795119600, "line_mean": 31.9144144144, "line_max": 90, "alpha_frac": 0.592800438, "autogenerated": false, "ratio": 4.196438828259621, "config_test": false, "...
__author__ = "Music" # Learning Basic Usage of Tf # https://www.tensorflow.org/versions/r0.9/get_started/basic_usage.html import tensorflow as tf print "Construct Graph" matrix1 = tf.constant([[3,3]]) matrix2 = tf.constant([[2],[2]]) # TO MY UNDERSTANDING: constant is added to the default graph as op (node), matrix1 r...
{ "repo_name": "pkumusic/AI", "path": "learn_tf/basic_usage.py", "copies": "1", "size": "1509", "license": "mit", "hash": 6427372199125899000, "line_mean": 23.3387096774, "line_max": 116, "alpha_frac": 0.6752816435, "autogenerated": false, "ratio": 2.8258426966292136, "config_test": false, "ha...
__author__ = 'mustafaduran' import math import numpy as np from numpy import array from numpy import matrix from numpy import linalg as LA def myptw (a,sample_profile,target_profile): n=len(sample_profile) print n A_=array([1,1,1]) dA=array([A_]).T while LA.norm(dA)>0.01: ...
{ "repo_name": "mduranmustafa/Python", "path": "ptw.py", "copies": "1", "size": "2489", "license": "epl-1.0", "hash": -891411925838580400, "line_mean": 21.9326923077, "line_max": 109, "alpha_frac": 0.4443551627, "autogenerated": false, "ratio": 2.917936694021102, "config_test": false, "has_no_...
from PIL import Image import Tkinter, tkFileDialog import math import random def default (pixels): # Returns pixels list of tuples (R,G,B,Cluster Assignment('x' by default)) pixels = [list(x)+ list(('x',)) for x in pixels] return pixels def centroids (pixels,k): # Checks whether the pix...
{ "repo_name": "Mustaf2501/Dominant-Colors", "path": "dominant_colors.py", "copies": "1", "size": "3155", "license": "mit", "hash": -9017552353171799000, "line_mean": 29.6310679612, "line_max": 121, "alpha_frac": 0.5553090333, "autogenerated": false, "ratio": 3.4861878453038675, "config_test": f...
__author__ = 'Mustafa ÇELİK' class Deque: """ Dequeue is common usage of Stack and Queue in the same data structure. Items can be added both beginning and end of dequeue. Items can be removed both beginning and end of dequeue. Example Usage Scenario: Palindrome Checker is a great example. ( basta...
{ "repo_name": "celikmustafa89/python_work", "path": "dequeue.py", "copies": "1", "size": "1670", "license": "apache-2.0", "hash": -223749537687531680, "line_mean": 26.8, "line_max": 90, "alpha_frac": 0.5983213429, "autogenerated": false, "ratio": 3.0831792975970425, "config_test": false, "has...
__author__ = 'mwagner' from qgis.core import QgsVectorLayer, QgsGeometry, QgsMapLayerRegistry, QgsPoint, QgsFeatureRequest,\ QgsMessageLog, QGis, QgsVectorFileWriter from PyQt4.Qt import QThread, pyqtSignal, QMutex, QMutexLocker, QDir class SnapToGrid(QThread): run_finished = pyqtSignal(str, bool) run_p...
{ "repo_name": "allspatial/vertex-tools", "path": "controller/SnapToGrid.py", "copies": "1", "size": "6663", "license": "mit", "hash": 4853717422286398000, "line_mean": 35.8121546961, "line_max": 111, "alpha_frac": 0.5853219271, "autogenerated": false, "ratio": 4.097785977859779, "config_test": ...
__author__ = 'mwagner' from qgis.core import QgsVectorLayer, QgsMapLayerRegistry, QgsMessageLog from PyQt4.Qt import QThread, pyqtSignal, QMutex, QMutexLocker, QDir, QFile class RestoreGeometry(QThread): run_finished = pyqtSignal(str, bool) run_progressed = pyqtSignal(str, int, int) report_message = pyq...
{ "repo_name": "allspatial/vertex-tools", "path": "controller/RestoreGeometry.py", "copies": "1", "size": "2541", "license": "mit", "hash": -4697653698336651000, "line_mean": 32, "line_max": 107, "alpha_frac": 0.6033057851, "autogenerated": false, "ratio": 3.9517884914463455, "config_test": fals...
__author__ = 'mwagner' from ..view.Ui_SnapToGridWidget import Ui_SnapToGridWidget from qgis.core import QgsMapLayerRegistry, QgsMapLayer, QgsVectorDataProvider from PyQt4.Qt import Qt, pyqtSlot, QReadWriteLock, QReadLocker, QSettings from PyQt4.QtGui import QDockWidget, QListWidgetItem, QMessageBox, QFileDialog from S...
{ "repo_name": "allspatial/vertex-tools", "path": "controller/SnapToGridWidget.py", "copies": "1", "size": "11888", "license": "mit", "hash": 7448048099681821000, "line_mean": 36.0373831776, "line_max": 114, "alpha_frac": 0.6069986541, "autogenerated": false, "ratio": 3.883698137863443, "config_...
__author__ = 'mwalker' from cms.models.pluginmodel import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class HomeMultiArticle(CMSPlugin): """ Home page articles, displayed in two columns. """ left_title_1 = models.CharField( _("Left side, Sli...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "homepage/models.py", "copies": "1", "size": "6447", "license": "mit", "hash": -2439728645060225000, "line_mean": 21.7007042254, "line_max": 67, "alpha_frac": 0.5221033039, "autogenerated": false, "ratio": 3.7094361334867663, "config_tes...
__author__ = 'mwalker' from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from .forms import HomeMultiArticleAdminForm, HomeFullArticleAdminForm from .models import HomeMultiArticle, HomeFullArticle class HomeMultiArticlePlugin(...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "homepage/cms_plugins.py", "copies": "1", "size": "1123", "license": "mit", "hash": 8884296372611701000, "line_mean": 26.4146341463, "line_max": 70, "alpha_frac": 0.7310774711, "autogenerated": false, "ratio": 4.269961977186312, "config_...
__author__ = 'mwalker' # from dateutil.relativedelta import relativedelta from django.db import models from django.utils.translation import gettext as _ AUS = 'AUS' NZ = 'NZ' UK = 'UK' USA = 'USA' COUNTRY_CHOICES = ( (AUS, _("Australia")), (NZ, _("New Zealand")), (UK, _("United Kingdom")), (USA, _("...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "listings/models.py", "copies": "1", "size": "3764", "license": "mit", "hash": -8180725960951889000, "line_mean": 21.9512195122, "line_max": 79, "alpha_frac": 0.541445271, "autogenerated": false, "ratio": 3.588179218303146, "config_test"...
__author__ = 'mwalker' from dateutil.relativedelta import relativedelta from django.db import models from django.utils.translation import gettext as _ TIER_CHOICES = ( (1, 1), (2, 2), (3, 3) ) class Clinic(models.Model): """ Model for storing a clinic. """ name = models.CharField( ...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "clinics/models.py", "copies": "1", "size": "2003", "license": "mit", "hash": 6671204912269754000, "line_mean": 19.4387755102, "line_max": 78, "alpha_frac": 0.5127309036, "autogenerated": false, "ratio": 3.851923076923077, "config_test":...
__author__ = 'mwalker' from django.core.urlresolvers import reverse from django.db.models import F, Q from django.shortcuts import ( render_to_response, get_object_or_404, HttpResponseRedirect ) from django.template import RequestContext from django.utils import timezone from .models import Listing, Tracking, COU...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "listings/views.py", "copies": "1", "size": "2669", "license": "mit", "hash": -2187613345790148900, "line_mean": 27.6989247312, "line_max": 77, "alpha_frac": 0.6328212814, "autogenerated": false, "ratio": 3.856936416184971, "config_test"...
__author__ = 'mwalker' from django.db.models import F from django.shortcuts import ( render_to_response, get_object_or_404, HttpResponseRedirect ) from django.template import RequestContext from .models import Clinic def index(request): """ Display the injury clinics by tier in random order. @param...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "clinics/views.py", "copies": "1", "size": "2068", "license": "mit", "hash": 3031167551545737700, "line_mean": 24.2317073171, "line_max": 69, "alpha_frac": 0.6044487427, "autogenerated": false, "ratio": 3.577854671280277, "config_test": ...
__author__ = 'mwalker' from django import forms from .models import HomeMultiArticle, HomeFullArticle class HomeMultiArticleAdminForm(forms.ModelForm): left_url_1 = forms.URLField( max_length=200, help_text="Input full URL e.g. http://www.google.com", initial='http://' ) left_url...
{ "repo_name": "marksweb/django-cms-app-examples", "path": "homepage/forms.py", "copies": "1", "size": "5585", "license": "mit", "hash": 7320946706767587000, "line_mean": 28.5555555556, "line_max": 69, "alpha_frac": 0.4879140555, "autogenerated": false, "ratio": 3.8019060585432265, "config_test"...
"@Author Mwaruwa Chaka, JKUAT ECE Final Year Project 2014" "This code takes videos from the Rpi and transports them to a local folder via a network" import pysftp import time def Transfer(): try: with pysftp.Connection('192.168.60.102',username = 'sysop', password = 'posys') as sftp: working_di...
{ "repo_name": "mwaruwa/jkuat-projects", "path": "Final-Project/Transport/RpiTransmission.py", "copies": "1", "size": "1451", "license": "apache-2.0", "hash": 3330720720714606600, "line_mean": 41.6764705882, "line_max": 136, "alpha_frac": 0.5561681599, "autogenerated": false, "ratio": 4.4783950617...
__author__ = 'mworden' import ntplib import re from mi.core.exceptions import RecoverableSampleException from mi.core.log import get_logger from mi.dataset.dataset_parser import DataSetDriverConfigKeys log = get_logger() from mi.dataset.dataset_parser import SimpleParser from mi.dataset.parser.pco2w_abc_particles im...
{ "repo_name": "oceanobservatories/mi-instrument", "path": "mi/dataset/parser/pco2w_abc_imodem.py", "copies": "5", "size": "20618", "license": "bsd-2-clause", "hash": -1729002443305780700, "line_mean": 37.3234200743, "line_max": 95, "alpha_frac": 0.5479192938, "autogenerated": false, "ratio": 4.21...
__author__ = 'mworden' # A regex used to match any characters ANY_CHARS_REGEX = r'.*' # A regex used to match any characters ANY_NON_SPACE_CHARS_REGEX = r'([^\s]*)' # A regex used to match a single space SPACE_REGEX = ' ' # A regex used to match the end of a line END_OF_LINE_REGEX = r'(?:\r\n|\n)' # A regex used ...
{ "repo_name": "renegelinas/mi-instrument", "path": "mi/dataset/parser/common_regexes.py", "copies": "2", "size": "1902", "license": "bsd-2-clause", "hash": -2308483000332407000, "line_mean": 30.7, "line_max": 109, "alpha_frac": 0.6451104101, "autogenerated": false, "ratio": 2.6054794520547944, ...
__author__ = 'mworden' """ @package mi.dataset.parser.nutnr_b_particles @file mi/dataset/parser/nutnr_b_particles.py @author Mark Worden @brief Parser for the nutnr_b_particles dataset driver This file contains the particles that are applicable nutnr_b_dcl_conc, nutnr_b_dcl_full and nutnr_b. """ from mi.core.log imp...
{ "repo_name": "JeffRoy/mi-dataset", "path": "mi/dataset/parser/nutnr_b_particles.py", "copies": "3", "size": "12615", "license": "bsd-2-clause", "hash": 6982931587896350000, "line_mean": 42.2054794521, "line_max": 107, "alpha_frac": 0.6198176774, "autogenerated": false, "ratio": 3.82504548211037,...
__author__ = 'myang' from a10networks.a10api.login import * import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.alert import Alert from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import W...
{ "repo_name": "PyLearner/myworks", "path": "selenium/network/adc/templates/slb_server_template.py", "copies": "1", "size": "2036", "license": "apache-2.0", "hash": -8787725440773535000, "line_mean": 36.1509433962, "line_max": 124, "alpha_frac": 0.6320474777, "autogenerated": false, "ratio": 3.610...