text stringlengths 0 1.05M | meta dict |
|---|---|
__author__ = 'Jesus Maria Escudero'
import numpy as np
def sinusoid(amplitude, frequency, phi, sampling_frequency, duration):
"""
Inputs:
amplitude (float) = amplitude of the sinusoid
frequency (float) = frequency of the sinusoid in Hz
phi (float) = initial phase of the sinusoid in ... | {
"repo_name": "jmescuderojustel/signal-processing",
"path": "src/signal_generator.py",
"copies": "1",
"size": "1431",
"license": "mit",
"hash": -8224570874243970000,
"line_mean": 31.5454545455,
"line_max": 96,
"alpha_frac": 0.6722571628,
"autogenerated": false,
"ratio": 3.846774193548387,
"conf... |
__author__ = 'Jesus Maria'
import numpy as np
import wave
import struct
def read(file_path):
"""
Inputs:
file_path (string) = path for the file we want to get samples from.
It has to be a WAV file with just one channel (mono)
Output:
The function should return an array with the fil... | {
"repo_name": "jmescuderojustel/signal-processing",
"path": "src/wav_manager.py",
"copies": "1",
"size": "1084",
"license": "mit",
"hash": -331227326557295000,
"line_mean": 25.4634146341,
"line_max": 75,
"alpha_frac": 0.6337638376,
"autogenerated": false,
"ratio": 3.6254180602006687,
"config_te... |
__author__ = 'jevgenik'
import os, shutil
import pkg_resources
from string import Template
from os.path import join as path_join, dirname, isfile
from PIL import Image
import cgi
import fnmatch
import re
import time
from multiprocessing import Pool, cpu_count
import ConfigParser
INDEX_FILE = 'index.html'
ORIGINAL_DIR... | {
"repo_name": "yozik04/fotorama_creator",
"path": "fotorama_creator/gallery.py",
"copies": "1",
"size": "6285",
"license": "mit",
"hash": 9119047553114936000,
"line_mean": 31.9109947644,
"line_max": 242,
"alpha_frac": 0.6626889419,
"autogenerated": false,
"ratio": 3.3009453781512605,
"config_te... |
__author__ = 'jfernandez'
from constants import ACCEPT_HEADER_JSON, CONTENT_TYPE_XML
import xmltodict
import dicttoxml
import json
def _xml_to_dict(xml_to_convert, attr_prefix=''):
"""
Function to convert XML response to Python dict.
:param xml_to_convert: XML to be converted
:param attr_prefix: If r... | {
"repo_name": "telefonicaid/fiware-puppetwrapper",
"path": "acceptance_tests/commons/utils.py",
"copies": "1",
"size": "2759",
"license": "apache-2.0",
"hash": -5304147700014422000,
"line_mean": 39.5735294118,
"line_max": 105,
"alpha_frac": 0.6930047119,
"autogenerated": false,
"ratio": 3.8055172... |
__author__ = 'jfernandez'
from lettuce import world
from commons.authentication_utils import get_auth_data_from_keystone
from constants import AUTH_TOKEN_HEADER, TENANT_ID_HEADER, CONTENT_TYPE, CONTENT_TYPE_JSON, ACCEPT_HEADER, ACCEPT_HEADER_JSON
from commons.rest_utils import RestUtils
rest_utils = RestUtils()
def... | {
"repo_name": "telefonicaid/fiware-puppetwrapper",
"path": "acceptance_tests/commons/terrain_utils.py",
"copies": "1",
"size": "1680",
"license": "apache-2.0",
"hash": -904300185687378000,
"line_mean": 34,
"line_max": 125,
"alpha_frac": 0.7125,
"autogenerated": false,
"ratio": 3.582089552238806,
... |
__author__ = 'jfernandez'
from lettuce import world, step
from commons.rest_utils import RestUtils
from commons.constants import *
from commons.utils import dict_to_xml, response_body_to_dict, body_model_to_body_request
from commons.product_body import default_product, create_product_release, product_with_all_paramete... | {
"repo_name": "telefonicaid/fiware-sdc",
"path": "test/acceptance/commons/product_steps.py",
"copies": "2",
"size": "6055",
"license": "apache-2.0",
"hash": -5642567443695047000,
"line_mean": 44.1940298507,
"line_max": 118,
"alpha_frac": 0.6090834021,
"autogenerated": false,
"ratio": 4.4358974358... |
__author__ = 'jflaisha'
from concurrent.futures import ProcessPoolExecutor as Pool
from functools import partial
import logging
import multiprocessing
#import numpy as np
import os
import sys
import sam_callable
try:
import superprzm # Import superprzm.dll / .so
_dll_loaded = True
except ImportError as e:
... | {
"repo_name": "puruckertom/ubertool",
"path": "ubertool/sam_old/sam_multiprocessing.py",
"copies": "1",
"size": "8682",
"license": "unlicense",
"hash": -770549884738831200,
"line_mean": 33.728,
"line_max": 185,
"alpha_frac": 0.6087307072,
"autogenerated": false,
"ratio": 3.8045574057844,
"confi... |
__author__ = 'jflaisha'
import logging, numpy as np, requests, json, cPickle
try:
import superprzm # Import superprzm.dll / .so
_dll_loaded = True
except ImportError as e:
logging.exception(e)
_dll_loaded = False
def run(jid, sam_bin_path, name_temp, section, array_size):
"""
Run SuperPRZM... | {
"repo_name": "puruckertom/ubertool",
"path": "ubertool/sam_old/sam_callable.py",
"copies": "1",
"size": "2287",
"license": "unlicense",
"hash": 1692234210362617000,
"line_mean": 26.5542168675,
"line_max": 111,
"alpha_frac": 0.6156536948,
"autogenerated": false,
"ratio": 3.082210242587601,
"con... |
__author__ = 'jgarman'
from cbopensource.connectors.bluecoat import __version__
from distutils.core import setup
from distutils.core import Command
from distutils.command.bdist_rpm import bdist_rpm
from distutils import log
from distutils.file_util import write_file
from distutils.util import change_root, convert_pa... | {
"repo_name": "carbonblack/cb-bluecoat-connector",
"path": "setup.py",
"copies": "1",
"size": "6258",
"license": "mit",
"hash": -6424357598045074000,
"line_mean": 34.3615819209,
"line_max": 107,
"alpha_frac": 0.5757430489,
"autogenerated": false,
"ratio": 4.194369973190349,
"config_test": false... |
__author__ = 'jgarman'
from flask_admin import Admin, BaseView, expose
from flask.ext import admin
from flask_admin.contrib import sqla
from flask import abort, redirect, url_for, request, flash
from flask.ext.login import current_user
from app.models import User, CbServer
from wtforms.fields import PasswordField, Bo... | {
"repo_name": "carbonblack/cb-2fa-login",
"path": "app/admin/__init__.py",
"copies": "1",
"size": "8895",
"license": "mit",
"hash": -1166333379493561600,
"line_mean": 37.8427947598,
"line_max": 124,
"alpha_frac": 0.6109050028,
"autogenerated": false,
"ratio": 4.123783031988873,
"config_test": f... |
__author__ = 'jgarman'
from flask import render_template, flash, redirect, url_for, request, session, Response, Blueprint
idp_component = Blueprint('idp', __name__, template_folder='templates')
from hashlib import sha1
from forms import LoginForm
from lib import duo_web
from flask.ext.login import login_required, lo... | {
"repo_name": "carbonblack/cb-2fa-login",
"path": "app/idp/__init__.py",
"copies": "1",
"size": "9833",
"license": "mit",
"hash": 969188971458977800,
"line_mean": 32.1077441077,
"line_max": 122,
"alpha_frac": 0.6214786942,
"autogenerated": false,
"ratio": 3.6813927368026955,
"config_test": true... |
__author__ = 'jgarman'
import unittest
from cbint.utils.detonation import DetonationDaemon, CbAPIUpToDateProducerThread, CbAPIHistoricalProducerThread
import os
import tempfile
import sys
import threading
import socket
from time import sleep
import dateutil.parser
import logging
sys.path.append(os.path.dirname(os.pat... | {
"repo_name": "carbonblack/cb-integration",
"path": "tests/test_daemon.py",
"copies": "1",
"size": "3094",
"license": "mit",
"hash": 7353147067261343000,
"line_mean": 34.1590909091,
"line_max": 118,
"alpha_frac": 0.6528765352,
"autogenerated": false,
"ratio": 3.627198124267292,
"config_test": t... |
__author__ = 'jgarman'
import threading
from time import sleep
import random
from cbint.utils.detonation.binary_queue import SqliteFeedServer, SqliteQueue, BinaryDatabaseArbiter, BinaryDatabaseController
import datetime
import string
import unittest
import tempfile
import os
import logging
logging.basicConfig(level=... | {
"repo_name": "carbonblack/cb-integration",
"path": "tests/test_concurrency.py",
"copies": "1",
"size": "3149",
"license": "mit",
"hash": -8908208489240590000,
"line_mean": 29.572815534,
"line_max": 126,
"alpha_frac": 0.610670054,
"autogenerated": false,
"ratio": 3.892459826946848,
"config_test... |
__author__ = 'JGJeffryes'
from pymongo import MongoClient
import sys
import platform
import time
from optparse import OptionParser
from minedatabase.queries import quick_search
from minedatabase.databases import establish_db_client
"""
def write_pathway_html(db, path, outfile):
html_printer = Printer(db)
for ... | {
"repo_name": "JamesJeffryes/MINE-Database",
"path": "Scripts/pathway_search.py",
"copies": "1",
"size": "8744",
"license": "mit",
"hash": 1812008670065753000,
"line_mean": 44.7853403141,
"line_max": 123,
"alpha_frac": 0.5580969808,
"autogenerated": false,
"ratio": 4.005497022446175,
"config_te... |
__author__ = 'jgrant'
import copy
import logging
import ogre_parse.basemodel
import ogre_parse.submodel
# this will split Materials with a single-pass Technique into multiple passes
class SplitPass(object):
def __init__(self):
# can configure these
self.split_iteration = 'once_per_light'
... | {
"repo_name": "cyrfer/ogre_parse",
"path": "ogre_parse/transforms.py",
"copies": "1",
"size": "15495",
"license": "mit",
"hash": -874971988688434600,
"line_mean": 41.1059782609,
"line_max": 145,
"alpha_frac": 0.5317844466,
"autogenerated": false,
"ratio": 3.628805620608899,
"config_test": false... |
__author__ = 'jgrant'
import unittest
import ogre_parse.model
import ogre_parse.subreader
import ogre_parse.reader
test_model_texture = """
texture_unit albedo
{
texture_alias alias
texture file.ext
tex_address_mode clamp
filtering none
}
"""
test_model_shaderref_vert = '''
vertex_program_ref myVertS... | {
"repo_name": "cyrfer/ogre_parse",
"path": "ogre_parse/tests_model.py",
"copies": "1",
"size": "3953",
"license": "mit",
"hash": -1626802343449640200,
"line_mean": 26.0753424658,
"line_max": 90,
"alpha_frac": 0.6043511257,
"autogenerated": false,
"ratio": 3.3931330472103003,
"config_test": true... |
__author__ = 'jgrant'
import unittest
# same imports as client code
import ogre_parse.reader
import ogre_parse.subreader
import ogre_parse.basereader
import ogre_parse.basemodel
from ogre_parse.basemodel import *
import ogre_parse.basereader
import ogre_parse.basemodel
import pyparsing
from pyparsing import *
impor... | {
"repo_name": "cyrfer/ogre_parse",
"path": "ogre_parse/tests_reader.py",
"copies": "1",
"size": "29134",
"license": "mit",
"hash": -9028871892102296000,
"line_mean": 21.7254290172,
"line_max": 111,
"alpha_frac": 0.6227088625,
"autogenerated": false,
"ratio": 3.2475755211236206,
"config_test": t... |
__author__ = 'jgrant'
from ogre_parse.basemodel import *
from pyparsing import ParseException
# TODO: for now, __repr__ = __str__, but I want to improve this depending on where __repr__ is used.
# http://stackoverflow.com/questions/1436703/difference-between-str-and-repr-in-python
# should be hooked up to a 'sub... | {
"repo_name": "cyrfer/ogre_parse",
"path": "ogre_parse/submodel.py",
"copies": "1",
"size": "21851",
"license": "mit",
"hash": 3464547457353813500,
"line_mean": 35.6627516779,
"line_max": 153,
"alpha_frac": 0.541897396,
"autogenerated": false,
"ratio": 3.6177152317880794,
"config_test": false,
... |
__author__ = 'jgrant'
# hook this up to a ogre_parse.reader.ReadShaderDeclaration
class ShaderDeclaration(object):
def __init__(self, tokens=None):
self.stage = '' # vertex_program
self.name = '' # myVertShader
self.language = '' # hlsl or glsl
self.source = '' # cloud... | {
"repo_name": "cyrfer/ogre_parse",
"path": "ogre_parse/model.py",
"copies": "1",
"size": "6309",
"license": "mit",
"hash": -6449140637257955000,
"line_mean": 27.8082191781,
"line_max": 90,
"alpha_frac": 0.489618006,
"autogenerated": false,
"ratio": 3.6765734265734267,
"config_test": false,
"h... |
__author__ = 'jgressmann'
from datetime import date
import pickle
import sys
import traceback
import urllib
import urlparse
#import urlresolver
import xbmc
import xbmcaddon
import xbmcgui
import xbmcplugin
import zlib
import resources.lib.sc2links as sc2links
addon = xbmcaddon.Addon()
#__addonname__ = addon.getAddon... | {
"repo_name": "jgressmann/sc2links",
"path": "addon.py",
"copies": "1",
"size": "11878",
"license": "mit",
"hash": 7328084158772807000,
"line_mean": 28.8442211055,
"line_max": 133,
"alpha_frac": 0.5335915137,
"autogenerated": false,
"ratio": 3.736395092796477,
"config_test": false,
"has_no_ke... |
__author__ = 'jhala'
#from bottle import route, run, debug, template, request, static_file, error, response
from bottle import route, response, request
import json
import os
@route('/getlocations', method='GET')
def new_item():
import ImageList
response.content_type = 'application/json'
return ImageList... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/Bottle500.py",
"copies": "1",
"size": "1789",
"license": "mit",
"hash": 3284950794077940700,
"line_mean": 23.1756756757,
"line_max": 87,
"alpha_frac": 0.6327557295,
"autogenerated": false,
"ratio": 3.6288032454361057,
"... |
__author__ = 'jhala'
import re
import Helpers
import logging
import logging.config
import json
logger = logging.getLogger('SerializeImageFeatures.py')
def ToDict(matlabFeatureOutputFile):
logger.info('Serializing matlab feature output.')
try:
isData=False
imgDict = {}
featureName=''
... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/SerializeImageFeatures.py",
"copies": "1",
"size": "1658",
"license": "mit",
"hash": -3922083227829143000,
"line_mean": 24.90625,
"line_max": 84,
"alpha_frac": 0.4613992762,
"autogenerated": false,
"ratio": 4.644257703081... |
__author__ = 'jhala'
import re
import Helpers
import logging
import logging.config
import json
logging.config.fileConfig('logging.conf')
logger = logging.getLogger(__name__)
def Get(matlabFeatureOutputFile):
isData=False
imgDict = {}
featureName=''
stat=0
for line in open(matlabFeatureOutputFile)... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python - Copy/MatlabOutputToJson.py",
"copies": "2",
"size": "1398",
"license": "mit",
"hash": 199425279414971940,
"line_mean": 22.3,
"line_max": 80,
"alpha_frac": 0.4885550787,
"autogenerated": false,
"ratio": 4.18562874251497,... |
__author__ = 'jhala'
import re
import Helpers
import logging
import logging.config
import json
logging.config.fileConfig('logging.conf')
logger = logging.getLogger(__name__)
def ToDict(matlabFeatureOutputFile):
isData=False
imgDict = {}
featureName=''
stat=0
for line in open(matlabFeatureOutputFi... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python - Copy/SerializeImageFeatures.py",
"copies": "1",
"size": "1394",
"license": "mit",
"hash": -971415898234168600,
"line_mean": 22.2333333333,
"line_max": 80,
"alpha_frac": 0.487804878,
"autogenerated": false,
"ratio": 4.19... |
__author__ = 'jhala'
import types
import os.path, time
import json
import logging
import logging.config
#import sys
#logging.config.fileConfig('logging.conf')
import re
import hashlib
logger = logging.getLogger('Helpers.py')
appInfo='appinfo.json'
'''
Check that the file is not in the process of being copied
'''
def... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/Helpers.py",
"copies": "1",
"size": "8320",
"license": "mit",
"hash": -3659009775046535000,
"line_mean": 28.1929824561,
"line_max": 333,
"alpha_frac": 0.6669471154,
"autogenerated": false,
"ratio": 3.641137855579869,
"c... |
__author__ = 'jhala'
import types
import os.path, time
import json
import logging
import logging.config
logging.config.fileConfig('logging.conf')
logger = logging.getLogger(__name__)
import re
appInfo='appinfo.json'
''' Helper Functions '''
''' get the file as an array of arrays ( header + rows and columns) '''
def... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python - Copy/Helpers.py",
"copies": "1",
"size": "4339",
"license": "mit",
"hash": 956866494557903000,
"line_mean": 29.3426573427,
"line_max": 333,
"alpha_frac": 0.6572943074,
"autogenerated": false,
"ratio": 3.7180805484147386... |
__author__ = 'jhala'
import Helpers
import json
import os
''' creates a location lookup, and an associated image lookup '''
''' main '''
if __name__ == "__main__":
fil = r"c:\capstone\featureInfo.csv"
outLoc = r"c:\capstone\locationLookup.json"
imageBaseDir="C:\\Users\\jhala\\angular-seed\\app\\images\\"... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "PythonScripts/LocationLookup.py",
"copies": "1",
"size": "2163",
"license": "mit",
"hash": 2599795270640477700,
"line_mean": 32.2769230769,
"line_max": 227,
"alpha_frac": 0.5570966251,
"autogenerated": false,
"ratio": 4.159615384615... |
__author__ = 'jhala'
import os
import json
import Helpers
def getImageList():
# first lets create a simple dictionary of locations and images
simpleImageDict={}
for i in Helpers.getMainImageFileList():
locName=os.path.basename(os.path.dirname(i['imageFile']))
imgName=locName + '/'+ os.pat... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/ImageList.py",
"copies": "2",
"size": "1391",
"license": "mit",
"hash": 1556287550569987800,
"line_mean": 28.5957446809,
"line_max": 87,
"alpha_frac": 0.636232926,
"autogenerated": false,
"ratio": 3.9517045454545454,
"c... |
__author__ = 'jhala'
import re
import json
''' creates a dictionary of semantic elements '''
if __name__ == "__main__":
fil=r"c:\capstone\SemanticElements.csv"
outFil = r"c:\capstone\SemanticElements.json"
elementDict={}
subElementDict={}
prevMainId=None
mainId=None
lineNo=0
for row... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "PythonScripts/SemanticElementLookup.py",
"copies": "1",
"size": "1664",
"license": "mit",
"hash": -2597947903107891700,
"line_mean": 30.3962264151,
"line_max": 113,
"alpha_frac": 0.5504807692,
"autogenerated": false,
"ratio": 3.6571... |
__author__ = 'jhala'
import re
import os
import json
def getImageList():
imgList=[]
cnt=0
for root, dirs, files in os.walk(r'C:\Users\geoimages\angular-seed\app\images'):
cnt+=1
if cnt==1:
continue
#print root
locName=os.path.basename(root)
#print loc... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python - Copy/backup/ImageList.py",
"copies": "2",
"size": "1045",
"license": "mit",
"hash": 7519416327359251000,
"line_mean": 24.512195122,
"line_max": 121,
"alpha_frac": 0.5751196172,
"autogenerated": false,
"ratio": 3.6411149... |
__author__ = 'jhala'
import logging
import logging.config
import Helpers
import SysCall
import SerializeImageFeatures
import time
import SerializeSemanticElements
logging.config.fileConfig('logging.conf')
logger = logging.getLogger('ImageDataWriter')
import json
matLabFeatureScr=Helpers.getMatLabFeatureExtractScript(... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python - Copy/ImageDataWriter.py",
"copies": "1",
"size": "3733",
"license": "mit",
"hash": -3321208588103210500,
"line_mean": 33.5648148148,
"line_max": 133,
"alpha_frac": 0.5979105277,
"autogenerated": false,
"ratio": 3.958642... |
__author__ = 'jhala'
import logging
import logging.config
logging.config.fileConfig('logging.conf')
logger = logging.getLogger('ImageDataWriter')
import Helpers
import SysCall
import SerializeSemanticElements
import json
matLabFeatureScr=Helpers.getMatLabFeatureExtractScript()
matLabSemanticElementsScr=Helpers.getMat... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/ImageDataWriter.py",
"copies": "1",
"size": "2882",
"license": "mit",
"hash": -736459509328341200,
"line_mean": 35.025,
"line_max": 220,
"alpha_frac": 0.5999306037,
"autogenerated": false,
"ratio": 4.447530864197531,
"c... |
__author__ = 'jhala'
import re
import sys
import logging
import logging.config
import Helpers
import SysCall
import MatlabOutputToJson
import time
logging.config.fileConfig('logging.conf')
logger = logging.getLogger('BatchFeatureExtract')
matLabFeatureScr=Helpers.getMatLabFeatureExtractScript()
updateCount=0
errorCo... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/BatchFeatureExtract.py",
"copies": "4",
"size": "2441",
"license": "mit",
"hash": -6359479935686456000,
"line_mean": 34.3768115942,
"line_max": 137,
"alpha_frac": 0.6149119213,
"autogenerated": false,
"ratio": 3.532561505... |
__author__ = 'jhala'
import re
import numpy
import json
import logging
logger = logging.getLogger('SerializeImageFeatures.py')
import Helpers
def ToDict(lcImageDataFile):
logger.info('Serializng Land cover data in '+ lcImageDataFile + ' to dictionary')
try:
eDict=Helpers.getLandCoverReferenceDict(... | {
"repo_name": "dbk138/ImageRegionRecognition-FrontEnd",
"path": "app/python/SerializeSemanticElements.py",
"copies": "1",
"size": "2273",
"license": "mit",
"hash": -772025118557333200,
"line_mean": 27.425,
"line_max": 126,
"alpha_frac": 0.5648922129,
"autogenerated": false,
"ratio": 4.24859813084... |
__author__ = 'jhaux'
import cv2
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.axes3d import Axes3D
import os
import image_operations as imop
import ltm_analysis as ltm
import jimlib as jim
from numpy import linspace , arange , reshape ,zeros
from scipy.fftpack import fft2 , fftfreq
from cmath import pi
... | {
"repo_name": "jhaux/bin",
"path": "python/fft test.py",
"copies": "1",
"size": "2361",
"license": "mit",
"hash": -6988112855476981000,
"line_mean": 32.7285714286,
"line_max": 90,
"alpha_frac": 0.6992799661,
"autogenerated": false,
"ratio": 2.9923954372623576,
"config_test": false,
"has_no_ke... |
__author__ = 'jhaux'
import cv2
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import BoundaryNorm
from matplotlib.ticker import MaxNLocator
import matplotlib.image as mpimg
from matplotlib.patches import Rectangle
import scipy.ndimage as ndimage
import jimlib as jim
from PIL import Image
im... | {
"repo_name": "jhaux/bin",
"path": "python/image_operations.py",
"copies": "1",
"size": "14106",
"license": "mit",
"hash": -7108269784024983000,
"line_mean": 39.0767045455,
"line_max": 204,
"alpha_frac": 0.5925847157,
"autogenerated": false,
"ratio": 3.2390355912743973,
"config_test": false,
... |
__author__ = 'jhaux'
import jimlib as jim
import image_operations as imop
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import cv2
def rescale(image, low=0, top=100):
image[image > top] = top
image[image < low] = low
image -= image.min()
image *= 100/image.max()
re... | {
"repo_name": "jhaux/bin",
"path": "python/evaporation.py",
"copies": "1",
"size": "1572",
"license": "mit",
"hash": 566241190878747460,
"line_mean": 27.0892857143,
"line_max": 149,
"alpha_frac": 0.6272264631,
"autogenerated": false,
"ratio": 2.7010309278350517,
"config_test": false,
"has_no_... |
__author__ = 'jhaux'
import numpy as np
from scipy.optimize import leastsq
import pylab as plt
import image_operations as imop
import jimlib as jim
import os
def get_raw_intensities( image, patch):
''' Sum over all columns in a specified patch and put the results in an output file.
returns an array with the... | {
"repo_name": "jhaux/bin",
"path": "python/ltm_analysis.py",
"copies": "1",
"size": "22246",
"license": "mit",
"hash": 7128220912500738000,
"line_mean": 55.1792929293,
"line_max": 218,
"alpha_frac": 0.6205609997,
"autogenerated": false,
"ratio": 3.128832630098453,
"config_test": false,
"has_n... |
__author__ = 'jhaux'
import numpy as np
import cv2
import matplotlib.pyplot as plt
import os
import image_operations as imop
import ltm_analysis as ltm
import jimlib as jim
path_to_pics = u'/Users/jhaux/Desktop/Bachelorarbeit/Measurements/measurement_2015-02-02_14-03-19/measurement_2015-02-02_14-03-19/images/630_n... | {
"repo_name": "jhaux/bin",
"path": "python/waves_test.py",
"copies": "1",
"size": "4593",
"license": "mit",
"hash": 7473818475989044000,
"line_mean": 31.1188811189,
"line_max": 159,
"alpha_frac": 0.6226866971,
"autogenerated": false,
"ratio": 2.4680279419666844,
"config_test": false,
"has_no_... |
__author__ = 'jhlee'
import glob
#data preprocessing for merge img to tag
class Preprocessing:
def __init__(self):
self.img_root = None
self.txt_root = None
self.img_file_list = None
self.txt_file_list = None
#set image file path and image file list
def set_img_path(self, i... | {
"repo_name": "lheadjh/FaceTypeDetector",
"path": "preprocessing.py",
"copies": "1",
"size": "2453",
"license": "bsd-2-clause",
"hash": 3178122120426684000,
"line_mean": 29.2839506173,
"line_max": 73,
"alpha_frac": 0.5071341215,
"autogenerated": false,
"ratio": 3.459802538787024,
"config_test":... |
__author__ = 'jhlee'
import cv2
import stasm
import numpy as np
class Landmark():
def __init__(self, path):
self.path = path
self.img = cv2.imread(self.path, cv2.IMREAD_GRAYSCALE)
if self.img is None:
print "Error in get_face_line(): no image", path
raise SystemExi... | {
"repo_name": "lheadjh/FaceTypeDetector",
"path": "landmark.py",
"copies": "1",
"size": "2887",
"license": "bsd-2-clause",
"hash": -4574534074814767000,
"line_mean": 31.4494382022,
"line_max": 94,
"alpha_frac": 0.5663318324,
"autogenerated": false,
"ratio": 3.3183908045977013,
"config_test": fa... |
__author__ = 'jhlee'
import preprocessing
import landmark
import numpy as np
import pickle
import sys
import os.path as op
FTYPE = {
'Ovals': 0, 0:'Ovals',
'Circles': 1, 1:'Circles',
'Almonds': 2, 2:'Almonds',
'Rectangles': 3, 3:'Rectangles',
'Squares': 4, 4:'Squares',
'TD': 5, 5:'TD'
}
class... | {
"repo_name": "lheadjh/FaceTypeDetector",
"path": "data.py",
"copies": "1",
"size": "4145",
"license": "bsd-2-clause",
"hash": 8002791021006493000,
"line_mean": 31.1395348837,
"line_max": 81,
"alpha_frac": 0.5112183353,
"autogenerated": false,
"ratio": 3.3213141025641026,
"config_test": false,
... |
__author__ = 'jh'
__copyright__ = 'www.codeh.de'
import datetime
from django.db import models
from django.contrib.auth.models import User
class Tag(models.Model):
title = models.CharField(unique=True, max_length=10000)
def __unicode__(self):
return str(self.title)
def __str__(self):
re... | {
"repo_name": "jhcodeh/my-doku",
"path": "my_doku_application/my_doku/models.py",
"copies": "1",
"size": "1343",
"license": "mit",
"hash": 1536325918919485400,
"line_mean": 26.4285714286,
"line_max": 59,
"alpha_frac": 0.6805658972,
"autogenerated": false,
"ratio": 3.6997245179063363,
"config_te... |
__author__ = 'jh'
__copyright__ = 'www.codeh.de'
import pafy
import psutil
import threading
from django.shortcuts import render_to_response, redirect, render
from django.contrib import messages
from django.shortcuts import get_object_or_404
from django.views.generic.list import ListView
from django.views.generic.deta... | {
"repo_name": "jhcodeh/my-doku",
"path": "my_doku_application/my_doku/views.py",
"copies": "1",
"size": "6026",
"license": "mit",
"hash": 1022228172724686700,
"line_mean": 37.8774193548,
"line_max": 128,
"alpha_frac": 0.665781613,
"autogenerated": false,
"ratio": 4.167358229598894,
"config_test... |
__author__ = 'jh'
__copyright__ = 'www.codeh.de'
import pafy
import urllib
import os
from os.path import basename
from urllib.parse import urlsplit
from .models import Documentation
from my_doku_application.settings.dev import THUMBNAIL_ROOT, VIDEO_ROOT
class YoutubeDownloader(object):
def download(self, url):... | {
"repo_name": "jhcodeh/my-doku",
"path": "my_doku_application/my_doku/downloader.py",
"copies": "1",
"size": "1492",
"license": "mit",
"hash": -2811203918477789000,
"line_mean": 35.4146341463,
"line_max": 101,
"alpha_frac": 0.6782841823,
"autogenerated": false,
"ratio": 3.815856777493606,
"conf... |
__author__ = 'jiajunshen'
import numpy as np
import itertools as itr
import amitgroup as ag
from pnet.layer import Layer
from randomPartitionLogisticTheano import multiLogisticRegression
import pnet
from multiprocessing import Pool, Value, Array
shared_data = None
def init(_data):
global shared_data
shared_d... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/randomPartitionSVMLayer.py",
"copies": "1",
"size": "24193",
"license": "bsd-3-clause",
"hash": -428016842325438500,
"line_mean": 39.1877076412,
"line_max": 189,
"alpha_frac": 0.5497457942,
"autogenerated": false,
"ratio": 3.5969372584002377,
"... |
__author__ = 'jiajunshen'
import numpy as np
import itertools as itr
import amitgroup as ag
from pnet.layer import Layer
from sklearn import linear_model
from multiprocessing import Pool, Value, Array
from sklearn.utils.extmath import (safe_sparse_dot, logsumexp, squared_norm)
shared_data = None
def init(_data):
... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/combineQuardPool.py",
"copies": "1",
"size": "12520",
"license": "bsd-3-clause",
"hash": 6341649641271170000,
"line_mean": 39.2572347267,
"line_max": 145,
"alpha_frac": 0.5318690096,
"autogenerated": false,
"ratio": 3.574079360548102,
"config_t... |
__author__ = 'jiajunshen'
from pnet.layer import Layer
from sklearn.svm import LinearSVC
from pnet.layer import SupervisedLayer
from sklearn import cross_validation
import numpy as np
import amitgroup as ag
@Layer.register('pca-layer')
class IntermediateSupervisionLayer(Layer):
def __init__(self, numOfFeatures, p... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/intermediateSupervisionLayer.py",
"copies": "1",
"size": "1992",
"license": "bsd-3-clause",
"hash": -5556863123777005000,
"line_mean": 31.6721311475,
"line_max": 84,
"alpha_frac": 0.6219879518,
"autogenerated": false,
"ratio": 3.6820702402957486,... |
__author__ = 'jiajunshen'
from pnet.layer import Layer
import numpy as np
from sklearn.decomposition import PCA
import amitgroup as ag
@Layer.register('pca-layer')
class PCALayer(Layer):
def __init__(self, numOfComponents, settings={}):
self._numOfComponents = numOfComponents
self._settings = sett... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/pca_layer.py",
"copies": "1",
"size": "1433",
"license": "bsd-3-clause",
"hash": -785306614689045100,
"line_mean": 29.5106382979,
"line_max": 76,
"alpha_frac": 0.6078157711,
"autogenerated": false,
"ratio": 3.5295566502463056,
"config_test": fa... |
__author__ = 'jiajunshen'
from pnet.layer import Layer
import numpy as np
import amitgroup as ag
import pnet
from pnet.cyfuncs import activation_map_pooling as poolf
def python_poolf(X, F, shape, strides, relu):
n = X.shape[0]
col = X.shape[1]
row = X.shape[2]
channel = X.shape[3]
result = np.zer... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/test_module.py",
"copies": "1",
"size": "1292",
"license": "bsd-3-clause",
"hash": -162499207161248220,
"line_mean": 27.0869565217,
"line_max": 77,
"alpha_frac": 0.6122291022,
"autogenerated": false,
"ratio": 2.680497925311203,
"config_test": f... |
__author__ = 'jiajunshen'
from pnet.layer import Layer
import numpy as np
import amitgroup as ag
@Layer.register('max-pooling-layer')
class MaxPoolingLayer(Layer):
def __init__(self, shape=(1, 1), strides=(1, 1), settings={}):
self._shape = shape
self._strides = strides
self._settings = ... | {
"repo_name": "jiajunshen/partsNet",
"path": "pnet/max_pooling_layer.py",
"copies": "1",
"size": "3197",
"license": "bsd-3-clause",
"hash": 269552508575639330,
"line_mean": 35.7471264368,
"line_max": 178,
"alpha_frac": 0.5667813575,
"autogenerated": false,
"ratio": 3.5961754780652417,
"config_t... |
__author__ = 'jiang'
def is_parameter_legal(signals):
if isinstance(signals,dict) and sum([signals[key] for key in signals.keys()]) == 1:
return True
return False
def signals_to_tree(signals):
trees = []
for symbol,probability in signals.items():
node = Huff_node(probability,symbol)
... | {
"repo_name": "jiang42/encoder",
"path": "util.py",
"copies": "1",
"size": "1825",
"license": "bsd-2-clause",
"hash": 1478923334514170600,
"line_mean": 25.4492753623,
"line_max": 87,
"alpha_frac": 0.5945205479,
"autogenerated": false,
"ratio": 3.46958174904943,
"config_test": false,
"has_no_k... |
__author__ = 'jiang'
__version__ = "Encoder 0.1\n"
__copyright__ = """Licensed under BSD 2-clause license.
Copyright (c) 2014 Jiang Zhu, mail.jiang.cn@gmail.com"""
# This is my homework for Information Theory and Coding.
# It implements one coding method(Huffman) for now.
#
# Warning: DO NOT use it in production envir... | {
"repo_name": "jiang42/encoder",
"path": "encoder.py",
"copies": "1",
"size": "1110",
"license": "bsd-2-clause",
"hash": -2825344361575248000,
"line_mean": 28.2105263158,
"line_max": 98,
"alpha_frac": 0.6612612613,
"autogenerated": false,
"ratio": 3.6754966887417218,
"config_test": false,
"ha... |
__author__ = 'jianxun'
# coding: UTF-8
import logging
from flask import Flask, jsonify, request, render_template
import json_wrapper
import data_center
import high_chart
import config
app = Flask(__name__)
app.config.from_object('config')
app.debug = True
__data_center = None
__task_center = None
logger = None
if __n... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/controller.py",
"copies": "1",
"size": "7807",
"license": "mit",
"hash": -4232812023842877400,
"line_mean": 31.5291666667,
"line_max": 126,
"alpha_frac": 0.5814013065,
"autogenerated": false,
"ratio": 3.6110083256244216,
"config_te... |
__author__ = 'jianxun'
# coding: UTF-8
import Queue
import copy
import config
import task_dao
import task
class TaskCenter:
__data_center = None
__data_distribute_map = {}
__task_list = {}
def __init__(self, d_center):
self.__data_center = d_center
task_list = task_dao.query_task(... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/task_center.py",
"copies": "1",
"size": "3748",
"license": "mit",
"hash": -7842574072143648000,
"line_mean": 39.3010752688,
"line_max": 121,
"alpha_frac": 0.5675026681,
"autogenerated": false,
"ratio": 3.4607571560480146,
"config_t... |
__author__ = 'jianxun'
# coding: UTF-8
import Queue
import threading
import time
import logging
import config
import task_center
import data_type_dao
import data_dao
class DataCenter:
__data_types = {}
__data_pool = None
__incoming_data_pool = None
__task_center = None
__worker = None
... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/data_center.py",
"copies": "1",
"size": "6388",
"license": "mit",
"hash": 2161253297113320000,
"line_mean": 33.5297297297,
"line_max": 113,
"alpha_frac": 0.5544771446,
"autogenerated": false,
"ratio": 3.6818443804034584,
"config_te... |
__author__ = 'jianxun'
from math import *
from collections import *
from datetime import datetime, timedelta
import numpy
time_range_interpreter = {
'd': lambda x: timedelta(days=x),
'h': lambda x: timedelta(hours=x),
'm': lambda x: timedelta(minutes=x),
's': lambda x: timedelta(seconds=x)
}
support_... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/functions.py",
"copies": "1",
"size": "42144",
"license": "mit",
"hash": 2534768117967018500,
"line_mean": 36.4280639432,
"line_max": 119,
"alpha_frac": 0.5203587699,
"autogenerated": false,
"ratio": 4.2973386356684005,
"config_tes... |
__author__ = 'jianxun'
import config
def generate_chart_content(title, subtitle, chart_id, data_list):
result = {}
result['chart'] = {'renderTo': chart_id, 'type': 'spline', 'marginRight': 130, 'marginBottom': 25}
result['title'] = {'text': title, 'x': -20}
result['subtitle'] = {'te... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/high_chart.py",
"copies": "1",
"size": "1305",
"license": "mit",
"hash": -931171074695031200,
"line_mean": 35.25,
"line_max": 116,
"alpha_frac": 0.4942528736,
"autogenerated": false,
"ratio": 4.0030674846625764,
"config_test": fals... |
__author__ = 'jianxun'
import threading
import time
from datetime import datetime, timedelta
import Queue
import re
import functions
import config
class Task(threading.Thread):
__id = None
__data_center = None
__data_list = None
__result_data_type_id = None
__functions = None
__time_ran... | {
"repo_name": "chineshboy/Real_Time_Data_Analyze",
"path": "app/task.py",
"copies": "1",
"size": "6501",
"license": "mit",
"hash": -8555913189124732000,
"line_mean": 34.7197802198,
"line_max": 113,
"alpha_frac": 0.5168435625,
"autogenerated": false,
"ratio": 3.985898221949724,
"config_test": fa... |
__author__ = 'Jiarui Xu'
import pandas as pd
import math
import numpy as np
def unique_list(coldata):
"""
Get a list of unique elements
:param coldata: a column of data
:return: a list of unique elements
"""
return list(set(coldata))
def get_both_columns(data, class_column):
"""
Get ... | {
"repo_name": "LargePanda/LearnPy",
"path": "learnpy/models/ModelUtil.py",
"copies": "1",
"size": "4030",
"license": "mit",
"hash": -7512187655030915000,
"line_mean": 21.1428571429,
"line_max": 82,
"alpha_frac": 0.5933002481,
"autogenerated": false,
"ratio": 3.4181509754028836,
"config_test": f... |
__author__ = 'Jiarui Xu'
from learnpy.models.Model import Model
import pandas as pd
from learnpy.models.ModelUtil import *
import operator
import time
# to be implemented next week
class NaiveBayes(Model):
def __init__(self, data, class_column):
"""
Constructor for the Naive Bayes Model
... | {
"repo_name": "LargePanda/LearnPy",
"path": "learnpy/models/NaiveBayes.py",
"copies": "1",
"size": "4229",
"license": "mit",
"hash": -8969463214153761000,
"line_mean": 28.9929078014,
"line_max": 127,
"alpha_frac": 0.5467013478,
"autogenerated": false,
"ratio": 3.894106813996317,
"config_test": ... |
__author__ = 'Jiarui Xu'
from learnpy.models.Model import Model
import pandas as pd
from learnpy.models.ModelUtil import *
import operator
import time
import matplotlib.pyplot as plt
# Here we use SGD for homework purpose
# Ref: https://courses.engr.illinois.edu/cs446/sp2015/Slides/Lecture04.pdf
class SVM(Model):
... | {
"repo_name": "LargePanda/LearnPy",
"path": "learnpy/models/SVM.py",
"copies": "1",
"size": "5499",
"license": "mit",
"hash": -650635995231267800,
"line_mean": 30.7919075145,
"line_max": 121,
"alpha_frac": 0.5761047463,
"autogenerated": false,
"ratio": 3.6130091984231276,
"config_test": true,
... |
__author__ = 'Jiarui Xu'
import textblob
import requests
import tweepy
from pylab import *
class TweetSentiment:
"""
A tool designed for tweet sentiment analysis
"""
def __init__(self, topic):
self.make_pie(self.get_stats(topic), topic)
def get_stats(self, topic):
"""
Get ... | {
"repo_name": "LargePanda/LearnPy",
"path": "learnpy/tools/TweetSentiment.py",
"copies": "1",
"size": "1812",
"license": "mit",
"hash": 7253676177864290000,
"line_mean": 28.2419354839,
"line_max": 97,
"alpha_frac": 0.5833333333,
"autogenerated": false,
"ratio": 3.0974358974358975,
"config_test"... |
__author__ = 'Jiashun'
import re
import time
import os
import string
from collections import Counter
starts = time.clock()
def s(si_, sj_):
if qu[si_] == seq2[sj_]:
return 2
else:
return -1
def alignment(seq1, seq2):
m = len(seq1)
n = len(seq2)
g = -3
ma... | {
"repo_name": "JiaShun-Xiao/python-implement-fast-BLAST-Basic-Local-Alignment-Search-Tool",
"path": "blast.py",
"copies": "1",
"size": "5890",
"license": "mit",
"hash": -7893098983931671000,
"line_mean": 29,
"line_max": 154,
"alpha_frac": 0.4543293718,
"autogenerated": false,
"ratio": 3.1,
"con... |
__author__ = 'jiataogu'
from .core import *
"""
Attention Model.
<::: Two kinds of attention models ::::>
-- Linear Transformation
-- Inner Product
"""
class Attention(Layer):
def __init__(self, target_dim, source_dim, hidden_dim,
init='glorot_uniform', name='attention',
... | {
"repo_name": "memray/seq2seq-keyphrase",
"path": "emolga/layers/attention.py",
"copies": "1",
"size": "5305",
"license": "mit",
"hash": 4903381487718581000,
"line_mean": 35.5862068966,
"line_max": 143,
"alpha_frac": 0.5151743638,
"autogenerated": false,
"ratio": 3.52960745176314,
"config_test"... |
__author__ = 'jiataogu'
from emolga.dataset.build_dataset import deserialize_from_file, serialize_to_file
import numpy.random as n_rng
n_rng.seed(19920206)
# the vocabulary
tmp = [chr(x) for x in range(48, 58)] # '1', ... , '9', '0'
voc = [tmp[a] + tmp[b] + tmp[c]
for c in xrange(10)
... | {
"repo_name": "MingyuanXie/CopyNet",
"path": "experiments/synthetic.py",
"copies": "1",
"size": "2907",
"license": "mit",
"hash": 8680094016142692000,
"line_mean": 29.9255319149,
"line_max": 118,
"alpha_frac": 0.4726522188,
"autogenerated": false,
"ratio": 3.0062047569803516,
"config_test": fal... |
__author__ = 'jiataogu'
import os
import os.path as path
def setup():
config = dict()
# config['seed'] = 3030029828
config['seed'] = 19920206
config['use_noise'] = False
config['optimizer'] = 'adam'
config['save_updates'] = True
config['get_instance'] ... | {
"repo_name": "MingyuanXie/CopyNet",
"path": "experiments/config.py",
"copies": "1",
"size": "20729",
"license": "mit",
"hash": 1173040785124399600,
"line_mean": 33.6638795987,
"line_max": 126,
"alpha_frac": 0.5342756525,
"autogenerated": false,
"ratio": 3.3793609390283663,
"config_test": true,... |
__author__ = 'jiataogu'
import theano
import logging
import copy
from emolga.layers.recurrent import *
from emolga.layers.ntm_minibatch import Controller
from emolga.layers.embeddings import *
from emolga.layers.attention import *
from emolga.layers.highwayNet import *
from emolga.models.encdec import *
from core impo... | {
"repo_name": "MingyuanXie/CopyNet",
"path": "emolga/models/pointers.py",
"copies": "1",
"size": "36210",
"license": "mit",
"hash": 933543689109602700,
"line_mean": 35.799796748,
"line_max": 124,
"alpha_frac": 0.523253245,
"autogenerated": false,
"ratio": 3.8615761970779565,
"config_test": true... |
__author__ = 'jiataogu'
import theano
import logging
import deepdish as dd
import sys
import os.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),os.path.pardir)))
from emolga.dataset.build_dataset import serialize_to_file, deserialize_from_file
from emolga.utils.theano_utils import floatX
... | {
"repo_name": "MingyuanXie/CopyNet",
"path": "emolga/models/core.py",
"copies": "1",
"size": "3130",
"license": "mit",
"hash": -1401573507882472000,
"line_mean": 29.9900990099,
"line_max": 114,
"alpha_frac": 0.5373801917,
"autogenerated": false,
"ratio": 3.8641975308641974,
"config_test": false... |
__author__ = 'jiataogu'
import theano
import theano.tensor as T
import scipy.linalg as sl
import numpy as np
from .core import *
from .recurrent import *
import copy
"""
This implementation supports both minibatch learning and on-line training.
We need a minibatch version for Neural Turing Machines.
"""
class Reade... | {
"repo_name": "memray/seq2seq-keyphrase",
"path": "emolga/layers/ntm_minibatch.py",
"copies": "2",
"size": "28501",
"license": "mit",
"hash": 8968155620022182000,
"line_mean": 38.0438356164,
"line_max": 124,
"alpha_frac": 0.5226483281,
"autogenerated": false,
"ratio": 3.407580105212817,
"config... |
__author__ = 'jiataogu'
"""
The file is the implementation of Grid-LSTM
In this stage we only support 2D LSTM with Pooling.
"""
from recurrent import *
from attention import Attention
import logging
import copy
logger = logging.getLogger(__name__)
class Grid(Recurrent):
"""
Grid Cell for Grid-LSTM
=======... | {
"repo_name": "memray/seq2seq-keyphrase",
"path": "emolga/layers/gridlstm.py",
"copies": "2",
"size": "33060",
"license": "mit",
"hash": 3271472375527419400,
"line_mean": 36.8272311213,
"line_max": 114,
"alpha_frac": 0.4555051422,
"autogenerated": false,
"ratio": 3.6013071895424837,
"config_tes... |
__author__ = 'Jichen Yang'
"""
This script is to evaluate the TF binding sites performance
between lstm and tranditional PWM method
Evaluation will be done in two situations: 1) negative seqs
were randomly sampled from the whole NBNCLS; 2) a part of
negative seqs were selected that they got HIGH PWM score. The
first... | {
"repo_name": "yangyangjuanjuan/DeepBindingDetection",
"path": "evaluatePWM.py",
"copies": "1",
"size": "4923",
"license": "apache-2.0",
"hash": -3002783153741131300,
"line_mean": 29.76875,
"line_max": 89,
"alpha_frac": 0.6922608166,
"autogenerated": false,
"ratio": 2.64962325080732,
"config_te... |
__author__ = 'Jichen Yang'
"""
This script is what created the dataset pickled.
1) You need to have a folder named "Xmers" including all sampled x-mers as negative cases.
2) positive cases: binding sites. Under "bindingsites" folder. As an example, file 'loadBindingSite/binding_sites_CDX2'
looks like:
>hg19_c... | {
"repo_name": "yangyangjuanjuan/DeepBindingDetection",
"path": "loadBindingSite.py",
"copies": "1",
"size": "3810",
"license": "apache-2.0",
"hash": -82100205451976960,
"line_mean": 27.5348837209,
"line_max": 119,
"alpha_frac": 0.5973753281,
"autogenerated": false,
"ratio": 3.234295415959253,
"... |
__author__ = 'Jichen Yang'
"""
This script is what created the dataset pickled.
1) You need to have a folder named "Xmers" including all sampled x-mers as negative cases.
2) You need have another folder named "BSPHighPWMScoreNonBinding" including negative cases with high PWM scores for each TF.
3) positive c... | {
"repo_name": "yangyangjuanjuan/DeepBindingDetection",
"path": "loadBindingSite_highScoreNegativeSeqs.py",
"copies": "1",
"size": "4911",
"license": "apache-2.0",
"hash": 551582390937746800,
"line_mean": 30.9597315436,
"line_max": 124,
"alpha_frac": 0.6129097943,
"autogenerated": false,
"ratio": ... |
__author__ = 'jie'
__author__ = 'jie'
TOEHOLD_LENGTH = 5
from cadnano.cnproxy import UndoCommand
from strandrep.toehold_list import ToeholdList
from strandrep.toehold import Toehold
class RemoveToeholdCommand(UndoCommand):
'''
called by Domain to create toehold on an end of an oligo;
can be undone if added ... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "strandrep/remove_toehold_command.py",
"copies": "1",
"size": "2408",
"license": "mit",
"hash": -5832988726257225000,
"line_mean": 38.4754098361,
"line_max": 134,
"alpha_frac": 0.6312292359,
"autogenerated": false,
"ratio": 3.45480631276901,
"confi... |
__author__ = 'jie'
# -*- coding: utf-8 -*-
import json
import io
from collections import defaultdict
from cadnano.document import Document
from cadnano.enum import LatticeType, StrandType
from cadnano.color import Color
import cadnano.preferences as prefs
from cadnano import setBatch, getReopen, setReopen
from cadnano... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "fileio/domain_decode.py",
"copies": "1",
"size": "17355",
"license": "mit",
"hash": -2287269373602087700,
"line_mean": 42.7153652393,
"line_max": 189,
"alpha_frac": 0.5957360991,
"autogenerated": false,
"ratio": 3.2671310240963853,
"config_test": ... |
__author__ = 'jie'
from PyQt5 import uic
from cadnano.gui.views.pathview.tools.pathtoolmanager import PathToolManager
from cadnano.gui.views.pathview.pathrootitem import PathRootItem
from PyQt5.QtCore import QFileInfo
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QGraphicsScene
from PyQt5.QtWidgets import Q... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "UI_units/ui_window.py",
"copies": "1",
"size": "3599",
"license": "mit",
"hash": 8527189427107880000,
"line_mean": 47.6351351351,
"line_max": 138,
"alpha_frac": 0.7076965824,
"autogenerated": false,
"ratio": 3.828723404255319,
"config_test": false... |
__author__ = 'jie'
from PyQt5.QtGui import QIcon
from cadnano.document import Document
from fileio import domain_decode
import io
from cadnano.gui.controllers.documentcontroller import DocumentController
from PyQt5.QtWidgets import QToolBar,QMessageBox,QFileDialog,QAction
from PyQt5.QtCore import QFileInfo
import json
... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "UI_units/toolbar.py",
"copies": "1",
"size": "5006",
"license": "mit",
"hash": -7470074738841736000,
"line_mean": 36.6390977444,
"line_max": 113,
"alpha_frac": 0.6294446664,
"autogenerated": false,
"ratio": 4.030595813204509,
"config_test": false,... |
__author__ = 'jie'
from PyQt5.QtWidgets import QLabel,QLineEdit,QDockWidget,QWidget,QHBoxLayout,QVBoxLayout,QCheckBox,QDialogButtonBox,QGroupBox,QFormLayout,QMessageBox
from PyQt5 import QtCore
import cadnano.util as util
from cadnano.oligo.removeoligocmd import RemoveOligoCommand
class DockWidget(QDockWidget):
''... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "UI_units/dockWidget.py",
"copies": "1",
"size": "12477",
"license": "mit",
"hash": -4346066474456936000,
"line_mean": 35.2703488372,
"line_max": 149,
"alpha_frac": 0.5950148273,
"autogenerated": false,
"ratio": 3.94218009478673,
"config_test": fal... |
__author__ = 'jie'
from strandrep.toehold_item_controller import ToeholdItemController
from cadnano.gui.views.pathview import pathstyles as styles
from PyQt5.QtCore import QRectF, Qt, QPointF, QEvent
from PyQt5.QtGui import QBrush, QPen, QFont, QColor, QPainterPath
from PyQt5.QtWidgets import QGraphicsPathItem, QGraph... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "strandrep/toehold_item.py",
"copies": "1",
"size": "8647",
"license": "mit",
"hash": 640655431175306600,
"line_mean": 34.008097166,
"line_max": 112,
"alpha_frac": 0.6384873366,
"autogenerated": false,
"ratio": 3.113791861721282,
"config_test": fal... |
__author__ = 'jie'
from strandrep.toehold_item import ToeholdItem
from cadnano.cnproxy import ProxySignal,ProxyObject
class ToeholdList(ProxyObject):
def __init__(self,domain,toehold):
'''
container for all toehold domains on one end of an oligo
has at least one toehold upon initialization;
... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "strandrep/toehold_list.py",
"copies": "1",
"size": "1560",
"license": "mit",
"hash": -8163545909145073000,
"line_mean": 40.0789473684,
"line_max": 130,
"alpha_frac": 0.6653846154,
"autogenerated": false,
"ratio": 3.5214446952595937,
"config_test":... |
__author__ = 'jie'
import os
from PyQt5 import uic
from cadnano25.cadnano.gui.views.pathview.pathrootitem import PathRootItem
from PyQt5.QtCore import QFileInfo
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QGraphicsScene,QVBoxLayout
from PyQt5.QtWidgets import QMainWindow,QAction
from PyQt5.QtWidgets impor... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "UI_units/mainWindow.py",
"copies": "1",
"size": "4456",
"license": "mit",
"hash": -3504555911908305400,
"line_mean": 42.6862745098,
"line_max": 138,
"alpha_frac": 0.6927737882,
"autogenerated": false,
"ratio": 3.8314703353396387,
"config_test": fa... |
__author__ = 'jie'
import string
from operator import attrgetter
from strandrep.create_toehold_command import CreateToeholdCommand
from strandrep.remove_toehold_command import RemoveToeholdCommand
import cadnano.util as util
from cadnano.cnproxy import ProxyObject, ProxySignal
class Domain(ProxyObject):
def __in... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "strandrep/domain.py",
"copies": "1",
"size": "15203",
"license": "mit",
"hash": 6950761499743209000,
"line_mean": 34.6877934272,
"line_max": 144,
"alpha_frac": 0.5992238374,
"autogenerated": false,
"ratio": 3.751974333662389,
"config_test": false,... |
__author__ = 'jie'
TOEHOLD_LENGTH = 5
from cadnano.cnproxy import UndoCommand
from strandrep.toehold_list import ToeholdList
from strandrep.toehold import Toehold
class CreateToeholdCommand(UndoCommand):
'''
called by Domain to create toehold on an end of an oligo;
can be undone if added to undo stack befor... | {
"repo_name": "amylittleyang/OtraCAD",
"path": "strandrep/create_toehold_command.py",
"copies": "1",
"size": "2232",
"license": "mit",
"hash": -270178997797522940,
"line_mean": 38.8571428571,
"line_max": 134,
"alpha_frac": 0.6308243728,
"autogenerated": false,
"ratio": 3.4766355140186915,
"conf... |
# 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 applicable law or agreed to in writing, software
# distributed under the... | {
"repo_name": "jimklo/LearningRegistry",
"path": "LR/lr/schema/validate.py",
"copies": "2",
"size": "8710",
"license": "apache-2.0",
"hash": 7267927548268405000,
"line_mean": 34.1209677419,
"line_max": 136,
"alpha_frac": 0.5203214696,
"autogenerated": false,
"ratio": 4.139733840304182,
"config_... |
__author__ = 'Jimmy'
import numpy as np
from backtest.handlers.order_type import *
#计算unit N
#计算unit N
class ATR(object):
def __init__(self, account, cycle=20, dpp=50, coe=0.2):
self.account = account
self.bar = None
self.cycle = cycle
self.dpp = dpp
self.n = 0
self.... | {
"repo_name": "sjsj0101/backtestengine",
"path": "backtest/tools/ta.py",
"copies": "1",
"size": "6665",
"license": "apache-2.0",
"hash": 3554661746314347000,
"line_mean": 26.0788381743,
"line_max": 116,
"alpha_frac": 0.4809195402,
"autogenerated": false,
"ratio": 3.090952155376599,
"config_test... |
__author__ = 'Jimmy'
import numpy as np
from utils.objects import *
from trade.tradeType import *
#计算unit N
#计算unit N
class ATR(object):
def __init__(self, account, cycle=20, dpp=10, coe=0.2):
self.account = account
self.bar = None
self.cycle = cycle
self.dpp = dpp
self.n = ... | {
"repo_name": "sjsj0101/backtestengine",
"path": "utils/ta.py",
"copies": "1",
"size": "3716",
"license": "apache-2.0",
"hash": 6334823304990934000,
"line_mean": 25.3550724638,
"line_max": 101,
"alpha_frac": 0.4906490649,
"autogenerated": false,
"ratio": 3.2291296625222023,
"config_test": false... |
__author__ = 'jingyu'
from django import template
from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
register = template.Library()
url_validator = URLValidator()
@register.filter()
def get_type(value):
"""
Helper function that returns the class name of the varia... | {
"repo_name": "Jingyu-Yao/elitetraderoutes",
"path": "frontend/templatetags/my_tags.py",
"copies": "1",
"size": "2181",
"license": "mit",
"hash": 6376943100147520000,
"line_mean": 27.6973684211,
"line_max": 110,
"alpha_frac": 0.6166895919,
"autogenerated": false,
"ratio": 3.7345890410958904,
"c... |
__author__ = 'Jin'
import json
import numpy as np
from itertools import product
# loading emoji data from existing JSON file
with open('emoji.json') as data_file:
EMOJI_DATA = json.load(data_file)
# extract the avg emoji color in RGB
EMOJI_AVG_COLOR = map(lambda d:d['avg_color'], EMOJI_DATA)
# Calculate the d... | {
"repo_name": "RxPy/emoji-mosaic",
"path": "emoji_match.py",
"copies": "1",
"size": "1889",
"license": "mit",
"hash": -4294993049172847600,
"line_mean": 40.0652173913,
"line_max": 115,
"alpha_frac": 0.6940179989,
"autogenerated": false,
"ratio": 3.0665584415584415,
"config_test": false,
"has_... |
__author__ = 'jiohyoo'
import numpy as np
from numpy.linalg import inv
from numpy.random import multivariate_normal
from sklearn.mixture import GMM
from sklearn.mixture.gmm import _log_multivariate_normal_density_full
from sparse_gmm import SparseGMM
def predict_missing_values(model, data):
if not isinstance(mod... | {
"repo_name": "yoojioh/gamelanpy",
"path": "gamelanpy/imputation_util.py",
"copies": "1",
"size": "4260",
"license": "mit",
"hash": 1446951613157557200,
"line_mean": 35.724137931,
"line_max": 119,
"alpha_frac": 0.6223004695,
"autogenerated": false,
"ratio": 3.315175097276265,
"config_test": fal... |
__author__ = 'Jiri'
#converts the dxd file to a sql file
import dxd
from converter import Converter
import time
import calendar
class SQLManager(object):
def __init__(self, site, var, meth):
self.site_id = site
self.var_id = var
self.meth_id = meth
self.src_id = 1
self.qc... | {
"repo_name": "jirikadlec2/rushvalley",
"path": "dxd2sql.py",
"copies": "1",
"size": "2374",
"license": "mit",
"hash": -3426932090227583000,
"line_mean": 30.6533333333,
"line_max": 100,
"alpha_frac": 0.5648694187,
"autogenerated": false,
"ratio": 3.2790055248618786,
"config_test": false,
"has... |
__author__ = 'Jiri'
import os
import requests
import shutil
from findtools.find_files import (find_files, Match)
def move_files(base_dir):
print base_dir
i = 0
files = os.listdir(base_dir)
for f in files:
i += 1
rem = i % 100
if rem == 0:
print i
oldname =... | {
"repo_name": "CMIP5/HUC8Climate",
"path": "scripts/python/update_series_catalog/organize_files2.py",
"copies": "1",
"size": "1392",
"license": "mit",
"hash": 5605048046933665000,
"line_mean": 26.84,
"line_max": 81,
"alpha_frac": 0.6364942529,
"autogenerated": false,
"ratio": 3.0064794816414686,
... |
__author__ = 'Jiri'
import xlrd
from lxml import etree
from os import listdir
from os.path import isfile, join
def get_dxd_passwords(password_file):
book = xlrd.open_workbook(password_file)
sheets = book.sheets()
sheet0 = sheets[0]
nr = sheet0.nrows
nc = sheet0.ncols
password_list = []
fo... | {
"repo_name": "jirikadlec2/rushvalley",
"path": "fetch_dxd.py",
"copies": "1",
"size": "1936",
"license": "mit",
"hash": -7862646648824769000,
"line_mean": 29.746031746,
"line_max": 116,
"alpha_frac": 0.6069214876,
"autogenerated": false,
"ratio": 2.996904024767802,
"config_test": false,
"has... |
__author__ = 'Jiri'
import xlrd
import os
import datetime
import pymysql
def findFile(directory, logger):
found = [i for i in os.listdir(directory) if logger in i and '.xls' in i]
#check that file exist
if len(found) > 0:
return os.path.join(directory, found[0])
#input: tab separated text file
#... | {
"repo_name": "jirikadlec2/rushvalley",
"path": "excel.py",
"copies": "1",
"size": "1535",
"license": "mit",
"hash": 6603622771342911000,
"line_mean": 27.4444444444,
"line_max": 116,
"alpha_frac": 0.6390879479,
"autogenerated": false,
"ratio": 3.2247899159663866,
"config_test": false,
"has_no... |
__author__ = 'Jiri'
import xlrd
import pymysql
import dxd2sql
import dxd
class Updater(object):
def __init__(self):
self.db_host = 'worldwater.byu.edu'
self.db_user = 'WWO_Admin'
self.db_pass = 'isaiah4118'
self.db_db = 'RushValley'
#rather use GetSites() method here, then w... | {
"repo_name": "jirikadlec2/rushvalley",
"path": "lookup.py",
"copies": "1",
"size": "5687",
"license": "mit",
"hash": 522187320744589760,
"line_mean": 37.693877551,
"line_max": 120,
"alpha_frac": 0.5340249692,
"autogenerated": false,
"ratio": 3.361111111111111,
"config_test": false,
"has_no_k... |
__author__ = 'Jiri'
import xlrd
import time
import json
import urllib2
import dxd
from converter import Converter
class Updater(object):
def __init__(self):
self.hydroserver_user = 'HIS_admin'
self.hydroserver_password = 'password'
self.dxd_folder = 'dxd'
self.HYDROSERVER_URL = '... | {
"repo_name": "jirikadlec2/rushvalley",
"path": "run_upload.py",
"copies": "1",
"size": "4596",
"license": "mit",
"hash": -3046493748787463000,
"line_mean": 33.5639097744,
"line_max": 120,
"alpha_frac": 0.5378590078,
"autogenerated": false,
"ratio": 3.7610474631751227,
"config_test": false,
"... |
__author__ = "Jiri Novotny"
__version__ = "1.0.0"
class KeyValues(dict):
"""
Class for manipulation with Valve KeyValue (KV) files (VDF format). Parses the KV file to object with dict interface.
Allows to write objects with dict interface to KV files.
"""
__re = __import__('re')
__sys = __impo... | {
"repo_name": "gorgitko/valve-keyvalues-python",
"path": "valve_keyvalues_python/keyvalues.py",
"copies": "1",
"size": "8902",
"license": "mit",
"hash": -7271989258451370000,
"line_mean": 36.885106383,
"line_max": 163,
"alpha_frac": 0.5597618513,
"autogenerated": false,
"ratio": 4.03718820861678,... |
import sys, getopt
import urllib, base64, json
from urllib2 import Request, urlopen, URLError, HTTPError
ambariBaseUrl = 'http://ambari_server:8080/api/v1'
requestHeaders = { 'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
'Authorization': 'Basic ' + base64.b64encode("admin" + ':' + "admin"),
'X... | {
"repo_name": "cubefyre/aws-dev-ops",
"path": "hadoop-setup/ambari_cluster_setup.py",
"copies": "1",
"size": "3379",
"license": "apache-2.0",
"hash": 3229615058992583000,
"line_mean": 30.287037037,
"line_max": 198,
"alpha_frac": 0.7369044096,
"autogenerated": false,
"ratio": 3.175751879699248,
... |
import os, datetime, shutil, itertools, csv, json, jwt, logging
from mongo_service import UserDBService
import util
from env_config import ENV
#start the logger
log = logging.getLogger(__name__)
log.setLevel("DEBUG")
class UserService:
def __init__(self):
try:
self.user_db = UserDBService()
except Exception... | {
"repo_name": "cubefyre/audience-behavior-ui",
"path": "app/server/user_service.py",
"copies": "1",
"size": "4540",
"license": "apache-2.0",
"hash": 1978687031423115000,
"line_mean": 30.102739726,
"line_max": 82,
"alpha_frac": 0.6889867841,
"autogenerated": false,
"ratio": 3.0884353741496597,
"... |
import os, logging, fnmatch, shutil, json
from datetime import datetime, timedelta
import keen
from keen.client import KeenClient
from env_config import ENV
log = logging.getLogger(__name__)
log.setLevel("DEBUG")
#
# keen service for handling raw Event logs
#
class KeenEventService():
def __init__(self):
... | {
"repo_name": "cubefyre/audience-behavior-ui",
"path": "app/server/keen_service.py",
"copies": "1",
"size": "10988",
"license": "apache-2.0",
"hash": -5905395596550703000,
"line_mean": 39.3970588235,
"line_max": 129,
"alpha_frac": 0.5789042592,
"autogenerated": false,
"ratio": 3.9075391180654337,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.