text
stringlengths
0
1.05M
meta
dict
from ex.common import * from common import * import ex.pp.mr as mr class Reducer(mr.BaseReducer): '''convert a pickle file into a Matlab data file. the pickle should contain just one dict that is acceptable for scipy.io.savemat(). ''' def __init__(self, output_dest): mr.BaseReducer.__init...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ioo/mr_pickle2mat.py", "copies": "1", "size": "1077", "license": "apache-2.0", "hash": -7581590864730159000, "line_mean": 28.9166666667, "line_max": 73, "alpha_frac": 0.5896007428, "autogenerated": false, "ratio": 3.713793103448276, "config_test": fal...
from ex.common import * from common import * import pyfits as pf def HDU2Mats(hdu): '''process a single hdu. ''' result = {} # header header = {} header_comment = {} cl = hdu.header.ascardlist() for card in cl: header[card.key] = card.value header_comment[card.key] = c...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ioo/FITS.py", "copies": "1", "size": "1932", "license": "apache-2.0", "hash": -6918571935179626000, "line_mean": 23.7692307692, "line_max": 68, "alpha_frac": 0.5408902692, "autogenerated": false, "ratio": 3.577777777777778, "config_test": false, "ha...
from ex.common import * from common import * pickle_proto=2 type_dict={"list":1, "array":2} class VectorOutputStream: '''Output a sequence of vectors to a pickle file ''' def __init__(self, output_stream, name="", type="array"): '''Constructor. output_stream: the opened pickle fi...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ioo/VectorStream.py", "copies": "1", "size": "3703", "license": "apache-2.0", "hash": 4938750464746996000, "line_mean": 28.3888888889, "line_max": 96, "alpha_frac": 0.5506346206, "autogenerated": false, "ratio": 4.2368421052631575, "config_test": fals...
from ex.common import * from ex.io.common import * import ex.pp.mr as mr import ex.array as ea from ex.geo.kdtree import KDTree import sdss_info as sinfo import base class Mapper(mr.BaseMapper): '''prepare the data so they can used by the reducer for processing. this module usually takes in results from compa...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/uw_data/mr_prepare_data.py", "copies": "1", "size": "3755", "license": "apache-2.0", "hash": -6386484010091251000, "line_mean": 32.2300884956, "line_max": 78, "alpha_frac": 0.565379494, "autogenerated": false, "ratio": 3.4608294930875574, "config_te...
from ex.common import * from ex.ioo.common import * from ex.pp.common import * # NOTE: one copy of mapper/reducer will be held in each process, so # the data replication is lower than using multiprocessing.Pool. But # here the data within the mapper/reducer should be readonly. _mapper = None _reducer = None def _init...
{ "repo_name": "excelly/xpy-ml", "path": "ex/pp/mr.py", "copies": "1", "size": "7956", "license": "apache-2.0", "hash": -677553412137480200, "line_mean": 30.078125, "line_max": 97, "alpha_frac": 0.5977878331, "autogenerated": false, "ratio": 4.026315789473684, "config_test": false, "has_no_key...
from ex.common import * from ex.ioo import * import ex.geo.kdtree as kdtree import ex.ml.util as emu import ex.array as ea from ex.plott import * from random import random as rand import networkx as nx import sdss.detector as detector def GetClusters(nNodes, edges, size_thresh=3): '''get clusters based on the ne...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/demo_particle.py", "copies": "1", "size": "4803", "license": "apache-2.0", "hash": 2535437691596833000, "line_mean": 31.02, "line_max": 310, "alpha_frac": 0.5887986675, "autogenerated": false, "ratio": 3.3377345378735233, "config_test": false, "ha...
from ex.common import * import gzip import bz2 import glob import cPickle as pickle import struct import socket import sqlite3 as sql import scipy.io as sio pickle_proto=2 def ExpandWildcard(pattern): '''expand a file pattern ''' files=glob.glob(os.path.expanduser(pattern)); log.debug('{0} files expa...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ioo/common.py", "copies": "1", "size": "7588", "license": "apache-2.0", "hash": -8695480945793738000, "line_mean": 23.7973856209, "line_max": 102, "alpha_frac": 0.5929098577, "autogenerated": false, "ratio": 3.7434632461766157, "config_test": false, ...
from .execjs import execjs, has_mini_racer import os from distutils.dir_util import copy_tree class RJSException(Exception): pass def optimize(conf=None, working_directory=None, **kwargs): if conf is None: conf = kwargs if working_directory is None: working_directory = "." if 'dir' i...
{ "repo_name": "wq/python-requirejs", "path": "requirejs/__init__.py", "copies": "1", "size": "1524", "license": "mit", "hash": -353867283631397600, "line_mean": 27.7547169811, "line_max": 73, "alpha_frac": 0.5564304462, "autogenerated": false, "ratio": 3.762962962962963, "config_test": false, ...
from execnet.gateway_bootstrap import HostNotFound import sys try: bytes except NameError: bytes = str class SocketIO: def __init__(self, sock, execmodel): self.sock = sock self.execmodel = execmodel socket = execmodel.socket try: # IPTOS_LOWDELAY s...
{ "repo_name": "RonnyPfannschmidt/execnet-test", "path": "execnet/gateway_socket.py", "copies": "4", "size": "2575", "license": "mit", "hash": 1919735025819831800, "line_mean": 26.3936170213, "line_max": 67, "alpha_frac": 0.5976699029, "autogenerated": false, "ratio": 3.843283582089552, "config_...
from ...executables import Assembler from ...descriptors import Link from ..misc import AutoUpstreams, is_runnable ORDER = [] class AlwaysReady(Assembler): def run(self): self.results.done = True ORDER.append(self.__class__) class DependsOnAlwaysReady(AlwaysReady): alwaysready_done = Link('...
{ "repo_name": "tkf/compapp", "path": "src/compapp/plugins/tests/test_autoupstreams.py", "copies": "1", "size": "1038", "license": "bsd-2-clause", "hash": 1790562530704138500, "line_mean": 19.76, "line_max": 57, "alpha_frac": 0.6782273603, "autogenerated": false, "ratio": 3.4257425742574257, "co...
from execute.models import Modindex import urllib2 import re import time req_header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 'Accept':'text/html;q=0.9,*/*;q=0.8', 'Accept-Charset':'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'Connection':...
{ "repo_name": "yueyongyue/saltshaker", "path": "shaker/salt_module_crawler.py", "copies": "1", "size": "2022", "license": "apache-2.0", "hash": 371529857597329800, "line_mean": 35.1071428571, "line_max": 131, "alpha_frac": 0.5791295747, "autogenerated": false, "ratio": 3.4742268041237114, "conf...
from execute.models import Modindex import urllib import urllib2 import re import time req_header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 'Accept':'text/html;q=0.9,*/*;q=0.8', 'Accept-Charset':'ISO-8859-1,utf-8;q=0.7,*;q=0.3', ...
{ "repo_name": "yueyongyue/saltshaker", "path": "shaker/tests.py", "copies": "1", "size": "2345", "license": "apache-2.0", "hash": 8260262316644638000, "line_mean": 33, "line_max": 131, "alpha_frac": 0.5918976546, "autogenerated": false, "ratio": 3.3452211126961484, "config_test": false, "has_...
from execution_trace.record import record @record(10) # 1 def f(): # 2 """Fn with a for.""" # 3 x = 3 # 4 s = 0 # 5 for i in range(x): # 6 s = s + i # 7 args = () expected_trace = [{u'data': [{u'lineno': 3, u'state': {}}, {u'lineno': 4, u'state': {u'x': u'...
{ "repo_name": "mihneadb/python-execution-trace", "path": "execution_trace/tests/functions/f_for.py", "copies": "1", "size": "1060", "license": "mit", "hash": 213800648199805300, "line_mean": 45.0869565217, "line_max": 94, "alpha_frac": 0.3226415094, "autogenerated": false, "ratio": 2.585365853658...
from execution_trace.record import record @record(10) # 1 def f(): # 2 """Fn with a for containing an if.""" # 3 x = 3 # 4 s = 0 # 5 for i in range(x): # 6 if s > -1: # 7 s += i # 8 args = () expected_trace = [{u'data': [{u'lineno': 3, u'state': {}}, ...
{ "repo_name": "mihneadb/python-execution-trace", "path": "execution_trace/tests/functions/f_nested_if_in_for.py", "copies": "1", "size": "1381", "license": "mit", "hash": -8915341553780169000, "line_mean": 50.1481481481, "line_max": 94, "alpha_frac": 0.3171614772, "autogenerated": false, "ratio":...
from execution_trace.record import record @record(10) # 1 def f(): # 2 """Fn with a for+else.""" # 3 x = 3 # 4 s = 0 # 5 for i in range(x): # 6 s = s + i # 7 else: # 8 ok = 1 # 9 args = () expected_trace = [{u'data': [{u'lineno': 3, u'state': {}}, ...
{ "repo_name": "mihneadb/python-execution-trace", "path": "execution_trace/tests/functions/f_for_else.py", "copies": "1", "size": "1237", "license": "mit", "hash": 5990199064281069000, "line_mean": 43.1785714286, "line_max": 93, "alpha_frac": 0.3120452708, "autogenerated": false, "ratio": 2.626326...
from execution_trace.record import record @record(10) # 1 def f(x): # 2 """Simple recursive function.""" # 3 if x == 0: # 4 return 1 # 5 return 1 + f(x - 1) # 7 args = (2,) # First is the innermost call (base case), and so on. # x = 0, x = 1, x= 2. expected_trace = [{u'data': [{u'lineno':...
{ "repo_name": "mihneadb/python-execution-trace", "path": "execution_trace/tests/functions/f_recursive.py", "copies": "1", "size": "1085", "license": "mit", "hash": -5143186678392441000, "line_mean": 37.75, "line_max": 85, "alpha_frac": 0.3612903226, "autogenerated": false, "ratio": 2.980769230769...
from executor.Executor import TBTAFExecutor from common.suite import TBTestSuite from common.sample_test import TBTAFSampleTest from common.enums.execution_status_type import TBTAFExecutionStatusType import time import sys total = 0 passed = 0 def testInvalid(method): global total global passed total = to...
{ "repo_name": "S41nz/TBTAF", "path": "tbtaf/test/executor/utest_executor.py", "copies": "1", "size": "3782", "license": "apache-2.0", "hash": -5247136723665769000, "line_mean": 28.5546875, "line_max": 95, "alpha_frac": 0.6829719725, "autogenerated": false, "ratio": 3.686159844054581, "config_te...
from executor.Executor import TBTAFExecutor from executor.ExecutionTBTestSuite import ExecutionTBTestSuite from common.suite import TBTestSuite from common.sample_test import TBTAFSampleTest from common.enums.execution_status_type import TBTAFExecutionStatusType import time import sys total = 0 passed = 0 def testInv...
{ "repo_name": "S41nz/TBTAF", "path": "tbtaf/test/executor/utest_executionTBTestSuite.py", "copies": "1", "size": "5682", "license": "apache-2.0", "hash": -8913639571777439000, "line_mean": 29.0687830688, "line_max": 71, "alpha_frac": 0.7038014784, "autogenerated": false, "ratio": 4.11143270622286...
from executor import Executor class GameBatchData: def __init__(self, timestamp): self.execution_timestamp = timestamp self.data = [] self.game_timestamps = [] self.current_game_index = None self.steps = 0 self.game_data_headers = [ 'index', 'timestamp',...
{ "repo_name": "escoboard/dqn", "path": "src/game_data.py", "copies": "1", "size": "2235", "license": "mit", "hash": -7808374241972180000, "line_mean": 34.4761904762, "line_max": 103, "alpha_frac": 0.5856823266, "autogenerated": false, "ratio": 4.382352941176471, "config_test": false, "has_no_...
from .executor import Executor import logging import sys from .daemonize import daemonize import signal import os from .config import AgentConfig from optparse import OptionParser import subprocess import tornado import scrapydd from six.moves import input from six.moves.urllib.parse import urlparse, urljoi...
{ "repo_name": "kevenli/scrapydd", "path": "scrapydd/agent.py", "copies": "1", "size": "4765", "license": "apache-2.0", "hash": 155077046800852000, "line_mean": 30.6506849315, "line_max": 107, "alpha_frac": 0.6100734523, "autogenerated": false, "ratio": 4.000839630562552, "config_test": true, ...
from .executors import ProjectImportExecutor from .log import event_logger from .models import Issue def import_project_issues(sender, instance, **kwargs): ProjectImportExecutor.execute(instance, updated_fields=None) def log_issue_save(sender, instance, created=False, **kwargs): if created or instance.state...
{ "repo_name": "opennode/nodeconductor-assembly-waldur", "path": "src/waldur_jira/handlers.py", "copies": "2", "size": "2054", "license": "mit", "hash": 1616194759800083000, "line_mean": 33.2333333333, "line_max": 86, "alpha_frac": 0.6066212269, "autogenerated": false, "ratio": 4.191836734693878, ...
from exercices.solutions.framework.core.base import BasePage from exercices.solutions.framework.pages.newUserPage import newUserPage class homePage(BasePage): url = 'https://forum-testing.herokuapp.com/v1.0/' _newUserLink = None _listUserLink = None _newForumMessageLink = None _listForumLink = Non...
{ "repo_name": "twiindan/selenium_lessons", "path": "04_Selenium/exercices/solutions/framework/pages/homePage.py", "copies": "1", "size": "1280", "license": "apache-2.0", "hash": -53186847410176040, "line_mean": 35.5714285714, "line_max": 101, "alpha_frac": 0.703125, "autogenerated": false, "ratio...
from exercices.solutions.framework.core.base import BasePage from exercices.solutions.framework.pages.userListPage import userListPage from selenium.webdriver.support.ui import Select class newUserPage(BasePage): url = "https://forum-testing.herokuapp.com/v1.0/users/new" _usernameTextBox = None _passwor...
{ "repo_name": "twiindan/selenium_lessons", "path": "04_Selenium/exercices/framework/pages/newUserPage.py", "copies": "1", "size": "1213", "license": "apache-2.0", "hash": 7070893827809741000, "line_mean": 24.2916666667, "line_max": 112, "alpha_frac": 0.6760098928, "autogenerated": false, "ratio":...
from ..exercise_converter.helper.ChangeMultiChoiceMarkup import * from ..exercise_converter.helper.WidgetRenderer import * from nose.tools import assert_equal def test_render_sorting_widget_1(): input_values = [MultiChoice(nr=1, items=[MultiChoiceItem(text='ja', is_correct_answer='...
{ "repo_name": "henrikmidtiby/math-exercises", "path": "src/test/test_multichoice_widgets.py", "copies": "1", "size": "1108", "license": "mit", "hash": -9091125835240402000, "line_mean": 31.5882352941, "line_max": 95, "alpha_frac": 0.5379061372, "autogenerated": false, "ratio": 4.2615384615384615,...
from ..exercise_converter.helper.ChangeSorterMarkup import * from ..exercise_converter.helper.WidgetRenderer import * from nose.tools import assert_equal def test_render_sorting_widget_1(): input_values = SorterWidget(nr=1, columna='ColA', columnb='C...
{ "repo_name": "henrikmidtiby/math-exercises", "path": "src/test/test_ChangeSorterMarkup.py", "copies": "1", "size": "3846", "license": "mit", "hash": -3272320839743883300, "line_mean": 21.8928571429, "line_max": 89, "alpha_frac": 0.4292771711, "autogenerated": false, "ratio": 3.920489296636086, ...
from exercise import Exercise, FunctionExercise, ThoughtExperiment, colorify class q1(Exercise): _hint = "Try using a third variable." _solution = """Use a third variable to temporarily store one of the old values. e.g.: tmp = a a = b b = tmp If you've read lots of Python code, you might have se...
{ "repo_name": "bgroveben/python3_machine_learning_projects", "path": "learn_kaggle/deep_learning/packages/learntools/python/ex2_objects.py", "copies": "1", "size": "4132", "license": "mit", "hash": -2889568124521588700, "line_mean": 48.1904761905, "line_max": 573, "alpha_frac": 0.6052758955, "autog...
from exercise import Exercise, FunctionExercise, ThoughtExperiment class q1(FunctionExercise): # Maybe should give a special message if they've modified the function body # but they don't have a return statement? _test_cases = [ (1.000001, 1.00), (1.23456, 1.23), ] _hint =...
{ "repo_name": "bgroveben/python3_machine_learning_projects", "path": "learn_kaggle/deep_learning/packages/learntools/python/ex1_functions.py", "copies": "1", "size": "1786", "license": "mit", "hash": -9124444738765497000, "line_mean": 42.4634146341, "line_max": 282, "alpha_frac": 0.702020202, "auto...
from Exercise import * from Metric import * from exercises_and_metrics_types import * class Training( object ): """Single training consists of a number of exercises and some arbitrary data, such as duration, start time, end time, comments etc.""" def __init__( self, exercises_list, training_desc...
{ "repo_name": "noooway/exj", "path": "Training.py", "copies": "1", "size": "1718", "license": "mit", "hash": -6119418687568899000, "line_mean": 34.7916666667, "line_max": 84, "alpha_frac": 0.5814901048, "autogenerated": false, "ratio": 3.5791666666666666, "config_test": false, "has_no_keyword...
from Exercise import * class ExerciseRunning( Exercise ): def __init__( self, name, intervals, distances, times, description_dict ): super( ExerciseRunning, self ).__init__( description_dict ) self.update( { 'type': type(self).__name__, # type: str 'name': name, # type: str ...
{ "repo_name": "noooway/exj", "path": "exercises_and_metrics_types/ExerciseRunning.py", "copies": "1", "size": "1490", "license": "mit", "hash": 2982535570045396500, "line_mean": 37.2051282051, "line_max": 78, "alpha_frac": 0.5516778523, "autogenerated": false, "ratio": 4.293948126801153, "confi...
from Exercise import * class ExerciseSetsRepsWeights( Exercise ): def __init__( self, name, sets, reps, weights, description_dict ): super( ExerciseSetsRepsWeights, self ).__init__( description_dict ) self.update( { 'type': type(self).__name__, # type: str 'name': name, # ty...
{ "repo_name": "noooway/exj", "path": "exercises_and_metrics_types/ExerciseSetsRepsWeights.py", "copies": "1", "size": "1375", "license": "mit", "hash": 438059630635303000, "line_mean": 37.1944444444, "line_max": 75, "alpha_frac": 0.5309090909, "autogenerated": false, "ratio": 3.647214854111406, ...
from exercise import * class q1a(ThoughtExperiment): _hint = ('Following its default "BEDMAS"-like rules for order of operations,' ' Python will first divide 3 by 2, then subtract the result from 5.' ' You need to add parentheses to force it to perform the subtraction first.') _solutio...
{ "repo_name": "bgroveben/python3_machine_learning_projects", "path": "learn_kaggle/deep_learning/packages/learntools/python/ex3_numbers.py", "copies": "1", "size": "1871", "license": "mit", "hash": -335091123983751360, "line_mean": 46.9743589744, "line_max": 534, "alpha_frac": 0.6477819348, "autoge...
from exercise import * class q1(Exercise): _hint = ("Take a look at how we fixed our original expression in the main" " lesson. We added parentheses around certain subexpressions. " "The bug in this code is caused by Python evaluating certain operations " "in the \"wrong\" orde...
{ "repo_name": "bgroveben/python3_machine_learning_projects", "path": "learn_kaggle/deep_learning/packages/learntools/python/ex4_booleans.py", "copies": "1", "size": "4902", "license": "mit", "hash": 2165919197426848300, "line_mean": 34.0142857143, "line_max": 199, "alpha_frac": 0.5869033048, "autog...
from Exercise.models import * from django.http import HttpResponse import simplejson from datetime import datetime from django.shortcuts import render_to_response from django.template import RequestContext def timesince(dt, default="just now"): """ Returns string representing "time since" e.g. 3 days ago, ...
{ "repo_name": "pocon/SUOnet", "path": "Exercise/views.py", "copies": "1", "size": "4201", "license": "mit", "hash": -4723196496429673000, "line_mean": 36.8468468468, "line_max": 142, "alpha_frac": 0.6491311592, "autogenerated": false, "ratio": 3.7710951526032317, "config_test": false, "has_no...
from exercises import warmUpExercise from exercises.plotData import plot from exercises.cost import computeCost from exercises.gradientDescent import doGD import pandas as pd import numpy as np import matplotlib.pyplot as plt print('Printing the Identitiy Matrix') identitiy_matx = warmUpExercise.get5by5IdentityMatri...
{ "repo_name": "pk-ai/training", "path": "machine-learning/coursera_exercises/ex1/in_python/ex1.py", "copies": "1", "size": "1968", "license": "mit", "hash": 6662530321807477000, "line_mean": 27.9558823529, "line_max": 87, "alpha_frac": 0.7332317073, "autogenerated": false, "ratio": 3.079812206572...
from exercises.plotData import plot from exercises.costFunction import getCost from exercises.advOptimize import optimize from exercises.plotDecisionBoundary import plotDB import pandas as pd import numpy as np inp = pd.read_csv('../ex2data1.txt', header=None) X_org = inp[inp.columns[0:2]].values # Giving directly th...
{ "repo_name": "pk-ai/training", "path": "machine-learning/coursera_exercises/ex2/in_python/ex2.py", "copies": "1", "size": "1613", "license": "mit", "hash": 267524879845616420, "line_mean": 26.3559322034, "line_max": 71, "alpha_frac": 0.714817111, "autogenerated": false, "ratio": 2.91155234657039...
from ex.exception import NotUnderstoodException from ex.exception import ConnectionLostException from pydub import AudioSegment import tempfile import requests import json import os class Google: """ Use the Google Speech-to-Text service to translate voice input into text so that it can be parsed by the program....
{ "repo_name": "anmolks/Jarvis", "path": "src/google_stt.py", "copies": "1", "size": "1430", "license": "mit", "hash": 352951801235348350, "line_mean": 26.5, "line_max": 71, "alpha_frac": 0.7230769231, "autogenerated": false, "ratio": 3.163716814159292, "config_test": false, "has_no_keywords":...
# from exhibitionist.toolbox import http_handler,JSONRequestHandler,Template import os import codecs import threading from exhibitionist.toolbox import * from tornado.template import Template context = None # lose the warnings @http_handler(r'/numpy/{{objid}}/(?P<animal>cat|dog)') class KittenGram(JSONRequestHandle...
{ "repo_name": "kentfrazier/Exhibitionist", "path": "Examples/kittengram/handlers.py", "copies": "1", "size": "1293", "license": "bsd-3-clause", "hash": 1325203141856405200, "line_mean": 39.40625, "line_max": 80, "alpha_frac": 0.5730858469, "autogenerated": false, "ratio": 3.8482142857142856, "c...
from ex import * from common import * class NBayes: '''naive bayes classifier ''' def __init__(self): self.n, self.dim, self.options, self.pC, self.meanFC, self.stdFC = [None]*6 def Train(self, X, y, options = None): self.options = options prior = GetOptions( self....
{ "repo_name": "excelly/xpy-ml", "path": "ex/ml/nbayes.py", "copies": "1", "size": "4772", "license": "apache-2.0", "hash": 8200940628954307000, "line_mean": 27.0705882353, "line_max": 89, "alpha_frac": 0.5067057837, "autogenerated": false, "ratio": 3.250681198910082, "config_test": false, "ha...
from ex import * from datetime import datetime from scipy.signal import cspline1d, cspline1d_eval from scipy.special import hyp2f1 #hypergeometric function 2F1 O_M = 0.27 # omega matter O_L = 0.73 # omega lambda O_K = 1.0 - O_M - O_L # omega curvature H_0 = 71.0 # Hubble constant (km/...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/utils.py", "copies": "1", "size": "7756", "license": "apache-2.0", "hash": 6396531796389920000, "line_mean": 30.024, "line_max": 158, "alpha_frac": 0.559566787, "autogenerated": false, "ratio": 2.698677800974252, "config_test": false, "has_no_keyw...
from ex import * from ex.alg.common import svdex import rpca #@profile def DRMF(X, K, e = 0.05, options = None): '''[ L, S ] = DRMF(M, K, e, options) direct robust matrix factorization M: input matrix K: max rank e: percentage of outliers L: Low rank result S: sparse outliers ''' i...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ml/drmf.py", "copies": "1", "size": "1988", "license": "apache-2.0", "hash": 2912320521109990000, "line_mean": 22.9518072289, "line_max": 90, "alpha_frac": 0.4974849095, "autogenerated": false, "ratio": 2.5784695201037615, "config_test": false, "has...
from ex import * from ex.alg.common import svdex def RPCA(D, lam = None, tol = 1e-7, maxIter = 500): '''Yi Ma's robust pca return (L, SingularValues(L)) ''' m, n = D.shape maxmn, minmn = (max(m, n), min(m, n)) lam = float(lam) if lam is not None else 1.0 log.info('RPCA for %dx%d matri...
{ "repo_name": "excelly/xpy-ml", "path": "ex/ml/rpca.py", "copies": "1", "size": "2134", "license": "apache-2.0", "hash": -7102599699000093000, "line_mean": 24.7108433735, "line_max": 65, "alpha_frac": 0.4765698219, "autogenerated": false, "ratio": 2.5017584994138335, "config_test": false, "ha...
from ex import * from ex.ioo import * from ex.pp import * import pyfits as pf from scipy.signal import cspline1d, cspline1d_eval import gc, pdb def usage(): print ''' fetch_make_fits.py working_dir stamp [nproc](1) [run](v_5_6_0) ''' sys.exit(0) #resample spectra at single wavelength spectrum defined above d...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/fetch_make_fits.py", "copies": "1", "size": "9454", "license": "apache-2.0", "hash": -8160130351993580000, "line_mean": 37.587755102, "line_max": 148, "alpha_frac": 0.6008038925, "autogenerated": false, "ratio": 2.8596491228070176, "config_test"...
from ex import * from ex.ioo import * import sdss.utils as utils def usage(): print ''' fetch_download.py working_dir [stamp](current time) [run](v_5_6_0) ''' sys.exit(0) def main(working_dir, run, stamp): data_dir = '%s/data' % working_dir cwd = os.getcwd() os.chdir(data_dir) log.info('''SD...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/fetch_download.py", "copies": "1", "size": "1450", "license": "apache-2.0", "hash": -454067271365678340, "line_mean": 31.2222222222, "line_max": 283, "alpha_frac": 0.6234482759, "autogenerated": false, "ratio": 2.821011673151751, "config_test": ...
from ex import * from ex.ml import * import ex.nnsearch as nn import ex.annsearch as ann def PCAScore_Model(X, pca, method = 'accum_err'): '''get the anomaly scores using global pca method ''' method = method.lower() check(method in ['rec_err', 'accum_err', 'dist', 'dist_out', 'accum_dist_out'], 'unkn...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/detection/detector.py", "copies": "1", "size": "2777", "license": "apache-2.0", "hash": -2090577614890947600, "line_mean": 31.6705882353, "line_max": 112, "alpha_frac": 0.5631976954, "autogenerated": false, "ratio": 2.877720207253886, "config_test":...
from ex import * from ex.ml.logistic import MultiLogistic from simbad import * from classification import * import sdss_info as sinfo def usage(): print(''' classify the objects using multinomial logistic regression python [--feature=SpectrumS1-Color] [--weighted=1] [--poolsize={number of parallel processes}] ''...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/classification/classification_multilogistic.py", "copies": "1", "size": "2728", "license": "apache-2.0", "hash": -2372719773489904600, "line_mean": 35.8648648649, "line_max": 101, "alpha_frac": 0.633431085, "autogenerated": false, "ratio": 3.186915887...
from ex import * from ex.ml.svmutil import * import sdss_info as sinfo def usage(): print(''' classify the objects using svm python [--feature=SpectrumS1-Color] [--weighted=1] [--svm_options='-t 0 -c 100 -m 1000'] [--poolsize={number of parallel processes}] ''') sys.exit(1) if __name__ == '__main__': In...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/classification/classification_svm.py", "copies": "1", "size": "2685", "license": "apache-2.0", "hash": 9034571406917744000, "line_mean": 37.3571428571, "line_max": 132, "alpha_frac": 0.6275605214, "autogenerated": false, "ratio": 3.075601374570447, ...
from ex import * from ex.pp import * from ex.ml import * import ex.nnsearch as nn import ex.annsearch as ann import sdss_iii.settings as settings from sdss_iii.feature import GetRepairedFeatures import sdss_iii.web_report.report as report import sdss.detection.detector as detector output_dir = './detection_results'...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/detect.py", "copies": "1", "size": "4932", "license": "apache-2.0", "hash": -3528126235332276000, "line_mean": 31.4473684211, "line_max": 76, "alpha_frac": 0.5762368208, "autogenerated": false, "ratio": 3.0406905055487052, "config_test": false, ...
from ex import * from ex.pp import * from ex.ml import * import sdss_iii.settings as settings ############################# features def Spectrum(data): f = data['VF']['spectrum'] return float64(f) def SpectrumS1(data): f = float64(Spectrum(data)) return Normalize(f, 's1', 'row')[0]*f.shape[1] clas...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/feature.py", "copies": "1", "size": "6669", "license": "apache-2.0", "hash": -8743349123338680000, "line_mean": 29.1764705882, "line_max": 116, "alpha_frac": 0.5578047683, "autogenerated": false, "ratio": 3.51, "config_test": false, "has_no_ke...
from ex import * from ex.pp import * from ex.nnsearch import KDTNNSearch as NNSearch from ex.graph import * import utils from feature import GetFeatures def usage(): print(''' generate the spatial edges and clusters for dr7 data python --coord={rdz, xyz} [--edge_thresh=10] [--cluster_thresh=1;3;5] [--nproc={numb...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/dr7_spatial.py", "copies": "1", "size": "3776", "license": "apache-2.0", "hash": 6062794489156861000, "line_mean": 34.2897196262, "line_max": 116, "alpha_frac": 0.6006355932, "autogenerated": false, "ratio": 3.283478260869565, "config_test": false, ...
from ex import * from ex.pp import * from ex.ml.logistic import MultiLogistic from ex.ml.nbayes import NBayes from ex.ml.active import * from ex.ml.pca import PCA from simbad import * import sdss_info as sinfo def usage(): print(''' test actively learning on sdss python [--feature=SpectrumS1-Color] [--poolsize=...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/classification/classification_active.py", "copies": "1", "size": "10326", "license": "apache-2.0", "hash": -2273778276624962800, "line_mean": 38.1136363636, "line_max": 222, "alpha_frac": 0.5991671509, "autogenerated": false, "ratio": 3.19196290571870...
from ex import * from ex.pp import * from ex.ml.logistic import MultiLogistic from ex.ml.nbayes import NBayes from ex.ml.active import * from ex.ml.pca import PCA import sdss_info as sinfo from classification_active import algs, alg_names, TruncateClass, Margin def usage(): print(''' test actively learning on to...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/classification/classification_active_sim.py", "copies": "1", "size": "5473", "license": "apache-2.0", "hash": -6718379236608238000, "line_mean": 35.2450331126, "line_max": 190, "alpha_frac": 0.5448565686, "autogenerated": false, "ratio": 3.21185446009...
from ex import * from ex.pp import * import pdb import pyfits as pf import matplotlib.pyplot as plt print 'Pyplot backend:', plt.get_backend() from matplotlib.font_manager import fontManager, FontProperties import sdss.utils as utils from sdss.settings import emission_lines def usage(): print ''' fetch_make_figu...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/fetch_make_figures.py", "copies": "1", "size": "5169", "license": "apache-2.0", "hash": -8537863682327828000, "line_mean": 33.2317880795, "line_max": 111, "alpha_frac": 0.5798026698, "autogenerated": false, "ratio": 2.912112676056338, "config_te...
from ex import * from feature import GetFeatures import settings class SIMBAD: '''handling all simbad related work ''' def __init__(self, db_file = None): if db_file is None: db_file = settings.sdss_dir + '/sdss.db3' self.db_file = db_file def GetSIMBADLabels(self, class...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/simbad.py", "copies": "1", "size": "3633", "license": "apache-2.0", "hash": -5426334847287566000, "line_mean": 38.064516129, "line_max": 144, "alpha_frac": 0.6102394715, "autogenerated": false, "ratio": 3.37639405204461, "config_test": false, "has...
from ex import * from scipy.sparse.linalg import svds from munkres import GetMunkresIndeces try: from propack import dlansvd, slansvd propack = True except ImportError: log.warn('PROPACK cannot be imported') propack = False def ChooseSVD(n, k): k = float(k) if n <= 100: return k / n <= 0.02...
{ "repo_name": "excelly/xpy-ml", "path": "ex/alg/common.py", "copies": "1", "size": "2019", "license": "apache-2.0", "hash": -252602320114499840, "line_mean": 27.0416666667, "line_max": 65, "alpha_frac": 0.4814264487, "autogenerated": false, "ratio": 3.0224550898203595, "config_test": false, "...
from ex import * from spatial import * class LeafNode: def __init__(self, idx, data, parent): self.idx=idx self.data=data self.parent=parent def __str__(self): return "(Leaf, Points={0}, Parent={1})".format(self.idx,self.parent) class InnerNode: def __init__(self, splitter...
{ "repo_name": "excelly/xpy-ml", "path": "practice/kdtree.py", "copies": "1", "size": "8940", "license": "apache-2.0", "hash": -7990711286974598000, "line_mean": 30.5901060071, "line_max": 119, "alpha_frac": 0.5288590604, "autogenerated": false, "ratio": 3.7033968516984257, "config_test": true, ...
from ex import * import ex.pp.mr as mr from ex.ml import * from ex.plott import * import settings import utils import feature class Reducer(mr.BaseReducer): '''get the pca model for compact dr7 data set ''' def __init__(self, mask_bad, feature_name): mr.BaseReducer.__init__(self, 'DR7 PCA', True)...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/dr7_pca.py", "copies": "1", "size": "3516", "license": "apache-2.0", "hash": 6077479740705204000, "line_mean": 29.0512820513, "line_max": 144, "alpha_frac": 0.5634243458, "autogenerated": false, "ratio": 3.37104506232023, "config_test": false, "ha...
from ex import * import ex.pp.mr as mr from ex.plott import * from ex.ioo.FITS import FITS import sdss.Spec as Spec import sdss.settings as settings class PlateReducer(mr.BaseReducer): '''assemble data of a palte ''' def __init__(self, fields, rebin_c0, rebin_c1, rebin_nbin, zmin, zmax, remove_sky_absorp...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/dr7_assemble_data.py", "copies": "1", "size": "6197", "license": "apache-2.0", "hash": -8557668882048910000, "line_mean": 32.4972972973, "line_max": 152, "alpha_frac": 0.5588187833, "autogenerated": false, "ratio": 3.1746926229508197, "config_test":...
from ex import * import ex.pp.mr as mr import settings class Reducer(mr.BaseReducer): '''filter the data and pack them into bigger chunks ''' def __init__(self, snr_thresh, badpixel_thresh, mag_thresh): mr.BaseReducer.__init__(self, 'DR7 Compact', True) self.output_dir = './compact/' ...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/dr7_compact.py", "copies": "1", "size": "5740", "license": "apache-2.0", "hash": 930714545122420700, "line_mean": 33.1666666667, "line_max": 130, "alpha_frac": 0.5463414634, "autogenerated": false, "ratio": 3.390431187241583, "config_test": false, ...
from ex import * import ex.pp.mr as mr def usage(): print(''' map files using specified handler python reduce_files.py --module={module path string} --input=input_files(wildcard) [--output={output directory}] [--poolsize={number of parallel processes}] --module: the processing module. this module should contain ...
{ "repo_name": "excelly/xpy-ml", "path": "cmd/reduce_files.py", "copies": "1", "size": "1355", "license": "apache-2.0", "hash": -2802078233513508000, "line_mean": 35.6216216216, "line_max": 156, "alpha_frac": 0.6833948339, "autogenerated": false, "ratio": 3.4743589743589745, "config_test": false...
from ex import * import ex.pp.mr as mr ############################# features def Color(data): f = AssembleMatrix((data['SF']['fiberMag_u'], data['SF']['fiberMag_g'], data['SF']['fiberMag_r'], data['SF']['fiberMag_i'], data...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/feature.py", "copies": "1", "size": "5640", "license": "apache-2.0", "hash": -6935398270395289000, "line_mean": 29.3225806452, "line_max": 103, "alpha_frac": 0.5409574468, "autogenerated": false, "ratio": 3.5074626865671643, "config_test": false, ...
from ex import * import utils InitLog() db = GetDB('/auton/home/lxiong/data/sdss/dr7/sdss.db3') qso = [] total = 0 with xFile('qso.lst') as i: for line in i: sp = line.split(' ') sp = [s for s in sp if len(s) > 0] plate, mjd, fiber, name, z1 = sp[:5] sid, ra, dec, z2 = utils.Looku...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/dla/dla_proc_list.py", "copies": "1", "size": "1521", "license": "apache-2.0", "hash": 1901124320462306300, "line_mean": 30.0408163265, "line_max": 82, "alpha_frac": 0.5075608153, "autogenerated": false, "ratio": 2.421974522292994, "config_test": fa...
from ex import * def GetDetailPage(spec_id): # return "http://sdss.lib.uchicago.edu/dr7/en/tools/explore/obj.asp?sid={0}".format(spec_id) return "http://cas.sdss.org/astro/en/tools/explore/obj.asp?sid={0}".format(spec_id) def GetSpectrumImage(spec_id): # return "http://sdss.lib.uchicago.edu/dr7/en/get/specB...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/web_report/report.py", "copies": "1", "size": "4715", "license": "apache-2.0", "hash": 8083558380877082000, "line_mean": 32.9208633094, "line_max": 171, "alpha_frac": 0.5978791092, "autogenerated": false, "ratio": 2.905113986444855, "config_test": f...
from ex import * import multiprocessing as mp def NumCPU(): return mp.cpu_count def SeedRand(extra = 0): run_id = int(os.getpid() + time.time() + extra) random.seed(run_id) def ProcJobs(func, jobs, nproc, global_init = None, global_data = None, chunk_size = None): '''process jobs in parallel '''...
{ "repo_name": "excelly/xpy-ml", "path": "ex/pp/common.py", "copies": "1", "size": "1127", "license": "apache-2.0", "hash": 7163094784611595000, "line_mean": 22.9787234043, "line_max": 91, "alpha_frac": 0.5669920142, "autogenerated": false, "ratio": 3.4359756097560976, "config_test": false, "h...
from ex import * import report def usage(): print(''' Generate report given the matlab data file. This program only work for SDSS DR7 data. For GAD results, the data file should contain the following variables: group_member_ids: a cell array. each cell for one cluster, containing member spec_ids. scores: the sco...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/web_report/report_gen_sdss.py", "copies": "1", "size": "2496", "license": "apache-2.0", "hash": 3764223515166636500, "line_mean": 32.28, "line_max": 88, "alpha_frac": 0.6209935897, "autogenerated": false, "ratio": 3.372972972972973, "config_test": f...
from ex import * import report def usage(): print(''' Generate report given the matlab data file. This program only work for the BOSS data. For PAD results, the data file should contain the following variables: mpf: an matrix of objects' (mjd,plate,fiber). one row per object. scores: the scores for each object. ...
{ "repo_name": "excelly/xpy-ml", "path": "sdss/web_report/report_gen_boss.py", "copies": "1", "size": "2579", "license": "apache-2.0", "hash": -3928522518238747600, "line_mean": 33.3866666667, "line_max": 109, "alpha_frac": 0.5781310585, "autogenerated": false, "ratio": 3.059311981020166, "confi...
from ex import * import sdss_iii.settings as settings import sdss.utils as utils def GetSpectrumImage(pmf): p, m, f = pmf return 'http://www.autonlab.org/sdss/iii/spec_img/{0}/figure-{1}.png'.format(p, utils.PMF_DashForm(p, m, f)) def GenObjFigure(pmf, rd, img_height = 230): p,m,f = utils.PMF_N2S(pmf...
{ "repo_name": "excelly/xpy-ml", "path": "sdss_iii/web_report/report.py", "copies": "1", "size": "1904", "license": "apache-2.0", "hash": -3985114583367571500, "line_mean": 22.2195121951, "line_max": 112, "alpha_frac": 0.5535714286, "autogenerated": false, "ratio": 2.485639686684073, "config_tes...
from exoatlas import * def test_reflection(telescope_name='JWST', wavelength=1*u.micron): with mock.patch('builtins.input', return_value=""): t = TransitingExoplanets() w = 1*u.micron fi, ax = plt.subplots(1, 2, figsize=(8, 4)) for i, per_transit in enumerate([True, False]): BubblePane...
{ "repo_name": "zkbt/exopop", "path": "exoatlas/tests/test_snr.py", "copies": "1", "size": "2313", "license": "mit", "hash": 1196795349808753200, "line_mean": 43.4807692308, "line_max": 118, "alpha_frac": 0.616515348, "autogenerated": false, "ratio": 3.2394957983193278, "config_test": false, "...
from exoduscli import cli NOTIFICATION_INFO = 'info' NOTIFICATION_WARNING = 'warning' NOTIFICATION_ERROR = 'error' class ListItem(object): def __init__(self, label='', label2='', iconImage='', thumbnailImage='', path=''): self.props = {} self.cm_items = [] self.label = label self._...
{ "repo_name": "cthlo/exoduscli", "path": "exoduscli/fakexbmc/xbmcgui.py", "copies": "1", "size": "2185", "license": "mit", "hash": -5196688152856105000, "line_mean": 23.5505617978, "line_max": 92, "alpha_frac": 0.5853546911, "autogenerated": false, "ratio": 3.7033898305084745, "config_test": fa...
from EXOSIMS.Observatory.ObservatoryL2Halo import ObservatoryL2Halo from EXOSIMS.Prototypes.TargetList import TargetList import numpy as np import astropy.units as u from scipy.integrate import solve_bvp import astropy.constants as const import hashlib import scipy.optimize as optimize import scipy.interpolate ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/Observatory/SotoStarshade.py", "copies": "1", "size": "21532", "license": "bsd-3-clause", "hash": -6181821689213629000, "line_mean": 39.4076923077, "line_max": 114, "alpha_frac": 0.5313951328, "autogenerated": false, "ratio": 3.8245115452930727...
from EXOSIMS.Observatory.SotoStarshade_ContThrust import SotoStarshade_ContThrust from EXOSIMS.Prototypes.TargetList import TargetList import numpy as np import sys import ipyparallel as ipp class SotoStarshade_parallel(SotoStarshade_ContThrust): """ StarShade Observatory class This class is implemented at L...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/Observatory/SotoStarshade_parallel.py", "copies": "1", "size": "4246", "license": "bsd-3-clause", "hash": -1939987186975683600, "line_mean": 42.3265306122, "line_max": 153, "alpha_frac": 0.5602920396, "autogenerated": false, "ratio": 3.54720133...
from EXOSIMS.Observatory.SotoStarshade import SotoStarshade import numpy as np import astropy.units as u from scipy.integrate import solve_ivp import astropy.constants as const import hashlib import scipy.optimize as optimize from scipy.optimize import basinhopping import scipy.interpolate as interp import scipy.integr...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/Observatory/SotoStarshade_SKi.py", "copies": "1", "size": "77012", "license": "bsd-3-clause", "hash": 5312747784819359000, "line_mean": 44.3812610489, "line_max": 171, "alpha_frac": 0.5491351997, "autogenerated": false, "ratio": 3.8071979434447...
from EXOSIMS.Observatory.SotoStarshade_SKi import SotoStarshade_SKi import numpy as np import astropy.units as u from scipy.integrate import solve_ivp import astropy.constants as const import hashlib import scipy.optimize as optimize from scipy.optimize import basinhopping import scipy.interpolate as interp import scip...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/Observatory/SotoStarshade_ContThrust.py", "copies": "1", "size": "67022", "license": "bsd-3-clause", "hash": -6192012337227700000, "line_mean": 38.0343622598, "line_max": 124, "alpha_frac": 0.5094894214, "autogenerated": false, "ratio": 3.85161...
from EXOSIMS.PlanetPhysicalModel.FortneyMarleyCahoyMix1 import FortneyMarleyCahoyMix1 from EXOSIMS.util.get_dirs import get_downloads_dir import astropy.units as u import numpy as np import os, h5py from scipy.stats import norm import sys # Python 3 compatibility: if sys.version_info[0] > 2: from urllib.request im...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPhysicalModel/Forecaster.py", "copies": "1", "size": "5441", "license": "bsd-3-clause", "hash": -1823929710941119500, "line_mean": 35.0397350993, "line_max": 106, "alpha_frac": 0.5449365925, "autogenerated": false, "ratio": 3.400625, "c...
from EXOSIMS.PlanetPhysicalModel.FortneyMarleyCahoyMix1 import FortneyMarleyCahoyMix1 import astropy.units as u import numpy as np class ForecasterMod(FortneyMarleyCahoyMix1): """Planet M-R relation model based on modification of the FORECASTER best-fit model (Chen & Kippling 2016) as described in Savransky e...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPhysicalModel/ForecasterMod.py", "copies": "1", "size": "3322", "license": "bsd-3-clause", "hash": 7014243313967169000, "line_mean": 28.6607142857, "line_max": 85, "alpha_frac": 0.5054184226, "autogenerated": false, "ratio": 2.90131004366...
from EXOSIMS.PlanetPopulation.DulzPlavchan import DulzPlavchan import astropy.units as u import numpy as np import sys # Python 3 compatibility: if sys.version_info[0] > 2: xrange = range class AlbedoByRadiusDulzPlavchan(DulzPlavchan): """Planet Population module based on occurrence rate tables from Shannon D...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/AlbedoByRadiusDulzPlavchan.py", "copies": "1", "size": "5235", "license": "bsd-3-clause", "hash": 6276397289387819000, "line_mean": 36.9347826087, "line_max": 103, "alpha_frac": 0.5677172875, "autogenerated": false, "ratio": 3....
from EXOSIMS.PlanetPopulation.KeplerLike1 import KeplerLike1 from EXOSIMS.util.InverseTransformSampler import InverseTransformSampler import astropy.units as u class KeplerLike2(KeplerLike1): """ Population based on Kepler radius distribution with RV-like semi-major axis distribution with exponential deca...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/KeplerLike2.py", "copies": "1", "size": "2605", "license": "bsd-3-clause", "hash": 8101321289599932000, "line_mean": 36.2285714286, "line_max": 81, "alpha_frac": 0.6537428023, "autogenerated": false, "ratio": 4.134920634920635,...
from EXOSIMS.PlanetPopulation.KeplerLike1 import KeplerLike1 import warnings import astropy import astropy.units as u import astropy.constants as const import numpy as np import os,inspect from astropy.io.votable import parse from astropy.time import Time from EXOSIMS.util import statsFun import pkg_resources class K...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/KnownRVPlanets.py", "copies": "1", "size": "7965", "license": "bsd-3-clause", "hash": 4601928611023153700, "line_mean": 40.7015706806, "line_max": 144, "alpha_frac": 0.6114249843, "autogenerated": false, "ratio": 3.427280550774...
from EXOSIMS.PlanetPopulation.SAG13 import SAG13 import astropy.units as u import numpy as np import sys # Python 3 compatibility: if sys.version_info[0] > 2: xrange = range class AlbedoByRadius(SAG13): """Planet Population module based on SAG13 occurrence rates. NOTE: This assigns constant albedo ba...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/AlbedoByRadius.py", "copies": "1", "size": "5293", "license": "bsd-3-clause", "hash": 6960843547965830000, "line_mean": 37.0791366906, "line_max": 84, "alpha_frac": 0.5597959569, "autogenerated": false, "ratio": 3.5547347212894...
from EXOSIMS.Prototypes.BackgroundSources import BackgroundSources import os, inspect import numpy as np import astropy.units as u from scipy.interpolate import griddata class GalaxiesFaintStars(BackgroundSources): """ GalaxiesFaintStars class This class calculates the total number background sources...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/BackgroundSources/GalaxiesFaintStars.py", "copies": "1", "size": "2881", "license": "bsd-3-clause", "hash": -1215295847102459100, "line_mean": 37.4133333333, "line_max": 87, "alpha_frac": 0.6004859424, "autogenerated": false, "ratio": 3.9144021...
from EXOSIMS.Prototypes.Observatory import Observatory import astropy.units as u from astropy.time import Time import numpy as np import os, inspect import scipy.interpolate as interpolate import scipy.integrate as itg try: import cPickle as pickle except: import pickle from scipy.io import loadmat class Obser...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/Observatory/ObservatoryL2Halo.py", "copies": "1", "size": "21259", "license": "bsd-3-clause", "hash": -9181120467412425000, "line_mean": 38.8855534709, "line_max": 148, "alpha_frac": 0.5425466861, "autogenerated": false, "ratio": 3.516790736145...
from EXOSIMS.Prototypes.OpticalSystem import OpticalSystem from EXOSIMS.OpticalSystem.Nemati import Nemati import astropy.units as u from astropy.io import fits import astropy.constants as const import numpy as np import scipy.stats as st import scipy.optimize as opt import os from scipy import interpolate from scipy.o...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/OpticalSystem/Nemati_2019.py", "copies": "1", "size": "37728", "license": "bsd-3-clause", "hash": 186813693652439740, "line_mean": 54.0773722628, "line_max": 238, "alpha_frac": 0.6036100509, "autogenerated": false, "ratio": 3.109279709906049, ...
from EXOSIMS.Prototypes.PlanetPhysicalModel import PlanetPhysicalModel import astropy.units as u import numpy as np import scipy.interpolate as interpolate import os, inspect try: import cPickle as pickle except: import pickle from scipy.io import loadmat class FortneyMarleyCahoyMix1(PlanetPhysicalModel): ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPhysicalModel/FortneyMarleyCahoyMix1.py", "copies": "1", "size": "9468", "license": "bsd-3-clause", "hash": -5968048589570952000, "line_mean": 39.2893617021, "line_max": 94, "alpha_frac": 0.5409801436, "autogenerated": false, "ratio": 3.2...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation from EXOSIMS.PlanetPopulation.EarthTwinHabZone1 import EarthTwinHabZone1 import numpy as np import astropy.units as u class EarthTwinHabZone2(EarthTwinHabZone1): """ Population of Earth twins (1 R_Earth, 1 M_Eearth, 1 p_Earth) On eccentric ha...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/EarthTwinHabZone2.py", "copies": "1", "size": "3071", "license": "bsd-3-clause", "hash": 6321418637239151000, "line_mean": 36.4512195122, "line_max": 84, "alpha_frac": 0.5659394334, "autogenerated": false, "ratio": 3.4122222222...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation from EXOSIMS.util import statsFun import astropy.units as u import astropy.constants as const import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate import sys class KeplerLike1(PlanetPopulation): """Populati...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/KeplerLike1.py", "copies": "1", "size": "15137", "license": "bsd-3-clause", "hash": -6960407322188186000, "line_mean": 34.9548693587, "line_max": 101, "alpha_frac": 0.5485234855, "autogenerated": false, "ratio": 3.6919512195121...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class Brown2005EarthLike(PlanetPopulation): """ Population of Earth-Like Planets from Brown 2005 paper This implementation is intended to enforce this population regardless of JSON inputs....
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/Brown2005EarthLike.py", "copies": "1", "size": "3810", "license": "bsd-3-clause", "hash": -8400282252256987000, "line_mean": 35.2857142857, "line_max": 126, "alpha_frac": 0.556167979, "autogenerated": false, "ratio": 3.60795454...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class EarthTwinHabZone1(PlanetPopulation): """Population of Earth twins (1 R_Earth, 1 M_Eearth, 1 p_Earth) On circular Habitable zone orbits (0.7 to 1.5 AU) Note that these values may not be o...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/EarthTwinHabZone1.py", "copies": "1", "size": "2416", "license": "bsd-3-clause", "hash": -7573453310058077000, "line_mean": 31.2133333333, "line_max": 86, "alpha_frac": 0.5488410596, "autogenerated": false, "ratio": 3.947712418...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class EarthTwinHabZone1SDET(PlanetPopulation): """Population of Earth twins (1 R_Earth, 1 M_Eearth, 1 p_Earth) On circular Habitable zone orbits (0.7 to 1.5 AU) Note that these values may not ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/EarthTwinHabZone1SDET.py", "copies": "1", "size": "2467", "license": "bsd-3-clause", "hash": -8379417329186584000, "line_mean": 31.8933333333, "line_max": 86, "alpha_frac": 0.5541143089, "autogenerated": false, "ratio": 3.86071...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class EarthTwinHabZone3(PlanetPopulation): """Population of Earth twins (1 R_Earth, 1 M_Eearth, 1 p_Earth) On circular Habitable zone orbits (0.7 to 1.5 AU) Note that these values may not be o...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/EarthTwinHabZone3.py", "copies": "1", "size": "1862", "license": "bsd-3-clause", "hash": 2896822693030807000, "line_mean": 29.5245901639, "line_max": 89, "alpha_frac": 0.5504833512, "autogenerated": false, "ratio": 3.9957081545...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class EarthTwinHabZoneSDET(PlanetPopulation): """Population of Earth twins (1 R_Earth, 1 M_Eearth, 1 p_Earth) On circular Habitable zone orbits (0.7 to 1.5 AU) Note that these values may not b...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/EarthTwinHabZoneSDET.py", "copies": "1", "size": "3075", "license": "bsd-3-clause", "hash": -7975955245094547000, "line_mean": 31.7127659574, "line_max": 86, "alpha_frac": 0.5570731707, "autogenerated": false, "ratio": 4.009126...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class Guimond2019(PlanetPopulation): """ Population of Earth-Like Planets from Brown 2005 paper This implementation is intended to enforce this population regardless of JSON inputs. The o...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/Guimond2019.py", "copies": "1", "size": "3459", "license": "bsd-3-clause", "hash": 7041535711214584000, "line_mean": 32.5825242718, "line_max": 121, "alpha_frac": 0.5617230413, "autogenerated": false, "ratio": 3.930681818181818...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import astropy.units as u class JupiterTwin(PlanetPopulation): """ Population of Jupiter twins (11.209 R_Earth, 317.83 M_Eearth, 1 p_Earth) On eccentric orbits (0.7 to 1.5 AU)*5.204. Numbers pulled from nssdc.gsfc.nasa....
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/JupiterTwin.py", "copies": "1", "size": "3358", "license": "bsd-3-clause", "hash": 289742654586029440, "line_mean": 36.7303370787, "line_max": 84, "alpha_frac": 0.5711733175, "autogenerated": false, "ratio": 3.213397129186603, ...
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation import numpy as np import os import inspect from astropy.io import ascii import astropy.units as u import astropy.constants as const import scipy.interpolate as interpolate import sys class DulzPlavchan(PlanetPopulation): """ Population based on ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/PlanetPopulation/DulzPlavchan.py", "copies": "1", "size": "19342", "license": "bsd-3-clause", "hash": -415644842183518800, "line_mean": 37, "line_max": 127, "alpha_frac": 0.5239375452, "autogenerated": false, "ratio": 3.3313813296589734, "con...
from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse import numpy as np import astropy.units as u from astropy.time import Time class KnownRVPlanetsUniverse(SimulatedUniverse): """ Simulated universe implementation inteded to work with the Known RV planet planetary population and target list ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/SimulatedUniverse/KnownRVPlanetsUniverse.py", "copies": "1", "size": "3909", "license": "bsd-3-clause", "hash": -1026664043273351200, "line_mean": 45, "line_max": 98, "alpha_frac": 0.5968278332, "autogenerated": false, "ratio": 3.43195785776997...
from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse import numpy as np import astropy.units as u class DulzPlavchanUniverseEarthsOnly(SimulatedUniverse): """Simulated Universe module based on Dulz and Plavchan occurrence rates. """ def __init__(self, **specs): SimulatedUniverse....
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/SimulatedUniverse/DulzPlavchanUniverseEarthsOnly.py", "copies": "1", "size": "1742", "license": "bsd-3-clause", "hash": -3715541176994282500, "line_mean": 31.2592592593, "line_max": 113, "alpha_frac": 0.6194029851, "autogenerated": false, "rati...
from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse import numpy as np import astropy.units as u class KeplerLikeUniverse(SimulatedUniverse): """ Simulated universe implementation inteded to work with the Kepler-like planetary population implementations. Args: specs: ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/SimulatedUniverse/KeplerLikeUniverse.py", "copies": "1", "size": "1910", "license": "bsd-3-clause", "hash": 4025766260925968400, "line_mean": 35.75, "line_max": 82, "alpha_frac": 0.6251308901, "autogenerated": false, "ratio": 3.7524557956777995...
from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse import numpy as np class SAG13Universe(SimulatedUniverse): """Simulated Universe module based on SAG13 Planet Population module. """ def __init__(self, **specs): SimulatedUniverse.__init__(self, **specs) def gen_...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/SimulatedUniverse/SAG13Universe.py", "copies": "1", "size": "1543", "license": "bsd-3-clause", "hash": 5868608313478267000, "line_mean": 37.6, "line_max": 80, "alpha_frac": 0.615683733, "autogenerated": false, "ratio": 3.6391509433962264, "co...
from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse import numpy as np class DulzPlavchanUniverse(SimulatedUniverse): """Simulated Universe module based on Dulz and Plavchan occurrence rates. """ def __init__(self, **specs): SimulatedUniverse.__init__(self, **specs) def gen_...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/SimulatedUniverse/DulzPlavchanUniverse.py", "copies": "1", "size": "1293", "license": "bsd-3-clause", "hash": -6575747239978424000, "line_mean": 33.972972973, "line_max": 81, "alpha_frac": 0.6450116009, "autogenerated": false, "ratio": 3.298469...
from EXOSIMS.Prototypes.StarCatalog import StarCatalog import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord class FakeCatalog_UniformAngles(StarCatalog): """Fake Catalog of stars separated uniformly by angle Generate a fake catalog of stars that are uniformly separated. ...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/StarCatalog/FakeCatalog_UniformAngles.py", "copies": "1", "size": "3354", "license": "bsd-3-clause", "hash": 3739556828292207000, "line_mean": 46.9142857143, "line_max": 99, "alpha_frac": 0.5336911151, "autogenerated": false, "ratio": 3.7770270...
from EXOSIMS.Prototypes.StarCatalog import StarCatalog import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord class FakeCatalog_UniformSpacing_wInput(StarCatalog): def __init__(self, lat_sep=0.3, lon_sep=0.3, star_dist=1, lat_extra = np.array([]), lon_extra = np.array([]), dist_...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/StarCatalog/FakeCatalog_UniformSpacing_wInput.py", "copies": "1", "size": "4169", "license": "bsd-3-clause", "hash": 858769394756738300, "line_mean": 48.630952381, "line_max": 150, "alpha_frac": 0.542096426, "autogenerated": false, "ratio": 3.9...
from EXOSIMS.Prototypes.StarCatalog import StarCatalog import numpy as np import astropy.units as u import random as py_random from astropy.coordinates import SkyCoord class FakeCatalog(StarCatalog): """ Fake Catalog class This class generates an artificial target list of stars with a logistic distributio...
{ "repo_name": "dsavransky/EXOSIMS", "path": "EXOSIMS/StarCatalog/FakeCatalog.py", "copies": "1", "size": "6193", "license": "bsd-3-clause", "hash": 7398224028870938000, "line_mean": 36.5333333333, "line_max": 99, "alpha_frac": 0.5147747457, "autogenerated": false, "ratio": 3.751059963658389, "c...