text
stringlengths
0
1.05M
meta
dict
__author__ = 'korantin' from nltk.util import ngrams from sys import argv from itertools import * from codecs import open from yaml.representer import Representer from yaml import load,dump,add_representer from collections import defaultdict def everygrams(sequence, min_len=1, max_len=-1,pad_left=False,pad_right=Fals...
{ "repo_name": "Krolov18/Languages", "path": "Kalaba_resolution/essai.py", "copies": "1", "size": "2628", "license": "apache-2.0", "hash": -1951115191478936800, "line_mean": 36, "line_max": 87, "alpha_frac": 0.58073115, "autogenerated": false, "ratio": 3.3580562659846547, "config_test": false, ...
__author__ = 'kosala atapattu' import time from ansible import errors def net_interface_list(values=[]): return ','.join(str(':'.join(i)) for i in values) def array_to_csv(values=[]): return ','.join(values) def get_image_name (values, resttime, strict): from datetime import datetime from ansible imp...
{ "repo_name": "Actifio/ansible_appaware_mount", "path": "filter_plugins/custom.py", "copies": "1", "size": "6245", "license": "mit", "hash": 3486639176747987000, "line_mean": 37.7888198758, "line_max": 107, "alpha_frac": 0.5409127302, "autogenerated": false, "ratio": 4.2253044654939105, "config...
__author__ = 'kosci' import sys from nose.tools import assert_equal sys.path.append("../../") from gfxlcd.driver.null.null_page import NullPage from gfxlcd.driver.hd44780 import HD44780 from charlcd.buffered import CharLCD class TestChip(object): def setUp(self): self.gfx_lcd = NullPage(132, 16, None, Fa...
{ "repo_name": "bkosciow/gfxlcd", "path": "gfxlcd/tests/test_hd44780.py", "copies": "1", "size": "1244", "license": "mit", "hash": 1439217463563834000, "line_mean": 28.619047619, "line_max": 70, "alpha_frac": 0.5795819936, "autogenerated": false, "ratio": 2.9689737470167064, "config_test": false...
__author__ = 'Kovachev' from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response, RequestContext, HttpResponseRedirect from apps.post.models import Post from apps.post.forms import UploadForm from django.contrib.auth.models import User from apps.member.models import Memb...
{ "repo_name": "Lyudmil-Kovachev/vertuto", "path": "vertuto/apps/post/views.py", "copies": "1", "size": "1238", "license": "mit", "hash": -4584593536844360700, "line_mean": 35.4411764706, "line_max": 96, "alpha_frac": 0.7140549273, "autogenerated": false, "ratio": 4.154362416107382, "config_test...
__author__ = 'Kovachev' from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django_resized import ResizedImageField class Member(models.Model): user = models.OneToOneField(User) name = models.CharField(max_length=100) avatar = Resiz...
{ "repo_name": "Lyudmil-Kovachev/vertuto", "path": "vertuto/apps/member/models.py", "copies": "1", "size": "1265", "license": "mit", "hash": 6692146326953250000, "line_mean": 34.1388888889, "line_max": 119, "alpha_frac": 0.7249011858, "autogenerated": false, "ratio": 3.6350574712643677, "config_...
__author__ = 'Kovachev' from django.db import models from django import forms from apps.member.models import Member from tinymce.widgets import TinyMCE from django_resized import ResizedImageField CAT = ( ('3D Modeling', '3D Modeling and Animation'), ('Game Development', 'Game Development'), ('Programming...
{ "repo_name": "Lyudmil-Kovachev/vertuto", "path": "vertuto/apps/post/models.py", "copies": "1", "size": "2100", "license": "mit", "hash": 296589505136251700, "line_mean": 38.641509434, "line_max": 137, "alpha_frac": 0.6966666667, "autogenerated": false, "ratio": 3.4768211920529803, "config_test...
__author__ = 'Kovachev' from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required #from apps.member.forms import RegistrationForm #from apps.member.forms import LoginForm from apps.me...
{ "repo_name": "Lyudmil-Kovachev/vertuto", "path": "vertuto/apps/member/views.py", "copies": "1", "size": "1577", "license": "mit", "hash": -9106937065181342000, "line_mean": 37.487804878, "line_max": 110, "alpha_frac": 0.6975269499, "autogenerated": false, "ratio": 3.9623115577889445, "config_t...
__author__ = 'Kovachev' from django import forms from apps.post.models import Post from tinymce.widgets import TinyMCE from django.contrib.auth.models import User from apps.member.models import Member from django.utils.encoding import smart_unicode from PIL import Image import StringIO from django_resized.forms import...
{ "repo_name": "Lyudmil-Kovachev/vertuto", "path": "vertuto/apps/post/forms.py", "copies": "1", "size": "1731", "license": "mit", "hash": 6436994332455192000, "line_mean": 35.829787234, "line_max": 130, "alpha_frac": 0.6874638937, "autogenerated": false, "ratio": 3.5544147843942504, "config_test...
import os import argparse import struct #The allowed file extensions EXTENSIONS = [".exe", ".dll"] def check_dir(directory): try: resultSet = set() #Getting every entry in directory for entry in os.listdir(directory): fullpath = os.path.join(directory, entry) #We are parsing only the files #NOTE...
{ "repo_name": "kovleventer/FoD", "path": "test/windows_arch_checker.py", "copies": "1", "size": "2378", "license": "mit", "hash": -4407691134901919000, "line_mean": 26.0227272727, "line_max": 162, "alpha_frac": 0.6820857864, "autogenerated": false, "ratio": 3.1580345285524567, "config_test": fa...
__author__ = "Kozo Nishida" __email__ = "knishida@riken.jp" __version__ = "0.1.0" __license__ = "MIT" API_BASE = "http://rest.kegg.jp/" import requests import pandas as pd from StringIO import StringIO #from progressbar import ProgressBar def search_pathway_object(cpd_ids): map_list = requests.get('http://rest.k...
{ "repo_name": "kozo2/keggutil", "path": "keggutil.py", "copies": "1", "size": "1650", "license": "mit", "hash": 6513739521357998000, "line_mean": 33.375, "line_max": 91, "alpha_frac": 0.6048484848, "autogenerated": false, "ratio": 2.8947368421052633, "config_test": false, "has_no_keywords": f...
__author__ = 'kpaskov' from os import listdir from datetime import datetime from math import floor method_to_times = {} file_to_times = {} root_file = '/Users/kpaskov/sgd-ng2_log/backend' file_names = [x for x in listdir(root_file) if not x.startswith('.')] for file_name in file_names: print(file_name) f = op...
{ "repo_name": "yeastgenome/SGDFrontend", "path": "src/sgd/frontend/yeastgenome/performance_aggregate.py", "copies": "1", "size": "2683", "license": "mit", "hash": -3464591315456055300, "line_mean": 36.2638888889, "line_max": 90, "alpha_frac": 0.581438688, "autogenerated": false, "ratio": 3.127039...
__author__ = 'kpaskov' import os import sys import httplib import base64 import json import new import unittest import sauceclient from selenium import webdriver from sauceclient import SauceClient # import env variables USERNAME = os.environ.get('SAUCE_USERNAME') ACCESS_KEY = os.environ.get('SAUCE_ACCESS_KEY') # poi...
{ "repo_name": "yeastgenome/SGDFrontend", "path": "src/sgd/frontend/yeastgenome/tests/features/environment.py", "copies": "1", "size": "1805", "license": "mit", "hash": -3694588262623973400, "line_mean": 33.0566037736, "line_max": 157, "alpha_frac": 0.6254847645, "autogenerated": false, "ratio": 3...
__author__ = 'kpaskov' import re from urllib.parse import urlparse from behave import step from selenium.common.exceptions import NoSuchElementException @step('I visit "{url}" for "{obj}"') def visit_page_for(context, url, obj): context.browser.get(context.base_url + url.replace('?', obj)) @step('I click the but...
{ "repo_name": "yeastgenome/SGDFrontend", "path": "src/sgd/frontend/yeastgenome/tests/features/steps/__init__.py", "copies": "1", "size": "5859", "license": "mit", "hash": 3079942762400451000, "line_mean": 37.0454545455, "line_max": 131, "alpha_frac": 0.6651305684, "autogenerated": false, "ratio":...
__author__ = 'kpiorno' import os import math from textwrap import dedent from xml.dom.minidom import parse from itertools import * from kivy.graphics import * from kivy.core.image import Image from kivy.resources import resource_find from kivy3dgui.objloader import ObjFile from kivy.uix.widget import Widget from kivy...
{ "repo_name": "kpiorno/kivy3dgui", "path": "kivy3dgui/node.py", "copies": "1", "size": "26232", "license": "mit", "hash": -5566642357997231000, "line_mean": 37.6902654867, "line_max": 120, "alpha_frac": 0.4947773711, "autogenerated": false, "ratio": 3.9458483754512637, "config_test": false, "...
__author__ = 'kra869' # coding=utf-8 from collections import namedtuple import struct import sys import os Message = namedtuple('Message', ['msg', 'params']) Push = namedtuple('Push', "package, hash"); HEADER_STRUCT = "BL" NAME = str(os.getpid()) def debug(msg): sys.stderr.write(NAME + ":" + msg + "\n") de...
{ "repo_name": "mikaelbrandin/armory", "path": "client/protocol.py", "copies": "1", "size": "1743", "license": "apache-2.0", "hash": -6946125019994953000, "line_mean": 20.0120481928, "line_max": 67, "alpha_frac": 0.5949512335, "autogenerated": false, "ratio": 3.3583815028901736, "config_test": f...
__author__ = 'kra869' from . import base_client import os import getpass import sys import subprocess class Client(base_client.IOClient): PUSH = "ssh {server} \"cd {path}; armory-push\"" PULL = "ssh {server} \"cd {path}; armory-pull\"" def __init__(self, uri): base_client.IOClient.__init__(self, u...
{ "repo_name": "mikaelbrandin/armory", "path": "client/ssh_client.py", "copies": "1", "size": "1184", "license": "apache-2.0", "hash": 8484870045023240000, "line_mean": 25.9318181818, "line_max": 68, "alpha_frac": 0.5329391892, "autogenerated": false, "ratio": 3.9335548172757475, "config_test": ...
__author__ = 'kra869' import os import subprocess import sys import pwd from . import exceptions from . import utils from . import configurations from . import output; class StartException(exceptions.ArmoryException): def __init__(self, msg): super(StartException, self).__init__(msg) class StopExcepti...
{ "repo_name": "mikaelbrandin/armory", "path": "client/startstop.py", "copies": "1", "size": "5497", "license": "apache-2.0", "hash": -4204123184758665700, "line_mean": 29.5444444444, "line_max": 142, "alpha_frac": 0.6276150628, "autogenerated": false, "ratio": 3.659786950732357, "config_test": ...
__author__ = 'kra869' import os import configparser from . import utils def directory_filter(args): return os.getcwd(); def init(context): parser = context.register_command('init', command_init, help='Initialize a new repository', directory_filter=directory_filter) parser.add_argument('repository', me...
{ "repo_name": "mikaelbrandin/armory", "path": "client/init.py", "copies": "1", "size": "1868", "license": "apache-2.0", "hash": 7130668096345215000, "line_mean": 27.7538461538, "line_max": 130, "alpha_frac": 0.6852248394, "autogenerated": false, "ratio": 4.169642857142857, "config_test": true, ...
__author__ = 'kra869' import os def init(context): parser = context.register_command('status', command_status, aliases=['ps', 'stat'], help='Show status information for one or more modules') parser.add_argument('modules', metavar='MODULE', nargs='*') return None def sizeof_fmt(num, suffix='B'): for...
{ "repo_name": "mikaelbrandin/armory", "path": "client/status.py", "copies": "1", "size": "1899", "license": "apache-2.0", "hash": 6630313525134508000, "line_mean": 27.7878787879, "line_max": 143, "alpha_frac": 0.5592417062, "autogenerated": false, "ratio": 3.331578947368421, "config_test": fals...
__author__ = 'kra869' import subprocess import hashlib import os from ar.semantic_version import Spec as VersionSpec from . import output def register_scheme(scheme): for method in [s for s in dir(urlparse) if s.startswith('uses_')]: getattr(urlparse, method).append(scheme) def cmd(cmd): proc = su...
{ "repo_name": "mikaelbrandin/armory", "path": "client/utils.py", "copies": "1", "size": "2218", "license": "apache-2.0", "hash": -3661036570090213000, "line_mean": 25.734939759, "line_max": 105, "alpha_frac": 0.5734896303, "autogenerated": false, "ratio": 3.804459691252144, "config_test": false...
__author__ = 'kra869' import argparse import os def is_armory_central_repo_dir(dir): if not dir.endswith(os.sep): dir += os.sep if not os.path.isdir(dir): return False elif not os.access(dir, os.R_OK): return False elif not os.access(dir, os.W_OK): return...
{ "repo_name": "mikaelbrandin/armory", "path": "repository/context.py", "copies": "1", "size": "2318", "license": "apache-2.0", "hash": 2585743804371583000, "line_mean": 36.0327868852, "line_max": 212, "alpha_frac": 0.6354616048, "autogenerated": false, "ratio": 4.024305555555555, "config_test":...
__author__ = 'Krager' from enum import Enum class Genre(Enum): deliveryServiceJap = "宅配" foodJap = "グルメ" hotelAndJapaneseHotel = "ホテル・旅館" hotel = "ホテル" japaneseHotel = "旅館" hairSalon = "ヘアサロン" relaxation = "リラクゼーション" otherCoupon = "その他のクーポン" spa = "エステ" lesson = "レッスン" leisur...
{ "repo_name": "AJLiu/SPCSAI-CouponPurchasePrediction", "path": "model/Genre.py", "copies": "1", "size": "1484", "license": "mit", "hash": -5934200556893375000, "line_mean": 22.25, "line_max": 36, "alpha_frac": 0.5833333333, "autogenerated": false, "ratio": 1.6582466567607728, "config_test": fal...
import sys import os import tables import tarfile import fnmatch import random import numpy import numpy as np from scipy.io import wavfile import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams from midify import lpc_analysis, lpc_to_lsf, lpc_synthesis from midify import ...
{ "repo_name": "kastnerkyle/speech_density", "path": "speech_lstmrbm.py", "copies": "1", "size": "18687", "license": "bsd-3-clause", "hash": 1900937371227716000, "line_mean": 38.8443496802, "line_max": 91, "alpha_frac": 0.6011665864, "autogenerated": false, "ratio": 3.275547765118317, "config_te...
__author__ = 'krawallmieze' from baseparser import BaseParser from BeautifulSoup import BeautifulSoup, Tag class TAZParser(BaseParser): domains = ['www.taz.de'] feeder_pat = '.+\/!\d{7}' feeder_pages = ['http://www.taz.de/'] def _parse(self, html): soup = BeautifulSoup(html, convertEntiti...
{ "repo_name": "catcosmo/newsdiffs", "path": "parsers/taz.py", "copies": "1", "size": "2420", "license": "mit", "hash": 1877839333568659000, "line_mean": 39.35, "line_max": 130, "alpha_frac": 0.5466942149, "autogenerated": false, "ratio": 3.884430176565008, "config_test": false, "has_no_keywor...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def getOrgs(url,authtoken,method): print authtoken handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = url + '/api/org' request = urllib2.Request(url) request.add_header(...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/getOrgs.py", "copies": "1", "size": "1117", "license": "apache-2.0", "hash": -2670606874920178700, "line_mean": 26.95, "line_max": 93, "alpha_frac": 0.6374216652, "autogenerated": false, "ratio": 3.5460317460317...
__author__ = 'krishnaa' from getvAPPDetails import getvAPPDetails def checkVM(vm_name,url,authtoken,method): print "checking if VM exists inside the VAPP" deploy_vapp_status = getvAPPDetails(url,authtoken,method) """ while True: deploy_vapp_status = getvAPPDetails(url,authtoken,method) ...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/checkVM.py", "copies": "1", "size": "1211", "license": "apache-2.0", "hash": 2527121446379791000, "line_mean": 30.8684210526, "line_max": 117, "alpha_frac": 0.5788604459, "autogenerated": false, "ratio": 3.56176...
__author__ = 'krishnaa' import time from addVM import addVM from taskStatus import taskStatus from getVAPP import getVAPP from vmReconf import vmReconf def processVM(vapp_name,vapp_desc,vapp_href,vdc_href,authtoken,new_vm_name,vm_ip,vm_network): task_href = addVM(vapp_name,vapp_desc,vapp_href,vdc_href,authtoke...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/processVM.py", "copies": "1", "size": "1270", "license": "apache-2.0", "hash": 7960327105062449000, "line_mean": 28.5348837209, "line_max": 93, "alpha_frac": 0.6078740157, "autogenerated": false, "ratio": 3.4324...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def addVM(vapp_name,vapp_desc,vapp_href,template_url,authtoken,method): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = vapp_href + '/action/recomposeVApp' request = urllib2...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/addVM.py", "copies": "1", "size": "2186", "license": "apache-2.0", "hash": -6618916672909655000, "line_mean": 34.8524590164, "line_max": 117, "alpha_frac": 0.5777676121, "autogenerated": false, "ratio": 3.673949...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def checkVAPP(vapp_name,url,authtoken,method): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) request = urllib2.Request(url) request.add_header("Accept",'application/*+xml;versio...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/checkVAPP.py", "copies": "1", "size": "1272", "license": "apache-2.0", "hash": -7599311445588182000, "line_mean": 29.3095238095, "line_max": 120, "alpha_frac": 0.6218553459, "autogenerated": false, "ratio": 3.45...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def deleteVM(vapp_name,vapp_href,vm_href,authtoken,method): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = vapp_href + '/action/recomposeVApp' request = urllib2.Request(url...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/deleteVM.py", "copies": "1", "size": "1809", "license": "apache-2.0", "hash": -3040129244220563000, "line_mean": 35.9387755102, "line_max": 117, "alpha_frac": 0.5721393035, "autogenerated": false, "ratio": 3.890...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def deployVapp(vapp_name,vapp_desc,vapp_poweron,vapp_deploy,url,authtoken,method,template_url): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = url + '/action/instantiateVAppTem...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/deployVapp.py", "copies": "1", "size": "1961", "license": "apache-2.0", "hash": 5548412749339733000, "line_mean": 39.0408163265, "line_max": 117, "alpha_frac": 0.5471698113, "autogenerated": false, "ratio": 4.11...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def getCatalog(url,authtoken,method,vapp_name): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) request = urllib2.Request(url) request.add_header("Accept",'application/*+xml;versi...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/getCatalog.py", "copies": "1", "size": "1063", "license": "apache-2.0", "hash": -7326033599133311000, "line_mean": 30.2647058824, "line_max": 118, "alpha_frac": 0.6509877705, "autogenerated": false, "ratio": 3.4...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def getVDC(url,authtoken,vdc_lookup,catalog): method = 'GET' handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) request = urllib2.Request(url) request.add_header("Accept",'applic...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/getVDC.py", "copies": "1", "size": "1361", "license": "apache-2.0", "hash": -929611736063884500, "line_mean": 29.9545454545, "line_max": 89, "alpha_frac": 0.6260102866, "autogenerated": false, "ratio": 3.4808184...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def poweroffVM(vm_href,authtoken,method): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = vm_href + '/action/undeploy' request = urllib2.Request(url) request.add_header(...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/poweroffVM.py", "copies": "1", "size": "1552", "license": "apache-2.0", "hash": 1775096907728628000, "line_mean": 33.5111111111, "line_max": 107, "alpha_frac": 0.6166237113, "autogenerated": false, "ratio": 3.78...
__author__ = 'krishnaa' import urllib2 import base64 import sys import xml.etree.ElementTree as ET def vmReconf(vm_href,authtoken,method,vm_name,vm_ip,vm_network): handler = urllib2.HTTPSHandler() opener = urllib2.build_opener(handler) url = vm_href + '/action/reconfigureVm' request = urllib2.Request(...
{ "repo_name": "krisdigitx/python-vcloud-automation", "path": "vcloud-automation/vcore/vmReconf.py", "copies": "1", "size": "3709", "license": "apache-2.0", "hash": 8282214888982520000, "line_mean": 38.0421052632, "line_max": 135, "alpha_frac": 0.5335669992, "autogenerated": false, "ratio": 3.9042...
__author__ = 'krishnab' import numpy as np import pandas as pd from bokeh.plotting import figure, output_file, show from bokeh.layouts import gridplot from operator import add, sub from .ColumnSpecs import MODEL_RUN_COLUMNS, EXPORT_COLUMNS_FOR_CSV from .PlotComposerOverallAttrition import PlotComposerOverallAttrition f...
{ "repo_name": "university-gender-evolution/py-university-gender-dynamics-pkg", "path": "pyugend/Comparison.py", "copies": "1", "size": "45862", "license": "mit", "hash": -7469582392523791000, "line_mean": 43.0980769231, "line_max": 95, "alpha_frac": 0.4762548515, "autogenerated": false, "ratio": ...
__author__ = 'krishnab' import numpy as np import pandas as pd import matplotlib.pyplot as plt # CONSTANTS line_colors = ['#7fc97f', '#beaed4', '#fdc086','#386cb0','#f0027f','#ffff99'] class Comparison(): def __init__(self, model_list): self.name = 'All Models' self.label = 'All Models' ...
{ "repo_name": "00krishna-research/py_university_gender_dynamics_pkg", "path": "pyugend/Comparison.py", "copies": "1", "size": "14670", "license": "mit", "hash": 3197880970051462700, "line_mean": 44.84375, "line_max": 176, "alpha_frac": 0.5648943422, "autogenerated": false, "ratio": 3.144020574367...
__author__ = 'krishnab' from operator import neg, truediv import numpy as np import pandas as pd from numpy.random import binomial from models.Models import Base_model class Basic_stochastic_model(Base_model): def __init__(self, **kwds): Base_model.__init__(self, **kwds) self.name = "Stochastic ...
{ "repo_name": "00krishna-research/py_university_gender_dynamics_pkg", "path": "pyugend/BasicStochasticModelHPDeptSizeShrinks.py", "copies": "1", "size": "13334", "license": "mit", "hash": 8841023194995153000, "line_mean": 46.2836879433, "line_max": 118, "alpha_frac": 0.5088495575, "autogenerated": ...
__author__ = 'krishnab' from operator import neg, truediv import numpy as np import pandas as pd from numpy.random import binomial from models.Models import Base_model class Basic_stochastic_model_fixed_promotion(Base_model): def __init__(self, **kwds): Base_model.__init__(self, **kwds) self.nam...
{ "repo_name": "00krishna-research/py_university_gender_dynamics_pkg", "path": "pyugend/BasicStochasticModelFixedPromotionDeptSizeStable.py", "copies": "1", "size": "13110", "license": "mit", "hash": 5464408429953944000, "line_mean": 46.5, "line_max": 118, "alpha_frac": 0.5110602593, "autogenerated"...
__author__ = 'krishnab' from operator import neg, truediv import numpy as np import pandas as pd from numpy.random import binomial from models.Models import Base_model class Stochastic_model_with_promotion_and_first_hiring(Base_model): def __init__(self, **kwds): Base_model.__init__(self, **kwds) ...
{ "repo_name": "00krishna-research/py_university_gender_dynamics_pkg", "path": "pyugend/StochasticModelWithPromotionAndFirstHiring.py", "copies": "2", "size": "12426", "license": "mit", "hash": 7317824180443879000, "line_mean": 46.427480916, "line_max": 167, "alpha_frac": 0.5218895864, "autogenerate...
__author__ = 'krishnab' # -*- coding: utf-8 -*- ''' .. :module:: main.py :module: main simulation module :synopsis: This module contains the main() function for running the simulation. This is the main file to run when executing this program. :author: krishna bhogaonker <cyclotomiq@gmail.com> ...
{ "repo_name": "00krishna-research/py3k_friendship_simulator", "path": "py3k_friendship_simulator/main.py", "copies": "1", "size": "6745", "license": "bsd-3-clause", "hash": -3577940852091260000, "line_mean": 24.2621722846, "line_max": 105, "alpha_frac": 0.5648628614, "autogenerated": false, "rati...
__author__ = 'krishnab' # -*- coding: utf-8 -*- ''' .. :module:: Sociomatrix.py :module: Sociomatrix class :synopsis: This module contains the Sociomatrix class to track friendships in a simulation. This class allows me to pass friendship changes to the object, and lets the object internally handle...
{ "repo_name": "00krishna-research/py3k_friendship_simulator", "path": "py3k_friendship_simulator/Sociomatrix.py", "copies": "1", "size": "1743", "license": "bsd-3-clause", "hash": -6431249297061538000, "line_mean": 20.8, "line_max": 79, "alpha_frac": 0.6069994263, "autogenerated": false, "ratio":...
__author__ = 'Krishna Mudragada' from collections import namedtuple from operator import itemgetter from pprint import pformat class Node(namedtuple('Node', 'location left_child right_child')): def __repr__(self): return pformat(tuple(self)) def kdtree(point_list, depth=0): try: k = len(point_...
{ "repo_name": "mudragada/util-scripts", "path": "Algos/KDTreeNode.py", "copies": "1", "size": "1097", "license": "mit", "hash": 1446431294700106500, "line_mean": 29.5, "line_max": 77, "alpha_frac": 0.6362807657, "autogenerated": false, "ratio": 3.5387096774193547, "config_test": false, "has_n...
__author__ = 'Krishna Mudragada' import logging,time class EuclidGCD: def __init__(self): logging.basicConfig(format='%(asctime)s %(message)s') logging.getLogger().setLevel(logging.INFO) logging.info("Initializing EuclidGCD..") self.numberList = [] def addToList(self, number ): ...
{ "repo_name": "mudragada/util-scripts", "path": "Algos/EuclidGCD.py", "copies": "1", "size": "1365", "license": "mit", "hash": 1106261380074822800, "line_mean": 30.7674418605, "line_max": 77, "alpha_frac": 0.5545787546, "autogenerated": false, "ratio": 3.5362694300518136, "config_test": false, ...
from __future__ import division import collections import math class Model: def __init__(self, arffFile): self.trainingFile = arffFile self.features = {} #all feature names and their possible values (including the class label) self.featureNameList = [] ...
{ "repo_name": "applecool/AI", "path": "Naive Bayes in 50 lines/new_nb.py", "copies": "1", "size": "3516", "license": "mit", "hash": -2250884819957675000, "line_mean": 59.6379310345, "line_max": 175, "alpha_frac": 0.5435153584, "autogenerated": false, "ratio": 4.656953642384106, "config_test": f...
__author__ = 'krishnasagar' from django import forms # Refer for forms.MultipleChoiceField always, its helpful - # http://www.programcreek.com/python/example/58199/django.forms.MultipleChoiceField class TrackForm(forms.Form): def __init__(self, *args, **kwargs): if 'choices' in kwargs: choic...
{ "repo_name": "krishnasagar14/Project", "path": "MusicApp/forms.py", "copies": "1", "size": "1975", "license": "mit", "hash": -5776447059622591000, "line_mean": 49.6666666667, "line_max": 116, "alpha_frac": 0.5660759494, "autogenerated": false, "ratio": 4.398663697104677, "config_test": false, ...
__author__ = 'krishnasagar' import requests from django.core.cache import cache class MusicTrack: def __init__(self): self.baseUrl = 'http://104.197.128.152:8000/v1/tracks?page=%s' self.trackUrl = 'http://104.197.128.152:8000/v1/tracks/%s' self.url = 'http://104.197.128.152:8000/v1/tracks...
{ "repo_name": "krishnasagar14/Project", "path": "MusicApp/Music_Repo.py", "copies": "1", "size": "5305", "license": "mit", "hash": -7550833784666533000, "line_mean": 33.6732026144, "line_max": 93, "alpha_frac": 0.5208294062, "autogenerated": false, "ratio": 3.816546762589928, "config_test": fal...
__author__ = 'krish' import logging # Change log level to suppress annoying IPv6 error logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.automaton import Automaton, ATMT class OpenFlowSession(Automaton): # store request reply session as a map # add the xid to subsequent requests # st...
{ "repo_name": "krish7919/openflow-test", "path": "src/of_automata.py", "copies": "1", "size": "1222", "license": "mit", "hash": -1721508958880341200, "line_mean": 22.0566037736, "line_max": 58, "alpha_frac": 0.6170212766, "autogenerated": false, "ratio": 3.521613832853026, "config_test": false,...
__author__ = 'krish' import logging from struct import pack from scapy.all import Packet, ShortEnumField, XByteField, ByteEnumField, ShortField, IntField, LongField, ByteField, XIntField, BitField from scapy.layers.inet import IP, TCP from scapy.packet import bind_layers # Change log level to suppress annoying IPv6...
{ "repo_name": "krish7919/openflow-test", "path": "src/of_protocol.py", "copies": "1", "size": "5974", "license": "mit", "hash": 3354579546362795000, "line_mean": 31.2918918919, "line_max": 137, "alpha_frac": 0.5482089053, "autogenerated": false, "ratio": 3.6338199513381997, "config_test": false...
__author__ = 'kris' class Stack(object): def __init__(self, size=16): self.stack = [] self.size = size self.top = -1 def setSize(self, size): print 'Now, size is', size self.size = size def isEmpty(self): if self.top == -1: return True ...
{ "repo_name": "dutwfk/pytest", "path": "base/stack.py", "copies": "1", "size": "1286", "license": "mit", "hash": 2468001895555503600, "line_mean": 18.7846153846, "line_max": 54, "alpha_frac": 0.4712286159, "autogenerated": false, "ratio": 3.6123595505617976, "config_test": false, "has_no_keyw...
__author__ = 'Kristen' # set (Kristen = 'KGerring') from sympy import * from pprint import pprint #{'⊤': Tautology, \u22A5 True :⊨\u22A8 dict(TT='true', TF='true', FT='true', FF='true'), #'<-', '⊂': Implies(y, x), 'x<<y, (x if y)', dict(TT='true', TF='true', FT='false', FF='true'), #('->', ⊃): Implies(x, y) '(if x...
{ "repo_name": "KGerring/RevealMe", "path": "Docs/RM2.py", "copies": "1", "size": "5806", "license": "mit", "hash": 1959152226482395600, "line_mean": 54.9108910891, "line_max": 456, "alpha_frac": 0.5185054011, "autogenerated": false, "ratio": 2.4091296928327646, "config_test": false, "has_no_k...
__author__ = 'Kristian Hinnenthal' import json import time import tests.example_datatypes as ex import twisted.internet.defer as defer import unittest class MaStaServerTester(object): def __init__(self): self.rpc = rpc.RpcLayer(u'amqp://fg-cn-sandman1.cs.upb.de:5672') def test_deploy(self): ...
{ "repo_name": "CN-UPB/OpenBarista", "path": "components/decaf-masta/tests/masta_server_test.py", "copies": "1", "size": "1080", "license": "mpl-2.0", "hash": 1014982284940072600, "line_mean": 24.7380952381, "line_max": 92, "alpha_frac": 0.6518518519, "autogenerated": false, "ratio": 3.22388059701...
__author__ = 'Kristin' from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.contrib import auth from django.core.context_processors import csrf from .forms import RegistrationForm #Registration functions def home(request): return render_to_response('intro_text...
{ "repo_name": "KBratland/django_final", "path": "Fruit_Finder/views.py", "copies": "1", "size": "1771", "license": "apache-2.0", "hash": 4042427308313460700, "line_mean": 23.6111111111, "line_max": 103, "alpha_frac": 0.6871823828, "autogenerated": false, "ratio": 3.9977426636568847, "config_tes...
from datetime import datetime from lxml import html from juriscraper.OpinionSite import OpinionSite class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self.__module__ self.url = 'http://www.state.il.us/court/Opinions/...
{ "repo_name": "m4h7/juriscraper", "path": "juriscraper/opinions/united_states/state/illappct.py", "copies": "2", "size": "2183", "license": "bsd-2-clause", "hash": -1539632523310365000, "line_mean": 35.3833333333, "line_max": 119, "alpha_frac": 0.5748969308, "autogenerated": false, "ratio": 3.384...
from datetime import datetime from lxml import html from juriscraper.OpinionSite import OpinionSite class Site(OpinionSite): def __init__(self): super(Site, self).__init__() self.court_id = self.__module__ self.url = 'http://www.state.il.us/court/Opinions/recent_appellate.asp' se...
{ "repo_name": "brianwc/juriscraper", "path": "opinions/united_states/state/illappct.py", "copies": "1", "size": "2151", "license": "bsd-2-clause", "hash": -3017610357542220000, "line_mean": 34.85, "line_max": 119, "alpha_frac": 0.5741515574, "autogenerated": false, "ratio": 3.392744479495268, "...
from datetime import datetime from lxml import html from juriscraper.OpinionSite import OpinionSite from juriscraper.lib.string_utils import titlecase class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self.__modul...
{ "repo_name": "m4h7/juriscraper", "path": "juriscraper/opinions/united_states/state/ark.py", "copies": "2", "size": "2181", "license": "bsd-2-clause", "hash": 6980496607665161000, "line_mean": 36.9464285714, "line_max": 100, "alpha_frac": 0.5878037597, "autogenerated": false, "ratio": 3.365740740...
import re from lxml import html import time from datetime import date from juriscraper.OpinionSite import OpinionSite from juriscraper.lib.string_utils import titlecase class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.c...
{ "repo_name": "Andr3iC/juriscraper", "path": "opinions/united_states/state/nj.py", "copies": "2", "size": "2600", "license": "bsd-2-clause", "hash": 4317837264893861000, "line_mean": 39.935483871, "line_max": 108, "alpha_frac": 0.5619230769, "autogenerated": false, "ratio": 3.5470668485675305, ...
__author__ = 'Kristof Speeckaert' import PyPDF2 import logging from wand.image import Image as wandImage from PIL import Image, ImageChops from io import BufferedRandom, BytesIO log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) def split_pdf(src_filename, pdf_res, page_list=None...
{ "repo_name": "kspeeckaert/pyPdfCompare", "path": "pyPdfCompare.py", "copies": "1", "size": "6219", "license": "bsd-2-clause", "hash": 3741969022081800700, "line_mean": 37.8653846154, "line_max": 121, "alpha_frac": 0.6335423702, "autogenerated": false, "ratio": 3.669026548672566, "config_test":...
__author__ = 'Krivenko' from model.contact import Contact from random import randrange def test_modify_contact_firstname(app,db,check_ui): if app.contact.count()==0: app.contact.create_contact( Contact(firstname="Alex", middlename="a", lastname="Kriv", nickname="sd", title="fdf", ...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "test/test_modify_contact.py", "copies": "1", "size": "2503", "license": "apache-2.0", "hash": -5392162229204051000, "line_mean": 59.6097560976, "line_max": 159, "alpha_frac": 0.5806841046, "autogenerated": false, "ratio": 3.202319587628866, ...
__author__ = 'Krivenko' from model.contact import Contact import random def test_del_contact(app,db,check_ui): if len(db.get_contact_list())==0: app.contact.create_contact( Contact(firstname="Alex", middlename="a", lastname="Kriv", nickname="sd", title="fdf", ...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "test/test_del_contact.py", "copies": "1", "size": "1272", "license": "apache-2.0", "hash": -2709003356101652500, "line_mean": 62.6, "line_max": 159, "alpha_frac": 0.5479559748, "autogenerated": false, "ratio": 3.5138121546961325, "config_tes...
__author__ = 'Krivenko' from model.contact import Contact class ContactHelper: def __init__(self,app): self.app = app def init_new_user(self): wd = self.app.wd wd.find_element_by_link_text("add new").click() def change_fields(self,field_name,text): wd = self.app.wd ...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "fixture/contact.py", "copies": "1", "size": "8687", "license": "apache-2.0", "hash": 2291712939147453700, "line_mean": 40.5645933014, "line_max": 153, "alpha_frac": 0.6331299643, "autogenerated": false, "ratio": 3.418732782369146, "config_te...
__author__ = 'Krivenko' from model.group import Group class GroupHelper: def __init__(self,app): self.app=app def Open_groups_page(self): wd = self.app.wd if not( wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new"))>0): wd.find_element_by_link_tex...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "fixture/group.py", "copies": "1", "size": "3935", "license": "apache-2.0", "hash": 5347333655956659000, "line_mean": 30.7338709677, "line_max": 98, "alpha_frac": 0.5941550191, "autogenerated": false, "ratio": 3.4187662901824503, "config_test...
__author__ = 'Krivenko' from sys import maxsize class Contact: def __init__(self,firstname=None, middlename=None, lastname=None, nickname=None, title=None, company=None, address=None, homephone=None, mobilephone=None, workphone=None,secondaryphone=None, fax=None,byear=None, ayear=None, addr...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "model/contact.py", "copies": "1", "size": "2113", "license": "apache-2.0", "hash": 3123861938726135300, "line_mean": 38.1296296296, "line_max": 194, "alpha_frac": 0.645054425, "autogenerated": false, "ratio": 3.5996592844974447, "config_test...
__author__ = 'Krivenko' class SessionHelper: def __init__(self,app): self.app=app def Login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by_...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "fixture/session.py", "copies": "1", "size": "1475", "license": "apache-2.0", "hash": 5252058817132640000, "line_mean": 27.9215686275, "line_max": 73, "alpha_frac": 0.5688135593, "autogenerated": false, "ratio": 3.329571106094808, "config_tes...
__author__ = 'Krivenko' 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 = mysql...
{ "repo_name": "KrivenkoAlexander/python_tr", "path": "fixture/db.py", "copies": "1", "size": "2110", "license": "apache-2.0", "hash": 2739957145862802000, "line_mean": 38.0925925926, "line_max": 194, "alpha_frac": 0.6180094787, "autogenerated": false, "ratio": 3.914656771799629, "config_test": ...
__author__ = 'krolev' import os import shlex import argparse import codecs import subprocess import re import string import urllib.request import urllib.error from bs4 import BeautifulSoup from pyinotify import ProcessEvent, Notifier, ALL_EVENTS, WatchManager import sqlite3 caractère_special = ('&#160;: ', ';') net=...
{ "repo_name": "Krolov18/Languages", "path": "Projet_media/Collecteur_texte 2.py", "copies": "2", "size": "6433", "license": "apache-2.0", "hash": -7603577026249327000, "line_mean": 35.6171428571, "line_max": 230, "alpha_frac": 0.6471598002, "autogenerated": false, "ratio": 3.1212859230394545, "...
__author__ = "Krolev" Nombres = {} Dizaines = {} #[Nombres.update({x:""}) for x in range(0,100000000000)] centaines = {100:{"cent":"sâ"}} milliers = {1000:{"mille":"mil"}} millions = {1000000:{"million":"miljô"}} milliards = {1000000000:{"milliard":"miljar"}} dico ={} def generer_dizaines(dico): unites = {0:["zéro",...
{ "repo_name": "Krolov18/Languages", "path": "Nombres/brouillon_1.py", "copies": "1", "size": "2868", "license": "apache-2.0", "hash": -2390775074868584400, "line_mean": 27.1782178218, "line_max": 190, "alpha_frac": 0.5737877723, "autogenerated": false, "ratio": 2.0773722627737228, "config_test"...
__author__ = 'krolev' y=''' class Nombres: """ 1 - système 10^3 = on découpe l'intégral en séquences de trois unités avec un séquence incomplète à gauche si le reste de la division est différent de 0. Distinguons deux systèmes de représentations chiffrés. Le système court et le système long. Cette...
{ "repo_name": "Krolov18/Languages", "path": "Nombres/Nombres 2.py", "copies": "1", "size": "16762", "license": "apache-2.0", "hash": 2034507743464797700, "line_mean": 58.8315412186, "line_max": 908, "alpha_frac": 0.6047445037, "autogenerated": false, "ratio": 2.754165979211351, "config_test": f...
__author__ = 'Krylik' import argparse import re import os import xml.etree.ElementTree as ET from xml.dom import minidom from shutil import copytree, ignore_patterns argparser = argparse.ArgumentParser() argparser.add_argument('indir', metavar='input', type=str, ...
{ "repo_name": "Krylik/Pidgin2AdiumEmoticons", "path": "emoticonset_builder/__main__.py", "copies": "1", "size": "2429", "license": "mit", "hash": 1199312557671326700, "line_mean": 36.96875, "line_max": 111, "alpha_frac": 0.6492383697, "autogenerated": false, "ratio": 3.6416791604197902, "config...
from decimal import Decimal import hashlib import logging import time import datetime from django.utils import six from six.moves.urllib.request import Request, urlopen from six.moves.urllib.parse import urlencode from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured fro...
{ "repo_name": "pawciobiel/django-getpaid", "path": "getpaid/backends/przelewy24/__init__.py", "copies": "1", "size": "7280", "license": "mit", "hash": -1711662172358539800, "line_mean": 42.0769230769, "line_max": 126, "alpha_frac": 0.6145604396, "autogenerated": false, "ratio": 3.4034595605423097...
from decimal import Decimal import hashlib import logging import time import urllib import urllib2 import datetime from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ f...
{ "repo_name": "KrzysiekJ/django-getpaid", "path": "getpaid/backends/przelewy24/__init__.py", "copies": "1", "size": "7203", "license": "mit", "hash": -2923699248689714700, "line_mean": 42.3915662651, "line_max": 126, "alpha_frac": 0.6050256837, "autogenerated": false, "ratio": 3.4763513513513513,...
__author__ = 'ksmith' from physicsTable import * from physicsTable.constants import * import pygame as pg import copy sc = pg.display.set_mode((1000,620)) def checkN(tb,goalret,kapv=20,kapb=15,kapm=50000,perr=25): i = 0 while True: i += 1 ntb = makeNoisy(tb,kapv,kapb,kapm,perr) ntb.set...
{ "repo_name": "kasmith/cbmm-project-christmas", "path": "python-trials/checkNoisy.py", "copies": "1", "size": "1305", "license": "mit", "hash": 1949431421712494300, "line_mean": 25.6530612245, "line_max": 58, "alpha_frac": 0.5540229885, "autogenerated": false, "ratio": 2.8744493392070485, "conf...
__author__ = 'ksmith' # Based on http://psiturk.readthedocs.org/en/latest/retrieving.html from sqlalchemy import create_engine, MetaData, Table import json import pandas as pd # Production db_url = "mysql://root:@56Bayes@localhost:3396/experiments" table_name = 'basicRG_final' # Test #db_url = 'sqlite:///participant...
{ "repo_name": "kasmith/cbmm-project-christmas", "path": "psiturk-rg-cont/grabData.py", "copies": "5", "size": "1740", "license": "mit", "hash": -5949114358001453000, "line_mean": 30.6545454545, "line_max": 70, "alpha_frac": 0.7327586207, "autogenerated": false, "ratio": 3.4523809523809526, "con...
__author__ = 'kszalai' try: import traceback import argparse import textwrap except ImportError as err: traceback.print_exc() exit(128) class HistogrammerCommandline: def __init__(self): # predefinied paths self.parser = argparse.ArgumentParser(prog="histogrammer", ...
{ "repo_name": "KAMI911/histogrammer", "path": "libs/HistogrammerCommandline.py", "copies": "1", "size": "3311", "license": "mpl-2.0", "hash": 2147558777568749000, "line_mean": 37.5, "line_max": 114, "alpha_frac": 0.540320145, "autogenerated": false, "ratio": 4.414666666666666, "config_test": fa...
__author__ = 'kszalai' try: import traceback import textwrap import glob import os import logging import datetime import numpy as np import cv2 import multiprocessing import pyexiv2 from datetime import date except ImportError as err: traceback.print_exc() exit(128) ...
{ "repo_name": "KAMI911/histogrammer", "path": "libs/HistogrammerWorkflow.py", "copies": "1", "size": "6068", "license": "mpl-2.0", "hash": -8683023225361506000, "line_mean": 43.6176470588, "line_max": 118, "alpha_frac": 0.5901450231, "autogenerated": false, "ratio": 3.9072762395363814, "config_...
__author__ = 'kszalai' try: import traceback import argparse import textwrap import glob import logging import logging.config import datetime from libs import Logging, timing, HistogrammerCommandline, HistogrammerWorkflow from datetime import date except ImportError as e...
{ "repo_name": "KAMI911/histogrammer", "path": "histogrammer.py", "copies": "1", "size": "1773", "license": "mpl-2.0", "hash": 2496600894313843000, "line_mean": 36.5434782609, "line_max": 122, "alpha_frac": 0.5329949239, "autogenerated": false, "ratio": 5.008474576271187, "config_test": false, ...
import os import logging import pandas as pd from math import ceil, pi, exp, log, sqrt, radians, cos, sin, asin # from pyproj import Proj import numpy as np from collections import defaultdict # from IPython.display import Markdown logging.basicConfig(format='%(asctime)s\t\t%(message)s', level=logging.DEBUG) # Gene...
{ "repo_name": "KTH-dESA/PyOnSSET", "path": "onsset/onsset.py", "copies": "1", "size": "198624", "license": "mit", "hash": -7874797436666233000, "line_mean": 61.2841015992, "line_max": 264, "alpha_frac": 0.48614971, "autogenerated": false, "ratio": 3.6336760455160806, "config_test": false, "ha...
__author__ = 'ktisha' import os import sys import imp PYTHON_VERSION_MAJOR = sys.version_info[0] PYTHON_VERSION_MINOR = sys.version_info[1] ENABLE_DEBUG_LOGGING = False if os.getenv("UTRUNNER_ENABLE_DEBUG_LOGGING"): ENABLE_DEBUG_LOGGING = True def debug(what): if ENABLE_DEBUG_LOGGING: sys.stdout.writelines(...
{ "repo_name": "adedayo/intellij-community", "path": "python/helpers/pycharm/pycharm_run_utils.py", "copies": "61", "size": "1126", "license": "apache-2.0", "hash": -3209528105456312000, "line_mean": 25.8095238095, "line_max": 62, "alpha_frac": 0.6998223801, "autogenerated": false, "ratio": 2.8797...
__author__ = 'ktisha' import os import sys PYTHON_VERSION_MAJOR = sys.version_info[0] PYTHON_VERSION_MINOR = sys.version_info[1] ENABLE_DEBUG_LOGGING = False if os.getenv("UTRUNNER_ENABLE_DEBUG_LOGGING"): ENABLE_DEBUG_LOGGING = True def debug(what): if ENABLE_DEBUG_LOGGING: sys.stdout.writelines(str(what) +...
{ "repo_name": "dahlstrom-g/intellij-community", "path": "python/helpers/pycharm/pycharm_run_utils.py", "copies": "21", "size": "1297", "license": "apache-2.0", "hash": 9018276485258260000, "line_mean": 24.94, "line_max": 64, "alpha_frac": 0.6854279106, "autogenerated": false, "ratio": 2.967963386...
__author__ = 'kuasha' """ 230,75-270,125 237,82 - 266,122 29x40 """ import numpy as np from scipy import misc from sklearn import datasets from sklearn import svm from sklearn import cluster img=misc.imread("/Users/kuasha/Downloads/people.jpg") print img.shape print img.dtype start = [(77, 230), (127, 270)] cell_w...
{ "repo_name": "kuasha/ml", "path": "load.py", "copies": "1", "size": "1137", "license": "mit", "hash": 7761200531349404000, "line_mean": 19.6727272727, "line_max": 102, "alpha_frac": 0.6437994723, "autogenerated": false, "ratio": 2.8496240601503757, "config_test": false, "has_no_keywords": fa...
__author__ = 'kuhn' __doc__ = """<Header> <MdCreator>DGD2CMDI</MdCreator> <MdCreationDate>2015-05-07+02:00</MdCreationDate> <MdSelfLink>file:/home/kuhn/Data/IDS/svn_rev1233/dgd2_data/metadata/events/extern/PF/PF--_E_00127_extern.xml</MdSelfLink> <MdProfile>clarin.eu:cr1:p_1430905751592</MdProfil...
{ "repo_name": "fkuhn/dgd2cmdi", "path": "src/dgd2cmdi/cmdiheader.py", "copies": "1", "size": "1679", "license": "bsd-3-clause", "hash": -8866503331166438000, "line_mean": 37.1590909091, "line_max": 145, "alpha_frac": 0.7153067302, "autogenerated": false, "ratio": 2.87008547008547, "config_test"...
import sys import urllib2 import re import time def find_link(url): sys.stdout.write("Wait a Minute its retrieving.") try: if url[0:4]!="http": url="http://" + url f=(urllib2.urlopen(url)).read() k=re.findall('(src|href)="(\/view_video.php\S+)"',f) k=se...
{ "repo_name": "pornvd/pornvd.github.io", "path": "_posts/new.py", "copies": "1", "size": "2932", "license": "mit", "hash": -2767370005538809000, "line_mean": 34.675, "line_max": 132, "alpha_frac": 0.4140518417, "autogenerated": false, "ratio": 3.7930142302716687, "config_test": false, "has_no...
__author__ = 'kunal' import numpy as np import pandas as pd from sklearn import preprocessing as pp from sklearn.feature_extraction.text import CountVectorizer #import pylab as P import matplotlib.pyplot as plt from sklearn.learning_curve import learning_curve from sklearn.cross_validation import train_test_split d...
{ "repo_name": "kv-kunalvyas/sfcc", "path": "algorithms/auxiliary.py", "copies": "1", "size": "8928", "license": "mit", "hash": -2848121423971691500, "line_mean": 49.1573033708, "line_max": 109, "alpha_frac": 0.6368727599, "autogenerated": false, "ratio": 2.86337395766517, "config_test": true, ...
""" A Python wrapper to access Amazon Web Service(AWS) E-Commerce Serive APIs, based upon pyamazon (http://www.josephson.org/projects/pyamazon/), enhanced to meet the latest AWS specification(http://www.amazon.com/webservices). This module defines the following classes: - `Bag`, a generic container for the python ob...
{ "repo_name": "OAButton/tricorder", "path": "plugins/python/ecs.py", "copies": "2", "size": "35455", "license": "bsd-3-clause", "hash": 2837627427961869300, "line_mean": 35.8555093555, "line_max": 549, "alpha_frac": 0.6557890283, "autogenerated": false, "ratio": 3.7478858350951376, "config_test...
__author__ = 'kuro' import argparse import codecs import json import re import os import django from django.conf import settings as django_settings from django.template import Template, Context from models import CantonKey SUPPORTED_FORMAT = ['ibus', 'cin', 'json'] def deploy(options): if not hasattr(options, ...
{ "repo_name": "lamsaitat/cantonhk-input", "path": "src/cantonhk.py", "copies": "1", "size": "4508", "license": "mit", "hash": 8852318945686451000, "line_mean": 31.9124087591, "line_max": 130, "alpha_frac": 0.5900621118, "autogenerated": false, "ratio": 3.7194719471947195, "config_test": false, ...
""" Molecular line object """ from moleidoscope.linker import Linker class Line: """ Line class.""" def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 self.name = str(p1) + '_' + str(p2) self.vec = [p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]] def grid(self, size): ...
{ "repo_name": "kbsezginel/Moleidoscope", "path": "moleidoscope/line.py", "copies": "1", "size": "1316", "license": "mit", "hash": 5153809964255488000, "line_mean": 28.2444444444, "line_max": 64, "alpha_frac": 0.5045592705, "autogenerated": false, "ratio": 2.758909853249476, "config_test": false...
""" Animation of molecules """ import os import mdtraj import nglview import tempfile from .output import write_pdb def animate(frames, gui=False, delete=True,): """ Creates nglview widget for given list of molecule files (frames). """ T = mdtraj.load(frames, top=frames[0]) view = nglview.show_mdt...
{ "repo_name": "kbsezginel/Moleidoscope", "path": "moleidoscope/animate.py", "copies": "1", "size": "1025", "license": "mit", "hash": -7302266104830199000, "line_mean": 26.7027027027, "line_max": 91, "alpha_frac": 0.647804878, "autogenerated": false, "ratio": 3.3279220779220777, "config_test": f...
""" HostDesigner integration (read library) """ import os import numpy as np def read_library(library_path, rename='N'): """ Read HostDesigner linker library. """ with open(library_path, 'r') as library_file: lib_lines = library_file.readlines() connectivity_index = [] connectivity = ...
{ "repo_name": "kbsezginel/Moleidoscope", "path": "moleidoscope/hd.py", "copies": "1", "size": "3354", "license": "mit", "hash": 4750423599717493000, "line_mean": 39.4096385542, "line_max": 104, "alpha_frac": 0.6115086464, "autogenerated": false, "ratio": 3.5987124463519313, "config_test": false...
""" Visualization methods using nglview backend """ import os import math import tempfile import nglview def show(*args, camera='perspective', move='auto', div=5, distance=(-10, -10), axis=0, caps=True, save=None, group=True): """ Show given structures using nglview - camera: 'perspective' / 'orthogra...
{ "repo_name": "kbsezginel/Moleidoscope", "path": "moleidoscope/visualize.py", "copies": "1", "size": "4191", "license": "mit", "hash": 5546931487064929000, "line_mean": 36.4196428571, "line_max": 121, "alpha_frac": 0.6366022429, "autogenerated": false, "ratio": 3.452224052718287, "config_test":...
import direct.directbase.DirectStart from panda3d.core import Filename,Buffer,Shader from panda3d.core import PandaNode,NodePath from panda3d.core import AmbientLight,DirectionalLight from panda3d.core import TextNode,Point3,Vec4 from direct.showbase.DirectObject import DirectObject from direct.filter.CommonFilters im...
{ "repo_name": "ToonTownInfiniteRepo/ToontownInfinite", "path": "Panda3D-1.9.0/samples/Glow-Filter/Tut-Glow-Basic.py", "copies": "3", "size": "4208", "license": "mit", "hash": 1328168453467299600, "line_mean": 36.5714285714, "line_max": 98, "alpha_frac": 0.6442490494, "autogenerated": false, "rati...
import direct.directbase.DirectStart from panda3d.core import Filename,Buffer,Shader from panda3d.core import PandaNode,NodePath from panda3d.core import ColorBlendAttrib from panda3d.core import AmbientLight,DirectionalLight from panda3d.core import TextNode,Point3,Vec4 from direct.showbase.DirectObject import Direct...
{ "repo_name": "francholi/PandaExamples", "path": "Glow-Filter/Tut-Glow-Advanced.py", "copies": "3", "size": "5837", "license": "mit", "hash": -6447775855570020000, "line_mean": 38.1744966443, "line_max": 89, "alpha_frac": 0.6695220147, "autogenerated": false, "ratio": 3.379849449913144, "config...
from direct.directbase import DirectStart from direct.showbase.DirectObject import DirectObject from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * from panda3d.core import lookAt from panda3d.core import GeomVertexFormat, GeomVertexData from panda3d.core import Geom, GeomTriangles, GeomVer...
{ "repo_name": "toontownfunserver/Panda3D-1.9.0", "path": "samples/Procedural-Cube/Tut-Procedural-Cube.py", "copies": "3", "size": "5398", "license": "bsd-3-clause", "hash": 8708560885073936000, "line_mean": 27.2617801047, "line_max": 89, "alpha_frac": 0.7128566136, "autogenerated": false, "ratio"...
from direct.directbase import DirectStart from panda3d.core import Filename,InternalName from panda3d.core import GeomVertexArrayFormat, GeomVertexFormat from panda3d.core import Geom, GeomNode, GeomTrifans, GeomTristrips from panda3d.core import GeomVertexReader, GeomVertexWriter from panda3d.core import GeomVertexR...
{ "repo_name": "toontownfunserver/Panda3D-1.9.0", "path": "samples/Fractal-Plants/Tut-Fractal-Plants.py", "copies": "3", "size": "12802", "license": "bsd-3-clause", "hash": 5910772495791416000, "line_mean": 28.9112149533, "line_max": 143, "alpha_frac": 0.7500390564, "autogenerated": false, "ratio"...
import direct.directbase.DirectStart from panda3d.core import PandaNode,LightNode,TextNode from panda3d.core import Filename from panda3d.core import NodePath from panda3d.core import Shader from panda3d.core import Point3,Vec4 from direct.task.Task import Task from direct.actor.Actor import Actor from direct.gui.Ons...
{ "repo_name": "toontownfunserver/Panda3D-1.9.0", "path": "samples/Cartoon-Shader/Tut-Cartoon-Advanced.py", "copies": "3", "size": "6259", "license": "bsd-3-clause", "hash": -322477642376203300, "line_mean": 40.1776315789, "line_max": 104, "alpha_frac": 0.6751877297, "autogenerated": false, "ratio...
import pandas as pd import numpy as np from sklearn.naive_bayes import MultinomialNB from sklearn.feature_selection import RFECV from sklearn import linear_model from sklearn.preprocessing import LabelEncoder from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.utils import check_arrays from scipy i...
{ "repo_name": "kastnerkyle/kaggle-kdd2014", "path": "clf.py", "copies": "1", "size": "3005", "license": "bsd-3-clause", "hash": -301095394529852400, "line_mean": 26.8240740741, "line_max": 78, "alpha_frac": 0.6628951747, "autogenerated": false, "ratio": 2.954768928220256, "config_test": false, ...
from collections import defaultdict import copy import nltk import pandas as pd import os import numpy as np from functools import partial import string NLTK_PACKAGES = ['punkt', 'word2vec_sample', 'cmudict'] START_SYMBOL = '<s>' END_SYMBOL = '</s>' _WORD2VEC = None _CMU_DICT = None BLACKLIST = ['"', '``', "''"] DY...
{ "repo_name": "kastnerkyle/pachet_experiments", "path": "markov_finite.py", "copies": "1", "size": "11670", "license": "bsd-3-clause", "hash": 5559183153541452000, "line_mean": 33.2228739003, "line_max": 146, "alpha_frac": 0.5928020566, "autogenerated": false, "ratio": 3.629860031104199, "confi...
from dagbldr.datasets import make_ocr from dagbldr.datasets import minibatch_iterator from dagbldr.utils import convert_to_one_hot from dagbldr.utils import add_datasets_to_graph from dagbldr.utils import get_params_and_grads from dagbldr.utils import TrainingLoop from dagbldr.optimizers import adadelta from dagbldr.no...
{ "repo_name": "dagbldr/dagbldr", "path": "examples/deprecated/bitmap_attention/bitmap_attention.py", "copies": "2", "size": "2615", "license": "bsd-3-clause", "hash": -2746229617671590400, "line_mean": 38.0298507463, "line_max": 80, "alpha_frac": 0.6940726577, "autogenerated": false, "ratio": 3.0...
from __future__ import print_function import __main__ as main import os import re import shutil import numpy as np import glob import numbers import theano import sys import warnings import inspect import zipfile import time import pprint try: import cPickle as pickle except ImportError: import pickle from coll...
{ "repo_name": "dribnet/dagbldr", "path": "dagbldr/utils/training_utils.py", "copies": "1", "size": "30507", "license": "bsd-3-clause", "hash": -4123039051299305000, "line_mean": 37.5676359039, "line_max": 80, "alpha_frac": 0.5952076573, "autogenerated": false, "ratio": 3.7948749844508023, "conf...
from theano import tensor import theano import numpy as np from ..utils import concatenate, as_shared from ..core import get_logger, get_type, set_shared from .nodes import projection from .nodes import np_tanh_fan_uniform from .nodes import np_variance_scaled_uniform from .nodes import np_normal from .nodes import np...
{ "repo_name": "dagbldr/dagbldr", "path": "dagbldr/nodes/recurrent_nodes.py", "copies": "2", "size": "10731", "license": "bsd-3-clause", "hash": 3455824099043429000, "line_mean": 37.325, "line_max": 80, "alpha_frac": 0.5608983319, "autogenerated": false, "ratio": 3.5734265734265733, "config_test...
from theano.sandbox.rng_mrg import MRG_RandomStreams from theano import tensor from ..utils import concatenate from ..core import get_logger, get_type logger = get_logger() _type = get_type() ''' def embedding(list_of_index_inputs, max_index, proj_dim, graph, name, random_state=None, strict=True, init_...
{ "repo_name": "kastnerkyle/dagbldr", "path": "dagbldr/nodes/stochastic_nodes.py", "copies": "2", "size": "4400", "license": "bsd-3-clause", "hash": -1089256488831256200, "line_mean": 42.5643564356, "line_max": 79, "alpha_frac": 0.6004545455, "autogenerated": false, "ratio": 3.5256410256410255, ...