text
stringlengths
0
1.05M
meta
dict
__author__ = 'Mirko Rossini' import unittest from integrationtest_support import IntegrationTestSupport from pybuilder.errors import BuildFailedException from common import BUILD_FILE_TEMPLATE BUILD_FILE_TEMPLATE = """ from pybuilder.core import use_plugin, init from pybuilder_django_enhanced_plugin import django_t...
{ "repo_name": "MirkoRossini/pybuilder_django_enhanced_plugin", "path": "src/integrationtest/python/django_test_fail_if_project_missing_tests.py", "copies": "1", "size": "1134", "license": "bsd-3-clause", "hash": 7635204198209177000, "line_mean": 25.3720930233, "line_max": 104, "alpha_frac": 0.6904761...
__author__ = 'Miroslaw Horbal' __email__ = 'miroslaw@gmail.com' __date__ = 'December 1, 2013' __website__ = 'http://pastebin.com/gaPnVwNH#' # Notes # Dec 2, 2013: Updated the parser to fix the bug noticed by kinnskogr # on the kaggle forums. The fix involves directly assigning # clicks to qu...
{ "repo_name": "charlesjlee/Kaggle", "path": "Yandex_web_search/Code/parse_sessions.py", "copies": "1", "size": "2461", "license": "mit", "hash": 1844813109685428200, "line_mean": 36.303030303, "line_max": 90, "alpha_frac": 0.5205201138, "autogenerated": false, "ratio": 3.366621067031464, "confi...
__author__ = "Mislav Novakovic <mislav.novakovic@sartura.hr>" __copyright__ = "Copyright 2017, Deutsche Telekom AG" __license__ = "BSD 3-Clause" import yang as ly import sys ctx = None try: ctx = ly.Context("/etc/sysrepo/yang") module = ctx.load_module("turing-machine", None) if module is None: p...
{ "repo_name": "PavolVican/libyang", "path": "swig/python/examples/xpath.py", "copies": "1", "size": "1162", "license": "bsd-3-clause", "hash": -2653521428397626000, "line_mean": 31.2777777778, "line_max": 113, "alpha_frac": 0.6101549053, "autogenerated": false, "ratio": 3.1236559139784945, "con...
__author__ = "Mislav Novakovic <mislav.novakovic@sartura.hr>" __copyright__ = "Copyright 2017, Deutsche Telekom AG" __license__ = "BSD 3-Clause" import yang as ly import sys try: ctx = ly.Context("/etc/sysrepo/yang") except Exception as e: print(e) sys.exit() ctx.load_module("iana-if-type", None) ctx.loa...
{ "repo_name": "sartura/libyang", "path": "swig/python/examples/subtype.py", "copies": "1", "size": "1461", "license": "bsd-3-clause", "hash": -7024405435779415000, "line_mean": 30.085106383, "line_max": 125, "alpha_frac": 0.6639288159, "autogenerated": false, "ratio": 2.875984251968504, "config...
__author__ = "Mislav Novakovic <mislav.novakovic@sartura.hr>" __copyright__ = "Copyright 2017, Deutsche Telekom AG" __license__ = "BSD 3-Clause" import yang as ly ctx = None try: ctx = ly.Context("/etc/sysrepo2/yang") except Exception as e: print(e) errors = ly.get_ly_errors(ctx) for err in errors: ...
{ "repo_name": "PavolVican/libyang", "path": "swig/python/examples/context.py", "copies": "2", "size": "1051", "license": "bsd-3-clause", "hash": 9187382899741111000, "line_mean": 25.275, "line_max": 102, "alpha_frac": 0.6251189343, "autogenerated": false, "ratio": 3.0552325581395348, "config_te...
__author__ = 'MISSCATLADY' import datetime from models import * from widgets import SelectTimeWidget from django import forms from django.shortcuts import render from django.http import HttpResponse from django.forms.extras.widgets import SelectDateWidget from django.http import HttpResponse, HttpResponseRedirect from...
{ "repo_name": "CSC301H-Fall2013/JuakStore", "path": "Storefront/juakstore/search.py", "copies": "1", "size": "5425", "license": "mit", "hash": 3081659325441254400, "line_mean": 41.390625, "line_max": 101, "alpha_frac": 0.5616589862, "autogenerated": false, "ratio": 4.179506933744221, "config_te...
__author__ = 'MisturDust319' import requests, re from bs4 import BeautifulSoup import winsound #find the section of the website where the data is coming from def getSection(html): #given a web soup, find the "up" link, which is the current segment link = html.find_all("link", rel="up") #isolate the section...
{ "repo_name": "MisturDust319/TaeKimJapansesVocabExtractor", "path": "taeKimVocab.py", "copies": "1", "size": "4207", "license": "mit", "hash": 3845066365276878300, "line_mean": 34.025, "line_max": 125, "alpha_frac": 0.5660242684, "autogenerated": false, "ratio": 3.5953806672369546, "config_test...
__author__ = 'mitch, eric' import logging import wikipedia import urllib3.contrib.pyopenssl import flickrapi import flickrapi.shorturl import googlemaps import gevent import gevent.monkey from pyteaser import Summarize from settings import FLICKR_API, FLICKR_API_SECRET, GOOGLEMAPS_API from collections import defaultdic...
{ "repo_name": "QuicklyRainbow/FieldGuideAU", "path": "Flask_App/utils/processutils.py", "copies": "1", "size": "3741", "license": "mit", "hash": -5810621186746096000, "line_mean": 36.0396039604, "line_max": 107, "alpha_frac": 0.6148088746, "autogenerated": false, "ratio": 3.5325779036827196, "c...
""" This tool snaps multiple target features to input features based on a user specified SQL criteria and search radius. Import this script into an ArcGIS Toolbox. Note: The tool uses the ArcGIS default scratch geodatabase. """ import arcpy import os import datetime #date string today = datetime.datetime.now().strftim...
{ "repo_name": "mitchh300/CustomTools", "path": "SnapNearFeatures.py", "copies": "1", "size": "2373", "license": "unlicense", "hash": 6673108364971709000, "line_mean": 39.9137931034, "line_max": 134, "alpha_frac": 0.7560050569, "autogenerated": false, "ratio": 3.520771513353116, "config_test": f...
import arcpy #Get feature from user feature = arcpy.GetParameterAsText(0) #Get field from user field = arcpy.GetParameterAsText(1) #Boolean used for check box ischecked = arcpy.GetParameterAsText(2) #Lists field_list = set() shapes = set() #Count for messages count = 0 if str(ischecked) == 'tr...
{ "repo_name": "mitchh300/CustomTools", "path": "Delete_Dups.py", "copies": "1", "size": "1697", "license": "unlicense", "hash": 6167662417564512000, "line_mean": 34.1063829787, "line_max": 125, "alpha_frac": 0.6269888038, "autogenerated": false, "ratio": 3.737885462555066, "config_test": false,...
__author__ = 'mithunbanerjee' #!/usr/bin/env python """ Lab Credential: IP address = 50.76.53.27 pynet-rtr1 (Cisco 881) snmp_port=7961, ssh_port=22 pynet-rtr2 (Cisco 881) snmp_port=8061, ssh_port=8022 pynet-sw1 (Arista vEOS switch) ssh_port=8222, eapi_port=8243 pynet-sw2 (Arista vEOS switch) ssh_port=8322, eapi_port=8...
{ "repo_name": "mith1979/ansible_automation", "path": "week2/SNMP/wk2_ex_4_snmp_basic.py", "copies": "1", "size": "2187", "license": "apache-2.0", "hash": -6822490727130220000, "line_mean": 26.3375, "line_max": 131, "alpha_frac": 0.6977594879, "autogenerated": false, "ratio": 2.4965753424657535, ...
"""@author: mje.""" import cPickle as Pickle import os import socket import mne import networkx as nx import numpy as np import numpy.random as npr from nitime import TimeSeries from nitime.analysis import CoherenceAnalyzer # from mne.stats import fdr_correction # Permutation test. def permutation_test(a, b, num_s...
{ "repo_name": "MadsJensen/Hyp_MEG_MNE_2", "path": "network_analysis.py", "copies": "1", "size": "6555", "license": "bsd-3-clause", "hash": 5275953961366066000, "line_mean": 30.0663507109, "line_max": 79, "alpha_frac": 0.5647597254, "autogenerated": false, "ratio": 3.1944444444444446, "config_te...
__author__ = 'mk' from random import randint from tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.male = Radiobutton(master, text='male', variable=v, value=1) self.male.pack(anchor=W) self.female = Radiobutton(m...
{ "repo_name": "mattzjack/mattzjack.github.io", "path": "latin_name/latin_name_generator.py", "copies": "1", "size": "17307", "license": "unlicense", "hash": -7064301715446458000, "line_mean": 30.2290502793, "line_max": 115, "alpha_frac": 0.7238689548, "autogenerated": false, "ratio": 1.9094218887...
__author__ = 'MKT1' from utils.http import request SEARCHER = ("www.google.com", "www.baidu.com", "www.sogou.com") BAIDU_BASIC = "http://www.baidu.com/#ie=utf-8&wd=" SOGOU_BASIC = "http://www.sogou.com/web?ie=utf-8&query=" GOOGLE_BASIC = "http://www.google.com/search?q=" class Searcher(object): def...
{ "repo_name": "wha000tif/Pencil", "path": "libs/searcher.py", "copies": "1", "size": "1345", "license": "mit", "hash": -652940424149489200, "line_mean": 23.3773584906, "line_max": 64, "alpha_frac": 0.5338289963, "autogenerated": false, "ratio": 3.225419664268585, "config_test": false, "has_no...
__author__ = 'mlaptev' def append_range_to_list_elements(initial_range, initial_set): result_set = set() for s in initial_set: for r in initial_range: set_to_append = set(s) if r not in set_to_append: set_to_append.add(r) list_to_append = list(se...
{ "repo_name": "MikeLaptev/sandbox_python", "path": "stepic/discrete_math/combinations.py", "copies": "1", "size": "1080", "license": "apache-2.0", "hash": -5215110188364000000, "line_mean": 31.7272727273, "line_max": 88, "alpha_frac": 0.5777777778, "autogenerated": false, "ratio": 3.1764705882352...
__author__ = 'mlissner' from requests.models import Request, Response from requests.exceptions import ConnectionError class MockRequest(Request): def __init__(self, url=None): super(Request, self).__init__() self.url = url def get(self): r = Response() try: r._con...
{ "repo_name": "Andr3iC/juriscraper", "path": "tests/__init__.py", "copies": "1", "size": "1077", "license": "bsd-2-clause", "hash": 5552707706735096000, "line_mean": 26.6153846154, "line_max": 68, "alpha_frac": 0.5747446611, "autogenerated": false, "ratio": 4.378048780487805, "config_test": fal...
__author__ = "mlklm" __date__ = "$28 juil. 2015 11:35:31$" __HOST__ = '0.0.0.0' __PORT__ = 1977 from metafile import metafile from myfile import myfile from urllib.parse import urlparse import cgi import codecs import http.server import mimetypes import re class AEFS(http.server.BaseHTTPRequestHandler): d...
{ "repo_name": "mlklm/AEFS", "path": "aefs.py", "copies": "1", "size": "5358", "license": "unlicense", "hash": 8714991127498274000, "line_mean": 33.3461538462, "line_max": 103, "alpha_frac": 0.4918797835, "autogenerated": false, "ratio": 4.009730538922156, "config_test": false, "has_no_keyword...
__author__ = "mlklm" __date__ = "$30 juil. 2015 09:59:26$" __NS__ = "AEFS" import os import random import re from simplecrypt import decrypt from simplecrypt import encrypt import uuid class myfile: def __init__(self): self.base_path = os.path.dirname(__file__) + "/../uploads/" def write_(self,...
{ "repo_name": "mlklm/AEFS", "path": "myfile.py", "copies": "1", "size": "1828", "license": "unlicense", "hash": -4160354256553860600, "line_mean": 25.1285714286, "line_max": 82, "alpha_frac": 0.5333698031, "autogenerated": false, "ratio": 3.5913555992141455, "config_test": false, "has_no_keyw...
__author__ = "mlklm" __date__ = "$30 juil. 2015 13:46:05$" import time import json class metafile : def __init__(self,jsonstr=None): if jsonstr is not None : djson = json.loads(jsonstr) self.burnafterreading = djson['burnafterreading'] self.expiration = djson['expir...
{ "repo_name": "mlklm/AEFS", "path": "metafile.py", "copies": "1", "size": "1502", "license": "unlicense", "hash": -4431815788203680300, "line_mean": 33.1590909091, "line_max": 68, "alpha_frac": 0.5778961385, "autogenerated": false, "ratio": 4.115068493150685, "config_test": false, "has_no_key...
__author__ = 'mll-001' import sys import urllib2 from urllib2 import Request, urlopen, URLError, HTTPError print "helle python" print "hello tonny good study" X = 'Span' def func(): X = 'NI!' print(X) def nested(): print (X) nested() func() print(X) print('#######################...
{ "repo_name": "JohnnyHao/Py-Spider", "path": "HelloPython.py", "copies": "1", "size": "1204", "license": "apache-2.0", "hash": -1536401780954271200, "line_mean": 20.1403508772, "line_max": 79, "alpha_frac": 0.5282392027, "autogenerated": false, "ratio": 3.7625, "config_test": false, "has_no_k...
__author__ = "mmcmahon13" import json from .blocks import get_farthest_ancestor, NEXTBLOCK, NEXT from __ids__ import * from .survey_exceptions import * __surveyGen__ = IdGenerator("s") class Survey: """ Contains the components of a survey: A survey is defined as a list of blocks and a list of branching ...
{ "repo_name": "SurveyMan/SMPy", "path": "surveyman/survey/surveys.py", "copies": "1", "size": "4500", "license": "apache-2.0", "hash": 134390234135526200, "line_mean": 39.5495495495, "line_max": 119, "alpha_frac": 0.6228888889, "autogenerated": false, "ratio": 4.433497536945813, "config_test": ...
__author__ = 'mmeisinger' import json import psycopg2 from psycopg2 import OperationalError, ProgrammingError, DatabaseError, IntegrityError from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from py2neo import neo4j DATABASE = "ion_sterling_ion" RESOURCES = "ion_sterling_resources" ASSOCS = "ion_sterling_r...
{ "repo_name": "ooici/pyon", "path": "prototype/neo4j/ion2neo.py", "copies": "1", "size": "2176", "license": "bsd-2-clause", "hash": -4257405309832139000, "line_mean": 30.5362318841, "line_max": 107, "alpha_frac": 0.5988051471, "autogenerated": false, "ratio": 3.2526158445440956, "config_test": ...
__author__ = 'mmikofski' try: from setuptools import setup except ImportError: from distutils.core import setup from pvmismatch import __version__, __name__, __email__, __url__ import os README = 'README.rst' try: with open(os.path.join(os.path.dirname(__file__), README), 'r') as readme: README = ...
{ "repo_name": "SunPower/PVMismatch", "path": "setup.py", "copies": "1", "size": "1992", "license": "bsd-3-clause", "hash": -5268795507864777000, "line_mean": 27.8695652174, "line_max": 78, "alpha_frac": 0.6019076305, "autogenerated": false, "ratio": 3.4285714285714284, "config_test": false, "...
__author__ = 'mmoisen' from abc import ABCMeta import time try: import RPi.GPIO as io io.setmode(io.BCM) except ImportError: print "run this on the RPi" class Probe(object): BASE_DIR = '/sys/bus/w1/devices/' RETRY_MAX = 5 def __init__(self, probe_type, file_name): if not probe_type i...
{ "repo_name": "mkmoisen/brew", "path": "models.py", "copies": "1", "size": "2736", "license": "mit", "hash": -583612438646223900, "line_mean": 28.4193548387, "line_max": 119, "alpha_frac": 0.5486111111, "autogenerated": false, "ratio": 3.3945409429280398, "config_test": false, "has_no_keyword...
__author__ = 'mmoisen' import peewee from settings import db from fermentation import FermentationHost, FermentationFermentor, FermentationFermwrap, FermentationProbe, \ FermentationTemperature, FermentationSchedule, FermentationFermwrapHistory import os from settings import BREW_PROPERTIES_FILE, hostnames tab...
{ "repo_name": "mkmoisen/brew", "path": "fermentation/init_db.py", "copies": "1", "size": "1723", "license": "mit", "hash": -2964863605421261300, "line_mean": 25.5230769231, "line_max": 108, "alpha_frac": 0.6970400464, "autogenerated": false, "ratio": 3.619747899159664, "config_test": false, "...
__author__ = 'mmoisen' import peewee import json import socket from models import Probe, Heater from settings import BaseModel, get_db, BREW_PROPERTIES_FILE import traceback import sys import logging import logging.handlers LOG_FILENAME = 'brew.log' logger = logging.getLogger('Logger') logger.setLevel(logging.DEB...
{ "repo_name": "mkmoisen/brew", "path": "fermentation/fermentation.py", "copies": "1", "size": "46398", "license": "mit", "hash": 873917690162779600, "line_mean": 39.5940507437, "line_max": 153, "alpha_frac": 0.5581490581, "autogenerated": false, "ratio": 3.7940960013083656, "config_test": false...
__author__ = 'mmoisen' import sys import time import os from models import Probe from datetime import datetime import logging LOG_FILENAME = 'ds18b20.log' logger = logging.getLogger('test_ds18b20') logger.setLevel(logging.DEBUG) handler = logging.FileHandler(LOG_FILENAME) formatter = logging.Formatter('%(asctime)s ...
{ "repo_name": "mkmoisen/brew", "path": "test_ds18b20.py", "copies": "1", "size": "1387", "license": "mit", "hash": 2366301954753899000, "line_mean": 28.5319148936, "line_max": 114, "alpha_frac": 0.6286950252, "autogenerated": false, "ratio": 3.5292620865139948, "config_test": false, "has_no_k...
__author__ = 'mmoisen' import threading import time import json class API(object): updated = False @classmethod def listen(cls): time.sleep(10) cls.updated = True ''' t = threading.Thread(name="api", target=API.listen) i = 0 t.start() while not API.updated: print i, "updated = ", API...
{ "repo_name": "mkmoisen/brew", "path": "fermentation/thread_test.py", "copies": "1", "size": "1158", "license": "mit", "hash": 8667130928718766000, "line_mean": 18, "line_max": 105, "alpha_frac": 0.6355785838, "autogenerated": false, "ratio": 3.181318681318681, "config_test": false, "has_no_k...
__author__ = 'mmoisen' import unittest from fermentation import ScheduleIncrease, Schedule from datetime import datetime, timedelta from fermentation import FermentationHost, FermentationFermentor, FermentationProbe, FermentationFermwrap, \ FermentationTemperature, FermentationSchedule from fermentation import Pro...
{ "repo_name": "mkmoisen/brew", "path": "fermentation/tests.py", "copies": "1", "size": "66812", "license": "mit", "hash": -8557317393833123000, "line_mean": 47.6266375546, "line_max": 177, "alpha_frac": 0.4885200263, "autogenerated": false, "ratio": 3.8952891791044775, "config_test": true, "h...
__author__ = 'mmoisen' from bottle import Bottle, route, run, template, debug, post, request from datetime import datetime, timedelta import os import sys app = Bottle() from fermentation.init_db import drop_and_create_tables, drop_brew_properties @app.route('/hai') def hai(): print "haiii'" @app.route('/a...
{ "repo_name": "mkmoisen/brew", "path": "test_controller.py", "copies": "1", "size": "1457", "license": "mit", "hash": 9146480864474138000, "line_mean": 21.78125, "line_max": 121, "alpha_frac": 0.6719286205, "autogenerated": false, "ratio": 3.2963800904977374, "config_test": false, "has_no_key...
__author__ = 'M' from setuptools import setup import codecs long_description = 'pytest-testlink is a plugin for py.test that reports to testlink' VERSION = '0.3' PYPI_VERSION = '0.3' setup( name='pytest-testlink', description=long_description, long_description=long_description, version=VERSION, u...
{ "repo_name": "manojklm/pytest-testlink", "path": "setup.py", "copies": "1", "size": "1508", "license": "mit", "hash": -1762344656220024800, "line_mean": 33.2727272727, "line_max": 89, "alpha_frac": 0.6193633952, "autogenerated": false, "ratio": 3.916883116883117, "config_test": true, "has_no...
__author__ = 'm' def rewrite_attributes(self, attribute_names, variables, skip_none=True): """ Rewrite variables specified in attributes list to the object :param self: object to rewrite the values to :param attribute_names: list of attributes names acceptable by the object :param variables: dicti...
{ "repo_name": "mrozo/PyNas", "path": "PyNasHelpers.py", "copies": "1", "size": "1583", "license": "bsd-3-clause", "hash": 7593042762231206000, "line_mean": 36.6904761905, "line_max": 80, "alpha_frac": 0.6790903348, "autogenerated": false, "ratio": 4.885802469135802, "config_test": false, "has...
__author__ = 'mnowotka' from random import shuffle as shuf from itertools import product from pypoker.card import Card from pypoker.hand import Hand #------------------------------------------------------------------------------ class Deck(list): def __init__(self, start="2", end="A", from_list=None): ...
{ "repo_name": "mnowotka/pypoker", "path": "pypoker/deck.py", "copies": "1", "size": "1538", "license": "apache-2.0", "hash": -712136447291224000, "line_mean": 29.1568627451, "line_max": 79, "alpha_frac": 0.4720416125, "autogenerated": false, "ratio": 3.76039119804401, "config_test": false, "h...
__author__ = 'mnowotka' import re from random import randint try: from termcolor import colored except ImportError: colored = None #------------------------------------------------------------------------------ class CardException(Exception): pass #------------------------------------------------------...
{ "repo_name": "mnowotka/pypoker", "path": "pypoker/card.py", "copies": "1", "size": "5627", "license": "apache-2.0", "hash": 1022564365257077200, "line_mean": 29.5815217391, "line_max": 80, "alpha_frac": 0.4544162076, "autogenerated": false, "ratio": 3.6586475942782837, "config_test": false, ...
__author__ = 'mnowotka' #------------------------------------------------------------------------------ class PokerEvaluator(object): def sklansky_rank(self, hand): """ Description here: http://en.wikipedia.org/wiki/Texas_hold_%27em_starting_hands """ if len(hand) != 2: ...
{ "repo_name": "mnowotka/pypoker", "path": "pypoker/evaluator.py", "copies": "1", "size": "2148", "license": "apache-2.0", "hash": -3907495699428016000, "line_mean": 27.2631578947, "line_max": 114, "alpha_frac": 0.4180633147, "autogenerated": false, "ratio": 3.5328947368421053, "config_test": fa...
__author__ = 'mnu' import logging from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic import TemplateView, View from google.appengine.api import users from .forms import SourceForm from .models import Source logger = logging.getLogger('django') class...
{ "repo_name": "manuel-alvarez/stateprices", "path": "sources/views.py", "copies": "1", "size": "1927", "license": "mit", "hash": -7001007934416502000, "line_mean": 31.1166666667, "line_max": 89, "alpha_frac": 0.6222106902, "autogenerated": false, "ratio": 4.1530172413793105, "config_test": fals...
__author__ = 'Moch' #!/usr/bin/env python # coding: utf-8 # import os # # for (k, v) in os.environ.items(): # # print "%s=%s" % (k, v) # # print("%s = %s" % (k, v)) # print ",".join(k) # # import sys # # print "\n".join(sys.modules.keys()) # import os # import urllib2 # request = urllib2.Request('http...
{ "repo_name": "snownothing/Python", "path": "DiveIntoPython2/DiveIntoPython2.py", "copies": "1", "size": "2021", "license": "mit", "hash": -8813268272920265000, "line_mean": 21.1208791209, "line_max": 73, "alpha_frac": 0.5534028813, "autogenerated": false, "ratio": 2.8512747875354107, "config_t...
"""Author model for Zinnia""" from django.apps import apps from django.conf import settings from django.db import models from django.urls import reverse from zinnia.managers import EntryRelatedPublishedManager from zinnia.managers import entries_published def safe_get_user_model(): """ Safe loading of the Us...
{ "repo_name": "Fantomas42/django-blog-zinnia", "path": "zinnia/models/author.py", "copies": "1", "size": "1677", "license": "bsd-3-clause", "hash": 6643440783679945000, "line_mean": 25.619047619, "line_max": 78, "alpha_frac": 0.6231365534, "autogenerated": false, "ratio": 4.289002557544757, "co...
__author__ = 'Modified by :aqeel' # Copyright 2010-2014 Google # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
{ "repo_name": "aqeel13932/DM", "path": "HW12/ShortestPathFinder.py", "copies": "1", "size": "4960", "license": "mit", "hash": -4955127769302747000, "line_mean": 45.3551401869, "line_max": 91, "alpha_frac": 0.6286290323, "autogenerated": false, "ratio": 4.3777581641659316, "config_test": false, ...
__author__ = 'Module Author' def func_a(): pass def func_b(arg1): pass def func_c(arg1, arg2) -> None: pass def func_d(arg1, arg2, arg3) -> int: pass def func_e(arg1, arg2, arg3, arg4) -> str: pass def func_f(arg1, arg2: int, arg3, arg4, arg5: int=123) -> bytes: pass def func_g(arg1, arg...
{ "repo_name": "prusnak/micropython-extmod-generator", "path": "example/example.py", "copies": "1", "size": "1073", "license": "mit", "hash": -1427547865900667400, "line_mean": 16.3064516129, "line_max": 74, "alpha_frac": 0.5507921715, "autogenerated": false, "ratio": 2.642857142857143, "config_...
__author__ = 'Mogeng' from tripManager import calDistance import numpy as np class Dtw(object): def __init__(self, seq1, seq2, distance_func=None): ''' seq1, seq2 are two lists, distance_func is a function for calculating the local distance between two elements. ''' ...
{ "repo_name": "sdsingh/e-mission-server", "path": "CFC_WebApp/main/DTW.py", "copies": "1", "size": "7758", "license": "bsd-3-clause", "hash": 4781045221101060000, "line_mean": 32.0127659574, "line_max": 83, "alpha_frac": 0.4930394432, "autogenerated": false, "ratio": 3.14471017430077, "config_t...
__author__ = 'Mogeng' # Standard imports import numpy as np # Our imports import emission.core.common as ec class Dtw(object): def __init__(self, seq1, seq2, distance_func=None): ''' seq1, seq2 are two lists, distance_func is a function for calculating the local distance between tw...
{ "repo_name": "joshzarrabi/e-mission-server", "path": "emission/analysis/modelling/tour_model/trajectory_matching/DTW.py", "copies": "2", "size": "7819", "license": "bsd-3-clause", "hash": 3831408109945158000, "line_mean": 31.8529411765, "line_max": 83, "alpha_frac": 0.4939250544, "autogenerated": ...
__author__ = 'mogui <mogui83@gmail.com>' # # Driver Constants # NAME = "OrientDB Python binary client (pyorient)" VERSION = "1.4.2a" SUPPORTED_PROTOCOL = 29 # # Binary Types # # Types Constants BOOLEAN = 1 # Single byte: 1 = true, 0 = false BYTE = 2 SHORT = 3 INT = 4 LONG = 5 BYTES = 6 # Used for bina...
{ "repo_name": "optimuspaul/pyorient", "path": "pyorient/constants.py", "copies": "2", "size": "4564", "license": "apache-2.0", "hash": -6822433584190255000, "line_mean": 28.2564102564, "line_max": 81, "alpha_frac": 0.6069237511, "autogenerated": false, "ratio": 3.096336499321574, "config_test":...
__author__ = 'mogui <mogui83@gmail.com>' # # Driver Constants # NAME = "OrientDB Python binary client (pyorient)" VERSION = "1.4.3" SUPPORTED_PROTOCOL = 30 # # Binary Types # # Types Constants BOOLEAN = 1 # Single byte: 1 = true, 0 = false BYTE = 2 SHORT = 3 INT = 4 LONG = 5 BYTES = 6 # Used for binar...
{ "repo_name": "ziyangzeng/pyorient", "path": "pyorient/constants.py", "copies": "1", "size": "4563", "license": "apache-2.0", "hash": 4936013817814717000, "line_mean": 28.25, "line_max": 81, "alpha_frac": 0.6068376068, "autogenerated": false, "ratio": 3.0977596741344198, "config_test": false, ...
__author__ = 'mogui <mogui83@gmail.com>' # # Driver Constants # NAME = "OrientDB Python binary client (pyorient)" VERSION = "1.4.6" SUPPORTED_PROTOCOL = 32 # # Binary Types # # Types Constants BOOLEAN = 1 # Single byte: 1 = true, 0 = false BYTE = 2 SHORT = 3 INT = 4 LONG = 5 BYTES = 6 # Used for binar...
{ "repo_name": "lebedov/pyorient", "path": "pyorient/constants.py", "copies": "1", "size": "4440", "license": "apache-2.0", "hash": -1906828345304425200, "line_mean": 27.6451612903, "line_max": 81, "alpha_frac": 0.6018018018, "autogenerated": false, "ratio": 3.0897703549060545, "config_test": fa...
__author__ = 'mogui <mogui83@gmail.com>' # # Driver Constants # NAME = "OrientDB Python binary client (pyorient)" VERSION = "1.5.3b" SUPPORTED_PROTOCOL = 36 # # Binary Types # # Types Constants BOOLEAN = 1 # Single byte: 1 = true, 0 = false BYTE = 2 SHORT = 3 INT = 4 LONG = 5 BYTES = 6 # Used for bina...
{ "repo_name": "Ostico/pyorient", "path": "pyorient/constants.py", "copies": "1", "size": "4441", "license": "apache-2.0", "hash": 3936720325726169000, "line_mean": 27.6516129032, "line_max": 81, "alpha_frac": 0.6018914659, "autogenerated": false, "ratio": 3.088317107093185, "config_test": false...
__author__ = 'mogui <mogui83@gmail.com>' # # Driver Constants # NAME = "OrientDB Python binary client (pyorient)" VERSION = "1.5.5" SUPPORTED_PROTOCOL = 36 # # Binary Types # # Types Constants BOOLEAN = 1 # Single byte: 1 = true, 0 = false BYTE = 2 SHORT = 3 INT = 4 LONG = 5 BYTES = 6 # Used for binar...
{ "repo_name": "mogui/pyorient", "path": "pyorient/constants.py", "copies": "2", "size": "4440", "license": "apache-2.0", "hash": -5590646958252619000, "line_mean": 27.6451612903, "line_max": 81, "alpha_frac": 0.6018018018, "autogenerated": false, "ratio": 3.0897703549060545, "config_test": fals...
__author__ = 'mohammad' import random import string import collections import datetime import itertools import numpy import datetime import sys import math sys.path.append('../OpenStreetMap') sys.path.append('../LookAhead') from datetime import timedelta from pymongo import MongoClient from bson.objectid import Object...
{ "repo_name": "rosenjens/monad", "path": "DynamicRoute/dynamicRoutes.py", "copies": "1", "size": "10642", "license": "apache-2.0", "hash": -5917443822539026000, "line_mean": 44.6738197425, "line_max": 188, "alpha_frac": 0.4492576583, "autogenerated": false, "ratio": 4.561508786969567, "config_t...
__author__ = 'Mohammad' import numpy as np import tensorflow as tf from tensorflow.contrib import learn, rnn from data_loader import get_related_answers # Parameters embedding_dim = 300 word2vec_file = 'data/GoogleNews-vectors-negative300.bin' learning_rate = 0.001 training_iters = 5000 batch_size = 128 display_step ...
{ "repo_name": "MohammadChavosh/VQA", "path": "relate_to_question.py", "copies": "1", "size": "8048", "license": "apache-2.0", "hash": 2560217180115316700, "line_mean": 43.7111111111, "line_max": 144, "alpha_frac": 0.6180417495, "autogenerated": false, "ratio": 3.683295194508009, "config_test": ...
__author__ = 'Mohammad' import os import numpy as np import tensorflow as tf from tensorflow.contrib import learn, rnn from data_loader import get_related_answers, get_vqa_data, load_image # Parameters embedding_dim = 300 word2vec_file = 'data/GoogleNews-vectors-negative300.bin' learning_rate = 0.001 batch_size = 8 d...
{ "repo_name": "MohammadChavosh/VQA", "path": "train_without_finetune.py", "copies": "1", "size": "12076", "license": "apache-2.0", "hash": -677985856641459100, "line_mean": 48.9008264463, "line_max": 218, "alpha_frac": 0.6435905929, "autogenerated": false, "ratio": 3.3656633221850614, "config_t...
__author__ = 'Mohammad' import random import json import skimage.io import skimage.transform import skimage.color def load_image(path, size=224): img = skimage.io.imread(path) if len(img.shape) == 2: img = skimage.color.gray2rgb(img) short_edge = min(img.shape[:2]) yy = int((img.shape[0] - short_edge) / 2) xx...
{ "repo_name": "MohammadChavosh/VQA", "path": "data_loader.py", "copies": "1", "size": "2474", "license": "apache-2.0", "hash": -8906363723146622000, "line_mean": 37.65625, "line_max": 92, "alpha_frac": 0.7158447858, "autogenerated": false, "ratio": 2.9915356711003627, "config_test": false, "h...
__author__ = 'Mohammad' import tensorflow as tf from train import load_related_train_data, load_data, batch_size, get_batch_for_test, display_step def run(): questions_vocab_processor, answers_vocab_processor, max_question_length = load_related_train_data() questions, answers, images_paths = load_data(questi...
{ "repo_name": "MohammadChavosh/VQA", "path": "loader.py", "copies": "1", "size": "3139", "license": "apache-2.0", "hash": 7781891764321538000, "line_mean": 45.8507462687, "line_max": 167, "alpha_frac": 0.6052883084, "autogenerated": false, "ratio": 3.7458233890214796, "config_test": false, "h...
__author__ = 'Mohammadreza Ghanavati' __email__ = "mohammadreza.ghanavati@informatik.uni-heidelberg.de" from unidiff import parse_unidiff, LINE_TYPE_ADD, LINE_TYPE_DELETE def findSeed(failingSeed, diffFilePath): """ Finds seed statement for the passing version from diff file and the seed statement of the fa...
{ "repo_name": "heiqs/crashfinder-plugin", "path": "resources/diff.py", "copies": "1", "size": "2345", "license": "mit", "hash": -5541529045682273000, "line_mean": 40.875, "line_max": 109, "alpha_frac": 0.6191897655, "autogenerated": false, "ratio": 4.217625899280575, "config_test": false, "ha...
__author__ = "Mohit Sharma" __credits__= "Charlie Mydlarz, Justin Salamon, Mohit Sharma" __version__ = "0.1" __status__ = "Development" import dbus import dbus.service import sys from wicd import misc from wicd.translations import _ from blessings import Terminal from tabulate import tabulate class Wifi(object): ...
{ "repo_name": "Mohitsharma44/pywifi", "path": "wifi.py", "copies": "1", "size": "10423", "license": "mit", "hash": 1903592347785468000, "line_mean": 40.0354330709, "line_max": 96, "alpha_frac": 0.4723208289, "autogenerated": false, "ratio": 4.483010752688172, "config_test": false, "has_no_key...
__author__ = 'mohnish' from matplotlib.pyplot import * from numpy import * unit_step = lambda x: -1 if x < 0 else 1 converter = lambda x: '*' if x == 1 else 'o' training_data = genfromtxt(open("data\demoTrain.csv","r"),delimiter=",", dtype="f8")[:] expected_outcomes = genfromtxt(open("data\demoTarget.csv","r"),del...
{ "repo_name": "navinpai/CS706", "path": "ScikitTry.py", "copies": "1", "size": "1324", "license": "mit", "hash": 7948750605269268000, "line_mean": 27.8043478261, "line_max": 92, "alpha_frac": 0.6276435045, "autogenerated": false, "ratio": 3.3350125944584383, "config_test": false, "has_no_keyw...
__author__ = 'mohnish' from numpy import * from matplotlib.pyplot import * color_map = {1: "ro", 2: "bo", 3: "go"} unit_step = lambda x: 0 if x < 0 else 1 data = genfromtxt(open("multiclassdata.csv","r"),delimiter=",", dtype="f8")[:] def max_value_plus_index(l): max_value = max(l) max_value_index = l.index(m...
{ "repo_name": "navinpai/CS706", "path": "MLPerceptron.py", "copies": "1", "size": "2016", "license": "mit", "hash": -8583532109392437000, "line_mean": 25.5394736842, "line_max": 81, "alpha_frac": 0.5902777778, "autogenerated": false, "ratio": 2.510585305105853, "config_test": false, "has_no_k...
__author__ = 'mohnish' from numpy import * from matplotlib.pyplot import * color_map = {1: "ro", 2: "bo", 3: "go"} unit_step = lambda x: 0 if x < 0 else 1 data = genfromtxt(open("multiclassdatatest.csv","r"),delimiter=",", dtype="f8")[:] def max_value_plus_index(l): max_value = max(l) max_value_index = l.ind...
{ "repo_name": "navinpai/CS706", "path": "MLPerceptronTest.py", "copies": "1", "size": "1067", "license": "mit", "hash": 6579150154809051000, "line_mean": 27.8648648649, "line_max": 82, "alpha_frac": 0.671977507, "autogenerated": false, "ratio": 2.7714285714285714, "config_test": false, "has_n...
__author__ = 'MOITIE Roderic' from Tools import Vertex, PrioQueue class Graph(object): """ Graphe represente par une liste de sommets """ def __init__(self): self._vertices = [] def add_vertex(self, v): self._vertices.append(v) def read(self, file_name): """ ...
{ "repo_name": "adrien-bellaiche/Repartition_Unpreferred", "path": "ford_fulkerson.py", "copies": "1", "size": "3903", "license": "mit", "hash": -6108946845126017000, "line_mean": 29.7401574803, "line_max": 107, "alpha_frac": 0.5070458622, "autogenerated": false, "ratio": 3.544959128065395, "con...
__author__ = 'MOITIE Roderic' class Vertex(object): """ Classe representant les sommets """ """ Variables de classe pour les couleurs de marquage """ WHITE = 0 GREY = 1 BLACK = 2 def __init__(self, label, distance=0): """ Constructeur """ self.l...
{ "repo_name": "adrien-bellaiche/Repartition_Unpreferred", "path": "Tools.py", "copies": "1", "size": "2920", "license": "mit", "hash": 4317486884750483000, "line_mean": 22.36, "line_max": 109, "alpha_frac": 0.4993150685, "autogenerated": false, "ratio": 3.403263403263403, "config_test": false, ...
__author__ = 'mojosaurus' import sys from com.demimojo.netflix.loader import Constants from sklearn.preprocessing import normalize import csv from com import logger import glob from scipy.sparse import lil_matrix import numpy as np class PreProcess(): def __init__(self): logger.info("Starting pre-procesi...
{ "repo_name": "mojosaurus/netflix-project", "path": "com/demimojo/netflix/matrix/preprocessing.py", "copies": "1", "size": "4272", "license": "apache-2.0", "hash": -7862415544619996000, "line_mean": 36.1565217391, "line_max": 129, "alpha_frac": 0.5922284644, "autogenerated": false, "ratio": 3.880...
"""This module exports the Rstylelint plugin class.""" import re import sublime import os from os.path import basename from SublimeLinter.lint import Linter, util def _make_text_safeish(text, method='decode'): # The unicode decode here is because sublime converts to unicode inside # insert in such...
{ "repo_name": "mom1/SublimeLinter-contrib-rstylelint", "path": "linter.py", "copies": "1", "size": "3479", "license": "mit", "hash": 3016880412385242600, "line_mean": 37.8, "line_max": 113, "alpha_frac": 0.6213420041, "autogenerated": false, "ratio": 3.434517766497462, "config_test": false, "...
__author__ = 'mongolrgata' import binascii import json import os import re import sys import tempfile import byteshift import dearcer import parcker def import_json(json_filename): """ :param json_filename: :type json_filename: str :return: """ with open(json_filename, 'rt', encoding='utf-8...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".ws2-tools/w2jImport/w2jImport.py", "copies": "1", "size": "1929", "license": "mit", "hash": 5536807300425556000, "line_mean": 25.4246575342, "line_max": 98, "alpha_frac": 0.5370658372, "autogenerated": false, "ratio": 3.314432989690722, "...
__author__ = 'mongolrgata' import binascii import json import re import sys import os def merge(a, b, path=None): if path is None: path = [] for key in b: if key in a: if isinstance(a[key], dict) and isinstance(b[key], dict): merge(a[key], b[key], path + [str(key)]) ...
{ "repo_name": "mongolrgata/mongolrgata-junkbox", "path": "w2jMerge/w2jMerge.py", "copies": "1", "size": "1316", "license": "mit", "hash": 1051668676828359800, "line_mean": 24.8039215686, "line_max": 118, "alpha_frac": 0.5098784195, "autogenerated": false, "ratio": 3.0892018779342725, "config_te...
__author__ = 'mongolrgata' import binascii import json import re import sys def rotr8(int8, shift): """ :param int8: :type int8: int :param shift: :type shift: int :return: :rtype: int """ return (int8 >> shift) | (int8 << (8 - shift) & 0xff) def shift_decode(string): """ ...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".ws2-tools/ws2json/ws2json.py", "copies": "1", "size": "2128", "license": "mit", "hash": 2454531605858635300, "line_mean": 21.8817204301, "line_max": 89, "alpha_frac": 0.4962406015, "autogenerated": false, "ratio": 3.325, "config_test": fa...
__author__ = 'mongolrgata' import json import os import sys def dict_merge(dict1, dict2): """ :param dict1: :type dict1: dict :param dict2: :type dict2: dict :return: """ for key in dict2: if key in dict1: if isinstance(dict1[key], dict) and isinstance(dict2[key],...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".ws2-tools/w2jMerge/w2jMerge.py", "copies": "1", "size": "1295", "license": "mit", "hash": -6164711685605547000, "line_mean": 20.9491525424, "line_max": 97, "alpha_frac": 0.5698841699, "autogenerated": false, "ratio": 3.5, "config_test": f...
__author__ = 'mongolrgata' import os import struct import sys def read_unsigned_int32(file): """ :param file: :type file: io.FileIO :return: :rtype: int """ return struct.unpack('<L', file.read(4))[0] def extract_png(pna_filename): """ :param pna_filename: :type pna_filenam...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".pna-tools/ePNA/ePNA.py", "copies": "1", "size": "1267", "license": "mit", "hash": -6549846147279906000, "line_mean": 21.625, "line_max": 108, "alpha_frac": 0.5588003157, "autogenerated": false, "ratio": 3.175438596491228, "config_test": f...
__author__ = 'mongolrgata' import os import struct import sys NUL_CHAR16 = chr(0).encode('utf-16le') def read_unsigned_int32(file): """ :param file: :type file: io.FileIO :return: :rtype: int """ return struct.unpack('<L', file.read(4))[0] def read_filename(file): """ :param f...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".arc-tools/dearcer/dearcer.py", "copies": "1", "size": "1877", "license": "mit", "hash": -1538531850915452400, "line_mean": 19.1827956989, "line_max": 86, "alpha_frac": 0.5652637187, "autogenerated": false, "ratio": 3.3045774647887325, "co...
__author__ = 'mongolrgata' import os import struct import sys NUL_CHAR16 = chr(0).encode('utf-16le') def write_unsigned_int32(file, value): """ :param file: :type file: io.FileIO :param value: :type value: int :return: :rtype: int """ return file.write(struct.pack('<L', value)) ...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".arc-tools/parcker/parcker.py", "copies": "1", "size": "2333", "license": "mit", "hash": 171659694679910140, "line_mean": 22.33, "line_max": 114, "alpha_frac": 0.5953707673, "autogenerated": false, "ratio": 3.3139204545454546, "config_test...
__author__ = 'mongolrgata' import os import sys import tempfile import dearcer import parcker bad_prefixes = [ 'A小鳥', 'Bあげは', 'C天音', 'D亜紗', 'E夜瑠', 'Fひばり', 'Gほたる', 'H朱莉', 'I佳奈子', 'J達也', 'K柾次', 'L鯨', 'M碧', 'Nイスカ', 'O早苗', 'P亮子', 'Q由佳', 'Rハット', ...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": "localeFixer/localeFixer.py", "copies": "1", "size": "3039", "license": "mit", "hash": -4694707255742714000, "line_mean": 22.64, "line_max": 120, "alpha_frac": 0.4707275804, "autogenerated": false, "ratio": 3.456140350877193, "config_test":...
__author__ = 'mongolrgata' import sys def rotr8(int8, shift_size): """ :param int8: :type int8: int :param shift_size: :type shift_size: int :return: :rtype: int """ return (int8 >> shift_size) | (int8 << (8 - shift_size) & 0xff) def shift_decode(string): """ :param str...
{ "repo_name": "mongolrgata/cool-beauty-tools", "path": ".ws2-tools/byteshift/byteshift.py", "copies": "1", "size": "1311", "license": "mit", "hash": -8666138742060044000, "line_mean": 16.9589041096, "line_max": 67, "alpha_frac": 0.5514874142, "autogenerated": false, "ratio": 3.1743341404358354, ...
__author__ = 'monk-ee' """This module provides an interface to the billing report in the amazon S3 billing bucket. """ import os import boto import zipfile from boto.s3.connection import S3Connection from datetime import datetime from boto.s3.key import Key from flask import flash from barnacles import app class Fe...
{ "repo_name": "monk-ee/barnacles", "path": "barnacles/modules/fetch.py", "copies": "1", "size": "2464", "license": "apache-2.0", "hash": -149741412495304740, "line_mean": 37.5, "line_max": 167, "alpha_frac": 0.6176948052, "autogenerated": false, "ratio": 3.955056179775281, "config_test": true, ...
__author__ = "Monte Goode" __author__ = "Karan Vahi" import time from sqlalchemy import exc from Pegasus.db.base_loader import BaseLoader from Pegasus.db.schema import * class DashboardLoader(BaseLoader): MAX_RETRIES = 10 # maximum number of retries in case of operational errors that arise because of databas...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-python/src/Pegasus/db/dashboard_loader.py", "copies": "1", "size": "13908", "license": "apache-2.0", "hash": -3473493743086703000, "line_mean": 32.9219512195, "line_max": 136, "alpha_frac": 0.533649698, "autogenerated": false, "ratio"...
__author__ = "Monte Goode" __author__ = "Karan Vahi" import time from sqlalchemy import exc, orm from Pegasus.db.base_loader import BaseLoader from Pegasus.db.schema import * from Pegasus.netlogger import util class WorkflowLoader(BaseLoader): """Load into the Stampede SQL schema through SQLAlchemy. Param...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-python/src/Pegasus/db/workflow_loader.py", "copies": "1", "size": "45010", "license": "apache-2.0", "hash": 1065218631475402000, "line_mean": 34.7931583134, "line_max": 136, "alpha_frac": 0.5353840683, "autogenerated": false, "ratio":...
__author__ = "Monte Goode" import logging import time from sqlalchemy import orm from Pegasus.db import connection from Pegasus.db.schema import * log = logging.getLogger(__name__) """ Module to expunge a workflow and the associated data from a stampede schema database in the case of running with the replay option...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-python/src/Pegasus/db/expunge.py", "copies": "1", "size": "3760", "license": "apache-2.0", "hash": -4865273342474853000, "line_mean": 30.3333333333, "line_max": 87, "alpha_frac": 0.6417553191, "autogenerated": false, "ratio": 3.664717...
__author__ = 'moonkey' from keras import models, layers import logging import numpy as np # from src.data_util.synth_prepare import SynthGen import keras.backend as K import tensorflow as tf def squeeze_dim(x, axis=-1): return K.squeeze(x, axis=axis) def squeeze_dim_shape(input_shape, axis=-1): if axis == ...
{ "repo_name": "dashayushman/air-script", "path": "src/model/cnn.py", "copies": "1", "size": "4374", "license": "mit", "hash": 6412278035037202000, "line_mean": 32.9069767442, "line_max": 79, "alpha_frac": 0.5105166895, "autogenerated": false, "ratio": 3.8537444933920706, "config_test": false, ...
__author__ = 'moonkey' #from keras import models, layers import logging import numpy as np # from src.data_util.synth_prepare import SynthGen #import keras.backend as K import tensorflow as tf def var_random(name, shape, regularizable=False): ''' Initialize a random variable using xavier initialization. ...
{ "repo_name": "da03/Attention-OCR", "path": "src/model/cnn.py", "copies": "1", "size": "5033", "license": "mit", "hash": 6154679094570008000, "line_mean": 29.6890243902, "line_max": 106, "alpha_frac": 0.6181204053, "autogenerated": false, "ratio": 3.1915028535193404, "config_test": false, "ha...
__author__ = 'moonkey' import logging import numpy as np # from src.data_util.synth_prepare import SynthGen import tensorflow as tf def var_random(name, shape, regularizable=False): ''' Initialize a random variable using xavier initialization. Add regularization if regularizable=True :param name: ...
{ "repo_name": "jvpoulos/Attention-OCR", "path": "src/model/cnn.py", "copies": "1", "size": "5032", "license": "mit", "hash": 5114765222818953000, "line_mean": 30.0617283951, "line_max": 106, "alpha_frac": 0.6158585056, "autogenerated": false, "ratio": 3.17877447883765, "config_test": false, "...
__author__ = 'moonkey' import os import numpy as np from PIL import Image from collections import Counter import cPickle import random from bucketdata import BucketData class DataGen(object): GO = 1 EOS = 2 def __init__(self, data_root, annotation_fn, evaluate = False, ...
{ "repo_name": "dashayushman/air-script", "path": "src/data_util/data_gen_original.py", "copies": "1", "size": "5333", "license": "mit", "hash": 4018030062194023400, "line_mean": 36.0347222222, "line_max": 108, "alpha_frac": 0.4740296269, "autogenerated": false, "ratio": 3.7137883008356547, "con...
__author__ = 'moonkey' import os import numpy as np from PIL import Image from collections import Counter import pickle as cPickle import random, math from data_util.bucketdata import BucketData class DataGen(object): GO = 1 EOS = 2 def __init__(self, data_root, annotation_fn, eva...
{ "repo_name": "jvpoulos/Attention-OCR", "path": "src/data_util/data_gen.py", "copies": "1", "size": "7051", "license": "mit", "hash": 2884980561224070700, "line_mean": 36.9032258065, "line_max": 111, "alpha_frac": 0.4724074337, "autogenerated": false, "ratio": 3.4965277777777777, "config_test":...
__author__ = 'moonkey' import os import numpy as np from PIL import Image from collections import Counter import pickle as cPickle import random, math from data_util.bucketdata import BucketData class DataGen(object): GO = 1 EOS = 2 def __init__(self, data_root, annotation_fn, ...
{ "repo_name": "da03/Attention-OCR", "path": "src/data_util/data_gen.py", "copies": "1", "size": "5682", "license": "mit", "hash": 7739982919184089000, "line_mean": 37.3918918919, "line_max": 126, "alpha_frac": 0.4868004224, "autogenerated": false, "ratio": 3.63531669865643, "config_test": true,...
__author__ = 'moonkey' import os import numpy as np from PIL import Image from collections import Counter import pickle as cPickle import random import math class BucketData(object): def __init__(self): self.max_width = 0 self.max_label_len = 0 self.data_list = [] self.data_len_lis...
{ "repo_name": "jvpoulos/Attention-OCR", "path": "src/data_util/bucketdata.py", "copies": "1", "size": "4604", "license": "mit", "hash": 294744919712322700, "line_mean": 38.6982758621, "line_max": 87, "alpha_frac": 0.545178106, "autogenerated": false, "ratio": 3.4905231235784684, "config_test": ...
__author__ = 'moonkey' import os import numpy as np from PIL import Image # from keras.preprocessing.sequence import pad_sequences from collections import Counter import pickle as cPickle import random import math class BucketData(object): def __init__(self): self.max_width = 0 self.max_label_len ...
{ "repo_name": "da03/Attention-OCR", "path": "src/data_util/bucketdata.py", "copies": "1", "size": "4662", "license": "mit", "hash": -4039684739158413300, "line_mean": 38.8461538462, "line_max": 87, "alpha_frac": 0.5486915487, "autogenerated": false, "ratio": 3.5, "config_test": false, "has_no...
__author__ = 'moonkey' import sys, argparse, logging import numpy as np from PIL import Image import tensorflow as tf tf.logging.set_verbosity(tf.logging.ERROR) sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) import keras.backend as K K.set_session(sess) from model.model import Model import exp...
{ "repo_name": "dashayushman/air-script", "path": "src/launcher.py", "copies": "1", "size": "7758", "license": "mit", "hash": -8508304938098553000, "line_mean": 48.7307692308, "line_max": 80, "alpha_frac": 0.5449858211, "autogenerated": false, "ratio": 4.348654708520179, "config_test": true, "...
__author__ = 'moonkey' import sys, argparse, logging import numpy as np from PIL import Image import tensorflow as tf tf.logging.set_verbosity(tf.logging.ERROR) from model.model import Model import exp_config def process_args(args, defaults): parser = argparse.ArgumentParser() parser.add_argument('--gpu-i...
{ "repo_name": "jvpoulos/Attention-OCR", "path": "src/launcher.py", "copies": "1", "size": "8908", "license": "mit", "hash": 7677901486465389000, "line_mean": 52.6686746988, "line_max": 100, "alpha_frac": 0.5405253705, "autogenerated": false, "ratio": 4.420843672456575, "config_test": true, "h...
__author__ = 'morita' import pandas as pd import numpy as np from matplotlib import pyplot as plt from collections import Counter, defaultdict import seaborn as sns from nltk import word_tokenize from nltk.stem import WordNetLemmatizer from nltk.stem.porter import * from wordcloud import WordCloud from sklearn.naive_...
{ "repo_name": "bluegrapes/DAT8Coursework", "path": "project2/code/rf.py", "copies": "1", "size": "4529", "license": "apache-2.0", "hash": -3712705877107039000, "line_mean": 29.6013513514, "line_max": 124, "alpha_frac": 0.6517995142, "autogenerated": false, "ratio": 3.4155354449472095, "config_t...
__author__ = 'mori.yuichiro' from Crypto.Cipher import AES from Crypto import Random import StringIO import binascii class Encryptor(): """ PKCS7 compatible encryption / decryption """ def __init__(self, encryption_key, initial_vector): self.encryption_key = encryption_key self...
{ "repo_name": "ymorired/s4backup", "path": "crypt.py", "copies": "1", "size": "3250", "license": "mit", "hash": -425828046279591230, "line_mean": 34.3260869565, "line_max": 123, "alpha_frac": 0.5898461538, "autogenerated": false, "ratio": 3.6931818181818183, "config_test": false, "has_no_keyw...
__author__ = 'mori.yuichiro' import os import errno import hashlib def mkdir_p(path): try: os.makedirs(path) except OSError as exc: # Python >2.5 if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def calc_md5_from_filename(file_path, blo...
{ "repo_name": "ymorired/s4backup", "path": "util.py", "copies": "1", "size": "1499", "license": "mit", "hash": -485417270203695600, "line_mean": 21.0441176471, "line_max": 61, "alpha_frac": 0.5857238159, "autogenerated": false, "ratio": 3.059183673469388, "config_test": false, "has_no_keyword...
__author__ = 'mori.yuichiro' import unittest import os import subprocess import filecmp import binascii from crypt import Encryptor BASE_TESTFILE_DIR = os.path.join(os.getcwd(), 'test') class EncryptorTest(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_e...
{ "repo_name": "ymorired/s4backup", "path": "test/crypt_test.py", "copies": "1", "size": "4811", "license": "mit", "hash": 1151850725096301700, "line_mean": 31.5067567568, "line_max": 113, "alpha_frac": 0.5487424652, "autogenerated": false, "ratio": 2.7570200573065904, "config_test": true, "ha...
__author__ = 'Morten' from PIL import Image from PIL import ExifTags import PIL import os, shutil, hashlib, time #Folder to start search from: root_folder = "/Users/Morten/" #Folder to place Photos folder: dest_folder = "/Users/Morten/Desktop/" #Picture minimum size: min_width = 500 min_height = 500 #Prepare hash list...
{ "repo_name": "MTelling/ImageSorter", "path": "main.py", "copies": "1", "size": "5133", "license": "mit", "hash": 7444759425495576000, "line_mean": 25.7395833333, "line_max": 96, "alpha_frac": 0.5735437366, "autogenerated": false, "ratio": 3.765957446808511, "config_test": false, "has_no_keyw...
__author__ = 'moshebasanchig' from base_classes import Base import pandas as pd class Transformers(Base): def __init__(self): self._execution_plan = None def combine(self, stream1, stream2, left_on=None, right_on=None, how='inner', suffixes=('_x', '_y')): """ takes two input streams ...
{ "repo_name": "Convertro/Hydro", "path": "src/hydro/transformers.py", "copies": "1", "size": "1552", "license": "mit", "hash": 4423127675036154400, "line_mean": 33.4888888889, "line_max": 109, "alpha_frac": 0.6095360825, "autogenerated": false, "ratio": 4.1386666666666665, "config_test": false,...
__author__ = 'moshebasanchig' from hydro.base_classes import PlanObject from hydro.base_classes import OptimizerBase class GeoQueriesOptimizer(OptimizerBase): def get_plan(self, source_id, params, conf): """ a plan is a simple tuple """ plans = { 'geo_widget': {'plan':...
{ "repo_name": "Convertro/Hydro", "path": "src/sample/geo_queries/optimizer.py", "copies": "1", "size": "1030", "license": "mit", "hash": -272291020079069980, "line_mean": 32.2580645161, "line_max": 64, "alpha_frac": 0.5796116505, "autogenerated": false, "ratio": 3.772893772893773, "config_test"...
__author__ = 'moshebasanchig' from hydro.connectors.base_classes import DBBaseConnector, DSN, CONNECTION_STRING import pyodbc from hydro.exceptions import HydroException class VerticaConnector(DBBaseConnector): """ implementation of Vertica connector, base function that need to be implemented are _connect, _...
{ "repo_name": "Convertro/Hydro", "path": "src/hydro/connectors/vertica.py", "copies": "1", "size": "1286", "license": "mit", "hash": -3609402788754154000, "line_mean": 38, "line_max": 116, "alpha_frac": 0.6391912908, "autogenerated": false, "ratio": 3.9207317073170733, "config_test": false, "...
__author__ = 'moshebasanchig' from importlib import import_module from base_classes import Base, HydroCommandTemplate from hydro.common.utils import create_cache_key from copy import deepcopy class QueryEngine(Base): def __init__(self, modules_dir, connection_handler, cache_engine, execution_plan, logger): ...
{ "repo_name": "Convertro/Hydro", "path": "src/hydro/query_engine.py", "copies": "1", "size": "4408", "license": "mit", "hash": 2774901463674206700, "line_mean": 39.4403669725, "line_max": 123, "alpha_frac": 0.6379310345, "autogenerated": false, "ratio": 4.0664206642066425, "config_test": false,...
__author__ = 'moshebasanchig' from importlib import import_module from base_classes import Base from connectors.base_classes import ConnectorBase from hydro.exceptions import HydroException DSN = 'dsn' class ConnectionPool(Base): CONN_POOL_SIZE = 1 pool = [] logical_names = set([]) def __init__(self...
{ "repo_name": "Convertro/Hydro", "path": "src/hydro/connector_factory.py", "copies": "1", "size": "2702", "license": "mit", "hash": -3209430530716585500, "line_mean": 30.7882352941, "line_max": 104, "alpha_frac": 0.606957809, "autogenerated": false, "ratio": 3.938775510204082, "config_test": fa...
__author__ = 'moshebasanchig' import pandas as pd from hydro.exceptions import HydroException DSN = 'dsn' CONNECTION_STRING = 'connection string' class ConnectorBase(object): _conn = None def __init__(self): self.logger = None def _verify_connection_definitions(self): raise HydroExcep...
{ "repo_name": "Convertro/Hydro", "path": "src/hydro/connectors/base_classes.py", "copies": "1", "size": "2921", "license": "mit", "hash": 8225646737028235000, "line_mean": 27.637254902, "line_max": 116, "alpha_frac": 0.5950017117, "autogenerated": false, "ratio": 4.385885885885886, "config_test...
__author__ = 'mosquito' from functools import wraps from flask import flash, redirect, jsonify, \ session, url_for, Blueprint, make_response from project import db from project.models import Appointment ################ #### config #### ################ api_blueprint = Blueprint('api', __name__) ###############...
{ "repo_name": "internetmosquito/flask-scheduler", "path": "project/api/views.py", "copies": "1", "size": "2239", "license": "apache-2.0", "hash": 323681483326720200, "line_mean": 28.4605263158, "line_max": 91, "alpha_frac": 0.5810629745, "autogenerated": false, "ratio": 3.8208191126279862, "con...
__author__ = 'mosquito' import datetime from flask import Flask, render_template, request from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.bcrypt import Bcrypt app = Flask(__name__) app.config.from_pyfile('_config.py') bcrypt = Bcrypt(app) db = SQLAlchemy(app) from project.users.views import users_blueprint...
{ "repo_name": "internetmosquito/flask-scheduler", "path": "project/__init__.py", "copies": "1", "size": "1451", "license": "apache-2.0", "hash": -8158274114256666000, "line_mean": 32, "line_max": 65, "alpha_frac": 0.6657477602, "autogenerated": false, "ratio": 3.5915841584158414, "config_test":...
__author__ = 'mosquito' import datetime from project import db class Appointment(db.Model): __tablename__ = "appointments" appointment_id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String, nullable=False) due_date = db.Column(db.DateTime, nullable=False) priority = db.Column(...
{ "repo_name": "internetmosquito/flask-scheduler", "path": "project/models.py", "copies": "1", "size": "1445", "license": "apache-2.0", "hash": 1309898843073300000, "line_mean": 29.125, "line_max": 78, "alpha_frac": 0.6415224913, "autogenerated": false, "ratio": 3.4569377990430623, "config_test"...
__author__ = 'mosquito' import logging from logging import Formatter, FileHandler from amazon.api import AmazonAPI import bottlenose.api import urllib2 from urllib2 import URLError from scrapy.selector import Selector import json import os import sys from time import sleep import xlwt from view.button import Button fro...
{ "repo_name": "internetmosquito/amazon_product_searcher", "path": "main.py", "copies": "1", "size": "19324", "license": "mit", "hash": -7683355009636793000, "line_mean": 42.6207674944, "line_max": 123, "alpha_frac": 0.5021217139, "autogenerated": false, "ratio": 4.279007971656333, "config_test"...
__author__ = 'mosquito' import os import unittest from views import app, db from _config import basedir from models import RegisteredMail TEST_DB = 'test.db' class MainTests(unittest.TestCase): ############################ #### setup and teardown #### ############################ # executed prior t...
{ "repo_name": "internetmosquito/bloowatch_site", "path": "test_main.py", "copies": "1", "size": "1655", "license": "mit", "hash": 8223059160421405000, "line_mean": 27.0677966102, "line_max": 74, "alpha_frac": 0.5685800604, "autogenerated": false, "ratio": 3.778538812785388, "config_test": true,...