text
stringlengths
0
1.05M
meta
dict
__author__ = 'gpratt' import HTSeq import pandas as pd def bed_to_genomic_interval(bed): """ Converts bed file to genomic interval (htseq format) file """ for interval in bed: yield HTSeq.GenomicPosition(str(interval.chrom), interval.start, str(interval.strand)) def get_closest(bam, regi...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/riboseq/riboseq_utils.py", "copies": "1", "size": "1276", "license": "mit", "hash": -7584745079109953000, "line_mean": 31.7179487179, "line_max": 129, "alpha_frac": 0.6363636364, "autogenerated": false, "ratio": 3.393617021276596, "config_test"...
__author__ = 'gpratt' import numpy as np import pandas as pd import pybedtools import pyBigWig from gscripts.general import dataviz import seaborn as sns class ReadDensity(): def __init__(self, pos, neg): self.pos = pyBigWig.open(pos) self.neg = pyBigWig.open(neg) def values(self, chrom, sta...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/rnaseq/splicing_map.py", "copies": "1", "size": "8107", "license": "mit", "hash": -7755084718646270000, "line_mean": 39.1336633663, "line_max": 159, "alpha_frac": 0.6538793635, "autogenerated": false, "ratio": 3.20815195884448, "config_test": f...
__author__ = 'gpratt' import sys from optparse import OptionParser import pysam def remove_softclip(in_bam, out_bam): """ Removes softclipping from start of stranded reads bam: str pointing to bam file out_bam: pysam bam file to be written to """ with pysam.Samfile(in_bam, 'rb') as in_ba...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/remove_softclip.py", "copies": "1", "size": "1704", "license": "mit", "hash": 575165811869622900, "line_mean": 29.4464285714, "line_max": 92, "alpha_frac": 0.5111502347, "autogenerated": false, "ratio": 3.5949367088607596, "config_test"...
__author__ = 'gpratt' import sys import argparse from collections import Counter import pyBigWig import numpy as np from scipy import stats import pybedtools def big_wig_corr(full, semi, regions): full = pyBigWig.open(full) semi = pyBigWig.open(semi) regions = pybedtools.BedTool(regions) full_resu...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/bigwig_corr.py", "copies": "1", "size": "1788", "license": "mit", "hash": -6963826497473122000, "line_mean": 35.5102040816, "line_max": 121, "alpha_frac": 0.6879194631, "autogenerated": false, "ratio": 3.512770137524558, "config_test": ...
__author__ = 'gpratt' """ barcode_collapse.py read in a .bam file where the first 9 nt of the read name are the barcode and merge reads mapped to the same position that have the same barcode """ from collections import Counter import itertools from optparse import OptionParser import sys import pysam def stranded...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/barcode_collapse_pe.py", "copies": "1", "size": "3833", "license": "mit", "hash": -4440487490425893400, "line_mean": 38.9270833333, "line_max": 112, "alpha_frac": 0.600573963, "autogenerated": false, "ratio": 3.717749757516974, "config_...
__author__ = 'gpratt' import pybedtools import pysam def compute_frip(bam, bed): bam_tool = pybedtools.BedTool(bam) peaks = pybedtools.BedTool(bed) num_reads_peaks = len(bam_tool.intersect(peaks, u=True, s=True)) bamtool = pysam.Samfile(bam) total_mapped_reads = bamtool.mapped return...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/calculate_frip.py", "copies": "1", "size": "1106", "license": "mit", "hash": -3458648476322830000, "line_mean": 29.7222222222, "line_max": 99, "alpha_frac": 0.6600361664, "autogenerated": false, "ratio": 3.16, "config_test": false, "h...
__author__ = 'gpratt' """ Converts randomer + barcoded fastq files into something that can be barcode collapsed and mapped """ from collections import Counter, defaultdict, OrderedDict from itertools import izip import gzip import os from optparse import OptionParser def hamming(word1, word2): """ Gets h...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/demux_paired_end.py", "copies": "1", "size": "8485", "license": "mit", "hash": -5700845333976245000, "line_mean": 40.7980295567, "line_max": 202, "alpha_frac": 0.6140247496, "autogenerated": false, "ratio": 3.726394378568292, "config_te...
__author__ = 'grafgustav' from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout from kivy.properties import StringProperty, ObjectProperty, BooleanProperty from kivy.uix.popup import Popup from src.database import Database from src.Controller.CommunicationController import CommunicationController from ...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/EmailItem.py", "copies": "1", "size": "3341", "license": "mit", "hash": -4189994554999272000, "line_mean": 31.7647058824, "line_max": 105, "alpha_frac": 0.6521999401, "autogenerated": false, "ratio": 4.18671679197995, "config_test": false,...
__author__ = 'grafgustav' from kivy.lang import Builder from kivy.uix.screenmanager import Screen from kivy.properties import ObjectProperty, NumericProperty from time import strptime from src.database import Database from src.models import Mails Builder.load_file('GUI/readlayout.kv') class ReadLayout(Screen): ...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/readLayout.py", "copies": "1", "size": "3771", "license": "mit", "hash": -3945645939882578400, "line_mean": 33.9259259259, "line_max": 108, "alpha_frac": 0.6239724211, "autogenerated": false, "ratio": 4.076756756756756, "config_test": fals...
__author__ = 'grafgustav' from kivy.lang import Builder from kivy.uix.screenmanager import Screen from kivy.properties import ObjectProperty, StringProperty from .EmailItem import EmailItem from src.database import Database from src.Controller.CommunicationController import CommunicationController from kivy.clock impor...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/InboxLayout.py", "copies": "1", "size": "5771", "license": "mit", "hash": -3368675931944848400, "line_mean": 32.9470588235, "line_max": 109, "alpha_frac": 0.6153179692, "autogenerated": false, "ratio": 4.078445229681979, "config_test": fal...
__author__ = 'grafgustav' from kivy.lang import Builder from kivy.uix.screenmanager import Screen from kivy.properties import ObjectProperty, StringProperty from src.database import Database from kivy.clock import Clock import sys import os Builder.load_file('GUI/SettingsLayout.kv') class SettingsLayout(Screen): ...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/SettingsLayout.py", "copies": "1", "size": "2386", "license": "mit", "hash": -9218006076176082000, "line_mean": 35.1515151515, "line_max": 81, "alpha_frac": 0.6722548198, "autogenerated": false, "ratio": 3.57185628742515, "config_test": fa...
__author__ = 'grafgustav' from kivy.lang import Builder from kivy.uix.screenmanager import Screen from src.GUI.ContactItem import ContactItem from kivy.properties import ObjectProperty, StringProperty from src.database import Database from kivy.uix.popup import Popup from src.models import Contacts from kivy.uix.floatl...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/addressLayout.py", "copies": "1", "size": "5451", "license": "mit", "hash": -2701464959462881300, "line_mean": 32.8571428571, "line_max": 110, "alpha_frac": 0.6285085305, "autogenerated": false, "ratio": 4.161068702290076, "config_test": f...
__author__ = 'grafgustav' import smtplib import email import imaplib from src.database import Database from kivy.uix.button import Button from kivy.uix.popup import Popup from src.models import Mails from clunky_config import clunkyConfig class CommunicationController(object): ''' This class handles the communica...
{ "repo_name": "grafgustav/accessmail", "path": "src/Controller/CommunicationController.py", "copies": "1", "size": "6594", "license": "mit", "hash": -695632712248255400, "line_mean": 31.1707317073, "line_max": 100, "alpha_frac": 0.5210797695, "autogenerated": false, "ratio": 4.384308510638298, ...
__author__ = 'grafgustav' from Singleton import Singleton from kivy.uix.button import Button from kivy.uix.textinput import TextInput from kivy.clock import Clock from kivy.core.window import Window from src.GUI.Tooltip import ToolTip @Singleton class WidgetManager: def __init__(self): self.root_widget ...
{ "repo_name": "grafgustav/accessmail", "path": "src/GUI/widgetHelpers/WidgetManager.py", "copies": "1", "size": "5924", "license": "mit", "hash": 165986120738126430, "line_mean": 37.2258064516, "line_max": 104, "alpha_frac": 0.5773126266, "autogenerated": false, "ratio": 4.210376687988628, "con...
class IndexedCache: """ Indexed cache space effecent and order preserving """ def __init__(self): self.dataMap = {} self.dataArray = [] def __eq__(self,value): result = self.dataMap == value.dataMap and self.dataArray == value.dataArray return res...
{ "repo_name": "bionomicron/Redirector", "path": "util/Cache.py", "copies": "1", "size": "12763", "license": "mit", "hash": -3895529563604074500, "line_mean": 26.5680345572, "line_max": 85, "alpha_frac": 0.5164929875, "autogenerated": false, "ratio": 4.264283327764785, "config_test": false, "h...
__author__ = 'Grainier Perera' from pyquery import PyQuery as pq from useragent_rotator import useragent from proxy_rotator import proxy from properties import google_prop class ApplicationScraper(object): def __init__(self): pass def scrape(self, application_id, application_url): user_agent ...
{ "repo_name": "grainier/google-play-service", "path": "play_scraper/util/scraper.py", "copies": "1", "size": "7097", "license": "mit", "hash": -6059109007934795000, "line_mean": 36.9572192513, "line_max": 114, "alpha_frac": 0.5482598281, "autogenerated": false, "ratio": 4.523263224984066, "conf...
__author__ = 'Grainier Perera' from selenium.webdriver import Firefox, FirefoxProfile, PhantomJS, DesiredCapabilities import time from useragent_rotator import useragent from proxy_rotator import proxy from properties import google_prop from selenium.webdriver.common.proxy import * class ApplicationIndexer(object): ...
{ "repo_name": "grainier/google-play-service", "path": "play_scraper/util/indexer.py", "copies": "1", "size": "5535", "license": "mit", "hash": 2108494732802952200, "line_mean": 39.4087591241, "line_max": 131, "alpha_frac": 0.5329719964, "autogenerated": false, "ratio": 4.529459901800327, "confi...
__author__ = 'Grainier Perera' import time import logging import pickle import redis import random from util.current_time import current_time_millisecond from properties import google_prop from multiprocessing import Pool from util.indexer import ApplicationIndexer from util.scraper import ApplicationScraper def proc...
{ "repo_name": "grainier/google-play-service", "path": "play_scraper/run_indexer.py", "copies": "1", "size": "8114", "license": "mit", "hash": -252934258554092060, "line_mean": 47.8795180723, "line_max": 112, "alpha_frac": 0.6440719744, "autogenerated": false, "ratio": 4.012858555885262, "config...
__author__ = 'grangzosoft' import pygame from player명섭0513 import * from block명섭0513 import * pygame.init() white = (255, 255, 255) black = (0, 0, 0) window = pygame.display.set_mode((800, 600)) pygame.display.set_caption('Building Crush') usw_buildings = building(window, 0, 150, black, 100, 800) gravity = -0.5 cloc...
{ "repo_name": "saintdragon2/python-3-lecture-2015", "path": "civil_mid_final/슈퍼그랑조/idea/main명섭0513.py", "copies": "1", "size": "3096", "license": "mit", "hash": -2702620010598888400, "line_mean": 36.6707317073, "line_max": 81, "alpha_frac": 0.4439766839, "autogenerated": false, "ratio": 2.0864864...
__author__ = 'grangzosoft' import pygame import time from player명섭0513 import Player from block명섭0513 import building,Block pygame.init() black = (0, 0, 0) white = (255, 255, 255) bright_red = (255,0,0) bright_green = (0,255,0) red = (45, 0, 0) green = (0, 45, 0) window = pygame.display.set_mode((800, 600)) pygame.d...
{ "repo_name": "saintdragon2/python-3-lecture-2015", "path": "civil_mid_final/슈퍼그랑조/Crash The USW/main명섭0513.py", "copies": "1", "size": "5878", "license": "mit", "hash": 1966060277405332200, "line_mean": 30.2287234043, "line_max": 81, "alpha_frac": 0.4964224872, "autogenerated": false, "ratio": 2...
__author__ = 'grantingersoll' import optparse import random import re # # Small script to create samples from the original Kyoto data # def sample(input_file, output_file, rows): print "Sampling " + str(rows) + " from " + input_file + " and writing to " + output_file p = re.compile('\t\t+') j = 0 out...
{ "repo_name": "LucidWorks/solr-for-security", "path": "src/python/kyoto-sampler.py", "copies": "1", "size": "1329", "license": "apache-2.0", "hash": -4729544130023454000, "line_mean": 30.6428571429, "line_max": 126, "alpha_frac": 0.5944319037, "autogenerated": false, "ratio": 3.416452442159383, ...
__author__ = 'grantingersoll' import optparse import random # # Small script to create samples from the original Citibike data # def sample(input_file, output_file, rows): print "Sampling " + str(rows) + " from " + input_file + " and writing to " + output_file j = 0 output = open(output_file, 'w') f ...
{ "repo_name": "LucidWorks/solr-for-datascience", "path": "src/python/citi-sampler.py", "copies": "2", "size": "1148", "license": "apache-2.0", "hash": -543387852846045900, "line_mean": 29.2105263158, "line_max": 126, "alpha_frac": 0.5993031359, "autogenerated": false, "ratio": 3.3372093023255816,...
__author__ = "grburgess <J. Michael Burgess>" from astromodels.functions.functions import DiracDelta, StepFunctionUpper import numpy as np def step_generator(intervals, parameter): """ Generates sum of step or dirac delta functions for the given intervals and parameter. This can be used to link time-ind...
{ "repo_name": "giacomov/3ML", "path": "threeML/utils/step_parameter_generator.py", "copies": "1", "size": "2905", "license": "bsd-3-clause", "hash": -5254537073167001000, "line_mean": 26.9326923077, "line_max": 81, "alpha_frac": 0.6330464716, "autogenerated": false, "ratio": 4.029126213592233, ...
__author__ = 'grburgess' from astropy import units as u import numpy as np import scipy.integrate as integrate import collections from threeML.utils.fitted_objects.fitted_source_handler import GenericFittedSourceHandler class NotCompositeModelError(RuntimeError): pass class InvalidUnitError(RuntimeError): ...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/utils/fitted_objects/fitted_point_sources.py", "copies": "1", "size": "12461", "license": "bsd-3-clause", "hash": -2036497851594954800, "line_mean": 30.7073791349, "line_max": 171, "alpha_frac": 0.5507583661, "autogenerated": false, "ratio": 4.620...
__author__ = 'grburgess' # from threeML.io.rich_display import display from threeML.utils.fitted_objects.fitted_point_sources import FittedPointSourceSpectralHandler from threeML.exceptions.custom_exceptions import custom_warnings import numpy as np import pandas as pd import collections def _setup_analysis_diction...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/io/calculate_flux.py", "copies": "1", "size": "20507", "license": "bsd-3-clause", "hash": 1912600731678550500, "line_mean": 34.6643478261, "line_max": 122, "alpha_frac": 0.4681328327, "autogenerated": false, "ratio": 4.97380548144555, "config_te...
__author__ = 'grburgess' import astropy.units as u import matplotlib.pyplot as plt import numpy as np from astropy.visualization import quantity_support from threeML.config.config import threeML_config from threeML.io.calculate_flux import _setup_analysis_dictionaries, _collect_sums_into_dictionaries from threeML.io....
{ "repo_name": "volodymyrss/3ML", "path": "threeML/io/plotting/model_plot.py", "copies": "1", "size": "25880", "license": "bsd-3-clause", "hash": -6858210789794804000, "line_mean": 32.9632545932, "line_max": 169, "alpha_frac": 0.4827666151, "autogenerated": false, "ratio": 4.80505012996658, "con...
__author__='grburgess' import collections import copy import os import numpy as np import pandas as pd from pandas import HDFStore from threeML.config.config import threeML_config from threeML.exceptions.custom_exceptions import custom_warnings from threeML.io.file_utils import sanitize_filename from threeML.io.prog...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/utils/time_series/event_list.py", "copies": "1", "size": "31101", "license": "bsd-3-clause", "hash": -4761736451517164000, "line_mean": 32.7687296417, "line_max": 125, "alpha_frac": 0.573582843, "autogenerated": false, "ratio": 4.18192819685357, ...
__author__ = 'grburgess' import collections import re from threeML.exceptions.custom_exceptions import custom_warnings, deprecated import astropy.io.fits as fits import numpy as np import pandas as pd from threeML.plugins.EventListLike import EventListLike from threeML.plugins.OGIP.response import InstrumentResponseS...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/plugins/FermiGBMTTELike.py", "copies": "1", "size": "11806", "license": "bsd-3-clause", "hash": 3766980563605077500, "line_mean": 32.6353276353, "line_max": 135, "alpha_frac": 0.5614941555, "autogenerated": false, "ratio": 3.985820391627279, "co...
__author__ = 'grburgess' import collections import warnings import astropy.io.fits as fits import numpy as np import pandas as pd from threeML.plugins.EventListLike import EventListLike from threeML.utils.fermi_relative_mission_time import compute_fermi_relative_mission_times from threeML.utils.time_series.event_lis...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/plugins/FermiLATLLELike.py", "copies": "1", "size": "13320", "license": "bsd-3-clause", "hash": 6553425025158199000, "line_mean": 29.2040816327, "line_max": 129, "alpha_frac": 0.5651651652, "autogenerated": false, "ratio": 3.8341968911917097, "c...
__author__ = "grburgess" import itertools import functools import numpy as np from threeML.io.progress_bar import progress_bar from astromodels import use_astromodels_memoization class GenericFittedSourceHandler(object): def __init__(self, analysis_result, new_function, parameter_names, parameters, confidence_l...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/utils/fitted_objects/fitted_source_handler.py", "copies": "1", "size": "10706", "license": "bsd-3-clause", "hash": 8213643885580075000, "line_mean": 24.25, "line_max": 144, "alpha_frac": 0.6068559686, "autogenerated": false, "ratio": 4.53068133728...
__author__ = "grburgess" import matplotlib.pyplot as plt import numpy as np # reverse these colormaps so that it goes from light to dark REVERSE_CMAP = ['summer', 'autumn', 'winter', 'spring', 'copper'] # clip some colormaps so the colors aren't too light CMAP_RANGE = dict(gray={'start':200, 'stop':0}, ...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/io/plotting/cmap_cycle.py", "copies": "1", "size": "2507", "license": "bsd-3-clause", "hash": -3157726288660211000, "line_mean": 29.2048192771, "line_max": 89, "alpha_frac": 0.5743917032, "autogenerated": false, "ratio": 3.5161290322580645, "con...
__author__ = 'grburgess' import numpy as np from threeML.io.file_utils import file_existing_and_readable from threeML.plugins.OGIP.pha import PHAII from threeML.exceptions.custom_exceptions import custom_warnings from threeML.io.plotting.light_curve_plots import binned_light_curve_plot from threeML.plugins.OGIPLike i...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/plugins/EventListLike.py", "copies": "1", "size": "18903", "license": "bsd-3-clause", "hash": 3036057226952021000, "line_mean": 30.0904605263, "line_max": 120, "alpha_frac": 0.5617097815, "autogenerated": false, "ratio": 4.339531680440771, "conf...
__author__ = 'greghines' from Container import Container class IBCCcontainer(Container): def __init__(self): self.subjects = [] self.users = [] self.classifications = {} def __subjectExists__(self,subjectName): return subjectName in self.subjects def __addSubject__(self,s...
{ "repo_name": "camallen/aggregation", "path": "experimental/classification/IBCCcontainer.py", "copies": "2", "size": "1421", "license": "apache-2.0", "hash": 7519016431810975000, "line_mean": 32.8571428571, "line_max": 72, "alpha_frac": 0.6840253343, "autogenerated": false, "ratio": 4.25449101796...
__author__ = 'greghines' from copy import deepcopy import numpy as np class BaseUserNode: def __init__(self,classList=None): #self.name = name self.subjectsViewed = [] self.classifications = [] if classList == None: self.numClasses = None self.confusion_matr...
{ "repo_name": "camallen/aggregation", "path": "experimental/graphicalClassification/BaseNodes.py", "copies": "2", "size": "6454", "license": "apache-2.0", "hash": -6517752994510942000, "line_mean": 30.7931034483, "line_max": 147, "alpha_frac": 0.6137279207, "autogenerated": false, "ratio": 4.1029...
__author__ = 'greg' def long_substr(data): substr = '' if len(data) > 1 and len(data[0]) > 0: for i in range(len(data[0])): for j in range(len(data[0])-i+1): if j > len(substr) and is_substr(data[0][i:i+j], data): substr = data[0][i:i+j] return substr ...
{ "repo_name": "camallen/aggregation", "path": "algorithms/new_agg.py", "copies": "2", "size": "1923", "license": "apache-2.0", "hash": 5929864048386053000, "line_mean": 67.7142857143, "line_max": 206, "alpha_frac": 0.6718668747, "autogenerated": false, "ratio": 3.1016129032258064, "config_test"...
__author__ = 'greg' from clustering import Cluster import pandas as pd import numpy as np from scipy.spatial.distance import pdist,squareform from scipy.cluster.hierarchy import linkage import abc import math class AbstractNode: def __init__(self): self.value = None self.rchild = None self....
{ "repo_name": "camallen/aggregation", "path": "algorithms/automatic_optics.py", "copies": "2", "size": "9956", "license": "apache-2.0", "hash": -3825393256074958000, "line_mean": 33.5729166667, "line_max": 116, "alpha_frac": 0.5640819606, "autogenerated": false, "ratio": 3.7598187311178246, "co...
__author__ = 'greg' from fix import Fix import numpy as np import sys import os # add the paths necessary for clustering algorithm and ibcc - currently only works on Greg's computer if os.path.exists("/home/ggdhines"): sys.path.append("/home/ggdhines/PycharmProjects/reduction/experimental/clusteringAlg") elif os.p...
{ "repo_name": "camallen/aggregation", "path": "experimental/clusteringAlg/zeroFix.py", "copies": "2", "size": "3043", "license": "apache-2.0", "hash": -7744606971844911000, "line_mean": 36.5679012346, "line_max": 111, "alpha_frac": 0.5928360171, "autogenerated": false, "ratio": 3.58, "config_te...
__author__ = 'greg' import aggregation import cPickle as pickle import os.path class CondorTools(aggregation.ClassificationTools): def __init__(self): aggregation.ClassificationTools.__init__(self,scale=1.875) def __classification_to_markings__(self,classification): annotations = classificati...
{ "repo_name": "camallen/aggregation", "path": "experimental/paper/condorAggregation.py", "copies": "2", "size": "2704", "license": "apache-2.0", "hash": -5368841571103929000, "line_mean": 39.3582089552, "line_max": 144, "alpha_frac": 0.6187130178, "autogenerated": false, "ratio": 3.77653631284916...
__author__ = 'greg' import aggregation import csv import os import urllib import cPickle as pickle class PenguinTools(aggregation.ROIClassificationTools): def __init__(self,subject_collection): aggregation.ROIClassificationTools.__init__(self,scale=1) #1.92 self.subject_collection = subject_collec...
{ "repo_name": "camallen/aggregation", "path": "experimental/paper/clustering/penguinAggregation.py", "copies": "2", "size": "6954", "license": "apache-2.0", "hash": -3506536902764759600, "line_mean": 37.4198895028, "line_max": 146, "alpha_frac": 0.561691113, "autogenerated": false, "ratio": 3.777...
__author__ = 'greg' import bisect import math import abc import numpy as np import os import re # import ibcc import csv import matplotlib.pyplot as plt import random import socket import warnings import scipy from shapely.geometry import Polygon # import panoptes_api def index(a, x): 'Locate the leftmost value e...
{ "repo_name": "camallen/aggregation", "path": "engine/clustering.py", "copies": "1", "size": "5463", "license": "apache-2.0", "hash": -7728411014051612000, "line_mean": 38.5869565217, "line_max": 142, "alpha_frac": 0.5912502288, "autogenerated": false, "ratio": 4.298190401258851, "config_test":...
__author__ = 'greg' import clustering import os import re import matplotlib.pyplot as plt import networkx as nx import itertools from copy import deepcopy import abc import json import csv import math def findsubsets(S,m): return set(itertools.combinations(S, m)) class Classification: def __init__(self): ...
{ "repo_name": "camallen/aggregation", "path": "engine/classification.py", "copies": "1", "size": "28416", "license": "apache-2.0", "hash": -6603582252461055000, "line_mean": 47.9931034483, "line_max": 409, "alpha_frac": 0.5601773649, "autogenerated": false, "ratio": 4.572899903443837, "config_t...
__author__ = 'greg' import divisiveDBSCAN import multiprocessing import numpy as np import math class Worker(multiprocessing.Process): def __init__(self,min_samples,task_queue,result_queue): multiprocessing.Process.__init__(self) self.d_DBSCAN = divisiveDBSCAN.DivisiveDBSCAN(min_samples) s...
{ "repo_name": "camallen/aggregation", "path": "experimental/clusteringAlg/divisiveDBSCAN_multi.py", "copies": "2", "size": "2387", "license": "apache-2.0", "hash": 1420804612340885200, "line_mean": 30.84, "line_max": 97, "alpha_frac": 0.5693338919, "autogenerated": false, "ratio": 3.8314606741573...
__author__ = 'greg' import json from pprint import pprint import matplotlib.pyplot as plt import matplotlib.cbook as cbook import math import numpy as np import cv2 from sklearn.cluster import DBSCAN import cPickle as pickle # img = cv2.imread("/home/ggdhines/Dropbox/066e48f5-812c-4b5f-ab04-df6c35f50393.jpeg") # print...
{ "repo_name": "zooniverse/aggregation", "path": "experimental/algorithms/old_weather/create_data.py", "copies": "2", "size": "5608", "license": "apache-2.0", "hash": -78660752049111520, "line_mean": 23.3826086957, "line_max": 104, "alpha_frac": 0.5082025678, "autogenerated": false, "ratio": 2.939...
__author__ = 'greg' import math import os import sys import numpy as np # add the paths necessary for clustering algorithm and ibcc - currently only works on Greg's computer if os.path.exists("/home/ggdhines"): sys.path.append("/home/ggdhines/PycharmProjects/reduction/experimental/clusteringAlg") elif os.path.exis...
{ "repo_name": "zooniverse/aggregation", "path": "experimental/clusteringAlg/ibccCorrect.py", "copies": "2", "size": "9073", "license": "apache-2.0", "hash": -7788493256229844000, "line_mean": 37.6085106383, "line_max": 113, "alpha_frac": 0.5764355781, "autogenerated": false, "ratio": 3.5372319688...
__author__ = 'greg' import math #the base of a series of classes which can fix clusters which have been split but which should not have been #the difference is how we find "abnormally" close clusters class Fix: def __init__(self): pass def calc_relations(self,centers,clusters,pts,user_list,dist_thresh...
{ "repo_name": "camallen/aggregation", "path": "experimental/clusteringAlg/fix.py", "copies": "2", "size": "6749", "license": "apache-2.0", "hash": 7976150013479378000, "line_mean": 39.4191616766, "line_max": 122, "alpha_frac": 0.5420062231, "autogenerated": false, "ratio": 3.998222748815166, "c...
__author__ = 'greg' import matplotlib.pyplot as plt import matplotlib.cbook as cbook import math import numpy from scipy import spatial from PIL import Image import pytesseract start_x = 585.5 end_x = 3265.5 horizontal_lines = [(1271.5,1288.5),(1368.5,1384),(1424,1440),(1481.5,1497),(1537.5,1552),(1593,1607.5),(1...
{ "repo_name": "camallen/aggregation", "path": "algorithms/old_weather/bear.py", "copies": "2", "size": "14647", "license": "apache-2.0", "hash": 1013865412984317800, "line_mean": 29.2644628099, "line_max": 198, "alpha_frac": 0.5037208985, "autogenerated": false, "ratio": 2.7973644003055766, "co...
__author__ = 'greg' import matplotlib.pyplot as plt import matplotlib.cbook as cbook import math import numpy import cPickle import os from neural_network import Network,load_data_wrapper import cv2 if os.path.exists("/home/ggdhines"): base_directory = "/home/ggdhines" else: base_directory = "/home/greg" net ...
{ "repo_name": "zooniverse/aggregation", "path": "experimental/algorithms/old_weather/cells.py", "copies": "2", "size": "5004", "license": "apache-2.0", "hash": -7206102879154386000, "line_mean": 23.5343137255, "line_max": 136, "alpha_frac": 0.5391686651, "autogenerated": false, "ratio": 2.7136659...
__author__ = 'greg' import numpy as np class Node: def __init__(self,min_x,min_y,max_x,max_y): self.min_x = min_x self.min_y = min_y self.max_x = max_x self.max_y = max_y self.markings = [] self.users = [] self.children = None self.split_x = None ...
{ "repo_name": "camallen/aggregation", "path": "experimental/old/quadTree.py", "copies": "2", "size": "2340", "license": "apache-2.0", "hash": 812417456523073700, "line_mean": 33.4117647059, "line_max": 94, "alpha_frac": 0.5081196581, "autogenerated": false, "ratio": 3.5240963855421685, "config_...
__author__ = 'greg' import os import yaml import psycopg2 if os.path.exists("/home/ggdhines"): base_directory = "/home/ggdhines" else: base_directory = "/home/greg" environment = "staging" try: database_file = open("config/database.yml") except IOError: database_file = open(base_directory+"/Databases...
{ "repo_name": "zooniverse/aggregation", "path": "experimental/algorithms/list_panoptes_projects.py", "copies": "2", "size": "1210", "license": "apache-2.0", "hash": 1590876713343120600, "line_mean": 24.7659574468, "line_max": 98, "alpha_frac": 0.6876033058, "autogenerated": false, "ratio": 3.7003...
__author__ = 'greg' import psycopg2 import pymongo import json import re # the directory to store the movie preview clips in image_directory = "/home/greg/Databases/chimp/images/" # connect to the mongodb server client = pymongo.MongoClient() db = client['serengeti_2015-06-27'] subjects = db["serengeti_subjects"] cla...
{ "repo_name": "camallen/aggregation", "path": "algorithms/migration.py", "copies": "2", "size": "1954", "license": "apache-2.0", "hash": -1248510847368518000, "line_mean": 34.5454545455, "line_max": 136, "alpha_frac": 0.6780962129, "autogenerated": false, "ratio": 3.3287904599659286, "config_te...
__author__ = 'greg' import pymongo import bisect import sys import os import csv import matplotlib.pyplot as plt import urllib import matplotlib.cbook as cbook from collections import Iterator import math from scipy.stats.stats import pearsonr import cPickle as pickle from scipy.stats.mstats import normaltest import wa...
{ "repo_name": "camallen/aggregation", "path": "experimental/paper/clustering/aggregation.py", "copies": "2", "size": "56968", "license": "apache-2.0", "hash": 771528196563640600, "line_mean": 39.1183098592, "line_max": 151, "alpha_frac": 0.5596650751, "autogenerated": false, "ratio": 3.5158921187...
__author__ = 'greg' import random import math import sys import gc steps = ["centered_in_crosshairs", "subtracted", "circular", "centered_in_host"] gc.set_debug(gc.DEBUG_LEAK) def create_annotations(): annotations = [] end_point = random.randint(0,4) for i in range(end_point): annotations.append({...
{ "repo_name": "camallen/aggregation", "path": "Stargazing/loadtesting.py", "copies": "2", "size": "2065", "license": "apache-2.0", "hash": 3839128037054996500, "line_mean": 25.4743589744, "line_max": 173, "alpha_frac": 0.6121065375, "autogenerated": false, "ratio": 3.458961474036851, "config_te...
__author__ = 'greg' import re import os import zipfile import math import csv import json import numpy import tarfile import rollbar class CsvOut: def __init__(self,project): print type(project) # assert isinstance(project,aggregation_api.AggregationAPI) self.project = project sel...
{ "repo_name": "camallen/aggregation", "path": "engine/csv_output.py", "copies": "1", "size": "16832", "license": "apache-2.0", "hash": 8854806366481500000, "line_mean": 42.496124031, "line_max": 118, "alpha_frac": 0.5777091255, "autogenerated": false, "ratio": 4.201697453819271, "config_test": ...
__author__ = 'greg' import requests import pymongo import json import csv import os import urllib import numpy import cv2 from skimage.measure import structural_similarity as ssim import matplotlib.pyplot as plt from skimage.feature import CENSURE def mse(imageA, imageB): # the 'Mean Squared Error' between the tw...
{ "repo_name": "camallen/aggregation", "path": "algorithms/blanks/image_diff.py", "copies": "2", "size": "4078", "license": "apache-2.0", "hash": -3543847362760126000, "line_mean": 25.8355263158, "line_max": 95, "alpha_frac": 0.6245708681, "autogenerated": false, "ratio": 3.2262658227848102, "co...
__author__ = 'greg' mypath = "/home/greg/Databases/tests/" from os import listdir from os.path import isfile, join import numpy as np import cv2 import numpy import PIL from sklearn.cluster import DBSCAN import matplotlib.pyplot as plt import math onlyfiles = [ f for f in listdir(mypath) if isfile(join(mypath,f)) and...
{ "repo_name": "zooniverse/aggregation", "path": "analysis/old_weather2.py", "copies": "2", "size": "2898", "license": "apache-2.0", "hash": -2846167512243142700, "line_mean": 27.99, "line_max": 87, "alpha_frac": 0.5786749482, "autogenerated": false, "ratio": 3.0156087408949013, "config_test": f...
__author__ = 'greg' def find_cluster(p,c_list): for i,c in enumerate(c_list): if p in c: return i return -1 def cluster_compare(c_list1,c_list2): #return those points in c_list2 which do not have a corresponding cluster in c_list1 mapping_1_to_2 = [None for c in c_list1] #mapp...
{ "repo_name": "zooniverse/aggregation", "path": "experimental/clusteringAlg/clusterCompare.py", "copies": "2", "size": "1960", "license": "apache-2.0", "hash": 7775831368206774000, "line_mean": 33.4035087719, "line_max": 118, "alpha_frac": 0.6566326531, "autogenerated": false, "ratio": 3.21311475...
__author__ = 'greg' from DAL import DAL import init_database as Init engine = 'mysql+mysqldb://johndoe:secret@localhost/how_to_sqlalchemy?unix_socket=/opt/lampp/var/mysql/mysql.sock' my_dal = None def add_users(dal_instance): if dal_instance: dal_instance.clear_users() dal_instance.add_user('Jo...
{ "repo_name": "gergob/how_to_sqlalchemy", "path": "app.py", "copies": "1", "size": "1353", "license": "mit", "hash": 30529278995558508, "line_mean": 32, "line_max": 145, "alpha_frac": 0.6171470806, "autogenerated": false, "ratio": 2.934924078091106, "config_test": false, "has_no_keywords": fa...
__author__ = 'Greg' import pandas as pd import numpy as np import itertools import multiprocessing as mp import csv def recur_dictify(frame): """ h/t: http://stackoverflow.com/a/19900276/843419 :param frame: a pandas data frame :return: a nested dictionary with the columns as the keys and the final o...
{ "repo_name": "gregmacfarlane/trucksim_disagg", "path": "py/disaggregate_trucks.py", "copies": "1", "size": "13526", "license": "mit", "hash": 4117332144261454300, "line_mean": 35.0693333333, "line_max": 186, "alpha_frac": 0.5691261275, "autogenerated": false, "ratio": 3.525149856658848, "confi...
from collections import defaultdict, deque from itertools import chain #from twython import Twython import random #import config # twitter = Twython( # config.TWITTER_CONSUMER_KEY, # config.TWITTER_CONSUMER_SECRET, # config.TWITTER_ACCESS_TOKEN, # config.TWITTER_ACCESS_SECRET # ) class MarkovChain(...
{ "repo_name": "IrekRybark/pyiku", "path": "pyiku/markov.py", "copies": "1", "size": "1598", "license": "mit", "hash": -1142135734682113500, "line_mean": 29.1509433962, "line_max": 77, "alpha_frac": 0.6245306633, "autogenerated": false, "ratio": 3.504385964912281, "config_test": false, "has_no...
__author__ = 'Greg Richards' __author__ = 'Tara Critteden' from random import randint import Player import Message import RPSPlayerExample class MyPlayer(Player.Player): def __init__(self): """ :param self: this player class """ Player.Player.__init__(self) # calls superclass c...
{ "repo_name": "geebzter/game-framework", "path": "GRTCPlayer.py", "copies": "1", "size": "5084", "license": "apache-2.0", "hash": -7003421978090337000, "line_mean": 33.8219178082, "line_max": 108, "alpha_frac": 0.5080645161, "autogenerated": false, "ratio": 4.261525565800503, "config_test": fal...
__author__ = 'Greg Richards' import Game class RPSGame(Game.Game): # # this class simulates two players playing a game of rock, paper, scissors def __init__(self): super(RPSGame, self).__init__() def get_result(self, moves): # unpack the tuple that was passed as a parameter move1...
{ "repo_name": "PaulieC/RPSPlayer", "path": "RPSGame.py", "copies": "3", "size": "1065", "license": "apache-2.0", "hash": 3941859482165159000, "line_mean": 28.5833333333, "line_max": 81, "alpha_frac": 0.4863849765, "autogenerated": false, "ratio": 3.710801393728223, "config_test": false, "has_...
__author__ = 'gremorian' import sys import time from datetime import date, datetime from decimal import Decimal from .types import OrientRecordLink, OrientRecord, OrientBinaryObject class ORecordDecoder(object): def __init__(self, content): self.className = None self.data = {} if not is...
{ "repo_name": "ziyangzeng/pyorient", "path": "pyorient/serialization.py", "copies": "1", "size": "15904", "license": "apache-2.0", "hash": -2915493534457863700, "line_mean": 29.0642722117, "line_max": 88, "alpha_frac": 0.4607017103, "autogenerated": false, "ratio": 4.51177304964539, "config_tes...
__author__ = 'gremorian' import sys import time from datetime import date, datetime from .types import OrientRecordLink, OrientRecord, OrientBinaryObject class ORecordDecoder(object): def __init__(self, content): self.className = None self.data = {} if not isinstance(content, str): ...
{ "repo_name": "SPSCommerce/pyorient", "path": "pyorient/serialization.py", "copies": "2", "size": "15464", "license": "apache-2.0", "hash": -204384615195529540, "line_mean": 29.027184466, "line_max": 88, "alpha_frac": 0.4625581997, "autogenerated": false, "ratio": 4.4940424295263, "config_test"...
__author__ = 'gremorian' import unittest import pyorient import os os.environ['DEBUG'] = "0" old_token = '' class TokenAuthTest(unittest.TestCase): """ Command Test Case """ client = None def setUp(self): self.client = pyorient.OrientDB("localhost", 2424) client = pyorient.OrientDB("...
{ "repo_name": "Ostico/pyorient", "path": "tests/test_token_auth.py", "copies": "3", "size": "3767", "license": "apache-2.0", "hash": -3603650487643592700, "line_mean": 33.5596330275, "line_max": 86, "alpha_frac": 0.6124236793, "autogenerated": false, "ratio": 3.726013847675569, "config_test": t...
__author__ = 'gremorian' import unittest import pyorient class LinkSetTestCase(unittest.TestCase): """ Command Test Case """ def setUp(self): self.client = pyorient.OrientDB("localhost", 2424) self.client.connect("root", "root") db_name = "test_set" try: self.c...
{ "repo_name": "Ostico/pyorient", "path": "tests/test_linkSet.py", "copies": "3", "size": "6752", "license": "apache-2.0", "hash": 7002568160081194000, "line_mean": 37.3636363636, "line_max": 109, "alpha_frac": 0.4942239336, "autogenerated": false, "ratio": 3.878230901780586, "config_test": true...
__author__ = 'grokrz' log = True class Node: def __init__(self, node_id=None, successor=None): self.node_id = node_id self.successor = successor self.leader = None self.__messages = [] def get_successor_id(self): if self.successor: return self.successor.no...
{ "repo_name": "kgrodzicki/cloud-computing-specialization", "path": "cloud-computing-concepts-part2/scripts/ring_election.py", "copies": "1", "size": "2575", "license": "mit", "hash": 5071830808931959000, "line_mean": 25.2755102041, "line_max": 92, "alpha_frac": 0.5580582524, "autogenerated": false,...
__author__ = 'grund' import re from snakebite.client import Client import pyhs2 class Loader: """ The idea of the loader is to provide a convenient interface to create a new table based on some input files """ def __init__(self, path, name_node, hive_server, user="root", hive_db...
{ "repo_name": "grundprinzip/pyxplorer", "path": "pyxplorer/loader.py", "copies": "1", "size": "4068", "license": "bsd-2-clause", "hash": -7700796680512762000, "line_mean": 31.2857142857, "line_max": 95, "alpha_frac": 0.5314650934, "autogenerated": false, "ratio": 4.273109243697479, "config_test...
__author__ = 'gstimac' import os import subprocess from cement.core.foundation import CementApp from cement.utils.misc import init_defaults # define our default configuration options defaults = init_defaults('disk_expander') defaults['disk_expander']['debug'] = False # define the application class class MyApp(CementA...
{ "repo_name": "gstimac/disk-expander", "path": "disk_expander.py", "copies": "1", "size": "1361", "license": "mit", "hash": -181372708260242720, "line_mean": 34.8157894737, "line_max": 185, "alpha_frac": 0.6767083027, "autogenerated": false, "ratio": 3.7910863509749304, "config_test": false, ...
__author__ = 'gturner' from eventtools.tests._inject_app import TestCaseWithApp as AppTestCase from eventtools.tests.eventtools_testapp.models import * from eventtools.models import Rule import datetime class TestEventTree(AppTestCase): def setUp(self): super(TestEventTree, self).setUp() #SCENARI...
{ "repo_name": "ixc/glamkit-eventtools", "path": "eventtools/tests/models/tree.py", "copies": "1", "size": "4822", "license": "bsd-3-clause", "hash": -5127721433171684000, "line_mean": 50.8602150538, "line_max": 183, "alpha_frac": 0.6758606387, "autogenerated": false, "ratio": 3.3696715583508037, ...
__author__ = 'Guanhua, Joms' from numpy import array, shape, sum, exp, dot, int8, zeros from scipy.io import loadmat import argparse, pickle, os import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('train_path', help='Path to training database') arguments = parser.parse_args() roaddat...
{ "repo_name": "archonren/project", "path": "algorithms/pnn_with_non_target_testing_file.py", "copies": "1", "size": "2904", "license": "mit", "hash": -1696456931758939600, "line_mean": 39.9154929577, "line_max": 108, "alpha_frac": 0.6039944904, "autogenerated": false, "ratio": 3.248322147651007, ...
__author__ = 'Guanhua, Joms' from scipy.io import loadmat, savemat from numpy import vstack, array import os def output_data(key, heading, num_imgs): arr = [] data = vstack(((heading[key][:, i])[0] for i in range(num_imgs))) data_mean = data.mean(axis=0).reshape(-1, 1) data_std = data.std(axis=0).res...
{ "repo_name": "archonren/project", "path": "preprocess/split_without_target.py", "copies": "1", "size": "1255", "license": "mit", "hash": 8058023889479131000, "line_mean": 34.8571428571, "line_max": 101, "alpha_frac": 0.6239043825, "autogenerated": false, "ratio": 2.8013392857142856, "config_te...
__author__ = 'Guanhua, Joms' from skimage.color import rgb2lab, rgb2hsv from numpy import empty, ndindex def to_lab(ndimage): return rgb2lab(ndimage) def to_hsv(ndimage): return rgb2hsv(ndimage) def normalized_RG(ndimage): """ :param ndimage: a image file :return: normalized RG for every pixel...
{ "repo_name": "archonren/project", "path": "preprocess/data_handling.py", "copies": "1", "size": "1179", "license": "mit", "hash": -6451370853175486000, "line_mean": 25.8181818182, "line_max": 56, "alpha_frac": 0.5742154368, "autogenerated": false, "ratio": 2.716589861751152, "config_test": fal...
__author__ = 'Guanhua, Joms' import os from real_single_pic import * from scipy.io import savemat import pickle from numpy import array def pic_package_to_mat(input_fldr, file_heading, number_of_file): feature = [] num_super_pixel = [] dim = [] for n in range(number_of_file): png_file_name = "...
{ "repo_name": "archonren/project", "path": "preprocess/pic_package_feature_mat_without_target.py", "copies": "1", "size": "1669", "license": "mit", "hash": 3050107543681629000, "line_mean": 42.9210526316, "line_max": 110, "alpha_frac": 0.6177351708, "autogenerated": false, "ratio": 2.887543252595...
__author__ = 'Guanhua, Joms' import os from single_pic_handling import * from scipy.io import savemat def pic_package_to_mat(input_fldr, file_heading, number_of_file): feature = [] target = [] dim = [] for n in range(number_of_file): png_file_name = "%s_%06d.png" % (file_heading, n) pa...
{ "repo_name": "archonren/project", "path": "preprocess/pic_package_feature_mat.py", "copies": "1", "size": "1457", "license": "mit", "hash": -668761063743321600, "line_mean": 40.6285714286, "line_max": 107, "alpha_frac": 0.6039807824, "autogenerated": false, "ratio": 2.78585086042065, "config_t...
__author__ = 'Guanhua, Joms' from struct import unpack from numpy import reshape, ndindex, empty from scipy.ndimage import imread def label(filepath, height, width): """ :param filepath: path of label.dat :return data_label: ndarray that contain label of each pixel, dim = (height, width) :return labe...
{ "repo_name": "archonren/project", "path": "preprocess/file_handling.py", "copies": "1", "size": "1248", "license": "mit", "hash": -7265214784291283000, "line_mean": 27.3863636364, "line_max": 87, "alpha_frac": 0.5961538462, "autogenerated": false, "ratio": 3.495798319327731, "config_test": fal...
__author__ = 'Guggi' import urllib2 import urllib import unirest import json from poster.encode import multipart_encode from poster.streaminghttp import register_openers from PIL import Image, ImageDraw, ImageFont register_openers() api_key = "YOUR_API_KEY" #you need to exchange the YOUR_API_KEY with your own API ke...
{ "repo_name": "mavlyutovrus/person_detection", "path": "src/Detect_Faces.py", "copies": "1", "size": "4235", "license": "apache-2.0", "hash": 3185664998627565000, "line_mean": 36.4778761062, "line_max": 140, "alpha_frac": 0.5924439197, "autogenerated": false, "ratio": 3.462796402289452, "config...
__author__ = 'guglielmo' from django.contrib import admin from datasets_survey.models import * class SettoreAdmin(admin.ModelAdmin): pass class LicenzaAdmin(admin.ModelAdmin): pass class OrganizzazioneAdmin(admin.ModelAdmin): list_display = ('denominazione', 'tipologia', 'area') list_filter = ('tipol...
{ "repo_name": "DeppSRL/odl_datasets_survey", "path": "project/datasets_survey/admin.py", "copies": "1", "size": "1036", "license": "bsd-3-clause", "hash": 5201951762637594000, "line_mean": 32.4193548387, "line_max": 90, "alpha_frac": 0.7075289575, "autogenerated": false, "ratio": 3.2375, "confi...
__author__ = 'guglielmo' import os # This is necessary for all installed apps to be recognized, for some reason. os.environ['DJANGO_SETTINGS_MODULE'] = 'op_social_access.settings.test' def before_all(context): # Even though DJANGO_SETTINGS_MODULE is set, this may still be # necessary. Or it may be simple CYA ...
{ "repo_name": "openpolis/social-access", "path": "op_social_access/features/environment.py", "copies": "1", "size": "3112", "license": "mit", "hash": 2184816788284262700, "line_mean": 36.9512195122, "line_max": 91, "alpha_frac": 0.705655527, "autogenerated": false, "ratio": 4.0732984293193715, ...
__author__ = 'Guido Krömer' __license__ = 'MIT' __version__ = '0.2' __email__ = 'mail 64 cacodaemon 46 de' import sublime from sublime import Window from sublime_plugin import TextCommand from sublime_plugin import EventListener from threading import Thread import json from time import sleep from .WebSocket.WebSocketS...
{ "repo_name": "LukevdPalen/GhostText-for-SublimeText", "path": "GhostText.py", "copies": "1", "size": "5931", "license": "mit", "hash": -3936956652284903000, "line_mean": 33.6549707602, "line_max": 111, "alpha_frac": 0.6587917651, "autogenerated": false, "ratio": 3.845554834523037, "config_test...
from flask import render_template from datetime import timedelta from maraschino import app, logger from maraschino.tools import * from rtorrent import RTorrent def log_error(ex): logger.log('RTORRENTDL :: EXCEPTION - %s' % ex, 'DEBUG') @app.route('/xhr/rtorrentdl/') @requires_auth def xhr_rtorrentdl(): # url qu...
{ "repo_name": "awagnon/maraschino", "path": "modules/rtorrentdl.py", "copies": "4", "size": "3861", "license": "mit", "hash": -5348793493012701000, "line_mean": 24.4013157895, "line_max": 97, "alpha_frac": 0.6576016576, "autogenerated": false, "ratio": 3.028235294117647, "config_test": false, ...
__author__ = 'GuillaumeBeaud' # print '=========================================== LIMIT =====================================' # ============================================== ABOVE IS OK ===================================== # ============================================== DEMO ===================================...
{ "repo_name": "LCAV/linvpy", "path": "tests/test.py", "copies": "1", "size": "2184", "license": "bsd-2-clause", "hash": 5235623275410641000, "line_mean": 34.2419354839, "line_max": 98, "alpha_frac": 0.5902014652, "autogenerated": false, "ratio": 4.1919385796545106, "config_test": false, "has_...
__author__ = "Guillaume Bonamis" __license__ = "MIT" __copyright__ = "2015, ESRF" import os import sys import numpy import matplotlib # matplotlib.use('Agg') import matplotlib.pyplot as plt from freesas.model import SASModel import itertools from scipy.optimize import fmin import logging logging.basicConfig(level=logg...
{ "repo_name": "kif/freesas", "path": "freesas/align.py", "copies": "1", "size": "17075", "license": "mit", "hash": -3295297519486938600, "line_mean": 37.1991051454, "line_max": 209, "alpha_frac": 0.574875549, "autogenerated": false, "ratio": 3.8147899910634493, "config_test": false, "has_no_k...
import pytest import numpy as np from sklearn.mixture import GaussianMixture from sklearn.mixture import BayesianGaussianMixture @pytest.mark.parametrize( "estimator", [GaussianMixture(), BayesianGaussianMixture()] ) def test_gaussian_mixture_n_iter(estimator): # check that n_iter is the number of ...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/mixture/tests/test_mixture.py", "copies": "3", "size": "1049", "license": "bsd-3-clause", "hash": 1429557988750151200, "line_mean": 25.8974358974, "line_max": 70, "alpha_frac": 0.701620591, "autogenerated": false, "ratio": 3.3196202531645...
__author__ = "Guillaume" __license__ = "MIT" __copyright__ = "2015, ESRF" import numpy from freesas.model import SASModel class Grid: """ This class is used to create a grid which include all the input models """ def __init__(self, inputfiles): """ :param inputfiles: list of pdb files...
{ "repo_name": "kif/freesas", "path": "freesas/average.py", "copies": "1", "size": "9116", "license": "mit", "hash": -2636630166722840600, "line_mean": 32.6383763838, "line_max": 101, "alpha_frac": 0.5072400176, "autogenerated": false, "ratio": 3.71021571021571, "config_test": false, "has_no_k...
__author__ = 'guillem' import networkx as nx import numpy as np def rag(partition, discard_axis=[]): """ Parameters ---------- partition: numpy array A 2D or 3D label array where each label represents a region discard_axis: list, optional Whether the rag discards adjacencies from given a...
{ "repo_name": "guillempalou/scikit-cv", "path": "skcv/graph/rag.py", "copies": "1", "size": "2309", "license": "bsd-3-clause", "hash": 4037748571661822500, "line_mean": 24.3736263736, "line_max": 73, "alpha_frac": 0.5426591598, "autogenerated": false, "ratio": 3.8228476821192054, "config_test":...
__author__ = 'gunnarkleemann' #specify an aligmnemt and a reference VCF, list the number of header lines to remove from each file import pandas as pd def FilterMutations(Align, SkipCt1, ref, hdCt2): # the metadata appears to be getting in the way of dataframe construciton so i skip it for now #capture mtadata...
{ "repo_name": "gunnarklee/DataStoreRetrieval", "path": "FilterMutations.py", "copies": "1", "size": "2398", "license": "mit", "hash": -5788852296164594000, "line_mean": 32.3055555556, "line_max": 158, "alpha_frac": 0.6576313595, "autogenerated": false, "ratio": 2.945945945945946, "config_test":...
""" nimsdata.medimg.nimsdicom ========================= nimsdicom stuff, and adds dicom specific parsing routines. nimsdicom uses a composer design pattern to dynamically incoporate functions based on the input data. """ import dicom import types import logging import tarfile import datetime import dcmstack import c...
{ "repo_name": "Eric89GXL/data", "path": "scitran/data/medimg/dcm/dcm.py", "copies": "1", "size": "16458", "license": "mit", "hash": -7986095593044696000, "line_mean": 38.6578313253, "line_max": 139, "alpha_frac": 0.628691214, "autogenerated": false, "ratio": 3.628306878306878, "config_test": fa...
""" nimsdata.medimg.nimsnifti ========================= NIMSNifti provide NIfti writing capabilities for MR datasets read by any subclass of NIMSMRReader. Provides nifti specifics, inherits from NIMSMRReader, NIMSMRWriter. """ import os import bson import logging import nibabel import json import numpy as np imp...
{ "repo_name": "cni/nimsdata", "path": "medimg/nimsnifti.py", "copies": "1", "size": "10850", "license": "mit", "hash": 4391735899394310000, "line_mean": 36.2852233677, "line_max": 161, "alpha_frac": 0.5714285714, "autogenerated": false, "ratio": 3.6992840095465396, "config_test": false, "has_...
""" scitran.data.medimg.nifti ========================= Nifti provide NIfti writing capabilities for MR datasets read by any subclass of MedImgReader. Provides nifti specifics, inherits from MedImgReader, MedImgWriter. """ import os import logging import nibabel import numpy as np import medimg from .. import u...
{ "repo_name": "Eric89GXL/data", "path": "scitran/data/medimg/nifti.py", "copies": "1", "size": "9578", "license": "mit", "hash": -1250271302966136600, "line_mean": 34.6059479554, "line_max": 157, "alpha_frac": 0.5870745458, "autogenerated": false, "ratio": 3.6061746987951806, "config_test": fal...
""" nimsdata.medimg.nimsbehavior ============================ Not implemented. This will parse behavioral data that is related to medical imaging data. This will potentially parse outputs from stimulus presentation software that are commonly used in medical imaging. Such as outputs from Matlab, Eprime2 and PsychoPy...
{ "repo_name": "cni/nimsdata", "path": "medimg/nimsbehavior.py", "copies": "1", "size": "1188", "license": "mit", "hash": 8936402483464797000, "line_mean": 26, "line_max": 98, "alpha_frac": 0.7003367003, "autogenerated": false, "ratio": 3.644171779141104, "config_test": false, "has_no_keywords...
""" scitran.data.medimg.behavior ============================ Not implemented. This will parse behavioral data that is related to medical imaging data. This will potentially parse outputs from stimulus presentation software that are commonly used in medical imaging. Such as outputs from Matlab, Eprime2 and PsychoPy...
{ "repo_name": "Eric89GXL/data", "path": "scitran/data/medimg/behavior.py", "copies": "2", "size": "1398", "license": "mit", "hash": 8126080656143035000, "line_mean": 28.7446808511, "line_max": 98, "alpha_frac": 0.6938483548, "autogenerated": false, "ratio": 3.8833333333333333, "config_test": fa...
""" nimsdata.medimg.nimspng ======================= NIMSMRPNG provides PNG image writing capabilities for medimg datasets. """ import os import logging from PIL import Image import numpy as np import medimg log = logging.getLogger(__name__) class NIMSPNGError(medimg.MedImgError): pass class NIMSPNG(medim...
{ "repo_name": "cni/nimsdata", "path": "medimg/nimspng.py", "copies": "1", "size": "2799", "license": "mit", "hash": -7708324686655690000, "line_mean": 31.1724137931, "line_max": 117, "alpha_frac": 0.5555555556, "autogenerated": false, "ratio": 3.792682926829268, "config_test": false, "has_no_...
""" nimsdata.medimg.png =================== PNG provides PNG image writing capabilities for medimg datasets. """ import os import logging from PIL import Image import numpy as np import medimg log = logging.getLogger(__name__) class PNGError(medimg.MedImgError): pass class PNG(medimg.MedImgWriter): ...
{ "repo_name": "scitran/data", "path": "scitran/data/medimg/png.py", "copies": "1", "size": "2769", "license": "mit", "hash": 3950324454253885000, "line_mean": 30.8275862069, "line_max": 113, "alpha_frac": 0.5521849043, "autogenerated": false, "ratio": 3.845833333333333, "config_test": false, ...
""" nimsdata ======== The nimsdata package provides two main interfaces, nimsdata.parse() for reading an input file, and nimsdata.write() for writing to an output file. Nimsdata can read dicoms, and GE P-files. Support for additional data domains and files types is being actively developed. NIMSdata provides read a...
{ "repo_name": "cni/nimsdata", "path": "__init__.py", "copies": "1", "size": "1208", "license": "mit", "hash": -53365790555330410, "line_mean": 37.9677419355, "line_max": 98, "alpha_frac": 0.7847682119, "autogenerated": false, "ratio": 3.38375350140056, "config_test": false, "has_no_keywords":...
""" scitran.data ============ The scitran data package provides two main interfaces, scitran.data.parse() for reading an input file, and scitran.data.write() for writing to an output file. Scitran data can read dicoms, and GE P-files. Support for additional data domains and files types is being actively developed. ...
{ "repo_name": "scitran/data", "path": "scitran/data/__init__.py", "copies": "2", "size": "1254", "license": "mit", "hash": 8752001405769975000, "line_mean": 37, "line_max": 106, "alpha_frac": 0.7727272727, "autogenerated": false, "ratio": 3.4640883977900554, "config_test": false, "has_no_keyw...
""" nimsdata.medimg.nimsgephysio ============================ Parse and identify GE MR Physio files. nimsdata.medimg.nimsbehavior will need to be paired with a writer that is capable of outputting to text or csv. Currently, there is no such writer. """ import bson import json import logging import tarfile from ....
{ "repo_name": "cni/nimsdata", "path": "medimg/nimsgephysio.py", "copies": "1", "size": "2980", "license": "mit", "hash": 5041054482586922000, "line_mean": 22.4645669291, "line_max": 124, "alpha_frac": 0.6046979866, "autogenerated": false, "ratio": 3.7865311308767473, "config_test": false, "ha...
""" scitran.data.medimg.gephysio ============================ Parse and identify GE MR Physio files. scitran.data.medimg.behavior will need to be paired with a writer that is capable of outputting to text or csv. Currently, there is no such writer. """ import json import logging import tarfile from .. import dat...
{ "repo_name": "Eric89GXL/data", "path": "scitran/data/medimg/gephysio.py", "copies": "1", "size": "3028", "license": "mit", "hash": -2106500723129867800, "line_mean": 22.65625, "line_max": 119, "alpha_frac": 0.6030383091, "autogenerated": false, "ratio": 3.882051282051282, "config_test": false,...
# pylint: skip-file import os import re import time import shutil import datetime from . import util from . import reaper from . import tempdir as tempfile import scitran.data.medimg.gephysio def reap(name, data_path, reap_path, reap_data, reap_name, log, log_info, tempdir): if not reap_data.psd_name or not r...
{ "repo_name": "scitran/reaper", "path": "reaper/gephysio.py", "copies": "1", "size": "2809", "license": "mit", "hash": -4654845614859657000, "line_mean": 42.890625, "line_max": 140, "alpha_frac": 0.6012815949, "autogenerated": false, "ratio": 3.1920454545454544, "config_test": false, "has_no_...
__author__ = 'Guo' from flask_sqlalchemy import SQLAlchemy from movieapp.extensions import bcrypt from movieapp.extensions import login_manager from flask_login import AnonymousUserMixin db_user = SQLAlchemy() class User(db_user.Model): id = db_user.Column(db_user.INTEGER(), primary_key=True) user_name = db_...
{ "repo_name": "Justlzp/project_team", "path": "webDemo/movieapp/models/models.py", "copies": "1", "size": "1287", "license": "mit", "hash": -741182441900718500, "line_mean": 23.3018867925, "line_max": 66, "alpha_frac": 0.6433566434, "autogenerated": false, "ratio": 3.7964601769911503, "config_t...
__author__ = 'Guo' from flask import (render_template, current_app, Blueprint, redirect, url_for, request, flash, jsonify, session) from movieapp.models.forms import...
{ "repo_name": "Justlzp/project_team", "path": "webDemo/movieapp/controllers/main.py", "copies": "1", "size": "2444", "license": "mit", "hash": 5468339251523201000, "line_mean": 25.2795698925, "line_max": 78, "alpha_frac": 0.5924713584, "autogenerated": false, "ratio": 3.76, "config_test": false...