text stringlengths 0 1.05M | meta dict |
|---|---|
__author__ = 'kdsouza'
from Spec import *
d_simple = {'a': 10,
'b': VEdit('b', CheckListEditor, {'values': ['a', 'b', 'c']})}
d1 = {'a': VEdit(10, RangeEditor, {'low': 2, 'high': 15}),
'b': {
'b1': VEdit(True, BooleanEditor, {}),
'b2': VEdit(1, EnumEditor, {'values': range(0, 20... | {
"repo_name": "kdz/test",
"path": "SpecNode_tests.py",
"copies": "1",
"size": "1830",
"license": "mit",
"hash": -5293760547690427000,
"line_mean": 27.59375,
"line_max": 82,
"alpha_frac": 0.5857923497,
"autogenerated": false,
"ratio": 3.1016949152542375,
"config_test": false,
"has_no_keywords"... |
__author__ = 'kdsouza'
from traits.api import HasTraits, Instance
from collections import namedtuple
import pandas as pd
from MPL_pyqt_mergewidget import *
from MPL_style_formatting import *
from MPL_dicts import *
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.figure import Figure as MPLFig... | {
"repo_name": "kdz/test",
"path": "SpecNode.py",
"copies": "1",
"size": "5273",
"license": "mit",
"hash": -2454078109465499000,
"line_mean": 30.201183432,
"line_max": 122,
"alpha_frac": 0.6193817561,
"autogenerated": false,
"ratio": 3.8715124816446402,
"config_test": false,
"has_no_keywords":... |
__author__ = 'kdsouza'
from traits.api import HasTraits, Str, Instance, Button, List, Any, Property, Dict, \
cached_property, on_trait_change, property_depends_on
from traitsui.api import View, TableEditor, ObjectColumn
import pandas as pd
from matplotlib.figure import Figure
from matplotlib.axes import Axes
impor... | {
"repo_name": "kdz/test",
"path": "Plot_class.py",
"copies": "1",
"size": "4163",
"license": "mit",
"hash": 8362309555214086000,
"line_mean": 29.6102941176,
"line_max": 109,
"alpha_frac": 0.570021619,
"autogenerated": false,
"ratio": 3.872558139534884,
"config_test": false,
"has_no_keywords":... |
__author__ = 'kdsouza'
from IV_Dim_class import *
from traits.api import Instance, List, Str, Any
# Only two dimensional plots
class Item(HasTraits):
"""Base class for all dimensioned view components."""
def _convert_to(self, item_type):
""""""
pass
################
class Column(Item):
... | {
"repo_name": "kdz/test",
"path": "IV_Item_Class.py",
"copies": "1",
"size": "1539",
"license": "mit",
"hash": 3737356103151837700,
"line_mean": 16.7011494253,
"line_max": 80,
"alpha_frac": 0.5964912281,
"autogenerated": false,
"ratio": 3.7354368932038833,
"config_test": false,
"has_no_keywor... |
__author__ = 'keaj'
from __future__ import unicode_literals
import base64
import httplib2
import json
import os
import re
from apiclient import discovery
from oauth2client import client
class NoSuchBook(Exception):
pass
class GoogleBooksService(object):
def __init__(self):
super(GoogleBooksServic... | {
"repo_name": "sydneycarton/NeatMechanicalToy",
"path": "app/bookbeeper/bookservices/APIServices.py",
"copies": "1",
"size": "3788",
"license": "apache-2.0",
"hash": 8868112672009909000,
"line_mean": 35.4230769231,
"line_max": 83,
"alpha_frac": 0.565469905,
"autogenerated": false,
"ratio": 4,
"... |
__author__ = "keats.kelleher@gmail.com (Andrew Kelleher)"
try:
from setuptools import setup, find_packages
except ImportError:
import distribute_setup
distribute_setup.use_setuptools()
from setuptools import setup, find_packages
setup(
name='pyconnie',
version='1.0',
packages=find_packages(),
... | {
"repo_name": "akellehe/pyconnie",
"path": "setup.py",
"copies": "1",
"size": "1140",
"license": "mit",
"hash": 7177753903690412000,
"line_mean": 34.625,
"line_max": 156,
"alpha_frac": 0.6877192982,
"autogenerated": false,
"ratio": 3.7133550488599347,
"config_test": false,
"has_no_keywords": ... |
__author__ = 'Ke Chen'
__email__ = "kec003@ucsd.edu"
# TODO: replace urllib usage with six library
try:
from urllib.request import urlopen
from urllib.request import build_opener
from urllib.request import HTTPCookieProcessor
from urllib.parse import urlparse
from urllib.parse import urlencode
exce... | {
"repo_name": "nmih/ssbio",
"path": "ssbio/protein/sequence/properties/kinetic_folding_rate.py",
"copies": "2",
"size": "2456",
"license": "mit",
"hash": -1402201209554226000,
"line_mean": 30.8831168831,
"line_max": 152,
"alpha_frac": 0.6878565607,
"autogenerated": false,
"ratio": 3.5720524017467... |
__author__ = 'keelan'
import sys
import nltk
import os
import cStringIO
def nested_tokenize(untokenized_sentences):
tokenized_sents = nltk.sent_tokenize(untokenized_sentences)
tokenized_words = [nltk.word_tokenize(sent) for sent in tokenized_sents]
return tokenized_words
input_dir = sys.argv[1]
output_di... | {
"repo_name": "pkarmstr/NYBC",
"path": "PyYiddish/prep_english_docs.py",
"copies": "1",
"size": "1259",
"license": "apache-2.0",
"hash": -8007030106249706000,
"line_mean": 28.3023255814,
"line_max": 76,
"alpha_frac": 0.5885623511,
"autogenerated": false,
"ratio": 3.5665722379603397,
"config_tes... |
"""xmlrpcserver.py - simple XML RPC server supporting TLS"""
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
from tlssocketservermixin import TLSSocketServerMixIn
class TLSXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
"""XMLRPCRequestHandler using TLS"""
# Redefine the... | {
"repo_name": "splunk/splunk-webframework",
"path": "contrib/tlslite/tlslite/integration/xmlrpcserver.py",
"copies": "3",
"size": "1708",
"license": "apache-2.0",
"hash": 2070001603004999200,
"line_mean": 33.8571428571,
"line_max": 77,
"alpha_frac": 0.6604215457,
"autogenerated": false,
"ratio": ... |
__author__ = 'Kegan Holtzhausen <Kegan.Holtzhausen@unibet.com>'
"""
The plugin system
"""
import functools
import logging
from collections import OrderedDict
from libsolace.util import get_calling_module
class PluginClass(type):
"""This is a metaclass for construction only, see Plugin rather"""
def __new_... | {
"repo_name": "unixunion/python-libsolace",
"path": "libsolace/plugin.py",
"copies": "1",
"size": "5686",
"license": "mit",
"hash": -1510544016896142300,
"line_mean": 31.6781609195,
"line_max": 142,
"alpha_frac": 0.5886387619,
"autogenerated": false,
"ratio": 4.029766123316796,
"config_test": f... |
__author__ = 'keghol'
__doc__ = """
This file is just a documentation holder for various kwargs. No function other than that. Link to items here with epydoc
e.g. @keyword shutdown_on_apply: :func:`shutdown_on_apply`
"""
shutdown_on_apply = None
"""
The shutdown_on_apply kwarg is typically passed in from the CLI for ... | {
"repo_name": "unixunion/python-libsolace",
"path": "libsolace/Kwargs.py",
"copies": "1",
"size": "1614",
"license": "mit",
"hash": 1722929844430021000,
"line_mean": 31.3,
"line_max": 120,
"alpha_frac": 0.7434944238,
"autogenerated": false,
"ratio": 3.762237762237762,
"config_test": false,
"h... |
__author__ = 'kehao'
from thu_learn import *
import sys
_FILES_ROOT_PATH = 'file'
_NEW_FILES_PATH = _FILES_ROOT_PATH+'/'+ 'new_files'
_UPDATE_FLAG = True
_MAX_FILE_SIZE = 20
def set_flag():
if len(sys.argv) == 1:
print("\n>> Will update files ---save new files to %s)"%_NEW_FILES_PATH)
print(">... | {
"repo_name": "kehao95/THULearn",
"path": "download_files.py",
"copies": "2",
"size": "1523",
"license": "mit",
"hash": -5021713224361285000,
"line_mean": 27.2037037037,
"line_max": 131,
"alpha_frac": 0.5331582403,
"autogenerated": false,
"ratio": 3.5336426914153134,
"config_test": false,
"ha... |
__author__ = 'Keiran'
# -*- coding: utf-8 -*-
from sys import maxsize
def randomize_str(attr, max_len=5, include_spaces = True):
import random, string
symbols = string.ascii_letters + string.digits
if include_spaces:
symbols += " " * 10
return attr + "".join(random.choice(symbols) for i in ran... | {
"repo_name": "IKeiran/FPT-Sinyakov",
"path": "model/contact.py",
"copies": "1",
"size": "4866",
"license": "apache-2.0",
"hash": -175494424171164100,
"line_mean": 44.0648148148,
"line_max": 120,
"alpha_frac": 0.5750102754,
"autogenerated": false,
"ratio": 3.714503816793893,
"config_test": fals... |
__author__ = 'Keiran'
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": "IKeiran/FPT-Sinyakov",
"path": "fixture/db.py",
"copies": "1",
"size": "1466",
"license": "apache-2.0",
"hash": 2772034498475945000,
"line_mean": 34.7804878049,
"line_max": 127,
"alpha_frac": 0.6036834925,
"autogenerated": false,
"ratio": 3.994550408719346,
"config_test": false,
... |
__author__ = 'keithblackwell1'
from datetime import timedelta
import datetime
import bisect as bs
import csv
import os
class Calendar(object):
"""
Calendar class for making a financial calendar.
__init__(self, holiday_file=None):
initialized with a holiday calendar csv. default is:
'data/ust_ho... | {
"repo_name": "econokeith/bondfuns",
"path": "bondfuns/calendar.py",
"copies": "1",
"size": "3550",
"license": "mit",
"hash": 952955860752628100,
"line_mean": 21.0559006211,
"line_max": 114,
"alpha_frac": 0.5512676056,
"autogenerated": false,
"ratio": 3.287037037037037,
"config_test": false,
... |
__author__ = 'keithblackwell1'
import bisect as bs
import datetime
import scipy.optimize as optimize
from dateutil.relativedelta import relativedelta
import os
from bondfuns.calendar import Calendar, to_datetime, open_string_csv_to_datetime
UST_CALENDAR = Calendar()
class Bond(object):
"""
Basic Fixed Incom... | {
"repo_name": "econokeith/bondfuns",
"path": "bondfuns/bonds.py",
"copies": "1",
"size": "15923",
"license": "mit",
"hash": -3267205462209642500,
"line_mean": 30.6560636183,
"line_max": 120,
"alpha_frac": 0.6021478365,
"autogenerated": false,
"ratio": 3.339555369127517,
"config_test": false,
... |
__author__ = 'Keith Kikta'
__copyright__ = "Copyright 2015, EPM Junkie"
__license__ = "BSD"
__version__ = "1.0"
__maintainer__ = "Keith Kikta"
__email__ = "kkikta@gmail.com"
__status__ = "Alpha"
import sys
import io
from getopt import getopt, GetoptError
from difflib import SequenceMatcher
use_minidom = False
try:
... | {
"repo_name": "newbish/pyEpmTools",
"path": "essbase-xml-otl-compare.py",
"copies": "1",
"size": "9183",
"license": "bsd-2-clause",
"hash": 7621191529550262000,
"line_mean": 32.0323741007,
"line_max": 130,
"alpha_frac": 0.5394751171,
"autogenerated": false,
"ratio": 3.7223348196189705,
"config_... |
__author__ = 'Keith Kikta'
__copyright__ = "Copyright 2015, EPM Junkie"
__license__ = "BSD"
__version__ = "1.0"
__maintainer__ = "Keith Kikta"
__email__ = "kkikta@gmail.com"
__status__ = "Alpha"
import sys
import re
import shlex
from xml.dom.minidom import parse
from getopt import getopt, GetoptError
def main(argv)... | {
"repo_name": "newbish/pyEpmTools",
"path": "convert-essbase-to-column.py",
"copies": "1",
"size": "4574",
"license": "bsd-2-clause",
"hash": -412861117561362800,
"line_mean": 30.7638888889,
"line_max": 142,
"alpha_frac": 0.4958460866,
"autogenerated": false,
"ratio": 4.08028545941124,
"config_... |
__author__ = "Keith Lee"
__email__ = "keithlee002@gmail.com"
# Create your views here.
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect, HttpResponseServerError, Http404
from models import *
from django.shortcuts import render_to_response, get_object_or_404
from django.template import R... | {
"repo_name": "keithlee/shakeAppPyDev",
"path": "shakeapp/views.py",
"copies": "1",
"size": "9111",
"license": "bsd-3-clause",
"hash": 2340622611083440600,
"line_mean": 34.4513618677,
"line_max": 122,
"alpha_frac": 0.7362528811,
"autogenerated": false,
"ratio": 3.485462892119357,
"config_test":... |
__author__ = "Keith Lee"
__email__ = "keithlee002@gmail.com"
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Recipe(models.Model):
name = models.CharField(max_length=200)
text = models.TextField(blank=True, null=True)
numLikes = models.IntegerField(default=... | {
"repo_name": "keithlee/shakeAppPyDev",
"path": "shakeapp/models.py",
"copies": "1",
"size": "1460",
"license": "bsd-3-clause",
"hash": -2127455790425429500,
"line_mean": 36.4615384615,
"line_max": 96,
"alpha_frac": 0.7232876712,
"autogenerated": false,
"ratio": 2.973523421588595,
"config_test"... |
__author__ = 'keithlovett'
"""
Personal project. Shows short trends of Mars rovers in the form of a graph.
Attribution:
Bucky Robert "thenewboston"'s Youtube tutorials were helpful for learning the basics behind tkinter.
Also found the eff-bot Python documentation on more minute aspects of tkinter quite helpful.
The j... | {
"repo_name": "kdlovett/MartianRoverGraph",
"path": "interface.py",
"copies": "1",
"size": "14501",
"license": "mit",
"hash": 8159901320711614000,
"line_mean": 45.4775641026,
"line_max": 161,
"alpha_frac": 0.5803048066,
"autogenerated": false,
"ratio": 3.6452991452991452,
"config_test": false,
... |
__author__ = 'kele'
from PySide import QtCore
# TODO: rewrite this
# TODO: refactoring
# TODO: UT
class ContactsInfoModel(QtCore.QAbstractListModel):
def __init__(self, address_book, whatcha_doin):
super().__init__()
self.address_book = address_book
self._patchAddressBook()
sel... | {
"repo_name": "kele/WhatchaDoin",
"path": "app/ui/pyside/ContactsInfoModel.py",
"copies": "1",
"size": "1723",
"license": "mit",
"hash": -7024341818999569000,
"line_mean": 30.9074074074,
"line_max": 107,
"alpha_frac": 0.571096924,
"autogenerated": false,
"ratio": 3.6350210970464136,
"config_tes... |
__author__ = 'kele'
from PySide import QtGui, QtCore, QtUiTools
from app.ui.pyside.ContactsInfoModel import ContactsInfoModel
class PySideUI:
def __init__(self, whatcha_doin):
self.whatcha_doin = whatcha_doin
self.app = QtGui.QApplication([])
# TODO: remove hardcode
self.main_win... | {
"repo_name": "kele/WhatchaDoin",
"path": "app/ui/pyside/pyside.py",
"copies": "1",
"size": "3766",
"license": "mit",
"hash": 4040254018081544000,
"line_mean": 33.2363636364,
"line_max": 98,
"alpha_frac": 0.5801911843,
"autogenerated": false,
"ratio": 4.010649627263046,
"config_test": false,
... |
__author__ = 'kele'
from socketserver import UDPServer, BaseRequestHandler
import socket
import logging
class RequestHandler(BaseRequestHandler):
def __init__(self, whatcha_doin, *args):
self.whatcha_doin = whatcha_doin
super().__init__(*args)
def handle(self):
data = str(self.reques... | {
"repo_name": "kele/WhatchaDoin",
"path": "app/networking/udp.py",
"copies": "1",
"size": "1494",
"license": "mit",
"hash": -5182194773422617000,
"line_mean": 26.6666666667,
"line_max": 98,
"alpha_frac": 0.6010709505,
"autogenerated": false,
"ratio": 3.574162679425837,
"config_test": false,
"... |
__author__ = 'kele'
from threading import Lock
class WhatchaDoin:
def __init__(self, networking, address_book):
self.address_book = address_book
self.user_status = {'busy': 'free', 'desc': ''}
self._running = True
self._running_lock = Lock()
self._buddy_statuses = {}
... | {
"repo_name": "kele/WhatchaDoin",
"path": "app/core/WhatchaDoin.py",
"copies": "1",
"size": "1346",
"license": "mit",
"hash": 2272510865977721300,
"line_mean": 24.8846153846,
"line_max": 63,
"alpha_frac": 0.5950965825,
"autogenerated": false,
"ratio": 3.7915492957746477,
"config_test": false,
... |
__author__ = 'kele'
import re
class Message:
def __init__(self, sender, receiver, label, content):
self.sender = sender
self.receiver = receiver
self.label = label
self.content = content
self.full_receiver = receiver
self.full_sender = sender
class Note:
def _... | {
"repo_name": "kele/flowdraw",
"path": "app/parse.py",
"copies": "1",
"size": "1472",
"license": "mit",
"hash": -1467923109477167600,
"line_mean": 23.9491525424,
"line_max": 99,
"alpha_frac": 0.6025815217,
"autogenerated": false,
"ratio": 3.7840616966580978,
"config_test": false,
"has_no_keyw... |
__author__ = 'kele'
# TODO: delete this file after GUI is done
import click
class ConsoleUI:
def __init__(self, whatcha_doin):
self.whatcha_doin = whatcha_doin
self.user_id = self.whatcha_doin.user_id
def run(self):
self._greet()
while True:
click.echo('Current s... | {
"repo_name": "kele/WhatchaDoin",
"path": "app/ui/console.py",
"copies": "1",
"size": "1569",
"license": "mit",
"hash": -1729325518614859500,
"line_mean": 24.7213114754,
"line_max": 106,
"alpha_frac": 0.5462077757,
"autogenerated": false,
"ratio": 3.6319444444444446,
"config_test": false,
"ha... |
__author__ = "Kelly Chan"
__date__ = "Sept 8 2014"
__version__ = '1.0.0'
import os
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
import mechanize
import cookielib
import re
import time
import urllib
import urllib2
from bs4 import BeautifulSoup
import pandas
def openBrowser():
# Browser
br = ... | {
"repo_name": "KellyChan/python-examples",
"path": "python/crawlers/crawler/catalogs/lowes/lowes_catalogs_products.py",
"copies": "3",
"size": "4210",
"license": "mit",
"hash": 8150008743087961000,
"line_mean": 25.6455696203,
"line_max": 141,
"alpha_frac": 0.5365795724,
"autogenerated": false,
"r... |
__author__ = "Kelly Chan"
__date__ = "Sept 9 2014"
__version__ = "1.0.0"
import re
import pandas as pd
def loadContent(dataFile):
with open(dataFile, 'rb') as f:
content = f.read()
f.close()
return content
def filterRE(content, pattern):
return re.findall(re.compile(pattern), str(content))
... | {
"repo_name": "KellyChan/Python",
"path": "python/crawlers/crawler/catalogs/lowes/lowes_catalogs_cleaning.py",
"copies": "3",
"size": "2867",
"license": "mit",
"hash": -3073810400626639400,
"line_mean": 23.5042735043,
"line_max": 77,
"alpha_frac": 0.5723753052,
"autogenerated": false,
"ratio": 3.... |
__author__ = "Kelly Chan"
__date__ = "Sept 9 2014"
__version__ = "1.0.0"
import os
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
import mechanize
import cookielib
import re
import time
import urllib
import urllib2
from bs4 import BeautifulSoup
import pandas
def openBrowser():
# Browser
br =... | {
"repo_name": "KellyChan/python-examples",
"path": "python/crawlers/crawler/catalogs/lowes/lowes_catalogs_products_recheck.py",
"copies": "3",
"size": "2796",
"license": "mit",
"hash": 8738958732534279000,
"line_mean": 21.9180327869,
"line_max": 141,
"alpha_frac": 0.6055078684,
"autogenerated": fal... |
__author__ = 'Kelsy C Cotto'
import os
import sys
import gzip
import csv
import requests
from version_logger import Version
from bs4 import BeautifulSoup
import datetime
class Entrez:
def __init__(self, download_path):
self.online_version = None
self.get_online_version()
self.version = V... | {
"repo_name": "griffithlab/dgi-db",
"path": "lib/genome/updaters/get_entrez.py",
"copies": "2",
"size": "5645",
"license": "mit",
"hash": 3309567777614392300,
"line_mean": 41.1268656716,
"line_max": 114,
"alpha_frac": 0.5585473871,
"autogenerated": false,
"ratio": 3.7089356110381075,
"config_te... |
__author__ = 'Kelsy C Cotto'
import zipfile
import os
import sys
import xml.etree.ElementTree as ET
import csv
import re
import ssl
import requests
from requests.auth import HTTPBasicAuth
from version_logger import Version
from urllib import request
from bs4 import BeautifulSoup
from get_entrez import Entrez
class D... | {
"repo_name": "griffithlab/dgi-db",
"path": "lib/genome/updaters/get_drugbank.py",
"copies": "2",
"size": "12904",
"license": "mit",
"hash": -1875150154696214300,
"line_mean": 45.0857142857,
"line_max": 122,
"alpha_frac": 0.5060446373,
"autogenerated": false,
"ratio": 3.9498010407101316,
"confi... |
__author__ = 'Kelton Halbert'
__all__ = ['backgroundGeneric', 'plotGeneric']
import numpy as np
from sharppy.sharptab.constants import *
import sharppy.sharptab as tab
from PySide import QtGui, QtCore
from PySide.QtGui import *
from PySide.QtCore import *
from PySide.QtOpenGL import *
class backgroundGeneric(QtGui.Q... | {
"repo_name": "scollis/SHARPpy",
"path": "sharppy/viz/generic.py",
"copies": "6",
"size": "11931",
"license": "bsd-3-clause",
"hash": -5093610575456862000,
"line_mean": 31.4211956522,
"line_max": 106,
"alpha_frac": 0.5705305507,
"autogenerated": false,
"ratio": 3.67673343605547,
"config_test": ... |
__author__ = 'keltonhalbert, wblumberg'
from sharppy.viz import plotSkewT, plotHodo, plotText, plotAnalogues
from sharppy.viz import plotThetae, plotWinds, plotSpeed, plotKinematics #, plotGeneric
from sharppy.viz import plotSlinky, plotWatch, plotAdvection, plotSTP, plotWinter
from sharppy.viz import plotSHIP, plotST... | {
"repo_name": "scollis/SHARPpy",
"path": "sharppy/viz/SPCWindow.py",
"copies": "2",
"size": "29262",
"license": "bsd-3-clause",
"hash": -377678670196797060,
"line_mean": 36.953307393,
"line_max": 193,
"alpha_frac": 0.6034447406,
"autogenerated": false,
"ratio": 3.5413288152002904,
"config_test"... |
__author__ = 'kelvinguu'
from contextlib import contextmanager
import logging
import numpy as np
from stanza.text import Vocab
class Embeddings(object):
"""A map from strings to vectors.
Vectors are stored as a numpy array.
Vectors are saved/loaded from disk using numpy.load, which is roughly 3-4 times ... | {
"repo_name": "arunchaganty/presidential-debates",
"path": "third-party/stanza/stanza/ml/embeddings.py",
"copies": "2",
"size": "6065",
"license": "mit",
"hash": -1969888785440821200,
"line_mean": 33.2655367232,
"line_max": 105,
"alpha_frac": 0.6049464138,
"autogenerated": false,
"ratio": 3.79536... |
__author__ = 'kelvin'
import os
from os.path import join, dirname, abspath
import sys
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.wsgi
from tornado.options import options, define, parse_command_line
import ConfigParser
import sqlite3
from qt.deploy.deploy import db
class Imp... | {
"repo_name": "seawaywen/memodir_skels",
"path": "memodir/skels/templates/buildout_project/utils/tornado_srv.py",
"copies": "1",
"size": "3098",
"license": "bsd-3-clause",
"hash": -6546287469521587000,
"line_mean": 23.9838709677,
"line_max": 111,
"alpha_frac": 0.6352485474,
"autogenerated": false,
... |
__author__ = 'kemi'
from cloudify.decorators import workflow
from cloudify.workflows import ctx
from cloudify.workflows import parameters
from package_installer_plugin.constants import *
@workflow
def start_service(**_):
""" Starts a service on a given node """
ctx.logger.info("Starting service...")
fo... | {
"repo_name": "kemiz/cloudify-package-installer-plugin",
"path": "package_installer_workflows/service_workflows.py",
"copies": "1",
"size": "1230",
"license": "apache-2.0",
"hash": 3918657553091708000,
"line_mean": 35.2058823529,
"line_max": 120,
"alpha_frac": 0.6609756098,
"autogenerated": false,
... |
__author__ = 'kemi'
from cloudify.decorators import workflow
from cloudify.workflows import ctx
from cloudify.workflows import parameters
from package_installer_plugin.constants import *
@workflow
def remove_packages(**_):
""" uninstalls a specified package from a given node """
for node in ctx.nodes:
... | {
"repo_name": "kemiz/cloudify-package-installer-plugin",
"path": "package_installer_workflows/workflows.py",
"copies": "1",
"size": "1155",
"license": "apache-2.0",
"hash": 5421239345229678000,
"line_mean": 37.5333333333,
"line_max": 103,
"alpha_frac": 0.6649350649,
"autogenerated": false,
"ratio... |
__author__ = 'kemp_mc'
import pyrat
import h5py
import logging
import copy
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import ParseError
class KOMPSAT5(pyrat.ImportWorker):
"""
Import of Kompsat-5 satellite data.
"""
gui = {'menu': 'File|Import spaceborne', 'entry': 'KOMPSAT-5'}
... | {
"repo_name": "birgander2/PyRAT",
"path": "pyrat/load/KOMPSAT5.py",
"copies": "1",
"size": "2856",
"license": "mpl-2.0",
"hash": -5687295321110180000,
"line_mean": 30.7333333333,
"line_max": 101,
"alpha_frac": 0.5364145658,
"autogenerated": false,
"ratio": 3.3879003558718863,
"config_test": fal... |
__author__ = 'kenchen'
import praw
import csv
def combine_subreddits(subs):
return "+".join(subs)
r = praw.Reddit("Network visualization data scraper v1.0 by u/k-a-n")
subreddits = ["pics"]
# Getting top [limit] posts from multi-reddit defined from subreddits above
top_subreddits = r.get_subreddit(combine_su... | {
"repo_name": "lbkchen/visual-reddit",
"path": "python/parse_comments.py",
"copies": "1",
"size": "1630",
"license": "mit",
"hash": 7014824086261943000,
"line_mean": 37.8095238095,
"line_max": 112,
"alpha_frac": 0.6564417178,
"autogenerated": false,
"ratio": 3.5205183585313176,
"config_test": f... |
from __future__ import print_function
from ctypes import *
# ///////////////////////////////////////////////////////////
# Type definitions
# ///////////////////////////////////////////////////////////
TPCANHandle = c_ubyte # Represents a PCAN hardware channel handle
TPCANStatus = int # ... | {
"repo_name": "BateauNautilus/DriveSimulator",
"path": "lib/pythoncan/can/interfaces/PCANBasic.py",
"copies": "2",
"size": "22443",
"license": "mit",
"hash": 1133733345753033100,
"line_mean": 44.6158536585,
"line_max": 187,
"alpha_frac": 0.625183799,
"autogenerated": false,
"ratio": 3.44376246739... |
### A python test that writes out a test python file... TestVTKXdmfReader attempts to read in the file generated
### here.
import sys
import Xdmf
from Xdmf import *
if __name__ == '__main__':
heavyDataSetName = 'testFile.h5'
outputName = 'testFile.xmf'
root = XdmfRoot()
dom = XdmfDOM()
... | {
"repo_name": "mspark93/VTK",
"path": "ThirdParty/xdmf2/vtkxdmf2/libsrc/test/TestXdmfWriteGridsToFilePython.py",
"copies": "24",
"size": "10841",
"license": "bsd-3-clause",
"hash": 7076291036807009000,
"line_mean": 41.3515625,
"line_max": 112,
"alpha_frac": 0.7189373674,
"autogenerated": false,
"... |
### A simple python test that writes ints and floats to XdmfArrays and then tries to read them. Compares the
### values for equality and tests the accuracy of some convenience functions
import Xdmf
from Xdmf import *
if __name__ == '__main__':
##
## First Part = XDMF_INT64_TYPE Array
##
intArray = Xdmf.... | {
"repo_name": "cjh1/Xdmf2",
"path": "libsrc/test/TestXdmfArrayPython.py",
"copies": "24",
"size": "1830",
"license": "bsd-3-clause",
"hash": 3962384953277719600,
"line_mean": 30.0338983051,
"line_max": 109,
"alpha_frac": 0.6579234973,
"autogenerated": false,
"ratio": 3.193717277486911,
"config_... |
import Xdmf
from Xdmf import *
if __name__ == '__main__':
##
## First Part = XDMF_INT64_TYPE Array
##
intArray = Xdmf.XdmfArray()
intArray.SetNumberType(Xdmf.XDMF_INT64_TYPE)
assert(intArray.GetNumberType() == Xdmf.XDMF_INT64_TYPE)
intArray.SetShapeFromString("3 3")
assert... | {
"repo_name": "hlzz/dotfiles",
"path": "graphics/VTK-7.0.0/ThirdParty/xdmf2/vtkxdmf2/libsrc/test/TestXdmfArrayPython.py",
"copies": "2",
"size": "1888",
"license": "bsd-3-clause",
"hash": 6949774067469081000,
"line_mean": 30.0338983051,
"line_max": 109,
"alpha_frac": 0.6377118644,
"autogenerated": ... |
__author__ = 'kennyjoseph'
from glob import glob
from utility_code.util import IDENTITY_DICTIONARIES_LOCATION,NON_IDENTITY_DICTIONARIES_LOCATION
from nltk.corpus import wordnet as wn
from Queue import Queue
from pywsd.baseline import max_lemma_count as most_frequent_sense
import os
def wordnet2():
to_visit_queue ... | {
"repo_name": "kennyjoseph/identity_extraction_pub",
"path": "python/9_generate_wordnet_identities_dict.py",
"copies": "1",
"size": "2463",
"license": "mit",
"hash": -3889399551041121300,
"line_mean": 38.7419354839,
"line_max": 156,
"alpha_frac": 0.5935850589,
"autogenerated": false,
"ratio": 3.1... |
__author__ = 'kennyjoseph'
from utility_code.RitterDictionaries import *
from utility_code.evaluation import *
from utility_code.create_features import *
from twitter_dm.utility.tweet_utils import get_stopwords
from functools import partial
from twitter_dm.utility.general_utils import tab_stringify_newline as tsn
def r... | {
"repo_name": "kennyjoseph/identity_extraction_pub",
"path": "python/10_run_baselines.py",
"copies": "1",
"size": "3876",
"license": "mit",
"hash": 6558455821290863000,
"line_mean": 47.45,
"line_max": 123,
"alpha_frac": 0.6560887513,
"autogenerated": false,
"ratio": 3.161500815660685,
"config_t... |
__author__ = 'kennyjoseph'
import HTMLParser
from utility_code.util import *
from utility_code.dependency_parse_object import DependencyParseObject
from identity_extraction.python.utility_code.dependency_parse_handlers import *
html_parser = HTMLParser.HTMLParser()
def do_twitter_ner_merge(dep_parse, twitter_nlp_li... | {
"repo_name": "kennyjoseph/identity_extraction_pub",
"path": "python/6_merge_annotations_with_ptb_pos_and_twiner.py",
"copies": "1",
"size": "3221",
"license": "mit",
"hash": 5445729946742872000,
"line_mean": 34.4065934066,
"line_max": 93,
"alpha_frac": 0.6355169202,
"autogenerated": false,
"rati... |
__author__ = 'kennyjoseph'
import os
import glob
import json
from utility_code.util import *
from twitter_dm.utility.general_utils import get_handles
from twitter_dm.nlp.tweeboparser import dependency_parse_tweets
from twitter_dm.Tweet import Tweet
from identity_extraction.python.utility_code.dependency_parse_object ... | {
"repo_name": "kennyjoseph/identity_extraction_pub",
"path": "python/8_pull_down_validation_set_and_merge_w_other_data.py",
"copies": "1",
"size": "4072",
"license": "mit",
"hash": -5700159911645951000,
"line_mean": 38.1538461538,
"line_max": 128,
"alpha_frac": 0.6195972495,
"autogenerated": false,... |
__author__ = 'kennyjoseph'
import re
from nltk.stem import WordNetLemmatizer
from util import get_cleaned_text
from twitter_dm.utility.tweet_utils import get_stopwords
from nltk.corpus import wordnet as wn
import sys
stopwords = get_stopwords()
wordnet_lemmatizer = WordNetLemmatizer()
#import inflect
#inflect_engine... | {
"repo_name": "kennyjoseph/identity_extraction_pub",
"path": "python/utility_code/dependency_parse_object.py",
"copies": "1",
"size": "8717",
"license": "mit",
"hash": -685770383767011100,
"line_mean": 36.0936170213,
"line_max": 107,
"alpha_frac": 0.5299988528,
"autogenerated": false,
"ratio": 3.... |
__author__ = 'Kenny'
# TODO: MAJOR REFACTORING... The code is starting to annoy..
# TODO: CREATE SOLVER INTERFACE
# TODO: USE JSON PARAMETER AND RESULT
import math
import copy
import csv
import time
import random
from bisect import bisect
UNPLANNED_NODE_COST = 1000000
OVERCAPACITY_PENALTY = 1000
def load_benchmark(... | {
"repo_name": "kenny-goh/vrpsolver",
"path": "vrpsolver/mysite/vrpsolver/solver.py",
"copies": "1",
"size": "8268",
"license": "mit",
"hash": 2484814996449343000,
"line_mean": 27.9090909091,
"line_max": 97,
"alpha_frac": 0.5520077407,
"autogenerated": false,
"ratio": 3.744565217391304,
"config_... |
__author__ = 'kent'
from time import sleep
import urllib.request
from urllib.error import HTTPError
from json import loads
import os
import praw
def get_links(subscribe):
r = praw.Reddit(user_agent='User-Agent: rbot/1.0 by draculacwg')
submissions = r.get_subreddit(subscribe).get_hot(limit=50)
results =... | {
"repo_name": "kentchiu/reddit-image-crawler",
"path": "src/readdit_client.py",
"copies": "1",
"size": "3557",
"license": "apache-2.0",
"hash": -430787936796405500,
"line_mean": 28.1557377049,
"line_max": 105,
"alpha_frac": 0.5535563677,
"autogenerated": false,
"ratio": 3.5252725470763133,
"con... |
__author__ = "kenzhaoyihui"
class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
if len(p)==0:
return len(s)==0
if len(p)==1 or p[1]!='*':
if len(s)==0 or (s[0]!=p[0] and p[0]!='.'):
... | {
"repo_name": "kenzhaoyihui/lettcode",
"path": "L_algorithms/10_Regular_Expression_Matching/regular_expression_matching1.py",
"copies": "1",
"size": "1066",
"license": "mit",
"hash": 3975714151495056000,
"line_mean": 27.0526315789,
"line_max": 64,
"alpha_frac": 0.4249530957,
"autogenerated": false,... |
__author__ = "kenzhaoyihui"
class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
"""
if len(p)==0:
return len(s)==0
if len(p)==1 or p[1]!='*':
if len(s)==0 or (s[0]!=p[0] and p[0]!='.'... | {
"repo_name": "kenzhaoyihui/lettcode",
"path": "L_algorithms/10_Regular_Expression_Matching/regular_expression_matching2.py",
"copies": "1",
"size": "1718",
"license": "mit",
"hash": 6468085246864016000,
"line_mean": 30.2545454545,
"line_max": 105,
"alpha_frac": 0.388242142,
"autogenerated": false,... |
__author__ = "kenzhaoyihui"
class Solution(object):
def myAtoi(self, str):
"""
:type str: str
:rtype: int
"""
i = 0
base = 0
flag = 1
INT_MAX = 2147483647
INT_MIN = -2147483648
l = len(str)
while i<l and str[i] == ' ':
... | {
"repo_name": "kenzhaoyihui/lettcode",
"path": "L_algorithms/8_String_To_Integer/string_to_integer.py",
"copies": "1",
"size": "1144",
"license": "mit",
"hash": 3320735872600221000,
"line_mean": 26.2380952381,
"line_max": 78,
"alpha_frac": 0.4632867133,
"autogenerated": false,
"ratio": 3.07526881... |
__author__ = 'kernel-72'
from mongoengine import InvalidQueryError, NotUniqueError
from tastypie.authentication import MultiAuthentication, Authentication, SessionAuthentication
from tastypie.authorization import Authorization
from tastypie.bundle import Bundle
from tastypie.exceptions import BadRequest, NotFound
from... | {
"repo_name": "kernel72/tastypie-mongoengine-resource",
"path": "tastypieMongoengineResource.py",
"copies": "1",
"size": "4975",
"license": "bsd-3-clause",
"hash": 6673996851979859000,
"line_mean": 31.5163398693,
"line_max": 117,
"alpha_frac": 0.6072361809,
"autogenerated": false,
"ratio": 4.1701... |
__author__ = 'Kevin Godden'
import argparse
import ook
import time
def run():
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--path",
help="The root path to the images directory tree")
parser.add_argument("-f", "--filter",
help="The filter to ... | {
"repo_name": "kgodden/ook",
"path": "run.py",
"copies": "1",
"size": "1456",
"license": "apache-2.0",
"hash": 7519095479617267000,
"line_mean": 25,
"line_max": 113,
"alpha_frac": 0.5679945055,
"autogenerated": false,
"ratio": 3.5254237288135593,
"config_test": false,
"has_no_keywords": false... |
__author__ = 'Kevin Godden'
import csv
import os
import time
import re
import fnmatch
import math
from datetime import datetime
from decimal import Decimal
#del show(i):
# name = i.path + i.
def to_timestamp(dt):
# return str(calendar.timegm(dt.timetuple()))
epoch = datetime.utcfromtimestamp(0)
delta... | {
"repo_name": "kgodden/ook",
"path": "ook/ook.py",
"copies": "1",
"size": "6059",
"license": "apache-2.0",
"hash": -286947278312326530,
"line_mean": 27.5801886792,
"line_max": 122,
"alpha_frac": 0.4910051164,
"autogenerated": false,
"ratio": 4.155692729766804,
"config_test": false,
"has_no_ke... |
__author__ = 'Kevin Gullikson'
import FittingUtilities
import sys
import os
import warnings
import numpy as np
import matplotlib.pyplot as plt
from astropy.io import fits, ascii
import GenericSmooth
import HelperFunctions
if __name__ == "__main__":
fileList = []
plot = False
vsini_file = "%s/School/Rese... | {
"repo_name": "kgullikson88/IGRINS_Scripts",
"path": "Smooth.py",
"copies": "1",
"size": "4076",
"license": "mit",
"hash": -4599356259499906600,
"line_mean": 38.572815534,
"line_max": 119,
"alpha_frac": 0.5127576055,
"autogenerated": false,
"ratio": 3.7532228360957642,
"config_test": false,
"... |
__author__ = 'Kevin Gullikson'
import numpy as np
import sys
import HelperFunctions
import FittingUtilities
import matplotlib.pyplot as plt
def get_fft(data, rebin=True, preprocess=True):
if rebin:
xgrid = np.linspace(data.x[0], data.x[-1], data.size())
data = FittingUtilities.RebinData(data, xg... | {
"repo_name": "kgullikson88/IGRINS_Scripts",
"path": "FixFringing.py",
"copies": "1",
"size": "2138",
"license": "mit",
"hash": 7466860684858374000,
"line_mean": 28.301369863,
"line_max": 76,
"alpha_frac": 0.5201122544,
"autogenerated": false,
"ratio": 3.3198757763975157,
"config_test": false,
... |
__author__ = "Kevin Hsu (khsu@appnexus.com)"
import requests
import re
import json
from datetime import datetime
import os, json
import conf
username = conf.appnexus_user
password = conf.appnexus_pass
DCS = ('nym1', 'nym2', 'lax1', 'ams1', 'sin1', 'fra1')
URL_BIDDER = 'https://metrics.adnxs.net/render?from=-30minutes... | {
"repo_name": "mmisiewicz/slask",
"path": "limbo/plugins/budgetage_script.py",
"copies": "1",
"size": "1549",
"license": "mit",
"hash": 8335385032080854000,
"line_mean": 29.3725490196,
"line_max": 135,
"alpha_frac": 0.6132989025,
"autogenerated": false,
"ratio": 3.0673267326732674,
"config_test... |
__author__ = 'kevin.nelson'
import numpy as np
import scipy as sp
import scipy.signal as sig
from math import floor
def stft(data, win_size, fft_size, overlap_fac):
win = np.hanning(win_size)
hop_size = int(floor(win_size * overlap_fac))
data = np.array(data)
pad_start = np.zeros(win_size // 2, dtype... | {
"repo_name": "KevinNJ/Projects",
"path": "Short Time Fourier Transform/archive/stft.py",
"copies": "1",
"size": "4220",
"license": "mit",
"hash": -2585435967105954300,
"line_mean": 25.2111801242,
"line_max": 101,
"alpha_frac": 0.6206161137,
"autogenerated": false,
"ratio": 2.9428172942817294,
... |
__author__ = 'kevin.nelson'
import sys
import numpy as np
import scipy.signal as sig
import scipy.io.wavfile as wav
import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
from PySide.QtGui import QApplication, QMainWindow
from ParseMathExp import eval_expr
from BuildQtGui import make_... | {
"repo_name": "KevinNJ/Projects",
"path": "Short Time Fourier Transform/Stft.py",
"copies": "1",
"size": "7034",
"license": "mit",
"hash": 4611441869901873000,
"line_mean": 35.4507772021,
"line_max": 118,
"alpha_frac": 0.6198464601,
"autogenerated": false,
"ratio": 3.2685873605947955,
"config_t... |
__author__ = 'Kevin'
from .models import Artist, Genre, Track, Album
from django.forms import ModelForm
from django.forms.formsets import formset_factory
from django.forms.models import inlineformset_factory
#class ArtistForm(forms.form):
#class ArtistForm(forms.Form):
class ArtistForm(ModelForm):
class Meta:
... | {
"repo_name": "maninmotion/bpmarchive",
"path": "bpmarchive/artists/forms.py",
"copies": "1",
"size": "1422",
"license": "mit",
"hash": 4881491499409971000,
"line_mean": 24.3928571429,
"line_max": 73,
"alpha_frac": 0.6744022504,
"autogenerated": false,
"ratio": 3.546134663341646,
"config_test":... |
__author__ = 'kevin'
import socket, base64
from itertools import cycle, izip
class ProxyHelper(object):
@staticmethod
def recv_line(sock):
read = ''
try:
chars = []
while True:
a = sock.recv(1)
if a != "\r":
chars.appen... | {
"repo_name": "kevinbluett/cs4032_project",
"path": "src/proxy/helpers.py",
"copies": "1",
"size": "2810",
"license": "mit",
"hash": 8086183975976378000,
"line_mean": 35.0384615385,
"line_max": 123,
"alpha_frac": 0.556227758,
"autogenerated": false,
"ratio": 3.7617135207496655,
"config_test": f... |
__author__ = 'kevin'
import time
from threading import Lock
class CacheEntry(object):
""" Used by the memory object cache in order to """
def __init__(self, key, value):
CacheEntry.__init__(self)
self._key=key
self._value=value
self._timestamp = time.time()
self._lock=Lo... | {
"repo_name": "kevinbluett/cs4032_project",
"path": "src/servers/util/memory_cache.py",
"copies": "1",
"size": "1664",
"license": "mit",
"hash": 8548729513963033000,
"line_mean": 32.9795918367,
"line_max": 107,
"alpha_frac": 0.5733173077,
"autogenerated": false,
"ratio": 4.255754475703325,
"con... |
__author__ = 'kevin'
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
class Plugin(object):
name = ""
description = ""
def install(self):
if self.is_install():
print " * %s : can... | {
"repo_name": "kefniark/turnkey-tools",
"path": "src/model/Plugin.py",
"copies": "1",
"size": "2363",
"license": "mit",
"hash": -428986586845752100,
"line_mean": 29.3076923077,
"line_max": 95,
"alpha_frac": 0.498518832,
"autogenerated": false,
"ratio": 3.9714285714285715,
"config_test": false,
... |
__author__ = 'kevin'
from attacksurfacemeter.loaders.base_line_parser import BaseLineParser
class JavaCGLineParser(BaseLineParser):
""""""
_instance = None
@staticmethod
def get_instance(cflow_line=None):
if JavaCGLineParser._instance is None:
JavaCGLineParser._instance = JavaCGL... | {
"repo_name": "andymeneely/attack-surface-metrics",
"path": "attacksurfacemeter/loaders/javacg_line_parser.py",
"copies": "1",
"size": "1391",
"license": "mit",
"hash": -6771252411015454000,
"line_mean": 28.6170212766,
"line_max": 78,
"alpha_frac": 0.5916606758,
"autogenerated": false,
"ratio": 3... |
__author__ = 'kevin'
from src.model.Plugin import Plugin
from src.model.Common import Common
class PluginMonit(Plugin):
def __init__(self):
self.name = "Monit"
self.description = "Monitoring program (preconfigured for system,apache,mysql)"
def _is_install(self):
return Common.exist("... | {
"repo_name": "kefniark/turnkey-tools",
"path": "src/plugins/PluginMonit.py",
"copies": "1",
"size": "2829",
"license": "mit",
"hash": 2725223786499001300,
"line_mean": 40.0144927536,
"line_max": 98,
"alpha_frac": 0.5945563803,
"autogenerated": false,
"ratio": 3.53625,
"config_test": false,
"... |
__author__ = 'kevin'
import argparse
import subprocess
import os
import re
def main():
args = parse_args()
os.chdir(args.repo_root)
# git checkout <COMMIT SHA1>
# somehow sending stderr=subprocess.PIPE prevents git from printing to this program's output
subprocess.call(['git', 'checkout', args.... | {
"repo_name": "andymeneely/attack-surface-metrics",
"path": "git_integration.py",
"copies": "1",
"size": "3653",
"license": "mit",
"hash": -3183650845724915000,
"line_mean": 31.0526315789,
"line_max": 113,
"alpha_frac": 0.5149192445,
"autogenerated": false,
"ratio": 3.9923497267759562,
"config_... |
__author__ = 'kevin'
import logging
import re
import time
from selenium import webdriver
def search_addr(addr):
driver = webdriver.Firefox()
driver.implicitly_wait(130)
# driver.set_page_load_timeout(30)
base_url = "http://www.nbnco.com.au/connect-home-or-business/check-your-address.html"
verifi... | {
"repo_name": "kevyin/nbnfinder",
"path": "nbn/search.py",
"copies": "1",
"size": "1916",
"license": "apache-2.0",
"hash": -7438015241582102000,
"line_mean": 29.4126984127,
"line_max": 89,
"alpha_frac": 0.5840292276,
"autogenerated": false,
"ratio": 3.6495238095238096,
"config_test": false,
"... |
__author__ = 'kevin'
import re
import logging
import traceback
from urllib.parse import urlsplit
import requests
import mimeparse
import praw
class GyazoPlugin:
"""A gyazo.com import plugin.
gyazo.com is a site for quickly uploading screen shots.
"""
def __init__(self, useragent: str, **options):
... | {
"repo_name": "Shugabuga/LapisMirror",
"path": "plugins/gyazo.py",
"copies": "3",
"size": "2843",
"license": "mit",
"hash": 2949357283370876400,
"line_mean": 32.8452380952,
"line_max": 77,
"alpha_frac": 0.5546957439,
"autogenerated": false,
"ratio": 4.262368815592204,
"config_test": false,
"h... |
__author__ = 'kevin'
import sqlite3, time, hashlib, base64
from random import random
from base_service import BaseService
class SecurityService(BaseService):
ALLOWED_ACTIONS = ["LOGIN_REQUEST"]
LOGGING_TAG = "SECURITY_SERVICE"
DATABASE = "db.sqlite"
def __init__(self):
self.__create_tables()... | {
"repo_name": "kevinbluett/cs4032_project",
"path": "src/servers/security_service.py",
"copies": "1",
"size": "2081",
"license": "mit",
"hash": 2077621149569907700,
"line_mean": 39.0384615385,
"line_max": 129,
"alpha_frac": 0.6035559827,
"autogenerated": false,
"ratio": 4.088408644400785,
"conf... |
__author__ = 'kevin'
import sqlite3, time
from random import random
from base_service import BaseService
class LockingService(BaseService):
ALLOWED_ACTIONS = ["LOCK_FILE", "UNLOCK_FILE"]
LOGGING_TAG = "LOCKING_SERVICE"
DATABASE = "db.sqlite"
def __init__(self):
pass
def lock_file(self, ... | {
"repo_name": "kevinbluett/cs4032_project",
"path": "src/servers/locking_service.py",
"copies": "1",
"size": "1302",
"license": "mit",
"hash": 4685300653811858000,
"line_mean": 29.3023255814,
"line_max": 156,
"alpha_frac": 0.5967741935,
"autogenerated": false,
"ratio": 3.7306590257879657,
"conf... |
__author__ = 'kevin'
# import statistics as stat
import networkx as nx
import os
from attacksurfacemeter.call import Call
from attacksurfacemeter.call_graph import CallGraph
from attacksurfacemeter.environments import Environments
from attacksurfacemeter.loaders.javacg_loader import JavaCGLoader
class AndroidCallGr... | {
"repo_name": "andymeneely/attack-surface-metrics",
"path": "attacksurfacemeter/android_call_graph.py",
"copies": "1",
"size": "9990",
"license": "mit",
"hash": 113946836268504770,
"line_mean": 38.02734375,
"line_max": 135,
"alpha_frac": 0.6162162162,
"autogenerated": false,
"ratio": 4.0136601044... |
__author__ = 'kevin'
import sys
import os
import csv
from pygit2 import Repository
from subprocess import call, check_output
contrib_file_prefix = "contrib_"
contrib_file_extension = ".csv"
# file_name lines_count top_single_dev_contribution_knowledge top_single_dev_contribution_knowledge_percent
csv_header = ['rele... | {
"repo_name": "megakevin/single-authored-code-evolution-analysis",
"path": "get_top_devs.py",
"copies": "1",
"size": "2080",
"license": "mit",
"hash": 8379111195275326000,
"line_mean": 29.6029411765,
"line_max": 107,
"alpha_frac": 0.5586538462,
"autogenerated": false,
"ratio": 3.7076648841354722,... |
__author__ = 'kevin'
class Store():
def __init__(self):
self.available_items = []
self.customer_list = []
class InventoryItem():
def __init__(self, name, on_hand, price):
self.name = name
self.on_hand = on_hand
self.price = price
def __repr__(self):
outpu... | {
"repo_name": "bobbybabra/codeGuild",
"path": "kevinStore.py",
"copies": "1",
"size": "2222",
"license": "bsd-2-clause",
"hash": -5598137168085619000,
"line_mean": 20.3653846154,
"line_max": 62,
"alpha_frac": 0.5783078308,
"autogenerated": false,
"ratio": 3.41321044546851,
"config_test": false,... |
__author__ = 'Kevin-Patxi'
import matplotlib.pyplot as plt
with open("octrl.log",'r') as f:
loc_x = []
loc_y = []
loc_z = []
loc_yaw =[]
loc_pitch =[]
loc_roll =[]
roll= []
pitch = []
yaw = []
thrust = []
in_out_toggle = 0
i=0
for line in f:
if "DEBUG" in... | {
"repo_name": "friend0/tower",
"path": "logs/logparser.py",
"copies": "1",
"size": "2096",
"license": "isc",
"hash": -1086804186349422600,
"line_mean": 20.387755102,
"line_max": 64,
"alpha_frac": 0.4990458015,
"autogenerated": false,
"ratio": 3.1471471471471473,
"config_test": false,
"has_no_... |
__author__ = 'Kevin'
from ..protobuf import *
from . import igt_base_template
class NotyPopLoadTemplate(igt_base_template.BaseTemplate):
def __init__(self):
igt_base_template.BaseTemplate.__init__(self)
self.notyIcon = ""
self.logoUrl = ""
self.notyTitle = ""
s... | {
"repo_name": "alphapigger/igetui",
"path": "igetui/template/igt_notypopload_template.py",
"copies": "1",
"size": "3373",
"license": "mit",
"hash": -7525204340152186000,
"line_mean": 33.5052631579,
"line_max": 107,
"alpha_frac": 0.6169581975,
"autogenerated": false,
"ratio": 3.7025246981339186,
... |
__author__ = 'Kevin'
from protobuf import *
import igt_base_template
class NotyPopLoadTemplate(igt_base_template.BaseTemplate):
def __init__(self):
igt_base_template.BaseTemplate.__init__(self)
self.notyIcon = ""
self.logoUrl = ""
self.notyTitle = ""
self.notyCon... | {
"repo_name": "jerryjobs/thirdpartPushSystem",
"path": "push/getui/igetui/template/igt_notypopload_template.py",
"copies": "3",
"size": "3362",
"license": "apache-2.0",
"hash": -6524970135013147000,
"line_mean": 33.7659574468,
"line_max": 107,
"alpha_frac": 0.6177870315,
"autogenerated": false,
"... |
__author__ = "Kevin-Roberts"
from trader import Trader, CoinOrder
def main():
api_key = None
OAUTH2_TEMP = None
# Edit this value with your api_key or oauth2credenial, uncomment the one you choose to use
# api_key = "longcharacterstring of api_key given by coinbase"
# OAUTH2_TEMP ='''{"_module": ... | {
"repo_name": "Kevin-Roberts/coinbase_trader",
"path": "testTrader.py",
"copies": "1",
"size": "3521",
"license": "mit",
"hash": 5891421004958979000,
"line_mean": 59.724137931,
"line_max": 884,
"alpha_frac": 0.6665719966,
"autogenerated": false,
"ratio": 3.0617391304347827,
"config_test": false... |
__author__ = 'Kevin Rue-Albrecht'
import argparse
import os
import re
import sys
def check_valid_reports(files_in):
for file_in in files_in:
if not os.path.isfile(file_in):
print("Error: Report file was not found: %s" % file_in)
sys.exit(2)
def get_input_reports(list_reports):
... | {
"repo_name": "kevinrue/NGS",
"path": "trim/Trimmomatic_summary.py",
"copies": "1",
"size": "6080",
"license": "mit",
"hash": 2409181671591934000,
"line_mean": 42.1205673759,
"line_max": 110,
"alpha_frac": 0.6638157895,
"autogenerated": false,
"ratio": 3.867684478371501,
"config_test": false,
... |
__author__ = 'kevinschoon@gmail.com'
import os
import argparse
import asyncio
import hashlib
import hmac
import json
import logging
import dbm
from yaml import load
from aiohttp import web, request, BasicAuth
logger = logging.getLogger(__name__)
class MgSubscriber:
"""
Add users defined in the "subscriptio... | {
"repo_name": "kevinschoon/mailgun_receiver",
"path": "mg_receiver/server.py",
"copies": "1",
"size": "7165",
"license": "apache-2.0",
"hash": -6396163878844438000,
"line_mean": 34.1225490196,
"line_max": 115,
"alpha_frac": 0.58897418,
"autogenerated": false,
"ratio": 3.797032326444091,
"config... |
__author__ = 'kevinschoon@gmail.com'
import os
import unittest
from haproxy.client import Templater, HAProxyConfig, HAProxyProcess
from haproxy.models import BackendSection, GlobalSection
from haproxy.exceptions import BadDeclaration
class TestTemplater(unittest.TestCase):
def setUp(self):
self.template... | {
"repo_name": "greencase/haproxy-python",
"path": "tests/test_client.py",
"copies": "1",
"size": "2138",
"license": "apache-2.0",
"hash": 8788016838729174000,
"line_mean": 33.4838709677,
"line_max": 87,
"alpha_frac": 0.6814780168,
"autogenerated": false,
"ratio": 3.6798623063683307,
"config_tes... |
__author__ = 'kevinschoon@gmail.com'
"""
This tool parses the "keyword" sections copied from HAProxy's configuration file....it is a far from an ideal solution.
"""
# TODO: Import configuration keys programmatically.
import re
global_config = {
'1.5': """
* Process management and security
- ca-base
- ... | {
"repo_name": "greencase/haproxy-python",
"path": "haproxy/config.py",
"copies": "1",
"size": "15994",
"license": "apache-2.0",
"hash": -72929726988072740,
"line_mean": 54.5347222222,
"line_max": 119,
"alpha_frac": 0.2872327123,
"autogenerated": false,
"ratio": 5.066202090592334,
"config_test":... |
import copy
import json
import webapp2
import datetime
import bson.json_util
def _dict_merge(a, b):
result = copy.deepcopy(a)
for k, v in b.iteritems():
if k in result and isinstance(result[k], dict):
result[k] = _dict_merge(result[k], v)
else:
result[k] = copy.deepcop... | {
"repo_name": "scitran/central",
"path": "remotes.py",
"copies": "1",
"size": "2045",
"license": "mit",
"hash": -6673712001543353000,
"line_mean": 45.4772727273,
"line_max": 125,
"alpha_frac": 0.591198044,
"autogenerated": false,
"ratio": 3.645276292335116,
"config_test": false,
"has_no_keywo... |
import logging
log = logging.getLogger('scitran.central')
import json
import webapp2
import datetime
import urlparse
import requests
import jsonschema
import bson.json_util
class Instances(webapp2.RequestHandler):
"""API route: /api/instances"""
def get(self):
"""Return info about all instances.""... | {
"repo_name": "scitran/central",
"path": "instances.py",
"copies": "1",
"size": "6184",
"license": "mit",
"hash": 2252284134833028900,
"line_mean": 38.3885350318,
"line_max": 131,
"alpha_frac": 0.5346054334,
"autogenerated": false,
"ratio": 4.020806241872561,
"config_test": false,
"has_no_key... |
import webapp2
import markdown
class Core(webapp2.RequestHandler):
def get(self):
"""Return API documentation"""
resources = """Resource | Description
:-----------------------------------------------|:-----------
api/registration ... | {
"repo_name": "scitran/central",
"path": "core.py",
"copies": "1",
"size": "2539",
"license": "mit",
"hash": 8033453847024932000,
"line_mean": 62.475,
"line_max": 149,
"alpha_frac": 0.5675462781,
"autogenerated": false,
"ratio": 3.7782738095238093,
"config_test": false,
"has_no_keywords": fal... |
"""
nimsdata.medimg.dcm.mr.generic_mr
=================================
Generic MR Dicom functions to use for composing the NIMSDicom class.
These functions are meant to be imported by and used within
dcm.mr.ge or dcm.mr.siemens.
note: direct usage of these functions is an "advanced" topic.
"""
import logging
impo... | {
"repo_name": "scitran/data",
"path": "scitran/data/medimg/dcm/mr/mr.py",
"copies": "1",
"size": "15756",
"license": "mit",
"hash": -3030103190010993000,
"line_mean": 33.3267973856,
"line_max": 141,
"alpha_frac": 0.6285224676,
"autogenerated": false,
"ratio": 3.3637916310845433,
"config_test": ... |
"""
nimsdata.medimg.dcm.mr.ge
=========================
load all data from a set of GE Dicoms, almost all information is available via non-private tags.
Cannot be instantiated. This object is merely a container for GE specific processing functions.
GE saves screenshot of the graphical prescription for each scan, t... | {
"repo_name": "cni/nimsdata",
"path": "medimg/dcm/mr/ge.py",
"copies": "1",
"size": "13638",
"license": "mit",
"hash": -6946231237964968000,
"line_mean": 44.7651006711,
"line_max": 159,
"alpha_frac": 0.6438627365,
"autogenerated": false,
"ratio": 3.211207911466918,
"config_test": false,
"has_... |
"""
nimsdata.medimg.dcm.mr.siemens
==============================
Load all data from a set of siemens dicoms.
Not all information required is available via non-private tags.
Cannot be instantiated. This is merely a container for Siemens specific functions.
however, the CSA Series Header and CSA Image Header are s... | {
"repo_name": "cni/nimsdata",
"path": "medimg/dcm/mr/siemens.py",
"copies": "1",
"size": "8882",
"license": "mit",
"hash": -1183112669341595600,
"line_mean": 44.3163265306,
"line_max": 159,
"alpha_frac": 0.660211664,
"autogenerated": false,
"ratio": 3.104508912967494,
"config_test": false,
"h... |
"""
nimsdata.medimg.dcm.sc.siemens
==============================
Not implemented.
"""
import logging
import generic_sc
log = logging.getLogger(__name__)
SIEMENS_TYPE_DIFF_FA = ['DERIVED', 'PRIMARY', 'DIFFUSION', 'FA', 'ND']
SIEMENS_TYPE_DIFF_TENSOR = ['DERIVED', 'PRIMARY', 'DIFFUSION', 'TENSOR', 'ND']
SIEMENS... | {
"repo_name": "cni/nimsdata",
"path": "medimg/dcm/sc/siemens.py",
"copies": "1",
"size": "3853",
"license": "mit",
"hash": 3356916639944051000,
"line_mean": 44.3294117647,
"line_max": 140,
"alpha_frac": 0.6613028809,
"autogenerated": false,
"ratio": 2.8477457501847745,
"config_test": true,
"h... |
"""
nimsdata.medimg.medimg
======================
Contains generally useful functions to parse information from a medical image, such as dicom,
pfile, siemens raw, or nifti. Which allows all such medical images to use the same fxns to
parse data in a consistent way.
Contains base class MedImgReader, MedImgWriter, wh... | {
"repo_name": "cni/nimsdata",
"path": "medimg/medimg.py",
"copies": "1",
"size": "18074",
"license": "mit",
"hash": -980892387335441500,
"line_mean": 27.2848200313,
"line_max": 136,
"alpha_frac": 0.5453137103,
"autogenerated": false,
"ratio": 3.6176941553242594,
"config_test": false,
"has_no_... |
"""
nimsdata.medimg
===============
The nimsdata.medimg module provides reading and writing capabilities for medical image file types.
Reading from dicoms and niftis(in-progress), and writing to niftis.
Currently medimg module includes response data that is associated with medical images such as
physiological record... | {
"repo_name": "cni/nimsdata",
"path": "medimg/__init__.py",
"copies": "1",
"size": "1365",
"license": "mit",
"hash": -6811668108669843000,
"line_mean": 34,
"line_max": 98,
"alpha_frac": 0.7706959707,
"autogenerated": false,
"ratio": 3.5921052631578947,
"config_test": false,
"has_no_keywords":... |
"""
scitran.data.medimg.medimg
==========================
Contains generally useful functions to parse information from a medical image, such as dicom,
pfile, siemens raw, or nifti. Which allows all such medical images to use the same fxns to
parse data in a consistent way.
Contains base class MedImgReader, MedImgWr... | {
"repo_name": "scitran/data",
"path": "scitran/data/medimg/medimg.py",
"copies": "1",
"size": "18754",
"license": "mit",
"hash": 5177651762880453000,
"line_mean": 27.0748502994,
"line_max": 114,
"alpha_frac": 0.5386584195,
"autogenerated": false,
"ratio": 3.6507689312828497,
"config_test": fals... |
"""
scitran.data.medimg
===================
The sctran.data.medimg module provides reading and writing capabilities for medical image file types.
Reading from dicoms and niftis(in-progress), and writing to niftis.
Currently medimg module includes response data that is associated with medical images such as
physiolog... | {
"repo_name": "scitran/data",
"path": "scitran/data/medimg/__init__.py",
"copies": "2",
"size": "1376",
"license": "mit",
"hash": 4739275874313460000,
"line_mean": 34.2820512821,
"line_max": 101,
"alpha_frac": 0.7681686047,
"autogenerated": false,
"ratio": 3.574025974025974,
"config_test": fals... |
"""Test nimsdata package."""
import os
import glob
import datetime
import numpy as np
from nose.plugins.attrib import attr
from numpy.testing.decorators import skipif
from nose.tools import ok_, eq_, raises, assert_raises
import scitran.data.medimg
import scitran.data.tempdir as tempfile
# data is stored separatel... | {
"repo_name": "scitran/data",
"path": "scitran/data/test/test_medimg.py",
"copies": "2",
"size": "2086",
"license": "mit",
"hash": 3895445297482384400,
"line_mean": 29.6764705882,
"line_max": 100,
"alpha_frac": 0.6490891659,
"autogenerated": false,
"ratio": 2.988538681948424,
"config_test": tru... |
"""Test nimsdata package."""
import os
import glob
import numpy as np
from nose.plugins.attrib import attr
from numpy.testing.decorators import skipif
from nose.tools import ok_, eq_, raises, assert_raises
import scitran.data as scidata
import scitran.data.tempdir as tempfile
# data is stored separately in nimsdat... | {
"repo_name": "scitran/data",
"path": "scitran/data/test/test_data.py",
"copies": "2",
"size": "4582",
"license": "mit",
"hash": -5609635501689800000,
"line_mean": 33.9770992366,
"line_max": 112,
"alpha_frac": 0.6721955478,
"autogenerated": false,
"ratio": 3.3372177713037146,
"config_test": tru... |
"""Tests for nimsdata.nimsdata."""
import os
import numpy as np
from nose.plugins.attrib import attr
from numpy.testing.decorators import skipif
from nose.tools import ok_, eq_, raises, assert_raises
import nimsdata
# data is stored separately in nimsdata_testdata
# located at the top level of the testing directory... | {
"repo_name": "cni/nimsdata",
"path": "test/test_dicom.py",
"copies": "1",
"size": "2425",
"license": "mit",
"hash": 8997514553984829000,
"line_mean": 26.8735632184,
"line_max": 111,
"alpha_frac": 0.6354639175,
"autogenerated": false,
"ratio": 3.340220385674931,
"config_test": true,
"has_no_k... |
__author__ = 'keyz'
from io import BytesIO
import StringIO
import datetime
import time
from os import path
from celery import Celery
from celery.utils.log import get_task_logger
import redis
from PIL import Image
import mapnik
import math
from metatile_pb2 import Metatile
from utils import get_metatile_coords, get_an... | {
"repo_name": "keyz182/Pyler",
"path": "tasks.py",
"copies": "1",
"size": "5485",
"license": "mit",
"hash": 6317887216381713000,
"line_mean": 29.1373626374,
"line_max": 110,
"alpha_frac": 0.6273473108,
"autogenerated": false,
"ratio": 3.2474837181764356,
"config_test": false,
"has_no_keywords... |
__author__ = 'keyz'
from os import path, makedirs, unlink
from config import TILE_PATH
from metatile_pb2 import Metatile
METATILE_SIZE = 8
'''
Assembles the metatile path and checks if it exists.
If it does not, it ensures all the directories leading to it are created.
'''
def get_and_create_tile_path(style, z, x, y)... | {
"repo_name": "keyz182/Pyler",
"path": "utils.py",
"copies": "1",
"size": "1754",
"license": "mit",
"hash": -2032914042229339600,
"line_mean": 25.1791044776,
"line_max": 74,
"alpha_frac": 0.610604333,
"autogenerated": false,
"ratio": 3.1209964412811386,
"config_test": false,
"has_no_keywords"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.