text
stringlengths
0
1.05M
meta
dict
__author__ = 'Steven' from django.conf import settings from django.contrib.auth.models import Permission, User import csv, bcrypt class Auth(object): def authenticate(self, username=None, password=None): try: user = User.objects.get(username=username) if user.check_password(passwor...
{ "repo_name": "steven-martins/Marking", "path": "back/auth/blow.py", "copies": "1", "size": "1595", "license": "mit", "hash": 8827425271017534000, "line_mean": 32.9574468085, "line_max": 91, "alpha_frac": 0.5611285266, "autogenerated": false, "ratio": 4.346049046321526, "config_test": false, ...
__author__ = 'steven' from flask import Blueprint, jsonify, request from sqlalchemy.exc import IntegrityError from models import Project, Project_Student, Template, Task import logging import json from datetime import datetime task = Blueprint('task', __name__) from api_tools import signed_auth, nocache @task.rout...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api_blueprints/task.py", "copies": "1", "size": "6044", "license": "mit", "hash": 4006185749053383000, "line_mean": 35.8536585366, "line_max": 148, "alpha_frac": 0.5918266049, "autogenerated": false, "ratio": 3.495662232504338, "conf...
__author__ = 'steven' from flask import Blueprint, jsonify, request from sqlalchemy.exc import IntegrityError from models import User import logging user = Blueprint('user', __name__) from api_tools import signed_auth, nocache @user.route('/', methods=["GET"]) @signed_auth() @nocache def api_get_users(): from a...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api_blueprints/user.py", "copies": "1", "size": "4453", "license": "mit", "hash": -622508039411242100, "line_mean": 31.503649635, "line_max": 96, "alpha_frac": 0.6099258927, "autogenerated": false, "ratio": 3.4734789391575664, "confi...
__author__ = 'steven' from flask import Blueprint, jsonify, request, send_from_directory from sqlalchemy.exc import IntegrityError from models import Project, Project_Student, Template, Task, User import logging import json from datetime import datetime project = Blueprint('project', __name__) from api_tools import ...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api_blueprints/project.py", "copies": "1", "size": "21073", "license": "mit", "hash": -7571091932764028000, "line_mean": 38.0240740741, "line_max": 125, "alpha_frac": 0.5794618706, "autogenerated": false, "ratio": 3.7529830810329474, ...
__author__ = 'steven' from flask import request, make_response from functools import wraps, update_wrapper from functools import wraps import config import hashlib import time import datetime import email.utils as eut import pytz import base64 import hmac import logging import csv def intranet_auth(): def wrappe...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api_tools.py", "copies": "1", "size": "6000", "license": "mit", "hash": -6267960951511550000, "line_mean": 39, "line_max": 157, "alpha_frac": 0.5305, "autogenerated": false, "ratio": 4.112405757368061, "config_test": false, "has_no...
__author__ = 'steven' from mixins.scm import GitMixin from exceptions import RepositoryNameMissing import logging import os import config from api_tools import Mapping mapping = Mapping() class Pickup(GitMixin): def __init__(self, task_id, project): self._project = project self._task_id = task_id...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "actions/pickup.py", "copies": "1", "size": "3330", "license": "mit", "hash": 6282610056759873000, "line_mean": 50.2307692308, "line_max": 118, "alpha_frac": 0.5816816817, "autogenerated": false, "ratio": 4.215189873417722, "config_te...
__author__ = 'steven' from sqlalchemy import create_engine import config from models import Task from datetime import datetime from datetime import timedelta import logging import time from models import dump_datetime engine = create_engine(config.SQL_DB_URI, echo=True, pool_recycle=3600) from sqlalchemy.orm import s...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "scheduler.py", "copies": "1", "size": "1923", "license": "mit", "hash": -8945473579076291000, "line_mean": 29.5238095238, "line_max": 150, "alpha_frac": 0.5481019241, "autogenerated": false, "ratio": 4.340857787810384, "config_test":...
__author__ = 'Steven' import json import hashlib import random try: import httplib except: import http.client as httplib import urllib import uuid import os import pytz import datetime import base64 import hmac import time import config class Client(object): def __init__(self, host): self._host...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "docs/api_client.py", "copies": "1", "size": "4064", "license": "mit", "hash": 5866118853153760000, "line_mean": 35.2857142857, "line_max": 158, "alpha_frac": 0.5713582677, "autogenerated": false, "ratio": 3.4528462192013594, "config_...
__author__ = 'steven' import os, errno, shutil, stat, logging import config import unicodedata import string from .execution import ExecMixin validFilenameChars = "-_.()+ %s%s" % (string.ascii_letters, string.digits) class FsMixin(ExecMixin): def __init__(self): pass def _cleanfilename(self, filenam...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "mixins/fs.py", "copies": "1", "size": "5101", "license": "mit", "hash": 2540374530582915000, "line_mean": 37.9389312977, "line_max": 108, "alpha_frac": 0.5428347383, "autogenerated": false, "ratio": 3.832456799398948, "config_test": ...
__author__ = 'steven' import requests, json from exceptions import NotImplemented, UnknownActivity import config import logging import hashlib import os from api_tools import Mapping mapping = Mapping() class CrawlerMixin(object): def __init__(self): pass def _bigint_json(self, data): cleane...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "mixins/crawl.py", "copies": "1", "size": "8371", "license": "mit", "hash": 9072327539598562000, "line_mean": 45.7653631285, "line_max": 147, "alpha_frac": 0.5302831203, "autogenerated": false, "ratio": 3.94300518134715, "config_test"...
__author__ = 'steven' import subprocess, shlex class ExecResult(object): def __init__(self, return_code, outs, errs, exception=None): self.return_code = return_code self.outs = outs self.errs = errs self.exception = exception class ExecMixin(object): def __init__(self): ...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "mixins/execution.py", "copies": "1", "size": "1671", "license": "mit", "hash": 8166450829924128000, "line_mean": 36.1333333333, "line_max": 115, "alpha_frac": 0.605625374, "autogenerated": false, "ratio": 3.9225352112676055, "config_...
__author__ = 'steven' # mysql+mysqldb://<user>:<password>@<host>[:<port>]/<dbname> from sqlalchemy import Column, String, Integer, ForeignKey, UniqueConstraint, Boolean, Enum, DateTime, Text, Table from sqlalchemy.orm import relationship, backref from sqlalchemy.ext.declarative import declarative_base from config impo...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "models.py", "copies": "1", "size": "14274", "license": "mit", "hash": -1871919977932960800, "line_mean": 39.3192090395, "line_max": 136, "alpha_frac": 0.5730400056, "autogenerated": false, "ratio": 3.8409580193756727, "config_test": ...
__author__ = 'Steven' from django.core.management.base import BaseCommand, CommandError try: from back.marks.models import Project, Timeslot, User except: from marks.models import Project, Timeslot, User import json, csv, io, os class Load(): def __init__(self, csv_name): self._rows = self._rea...
{ "repo_name": "steven-martins/Marking", "path": "back/marks/management/commands/importprojects.py", "copies": "1", "size": "3031", "license": "mit", "hash": 8270243035897145000, "line_mean": 30.9157894737, "line_max": 92, "alpha_frac": 0.5212801056, "autogenerated": false, "ratio": 4.245098039215...
__author__ = 'steven' from flask import Blueprint, jsonify, request from sqlalchemy.exc import IntegrityError import logging from models import Template template = Blueprint('template', __name__) from api_tools import signed_auth,nocache @template.route('/', methods=["GET"]) @signed_auth() @nocache def api_get_te...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api_blueprints/template.py", "copies": "1", "size": "3641", "license": "mit", "hash": -4725117468301885000, "line_mean": 32.712962963, "line_max": 91, "alpha_frac": 0.6146663005, "autogenerated": false, "ratio": 3.511089681774349, "c...
__author__ = 'steven' from flask import request, Flask, jsonify from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS import config from api_tools import nocache app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = config.SQL_DB_URI app.config['SQLALCHEMY_POOL_RECYCLE'] = 3600 try: if con...
{ "repo_name": "steven-martins/ramassage.epitech.eu", "path": "api.py", "copies": "1", "size": "1642", "license": "mit", "hash": -7866926175499135000, "line_mean": 25.4838709677, "line_max": 124, "alpha_frac": 0.6747868453, "autogenerated": false, "ratio": 3.2514851485148513, "config_test": fals...
__author__ = 'steve' """ Read all matching log files in specified folder, extracting the contents into a usable model, """ import glob, re, gzip from portality.core import app from portality.models import SshEntry from datetime import datetime # Regular Expressions to get the relevant lines. We only want sshd lines l...
{ "repo_name": "Steven-Eardley/ssh_attacks", "path": "portality/read_logs.py", "copies": "1", "size": "3931", "license": "mit", "hash": 6940079315688163000, "line_mean": 33.1826086957, "line_max": 101, "alpha_frac": 0.6481811244, "autogenerated": false, "ratio": 3.691079812206573, "config_test":...
__author__ = 'stevet' import re import time import inspect from maya import cmds from mGui import gui, forms, lists from mGui.bindings import bind from mGui.observable import ViewCollection from mGui.qt.QTextField import QTextField from mGui.scriptJobs import Idle """ This example illustrates the optional QTextField...
{ "repo_name": "theodox/mGui", "path": "mGui/examples/filtered_collection.py", "copies": "1", "size": "2353", "license": "mit", "hash": -1389931252412136200, "line_mean": 26.3604651163, "line_max": 97, "alpha_frac": 0.5954101147, "autogenerated": false, "ratio": 3.7468152866242037, "config_test"...
__author__ = 'stevet' import sys import traceback from maya.api.OpenMaya import MFnPlugin, MPxCommand, MSyntax, MDGModifier, MArgDatabase, MGlobal, MDagModifier, \ MDistance, MAngle, MTime __version__ = 0.5 class initializePlugin2(object): """ Proxies the `initializePlugin` method that Maya expects to b...
{ "repo_name": "theodox/plugger", "path": "plugger/__init__.py", "copies": "1", "size": "7948", "license": "mit", "hash": 8895601633029040000, "line_mean": 29.5692307692, "line_max": 120, "alpha_frac": 0.611348767, "autogenerated": false, "ratio": 4.298539751216874, "config_test": false, "has_...
__author__ = 'steve_w' from urllib2 import urlopen from bs4 import BeautifulSoup def get_locations(url): """ Function gets the url of yum website and gets the locations of the restuarants and convert them to linkable url :param url: link to yum webiste :return: list of locations """ soup = Be...
{ "repo_name": "SteveWaweru/yumscrap", "path": "yumscrap.py", "copies": "1", "size": "2691", "license": "mit", "hash": -997303097672517200, "line_mean": 37.4571428571, "line_max": 200, "alpha_frac": 0.652173913, "autogenerated": false, "ratio": 3.536136662286465, "config_test": false, "has_no_...
__author__ = 'steve_w' import random class GeneticAlgorithm(object): def __init__(self, genetics): self.genetics = genetics pass def run(self): population = self.genetics.initial() while True: fits_pops = [(self.genetics.fitness(ch), ch) for ch in population] ...
{ "repo_name": "TonyHinjos/Machine-Learning-Algorithms-Toolkit", "path": "Genetic Algorithm /Genetic Algorithm.py", "copies": "2", "size": "5561", "license": "mit", "hash": -3289175141756668400, "line_mean": 31.1445086705, "line_max": 79, "alpha_frac": 0.548282683, "autogenerated": false, "ratio":...
__authors__ = ['Thomas Bass'] ## Candidate Number 4869 | Centre Number 52423 ## TASK 2 import sqlite3 as lite ## Imports libraries import random import math currentOrder = [] ## Define curr...
{ "repo_name": "electric-blue-green/GSCE-Coursework-GTIN", "path": "Final Compiled/Task 2/task2.py", "copies": "2", "size": "8038", "license": "apache-2.0", "hash": -8777599494856201000, "line_mean": 90.3563218391, "line_max": 165, "alpha_frac": 0.4017179136, "autogenerated": false, "ratio": 5.209...
__authors__ = ['Thomas Bass'] ## Candidate Number 4869 | Centre Number 52423 ## TASK 2 import sqlite3 as lite import random import math currentOrder = [] con = lite.connect('dbuse.db') cur = con.cursor() def verify(con, cur, currentOrder): var = input('Enter GTIN for the product you wish to purchase:\...
{ "repo_name": "electric-blue-green/GSCE-Coursework-GTIN", "path": "Task 2/FINAL/task2 Development Testing.py", "copies": "1", "size": "3603", "license": "apache-2.0", "hash": 9088495723665561000, "line_mean": 39.3908045977, "line_max": 165, "alpha_frac": 0.5942793668, "autogenerated": false, "rat...
import time import numpy as np from scipy import sparse from .lil import is_lil from .. import cython_code from . import check_random_state from ..loss_and_gradient import gradient_zi from .convolution import _choose_convolve_multi def _coordinate_descent_idx(Xi, D, constants, reg, z0=None, max_iter=1000, ...
{ "repo_name": "alphacsc/alphacsc", "path": "alphacsc/utils/coordinate_descent.py", "copies": "1", "size": "10052", "license": "bsd-3-clause", "hash": -490154152721771800, "line_mean": 34.0243902439, "line_max": 79, "alpha_frac": 0.5393951452, "autogenerated": false, "ratio": 3.287115761935906, ...
__author__ = 'stig' import argparse import sys import numpy as np from pymjolnir.mjolnir import Mjolnir def command_line_parse(default_concurrencies): parser = argparse.ArgumentParser(description='Wraps "ab" (Apache HTTP server benchmarking tool) to ' 'load test we...
{ "repo_name": "stiggg/pymjolnir", "path": "src/app.py", "copies": "1", "size": "1180", "license": "mit", "hash": -1469287906804664000, "line_mean": 32.7428571429, "line_max": 112, "alpha_frac": 0.6322033898, "autogenerated": false, "ratio": 3.5435435435435436, "config_test": false, "has_no_ke...
__author__ = 'stig' import envoy import re import numpy as np import sys class Mjolnir(): REQUEST_MULTIPLIER = 10 def strike(self, url, concurrencies): means = [] stds = [] for concurrency in concurrencies: requests = concurrency * self.REQUEST_MULTIPLIER sel...
{ "repo_name": "stiggg/pymjolnir", "path": "src/pymjolnir/mjolnir.py", "copies": "1", "size": "2023", "license": "mit", "hash": 8316275756845901000, "line_mean": 27.1111111111, "line_max": 145, "alpha_frac": 0.5669797331, "autogenerated": false, "ratio": 3.651624548736462, "config_test": false, ...
__author__ = 'Stojan Jovic <stojan.jovic@dmsgroup.rs>' __contact__ = 'stojan.jovic@dmsgroup.rs' __date__ = '04 February 2009' __copyright__ = 'Copyright (c) 2008 DMS Group' import socket import logging import xmllayout # Adding custom debug levels (for example: TRACE, i.e. VERBOSE) logging.VERBOSE...
{ "repo_name": "nickswebsite/pylogfaces", "path": "logFaces_logger_example.py", "copies": "1", "size": "2076", "license": "bsd-3-clause", "hash": -5630117559583431000, "line_mean": 29.9384615385, "line_max": 81, "alpha_frac": 0.7003853565, "autogenerated": false, "ratio": 3.2136222910216716, "co...
import matplotlib.pyplot as plt from joblib import Memory import numpy as np import gc import time from sklearn.linear_model import (LogisticRegression, SGDClassifier) from sklearn.datasets import fetch_rcv1 from sklearn.linear_model._sag import get_auto_step_size try: import lightning.classification as lightnin...
{ "repo_name": "ndingwall/scikit-learn", "path": "benchmarks/bench_rcv1_logreg_convergence.py", "copies": "18", "size": "7212", "license": "bsd-3-clause", "hash": 1250481961454503200, "line_mean": 29.3025210084, "line_max": 79, "alpha_frac": 0.5818080976, "autogenerated": false, "ratio": 3.1479703...
import matplotlib.pyplot as plt import numpy as np import gc import time from sklearn.externals.joblib import Memory from sklearn.linear_model import (LogisticRegression, SGDClassifier) from sklearn.datasets import fetch_rcv1 from sklearn.linear_model.sag import get_auto_step_size try: import lightning.classific...
{ "repo_name": "pprett/scikit-learn", "path": "benchmarks/bench_rcv1_logreg_convergence.py", "copies": "58", "size": "7229", "license": "bsd-3-clause", "hash": 8959127179930633000, "line_mean": 29.3739495798, "line_max": 79, "alpha_frac": 0.5826532024, "autogenerated": false, "ratio": 3.1498910675...
import matplotlib.pyplot as plt import numpy as np import gc import time from sklearn.utils import Memory from sklearn.linear_model import (LogisticRegression, SGDClassifier) from sklearn.datasets import fetch_rcv1 from sklearn.linear_model.sag import get_auto_step_size try: import lightning.classification as li...
{ "repo_name": "vortex-ape/scikit-learn", "path": "benchmarks/bench_rcv1_logreg_convergence.py", "copies": "7", "size": "7218", "license": "bsd-3-clause", "hash": 3917219947076932600, "line_mean": 29.3277310924, "line_max": 79, "alpha_frac": 0.5821557218, "autogenerated": false, "ratio": 3.1492146...
class Prime: """Provides methods to obtain prime numbers and use them.""" def __init__(self): pass # Cache for already calculated prime numbers cache = [2, 3] @staticmethod def get_prime(index): """ Returns the prime number at the given index. The index starts with 0...
{ "repo_name": "Koopakiller/School", "path": "NLA/serie1/prime.py", "copies": "2", "size": "2370", "license": "mit", "hash": -6522836265696626000, "line_mean": 28.2592592593, "line_max": 107, "alpha_frac": 0.5202531646, "autogenerated": false, "ratio": 4.065180102915952, "config_test": false, ...
# License: BSD (3-clause) import os.path as op import warnings import copy import numpy as np from scipy import sparse, linalg from .fixes import _get_img_fdata from .parallel import parallel_func from .source_estimate import ( _BaseSurfaceSourceEstimate, _BaseVolSourceEstimate, _BaseSourceEstimate, _get_ico...
{ "repo_name": "olafhauk/mne-python", "path": "mne/morph.py", "copies": "4", "size": "59960", "license": "bsd-3-clause", "hash": 9222653154321270000, "line_mean": 40.955913226, "line_max": 102, "alpha_frac": 0.5858727379, "autogenerated": false, "ratio": 3.616539992761491, "config_test": false, ...
# License: BSD (3-clause) import os.path as op import warnings import copy import numpy as np from scipy import sparse from .fixes import _get_img_fdata from .parallel import parallel_func from .source_estimate import ( VolSourceEstimate, _BaseSurfaceSourceEstimate, _BaseVolSourceEstimate, _BaseSourceEstimat...
{ "repo_name": "cjayb/mne-python", "path": "mne/morph.py", "copies": "1", "size": "56407", "license": "bsd-3-clause", "hash": -2649228916433032700, "line_mean": 39.90137781, "line_max": 102, "alpha_frac": 0.5892771661, "autogenerated": false, "ratio": 3.595066607177003, "config_test": false, "...
# License: BSD (3-clause) import os.path as op import warnings import copy import numpy as np from scipy import sparse from .parallel import parallel_func from .source_estimate import (VolSourceEstimate, SourceEstimate, VolVectorSourceEstimate, VectorSourceEstimate, ...
{ "repo_name": "adykstra/mne-python", "path": "mne/morph.py", "copies": "1", "size": "49187", "license": "bsd-3-clause", "hash": -2604674499334659600, "line_mean": 39.6504132231, "line_max": 102, "alpha_frac": 0.5895053571, "autogenerated": false, "ratio": 3.7125066042720207, "config_test": fals...
# License: BSD (3-clause) import os.path as op import warnings import copy import numpy as np from .fixes import _get_img_fdata from .morph_map import read_morph_map from .parallel import parallel_func from .source_estimate import ( _BaseSurfaceSourceEstimate, _BaseVolSourceEstimate, _BaseSourceEstimate, _ge...
{ "repo_name": "bloyl/mne-python", "path": "mne/morph.py", "copies": "1", "size": "60555", "license": "bsd-3-clause", "hash": 6180334274734830000, "line_mean": 40.8445058742, "line_max": 102, "alpha_frac": 0.5851128838, "autogenerated": false, "ratio": 3.6163769933703636, "config_test": false, ...
# License: BSD (3-clause) import os.path as op import warnings import copy import numpy as np from .fixes import _get_img_fdata from .parallel import parallel_func from .source_estimate import ( _BaseSurfaceSourceEstimate, _BaseVolSourceEstimate, _BaseSourceEstimate, _get_ico_tris) from .source_space import ...
{ "repo_name": "wmvanvliet/mne-python", "path": "mne/morph.py", "copies": "2", "size": "60065", "license": "bsd-3-clause", "hash": -4943030793413473000, "line_mean": 40.912072575, "line_max": 102, "alpha_frac": 0.5860972361, "autogenerated": false, "ratio": 3.6180722891566264, "config_test": fal...
import icons import os import sys import re import time #import urllib2 // for updater next version #import json // for updater next version from time import time, sleep from PyQt5.QtGui import QIcon from PyQt5.QtCore import QProcess from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtGui import QFont, QPixmap from...
{ "repo_name": "techbliss/Windows_Screenrecorder", "path": "Build folder/rec_main.py", "copies": "1", "size": "44395", "license": "mit", "hash": -1420300660222871300, "line_mean": 48.8260381594, "line_max": 195, "alpha_frac": 0.3683522919, "autogenerated": false, "ratio": 4.520875763747454, "con...
__author__ = 'stowellc17' from pygext.notifier import global_notify class Messenger: notify = global_notify.new_category('Messenger') def __init__(self): self._acceptors = {} def accept(self, object, event, method): if event not in self._acceptors: self._acceptors[event] = ...
{ "repo_name": "chandler14362/pygext", "path": "pygext/messenger.py", "copies": "1", "size": "1674", "license": "mit", "hash": 5911106447354976000, "line_mean": 29.4363636364, "line_max": 113, "alpha_frac": 0.5818399044, "autogenerated": false, "ratio": 4.043478260869565, "config_test": false, ...
__author__ = 'stowellc17' from twisted.internet.error import AlreadyCalled from twisted.internet.task import LoopingCall from twisted.internet import reactor from pygext.notifier import global_notify TASK_DONE = 0 TASK_AGAIN = 1 class Task: notify = global_notify.new_category('Task') def __init__(self, ...
{ "repo_name": "chandler14362/pygext", "path": "pygext/taskmanager.py", "copies": "1", "size": "2806", "license": "mit", "hash": 1041728283480147100, "line_mean": 24.2792792793, "line_max": 99, "alpha_frac": 0.5727013542, "autogenerated": false, "ratio": 3.9080779944289694, "config_test": false,...
__author__ = 'stowellc17' LEVEL_DEBUG = 0 LEVEL_INFO = 1 LEVEL_WARNING = 2 LEVEL_ERROR = 3 class NotifyCategory: def __init__(self, notify, name): self.notify = notify self.name = name def debug(self, message): if self.notify.can_output(LEVEL_DEBUG): print('|DEBUG| %s: %...
{ "repo_name": "chandler14362/pygext", "path": "pygext/notifier.py", "copies": "1", "size": "1064", "license": "mit", "hash": -1351914250008226000, "line_mean": 23.7441860465, "line_max": 60, "alpha_frac": 0.587406015, "autogenerated": false, "ratio": 3.432258064516129, "config_test": false, "...
""" Base classes for MATLAB file stream reading. MATLAB is a registered trademark of the Mathworks inc. """ from __future__ import division, print_function, absolute_import import operator import functools import numpy as np from scipy._lib import doccer from . import byteordercodes as boc class MatReadError(Exc...
{ "repo_name": "arokem/scipy", "path": "scipy/io/matlab/miobase.py", "copies": "1", "size": "12006", "license": "bsd-3-clause", "hash": -8558860502057887000, "line_mean": 28.4987714988, "line_max": 80, "alpha_frac": 0.6158587373, "autogenerated": false, "ratio": 3.7754716981132077, "config_test"...
""" Base classes for MATLAB file stream reading. MATLAB is a registered trademark of the Mathworks inc. """ from __future__ import division, print_function, absolute_import import operator import sys import numpy as np from scipy._lib.six import reduce if sys.version_info[0] >= 3: byteord = int else: byteo...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scipy-master/scipy/io/matlab/miobase.py", "copies": "1", "size": "12089", "license": "mit", "hash": -8975930575358711000, "line_mean": 28.1301204819, "line_max": 80, "alpha_frac": 0.6156009596, "autogenerated": false, "ratio": 3.764870...
""" Base classes for MATLAB file stream reading. MATLAB is a registered trademark of the Mathworks inc. """ from __future__ import division, print_function, absolute_import import sys import numpy as np if sys.version_info[0] >= 3: byteord = int else: byteord = ord from scipy.misc import doccer from . imp...
{ "repo_name": "Universal-Model-Converter/UMC3.0a", "path": "data/Python/x86/Lib/site-packages/scipy/io/matlab/miobase.py", "copies": "3", "size": "11706", "license": "mit", "hash": -6567999490765558000, "line_mean": 28.4120603015, "line_max": 75, "alpha_frac": 0.6105416026, "autogenerated": false, ...
""" Base classes for MATLAB file stream reading. MATLAB is a registered trademark of the Mathworks inc. """ from __future__ import division, print_function, absolute_import import sys import operator from scipy._lib.six import reduce import numpy as np if sys.version_info[0] >= 3: byteord = int else: byte...
{ "repo_name": "jamestwebber/scipy", "path": "scipy/io/matlab/miobase.py", "copies": "1", "size": "12104", "license": "bsd-3-clause", "hash": -2811247989348991500, "line_mean": 28.1662650602, "line_max": 80, "alpha_frac": 0.6159947125, "autogenerated": false, "ratio": 3.762511656823127, "config_...
""" Base classes for MATLAB file stream reading. MATLAB is a registered trademark of the Mathworks inc. """ import operator import functools import numpy as np from scipy._lib import doccer from . import byteordercodes as boc class MatReadError(Exception): pass class MatWriteError(Exception): pass cla...
{ "repo_name": "person142/scipy", "path": "scipy/io/matlab/miobase.py", "copies": "3", "size": "11940", "license": "bsd-3-clause", "hash": -2171715887152351700, "line_mean": 28.4814814815, "line_max": 80, "alpha_frac": 0.6149916248, "autogenerated": false, "ratio": 3.7737041719342606, "config_te...
""" Base classes for matlab (TM) file stream reading """ import warnings import numpy as np from scipy.ndimage import doccer import byteordercodes as boc class MatReadError(Exception): pass doc_dict = \ {'file_arg': '''file_name : string Name of the mat file (do not need .mat extension if appen...
{ "repo_name": "huard/scipy-work", "path": "scipy/io/matlab/miobase.py", "copies": "1", "size": "18919", "license": "bsd-3-clause", "hash": -6131410916078749000, "line_mean": 32.6039076377, "line_max": 83, "alpha_frac": 0.5849146361, "autogenerated": false, "ratio": 4.027032779906343, "config_te...
""" Module for reading and writing matlab (TM) .mat files """ import os import sys import warnings from miobase import get_matfile_version, docfiller from mio4 import MatFile4Reader, MatFile4Writer from mio5 import MatFile5Reader, MatFile5Writer __all__ = ['find_mat_file', 'mat_reader_factory', 'loadmat', 'savemat'...
{ "repo_name": "huard/scipy-work", "path": "scipy/io/matlab/mio.py", "copies": "1", "size": "5397", "license": "bsd-3-clause", "hash": -1741612395532932900, "line_mean": 30.7470588235, "line_max": 86, "alpha_frac": 0.5853251807, "autogenerated": false, "ratio": 3.747916666666667, "config_test": ...
"""This module allows for the loading of an array from an ASCII Text File """ __all__ = ['read_array', 'write_array'] # Standard library imports. import os import re import sys import types # Numpy imports. import numpy from numpy import array, take, concatenate, asarray, real, imag, \ deprecate_with_doc # Sadl...
{ "repo_name": "huard/scipy-work", "path": "scipy/io/array_import.py", "copies": "1", "size": "17528", "license": "bsd-3-clause", "hash": -560847653054485600, "line_mean": 34.1967871486, "line_max": 96, "alpha_frac": 0.5708580557, "autogenerated": false, "ratio": 3.871024734982332, "config_test"...
__author__ = 'stuart' from collections import defaultdict from ._join_funcs import union_join, tuple_join, make_union_join def merge(left, right, how='inner', key=None, left_key=None, right_key=None, left_as='left', right_as='right'): """ Performs a join using the union join function. """ return jo...
{ "repo_name": "StuartAxelOwen/join", "path": "join/_core.py", "copies": "1", "size": "5900", "license": "mit", "hash": 8079025246180780000, "line_mean": 37.3116883117, "line_max": 131, "alpha_frac": 0.6461016949, "autogenerated": false, "ratio": 3.617412630288167, "config_test": false, "has_n...
__author__ = 'stuart' from datastreams import DataStream from datastreams import join_objects from itertools import product class RddStream(DataStream): def __init__(self, source_rdd): self._source = source_rdd @staticmethod def Stream(rdd): return RddStream(rdd) def map(self, func...
{ "repo_name": "StuartAxelOwen/datastreams", "path": "datastreams/rddstreams.py", "copies": "1", "size": "3809", "license": "mit", "hash": 3585393981364712000, "line_mean": 31.2796610169, "line_max": 91, "alpha_frac": 0.6266736676, "autogenerated": false, "ratio": 3.786282306163022, "config_test...
__author__ = 'stuart' import os, sys, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from datastreams import DataSet, DataStream, Datum, DictSet, DictStream if sys.version_info[0] == 2 and sys.version_...
{ "repo_name": "StuartAxelOwen/datastreams", "path": "test/test_datastreams.py", "copies": "1", "size": "15338", "license": "mit", "hash": 8238453935962712000, "line_mean": 35.345971564, "line_max": 91, "alpha_frac": 0.5896466293, "autogenerated": false, "ratio": 3.5211202938475665, "config_test...
__author__ = 'Subhashis' import random import Game from copy import copy # Currently for 2P mode only class CRAIController(Game.Controller): def __init__(self, max_depth=3): self.max_depth = max_depth def make_move(self, state): print "Waiting for player " + str(state.current_player) + "..."...
{ "repo_name": "subhashisbhowmik/CRAI", "path": "CRAI.py", "copies": "1", "size": "3043", "license": "apache-2.0", "hash": 6274996389910330000, "line_mean": 33.9770114943, "line_max": 117, "alpha_frac": 0.5090371344, "autogenerated": false, "ratio": 4.20303867403315, "config_test": false, "has...
__author__ = "Subhav Pradhan" import operator import datetime import copy from operator import attrgetter from chariot_helpers import Serialize from logger import get_logger logger = get_logger("solver_backend") class GoalDescription: name = None replicationConstraints = None # List of constraints ...
{ "repo_name": "visor-vu/chariot", "path": "Runtime/chariot_runtime_libs/solver_backend.py", "copies": "2", "size": "79832", "license": "mit", "hash": 5990528472515837000, "line_mean": 50.940143136, "line_max": 199, "alpha_frac": 0.6225573705, "autogenerated": false, "ratio": 5.242792408222237, ...
__author__ = "Subhav Pradhan" import os import logging # Helper to create and return python logger. This uses environment variable CHARIOT_LOG_LEVEL to determine base log level. def get_logger(name): logger = logging.getLogger(name) # Get base log level from environment variable. try: logLeve...
{ "repo_name": "dcpssc/chariot", "path": "Runtime/chariot_runtime_libs/logger.py", "copies": "2", "size": "1125", "license": "mit", "hash": -855127245804752500, "line_mean": 30.25, "line_max": 122, "alpha_frac": 0.6488888889, "autogenerated": false, "ratio": 4.090909090909091, "config_test": fal...
__author__ = "Subhav Pradhan" import os, signal, subprocess import re from random import randint from chariot_helpers import Serialize from logger import get_logger logger = get_logger("deployment_manager") def execute_start_action(actionProcess, actionStartScript): retval = None env_str = os.getenv('APP_HO...
{ "repo_name": "dcpssc/chariot", "path": "Runtime/chariot_runtime_libs/deployment_manager.py", "copies": "2", "size": "5595", "license": "mit", "hash": 5066955502038514000, "line_mean": 41.7099236641, "line_max": 140, "alpha_frac": 0.6253798034, "autogenerated": false, "ratio": 4.07798833819242, ...
__author__ = "Subhav Pradhan" import time import socket, zmq, json import copy, re from solver_backend import SolverBackend from new_configuration_solver_bound import NewConfigurationSolverBound from chariot_helpers import Serialize, get_node_address from deployment_manager import update_start_action, update_stop_acti...
{ "repo_name": "dcpssc/chariot", "path": "Runtime/chariot_runtime_libs/management_engine.py", "copies": "2", "size": "19410", "license": "mit", "hash": 1424074315726310100, "line_mean": 40.8318965517, "line_max": 130, "alpha_frac": 0.591241628, "autogenerated": false, "ratio": 4.7008961007507875, ...
__author__ = "Subhav Pradhan, Tihamer Levendovszky" # Base class file for all solvers. General encoding. from z3 import * from logger import get_logger logger = get_logger("configuration_solver") class ConfigurationSolver(object): def __init__(self, NO_OF_NODES, NO_OF_COMPONEN...
{ "repo_name": "visor-vu/chariot", "path": "Runtime/chariot_runtime_libs/configuration_solver.py", "copies": "2", "size": "20105", "license": "mit", "hash": -1785656469056033500, "line_mean": 42.6117136659, "line_max": 166, "alpha_frac": 0.6243223079, "autogenerated": false, "ratio": 3.83829705994...
__author__ = 'Sudhanshu Patel' from xlrd import open_workbook import codecs import sys import time def remove_anomaly(s): #Remove or replace data with ascii value greter than 128 cell_data='' for ch in s: if ord(ch) <127: cell_data +=ch return cell_data if __nam...
{ "repo_name": "Hack22learn/python-Application", "path": "Email_Harvesting/Python_code/Excell Access/Excel_EModifire.py", "copies": "2", "size": "2890", "license": "mit", "hash": 7581172646396704000, "line_mean": 31.6046511628, "line_max": 109, "alpha_frac": 0.453633218, "autogenerated": false, "r...
__author__ = 'Sudhanshu Patel' import urllib2 import os class EHarvestor(): def __init__(self,url,fname): self.url=url self.data='' self.file=fname self.counter=0 def get_data(self): # Get data from web ''' connect to given url and store...
{ "repo_name": "Hack22learn/Small-Application---Python", "path": "Email_Harvesting/Python_code/harvester/EmHarvestor.py", "copies": "2", "size": "1943", "license": "mit", "hash": -274305492946541220, "line_mean": 27.4393939394, "line_max": 73, "alpha_frac": 0.4503345342, "autogenerated": false, "r...
__author__ = "Sudip Sinha" from cliquet import cliquet_sp def run_cliquet_high(ms: list, d: int = 9) -> None: """Display short results for a list of 'n's.""" for m in ms: pr = cliquet_sp( r = 0.03, q = 0., sigma = 0.2, # sigma = [(0.05 + 0.04 * i) for i in range(1,9)], t = ...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/runCliquet.py", "copies": "1", "size": "1366", "license": "mit", "hash": 6656690291073117000, "line_mean": 34.9473684211, "line_max": 72, "alpha_frac": 0.4311859444, "autogenerated": false, "ratio": 2.511029411764706, "config_test": ...
__author__ = "Sudip Sinha" from math import exp, sqrt def vanilla_call(r: float, # Market s0: float, sigma: float, q: float, # Underlying k: float, t: float, am: bool=True, # Derivative n: int=25 # Computation ) -> list: """Price of a Am...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/asian_binom.py", "copies": "1", "size": "1153", "license": "mit", "hash": -9147303423177553000, "line_mean": 29.3421052632, "line_max": 82, "alpha_frac": 0.4770164788, "autogenerated": false, "ratio": 2.447983014861996, "config_test"...
__author__ = "Sudip Sinha" from math import exp, sqrt # @profile def sp_asian_call_old(r: float, # Market s0: float, sigma: float, q: float, # Underlying k: float, t: float, am: bool=False, # Derivative mach_eps=65536 * (7/3 - 4/3 - 1), n: int=25, h: flo...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/tr_asian_singularpoints_old.py", "copies": "1", "size": "6312", "license": "mit", "hash": 5223741569140710000, "line_mean": 31.2040816327, "line_max": 106, "alpha_frac": 0.4218948035, "autogenerated": false, "ratio": 2.0374435119431893...
__author__ = "Sudip Sinha" from math import exp, sqrt # @profile def sp_asian_call(r: float, # Market s0: float, sigma: float, q: float, # Underlying k: float, t: float, am: bool=False, # Derivative mach_eps=65536 * (7/3 - 4/3 - 1), n: int=25, h: float=0...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/tr_asian_geometric_singularpoints.py", "copies": "1", "size": "1830", "license": "mit", "hash": -3834633546892695600, "line_mean": 26.7272727273, "line_max": 106, "alpha_frac": 0.4568306011, "autogenerated": false, "ratio": 2.084282460...
__author__ = "Sudip Sinha" from math import exp, sqrt # @profile def sp_asian_call(s0: float, sigma: float, q: float, # Underlying k: float, t: float, am: bool=True, # Derivative n: int=16, h: float=0., ub: bool=True # Computation ) -> list: """Prices o...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/SPAsianOld.py", "copies": "1", "size": "6035", "license": "mit", "hash": -7561050043754738000, "line_mean": 30.7631578947, "line_max": 109, "alpha_frac": 0.4241922121, "autogenerated": false, "ratio": 2.0278897849462365, "config_test...
__author__ = "Sudip Sinha" from tr_crr import tr_underlying from tr_vanilla import vanilla_call from asian import asian_call_sp from tr_asian_singularpoints_old import sp_asian_call_old # http://www.goddardconsulting.ca/matlab-binomial-crr.html # http://www.hoadley.net/options/binomialtree.aspx?tree=B # http://www.m...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Thesis/code/runAsian.py", "copies": "1", "size": "3624", "license": "mit", "hash": -3628707790591341000, "line_mean": 41.1395348837, "line_max": 109, "alpha_frac": 0.5560154525, "autogenerated": false, "ratio": 2.057921635434412, "config_test": ...
__author__ = 'Sudip Sinha' import math # Computer eps = 256 * (7/3 - 4/3 - 1) # Market r = 0.07 # Underlying s0 = 100.0 sigma = 0.2 # Derivative T = 1.0 k = 90.0 def pos(x): return x if (x > 0) else 0 def getTree(s0, sigma, n, t): """Generate the tree of stock prices""" s = [[0]*(i+1) for i in range(n+1)] ...
{ "repo_name": "SudipSinha/edu", "path": "MathMods/Finance/SPEuropeanAsianOptions.py", "copies": "1", "size": "5145", "license": "mit", "hash": 3093739599034187300, "line_mean": 28.7398843931, "line_max": 113, "alpha_frac": 0.4864917396, "autogenerated": false, "ratio": 2.1017156862745097, "conf...
__author__ = 'suidov' import numpy as np from sklearn.preprocessing import normalize def toList(filename): popList = [] with open(filename) as file: for line in file: strList = line.split() floatList = [] for element in strList: floatList.append(floa...
{ "repo_name": "lkokhreidze/cg-project", "path": "tools/Tools.py", "copies": "1", "size": "2845", "license": "apache-2.0", "hash": 6659078437142272000, "line_mean": 28.0306122449, "line_max": 113, "alpha_frac": 0.5574692443, "autogenerated": false, "ratio": 3.122941822173436, "config_test": fals...
__author__ = 'Sukrit' import bson import pandas as pd import numpy as np #import matplotlib.pyplot as plt #from scipy.optimize import curve_fit ELElist = [] with open('../data/Elsevier_journal_list.csv', 'r') as file : x = file.readlines() for line in x : #print line line = line.replace('&','a...
{ "repo_name": "SciBase-Project/internationality-journals", "path": "src/get_journal_list_Aminer.py", "copies": "3", "size": "1586", "license": "mit", "hash": 5098038992123449000, "line_mean": 20.7260273973, "line_max": 89, "alpha_frac": 0.6223203026, "autogenerated": false, "ratio": 3.41810344827...
__author__ = 'Sukrit' import pandas as pd import csv f = open('../output/both_journal_list.txt', 'r') #reading list of journals present in Aminer and Elesevier x = f.readlines() f.close() bothjs = [] for line in x: bothjs.append(line.rstrip()) # list of common journals, removing '\n' # OUR SNIP our_SNIP = pd.r...
{ "repo_name": "sujithvm/internationality-journals", "path": "src/SNIPvsourSNIPv2.py", "copies": "3", "size": "2366", "license": "mit", "hash": 2799367627204670500, "line_mean": 24.1808510638, "line_max": 153, "alpha_frac": 0.6538461538, "autogenerated": false, "ratio": 2.646532438478747, "confi...
__author__ = 'Sukrit' import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit def poly_fit(x,y,deg): #POLYNOMIAL FIT # calculate polynomial z = np.polyfit(x, y, deg) f = np.poly1d(z) # calculate new x's and y's x_new = np.linspace(np.amin(x),...
{ "repo_name": "sujithvm/red-alert", "path": "src/IPP_SNIP_parse.py", "copies": "3", "size": "5729", "license": "mit", "hash": 797139393441370000, "line_mean": 30.1358695652, "line_max": 190, "alpha_frac": 0.6744632571, "autogenerated": false, "ratio": 2.6796071094480824, "config_test": false, ...
__author__ = 'sukrit' from pkg_resources import resource_string BUNDLED_TEMPLATE_PREFIX="bundled://" RAW_TEMPLATE_PREFIX="raw://" def fetch_template(template_url): if template_url.startswith('http://') or \ template_url.startswith('https://'): pass if template_url.startswith(BUNDLED_TE...
{ "repo_name": "sukrit007/fleet-scheduler", "path": "fleet/deploy/template_manager.py", "copies": "1", "size": "1036", "license": "mit", "hash": -1698456624298326500, "line_mean": 32.4193548387, "line_max": 78, "alpha_frac": 0.6370656371, "autogenerated": false, "ratio": 3.767272727272727, "conf...
__author__ = 'sukrit' import os import SimpleHTTPServer import SocketServer import etcd import requests from threading import Thread ETCD_PROXY_BASE = os.environ.get('ETCD_PROXY_BASE', '/yoda') ETCD_HOST = os.environ.get('ETCD_HOST', 'localhost') ETCD_PORT = int(os.environ.get('ETCD_PORT', '4001')) MOCK_TCP_PORT = i...
{ "repo_name": "totem/yoda-proxy", "path": "test/integration/__init__.py", "copies": "1", "size": "5534", "license": "mit", "hash": 2873847685220860000, "line_mean": 32.5393939394, "line_max": 79, "alpha_frac": 0.6183592338, "autogenerated": false, "ratio": 3.435133457479826, "config_test": fals...
__author__ = 'sukrit' class Provider: """ Base Provider class for API Client implementation. """ def __init__(self, **kwargs): super(Provider, self).__init__() def not_supported(self): """ Raises NotImplementedError with a message :return: """ rais...
{ "repo_name": "totem/fleet-py", "path": "fleet/client/fleet_base.py", "copies": "1", "size": "3221", "license": "mit", "hash": 5030226559908543000, "line_mean": 32.206185567, "line_max": 79, "alpha_frac": 0.6010555728, "autogenerated": false, "ratio": 4.641210374639769, "config_test": false, ...
__author__ = 'sulantha' from datetime import datetime import itertools from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] count = 0 with open('/data/data02/sulantha/Marina_Sep_2016/Marina_2016Sep_Full_SQL_CSV_Bef_FDG_Scans.csv', 'r') as file: next(file) for line in file: ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/marina/Marina_2016Sep_GetFDG.py", "copies": "1", "size": "1795", "license": "apache-2.0", "hash": -2308724912516439000, "line_mean": 41.7619047619, "line_max": 146, "alpha_frac": 0.5732590529, "autogenerated": false, "ratio": 3.06837...
__author__ = 'sulantha' from Utils.DbUtils import DbUtils DBClient = DbUtils() RIDList = ['4225','4746','4799','4136','4142','4192','4713','4960','4387','0021','4827','4579','4580','4616','4668','4696','4809','4549','4680','5012','5019','4674','4757','4385','4721','4947','4714','4715','4736','4706','4720','4661','4728'...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/andrea/RemoveEntriesFromDBTables.py", "copies": "1", "size": "1231", "license": "apache-2.0", "hash": -8238911720778759000, "line_mean": 71.4117647059, "line_max": 424, "alpha_frac": 0.6425670187, "autogenerated": false, "ratio": 2.6...
__author__ = 'sulantha' from Utils.DbUtils import DbUtils from Manager.SQL.SQLBuilder import SQLBuilder from Config import StudyConfig as sc from Manager.SQLTables.ConversionObject import ConversionObject class Conversion: def __init__(self): self.tableName = 'Conversion' self.DBClient = DbUtils() ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/SQLTables/Conversion.py", "copies": "1", "size": "3350", "license": "apache-2.0", "hash": 6267866664815984000, "line_mean": 52.1746031746, "line_max": 233, "alpha_frac": 0.672238806, "autogenerated": false, "ratio": 3.936545240893...
__author__ = 'sulantha' from Utils.DbUtils import DbUtils from Manager.SQL.SQLBuilder import SQLBuilder from Config import StudyConfig as sc from Manager.SQLTables.SortingObject import SortingObject class Sorting: def __init__(self): self.tableName = 'Sorting' self.DBClient = DbUtils() self...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/SQLTables/Sorting.py", "copies": "1", "size": "1537", "license": "apache-2.0", "hash": 5467262065571800000, "line_mean": 41.6944444444, "line_max": 141, "alpha_frac": 0.6746909564, "autogenerated": false, "ratio": 3.625, "config...
__author__ = 'sulantha' from Utils.DbUtils import DbUtils from Manager.SQL.SQLBuilder import SQLBuilder from Manager.SQLTables.ProcessingObject import ProcessingObject from Config import StudyConfig as sc class Processing: def __init__(self): self.DBClient = DbUtils() self.sqlBuilder = SQLBuilder(...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/SQLTables/Processing.py", "copies": "1", "size": "1676", "license": "apache-2.0", "hash": 5285752274115201000, "line_mean": 48.2941176471, "line_max": 139, "alpha_frac": 0.6915274463, "autogenerated": false, "ratio": 3.82648401826...
__author__ = 'Sulantha' from Utils.DbUtils import DbUtils from Utils.PipelineLogger import PipelineLogger from Coregistration.CoregHandler import CoregHandler from pymongo import MongoClient import os, subprocess, difflib import Config.PipelineConfig as pc class PETHelper: def __init__(self): self.DBClient...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Pipelines/Helpers/PETHelper.py", "copies": "1", "size": "11524", "license": "apache-2.0", "hash": -8494376012580870000, "line_mean": 54.4038461538, "line_max": 287, "alpha_frac": 0.5713293995, "autogenerated": false, "ratio": 3.6829658037...
__author__ = 'Sulantha' from Utils.DbUtils import DbUtils class QCHandler: def __init__(self): self.DBClient = DbUtils() def requestQC(self, study, modal_table, modal_tableId, qcField, qctype, qcFolder): qcsql = "INSERT IGNORE INTO QC VALUES (Null, '{0}', '{1}', '{2}', '{3}', '{4}','{5}' , 0, ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "QC/QCHandler.py", "copies": "1", "size": "1334", "license": "apache-2.0", "hash": 8561356315229255000, "line_mean": 50.3076923077, "line_max": 148, "alpha_frac": 0.4385307346, "autogenerated": false, "ratio": 4.359477124183006, "config_...
__author__ = 'sulantha' from Utils.PipelineLogger import PipelineLogger from Utils.DbUtils import DbUtils from QC.QCHandler import QCHandler class QSubJobStatusReporter: def __init__(self): self.DBClient = DbUtils() self.QCHandler = QCHandler() def setStatus(self, job, status): if job....
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/QSubJobStatusReporter.py", "copies": "1", "size": "5660", "license": "apache-2.0", "hash": -946863805116678400, "line_mean": 61.9, "line_max": 206, "alpha_frac": 0.5568904594, "autogenerated": false, "ratio": 3.731048121292024, ...
__author__ = 'sulantha' import datetime from Utils.DbUtils import DbUtils csvFile = '/data/data03/sulantha/Downloads/av45_list.csv' MatchDBClient = DbUtils(database='Study_Data.ADNI') DBClient = DbUtils() with open(csvFile, 'r') as csv: next(csv) for line in csv: row = line.split(',') rid = row[...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/getSystemVisitCode.py", "copies": "1", "size": "1186", "license": "apache-2.0", "hash": -6321006153446962000, "line_mean": 39.8965517241, "line_max": 185, "alpha_frac": 0.5927487352, "autogenerated": false, "ratio": 3.196765498652291...
__author__ = 'sulantha' import datetime from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] with open('/data/data02/sulantha/Tharick_VBM/Av45_Date_and_RID', 'r') as file: next(file) for line in file: row = line.split(',') rid = row[0] date = row[1].strip() ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/andrea/getAndreaProcessedFilesAV45.py", "copies": "1", "size": "2420", "license": "apache-2.0", "hash": 8321829815800845000, "line_mean": 38.6721311475, "line_max": 151, "alpha_frac": 0.5227272727, "autogenerated": false, "ratio": 2....
__author__ = 'sulantha' import datetime from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] with open('/data/data03/sulantha/Downloads/fdg_list.csv', 'r') as file: next(file) for line in file: row = line.split(',') rid = row[0] date = row[1].strip() d...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/andrea/getAndreaProcessedFilesFDG.py", "copies": "1", "size": "2367", "license": "apache-2.0", "hash": 409729848985346370, "line_mean": 37.8032786885, "line_max": 150, "alpha_frac": 0.5162653147, "autogenerated": false, "ratio": 3.02...
__author__ = 'sulantha' import datetime from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] with open('/data/data03/sulantha/MarinaAnalysis/AV45_list_with_dates.csv', 'r') as file: next(file) for line in file: row = line.split(',') rid = row[0] date = row[1]....
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/marina/getMarinaProcessedFilesAV45.py", "copies": "1", "size": "2437", "license": "apache-2.0", "hash": 1769159766905401600, "line_mean": 38.9508196721, "line_max": 151, "alpha_frac": 0.5264669676, "autogenerated": false, "ratio": 3....
__author__ = 'sulantha' import datetime from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] with open('/data/data03/sulantha/MarinaAnalysis/FDG_list_with_dates.csv', 'r') as file: next(file) for line in file: row = line.split(',') rid = row[0] date = row[1].s...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/marina/getMarinaProcessedFilesFDG.py", "copies": "1", "size": "2385", "license": "apache-2.0", "hash": 8897382009742381000, "line_mean": 38.0983606557, "line_max": 150, "alpha_frac": 0.5194968553, "autogenerated": false, "ratio": 3.0...
__author__ = 'sulantha' import glob, subprocess, re from Utils.DbUtils import DbUtils import os from distutils import file_util, dir_util import shutil DBClient = DbUtils() IID_list = ['45WL3UA1MPRAGEv0020111115xDICOM'] for iid in IID_list: getDataFolderSQL = "SELECT RAW_FOLDER FROM Sorting WHERE I_IDENTIFIER = '{...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Utils/PurgeDataByIID.py", "copies": "1", "size": "2552", "license": "apache-2.0", "hash": -1593495921361936100, "line_mean": 37.1044776119, "line_max": 127, "alpha_frac": 0.6504702194, "autogenerated": false, "ratio": 3.0673076923076925, ...
__author__ = 'sulantha' import glob, subprocess, re from Utils.DbUtils import DbUtils import os from distutils import file_util, dir_util import shutil DBClient = DbUtils() def recurseBeastFolder(): fileList = [] for name in glob.glob('/data/data03/ADNI/BEAST/adni_*/t1/beast/*'): mainFolder = name ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Utils/addOldBeastFiles.py", "copies": "1", "size": "5075", "license": "apache-2.0", "hash": 5282620139240241000, "line_mean": 41.6470588235, "line_max": 268, "alpha_frac": 0.5972413793, "autogenerated": false, "ratio": 3.2160963244613434,...
__author__ = 'sulantha' import glob, subprocess, re from Utils.DbUtils import DbUtils import os from distutils import file_util, dir_util import shutil DBClient = DbUtils() getAllTodoSQL = "SELECT XFM_NAME FROM Coregistration WHERE END = 0 AND SKIP = 0 AND START = 0 AND PET_SCANTYPE = 'AV45'" res = DBClient.executeAl...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Utils/FixRedoingCoregs.py", "copies": "1", "size": "1241", "license": "apache-2.0", "hash": -6220745232104206000, "line_mean": 30.05, "line_max": 120, "alpha_frac": 0.64544722, "autogenerated": false, "ratio": 2.872685185185185, "config...
__author__ = 'Sulantha' import math from matplotlib import pyplot as plt from sklearn.metrics import auc from Python.RUSRandomForest import Config import numpy def getOptimalOparatingPoint(fpr, tpr, th): distanceList = numpy.sqrt(numpy.power(fpr, 2) + numpy.power(tpr - 1, 2)) minIdx = numpy.argmin(distanceLis...
{ "repo_name": "sulantha2006/Conversion", "path": "Python/RUSRandomForest/plotROCFromFile.py", "copies": "1", "size": "2544", "license": "mit", "hash": -8426556223427367000, "line_mean": 47.9230769231, "line_max": 119, "alpha_frac": 0.6187106918, "autogenerated": false, "ratio": 2.8266666666666667...
__author__ = 'Sulantha' import numpy from sklearn.ensemble import RandomForestClassifier from sklearn import cross_validation from sklearn.metrics import confusion_matrix class RUSRandomForestClassifier: def __init__(self, n_Forests=100, n_TreesInForest=200): self.__n_Forests = n_Forests self.__n...
{ "repo_name": "sulantha2006/Conversion", "path": "Python/RUSRandomForest/RUSRandomForestClassifier.py", "copies": "1", "size": "4581", "license": "mit", "hash": 7355550064518408000, "line_mean": 45.2727272727, "line_max": 126, "alpha_frac": 0.6347958961, "autogenerated": false, "ratio": 3.5319969...
__author__ = 'Sulantha' import numpy import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn import cross_validation from sklearn.metrics import confusion_matrix class RegularizedLogisticLearner: def __init__(self): pass def trainLogisticRegreion(self): pass def m...
{ "repo_name": "sulantha2006/Conversion", "path": "Python/RegularizedLogistic/runRegLogisticRegression.py", "copies": "1", "size": "1911", "license": "mit", "hash": -6465320527887154000, "line_mean": 30.85, "line_max": 103, "alpha_frac": 0.6452119309, "autogenerated": false, "ratio": 2.90425531914...
__author__ = 'sulantha' import os defaultT1config = "{'n3Dist':'75', 'headHeight':'150'}" defaultAV45config = "{'blur':'8'}" defaultAV1451config = "{'blur':'8'}" defaultFDGconfig = "{'blur':'8'}" defaultFMRIconfig = "{'nu_correct':'-75', 'fwhm_smoothing':'6'}" # For Fmri niak_location = '/data/data01/wang/references/...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Config/PipelineConfig.py", "copies": "1", "size": "5681", "license": "apache-2.0", "hash": -5859519372192091000, "line_mean": 52.5943396226, "line_max": 116, "alpha_frac": 0.4536173209, "autogenerated": false, "ratio": 2.527135231316726, ...
__author__ = 'sulantha' import os from Utils.DbUtils import DbUtils import glob DBClient = DbUtils() outLines = [] count = 0 with open('/data/data02/sulantha/VBM_FDG/FDG_FULLPAT', 'r') as file: for line in file: row = line.split('/') rid = row[6] dirname = os.path.dirname(line) na...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Test/getCIVETForPETFile.py", "copies": "1", "size": "1067", "license": "apache-2.0", "hash": -8315244488697230000, "line_mean": 31.3636363636, "line_max": 153, "alpha_frac": 0.5838800375, "autogenerated": false, "ratio": 2.75, "config_t...
__author__ = 'Sulantha' import pandas as pd from matplotlib import pyplot as plt from sklearn.metrics import roc_curve, auc, confusion_matrix from Python.RUSRandomForest import RUSRandomForestClassifier import pickle mci_df = pd.read_csv('../../Classification_Table.csv', delimiter=',') mci_df = mci_df.drop('ID', axis=...
{ "repo_name": "sulantha2006/Conversion", "path": "Python/RUSRandomForest/runRUSRFC.py", "copies": "1", "size": "1610", "license": "mit", "hash": -8376649351377917000, "line_mean": 35.6136363636, "line_max": 132, "alpha_frac": 0.7149068323, "autogenerated": false, "ratio": 2.6611570247933884, "c...
__author__ = 'sulantha' import pandas as pd import numpy from matplotlib import pyplot as plt from sklearn.metrics import roc_curve, auc, confusion_matrix from Python.RUSRandomForest import RUSRandomForestClassifier from Python.RUSRandomForest import Config from multiprocessing import Pool def writeSensAndSpec(fpr, t...
{ "repo_name": "sulantha2006/Conversion", "path": "Python/RUSRandomForest/runClassificationHAI2016.py", "copies": "1", "size": "5995", "license": "mit", "hash": 8149228545522582000, "line_mean": 46.2047244094, "line_max": 175, "alpha_frac": 0.6483736447, "autogenerated": false, "ratio": 3.09979317...
__author__ = 'sulantha' import subprocess import os import fnmatch import distutils.dir_util import distutils.file_util import shutil import glob from Utils.PipelineLogger import PipelineLogger class ADNI_V1_PET: def __init__(self): pass def convert_nii(self, convertionObj): rawFile = '{0}/*....
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Converters/ConversionScripts/ADNI_V1_PET.py", "copies": "1", "size": "18439", "license": "apache-2.0", "hash": -7222108393060974000, "line_mean": 68.5811320755, "line_max": 237, "alpha_frac": 0.4706871305, "autogenerated": false, "ratio":...
__author__ = 'sulantha' import threading import socket from Utils.PipelineLogger import PipelineLogger import datetime from Manager.QSubJob import QSubJob from Manager.QSubJobStatusReporter import QSubJobStatusReporter class QSubJobHandler(threading.Thread): submittedJobs = {'xxxx':QSubJob('xxxx', '23:59:59', None...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/QSubJobHanlder.py", "copies": "1", "size": "3930", "license": "apache-2.0", "hash": -7622021321602278000, "line_mean": 45.7857142857, "line_max": 153, "alpha_frac": 0.5541984733, "autogenerated": false, "ratio": 4.051546391752577,...
__author__ = 'Sulantha' AllowedStudyList = ['ADNI', 'ADNI_OLD', 'DIAN'] AllowedStepsList = ['Sort', 'Move', 'T1Beast', 'T1Process', 'ProcessAV45', 'ProcessFDG', 'ProcessFMRI', 'ProcessDTI', 'ProcessAV1451'] AllowedVersions = ['V1', 'V2', 'V3'] AllowedModalityList = ['T1', 'AV45', 'FDG', 'FMRI', 'BLUFF', 'AV1451', 'PIB...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Config/StudyConfig.py", "copies": "1", "size": "5428", "license": "apache-2.0", "hash": 1051732403233809900, "line_mean": 57.3655913978, "line_max": 134, "alpha_frac": 0.2584745763, "autogenerated": false, "ratio": 4.197989172467131, "c...
__author__ = 'sulantha' class ConversionObject: def __init__(self, values): self.record_id = 0 if 'record_id' not in values else values['record_id'] self.study = values['study'] self.rid = values['rid'] self.scan_type = values['scan_type'] self.scan_date = values['scan_date'...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/SQLTables/ConversionObject.py", "copies": "1", "size": "1693", "license": "apache-2.0", "hash": 3094335593315558000, "line_mean": 44.7837837838, "line_max": 107, "alpha_frac": 0.5451860602, "autogenerated": false, "ratio": 3.66450...
__author__ = 'sulantha' class ProcessingObject: def __init__(self, values): self.record_id = 0 if 'record_id' not in values else values['record_id'] self.study = values['study'] self.rid = values['rid'] self.modality = values['modality'] self.scan_date = values['scan_date'] ...
{ "repo_name": "sulantha2006/Processing_Pipeline", "path": "Manager/SQLTables/ProcessingObject.py", "copies": "1", "size": "1463", "license": "apache-2.0", "hash": 4677492442566853000, "line_mean": 44.71875, "line_max": 112, "alpha_frac": 0.5543403964, "autogenerated": false, "ratio": 3.6212871287...