text
stringlengths
0
1.05M
meta
dict
from copy import deepcopy import numpy as np from scipy import linalg from ..io.constants import FIFF from ..io.pick import pick_channels from ..utils import logger, verbose, _check_option from ..forward import convert_forward_solution from ..evoked import EvokedArray from ..source_estimate import SourceEstimate fro...
{ "repo_name": "adykstra/mne-python", "path": "mne/minimum_norm/psf_ctf.py", "copies": "2", "size": "17562", "license": "bsd-3-clause", "hash": 3457780827239807000, "line_mean": 42.5781637717, "line_max": 79, "alpha_frac": 0.6104657784, "autogenerated": false, "ratio": 4.105189340813464, "config...
from copy import deepcopy import numpy as np from scipy import linalg from ..io.constants import FIFF from ..io.pick import pick_channels from ..utils import logger, verbose from ..forward import convert_forward_solution from ..evoked import EvokedArray from ..source_estimate import SourceEstimate from .inverse impo...
{ "repo_name": "teonlamont/mne-python", "path": "mne/minimum_norm/psf_ctf.py", "copies": "3", "size": "17971", "license": "bsd-3-clause", "hash": -1257241153464178700, "line_mean": 42.9388753056, "line_max": 79, "alpha_frac": 0.6105948473, "autogenerated": false, "ratio": 4.111416151910318, "con...
from copy import deepcopy import numpy as np from scipy import linalg from ..io.pick import pick_channels from ..utils import logger, verbose from ..forward import convert_forward_solution from ..evoked import EvokedArray from ..source_estimate import SourceEstimate from .inverse import _subject_from_inverse from . ...
{ "repo_name": "jaeilepp/mne-python", "path": "mne/minimum_norm/psf_ctf.py", "copies": "3", "size": "19080", "license": "bsd-3-clause", "hash": 7626367846426852000, "line_mean": 42.5616438356, "line_max": 79, "alpha_frac": 0.6131027254, "autogenerated": false, "ratio": 4.16775884665793, "config_...
from copy import deepcopy import numpy as np from scipy import linalg from ..utils import logger, verbose from ..io.constants import FIFF from ..evoked import EvokedArray from ..source_estimate import SourceEstimate from .inverse import _subject_from_inverse from . import apply_inverse @verbose def point_spread_fu...
{ "repo_name": "effigies/mne-python", "path": "mne/minimum_norm/psf_ctf.py", "copies": "3", "size": "18884", "license": "bsd-3-clause", "hash": -2646664424271442000, "line_mean": 42.8143851508, "line_max": 82, "alpha_frac": 0.6148061851, "autogenerated": false, "ratio": 4.145773874862789, "confi...
__author__ = 'SolarLune' from bge import logic import mathutils from . import window ML_LOCK_NONE = 0 # Constants for mouse-look axis locking ML_LOCK_X = 1 ML_LOCK_Y = 2 # TODO: Add axis setting to allow for joystick analog controlled mouse-look def mouse_look(obj=None, accel_speed=1.0, max_speed=45.0, frictio...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/game.py", "copies": "1", "size": "1538", "license": "mit", "hash": 5841046342113981000, "line_mean": 21.9552238806, "line_max": 97, "alpha_frac": 0.5617685306, "autogenerated": false, "ratio": 3.251585623678647, "config_test": false, "h...
__author__ = 'SolarLune' from bge import logic LT_POINT = 0 LT_SPOT = 1 LT_SUN = 2 LT_HEMI = 3 class LightManager(): """ A class for managing lights. The Poll() function looks through the scene to find objects that have a property named "DynLightNode", which indicates spots where lights should be ...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/light.py", "copies": "1", "size": "7425", "license": "mit", "hash": 4239142075115212300, "line_mean": 31.7092511013, "line_max": 165, "alpha_frac": 0.5552861953, "autogenerated": false, "ratio": 4.077429983525535, "config_test": false, ...
__author__ = 'SolarLune' from bge import logic, render, events def get_aspect_ratio(width_first=True): """ Returns the aspect ratio of the game window, or the window's width / the window's height. If width_first is True (default), then it will return the window's height / the window's width. :param w...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/window.py", "copies": "1", "size": "2035", "license": "mit", "hash": 1254596026680268800, "line_mean": 31.8387096774, "line_max": 117, "alpha_frac": 0.6658476658, "autogenerated": false, "ratio": 3.754612546125461, "config_test": false, ...
__author__ = 'SolarLune' from bge import logic, render import math,time # Nodemaps for game space navigation. class Node(): def __init__(self, obj): self.obj = obj self.obj['nm_node'] = self # Place yourself in the "owner" game object self.position = self.obj.worldPosition ...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/nodemap.py", "copies": "1", "size": "6836", "license": "mit", "hash": 2832403727357382700, "line_mean": 21.5643564356, "line_max": 142, "alpha_frac": 0.5421299005, "autogenerated": false, "ratio": 3.862146892655367, "config_test": false, ...
__author__ = 'SolarLune' from bge import logic, types class Trail(): def __init__(self, stretch=True, spacing=3, reverse=False, vertex_axis="y", update_on_moving_only=False, trail_target_obj=None, trail_obj=None): """ Creates a Trail object. Trail objects influence the vertices ...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/trail.py", "copies": "1", "size": "7569", "license": "mit", "hash": -9212119118758593000, "line_mean": 39.6935483871, "line_max": 120, "alpha_frac": 0.60073986, "autogenerated": false, "ratio": 4.021785334750266, "config_test": false, "...
__author__ = 'SolarLune' import collections import bge class CViewManager(): """ A static class that you don't have to instantiate to use. """ AH_NONE = 0 AH_VERTICAL = 1 # Increases from first camera added at top to last camera added at bottom AH_VERTICAL_REVERSED = 2 # Goes the other w...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/viewport.py", "copies": "1", "size": "4114", "license": "mit", "hash": -8531942006151486000, "line_mean": 29.4814814815, "line_max": 116, "alpha_frac": 0.5199319397, "autogenerated": false, "ratio": 3.5192472198460223, "config_test": fals...
__author__ = 'SolarLune' import math import time import collections import operator from bge import logic, constraints, types, render import mathutils from .math import sign lib_new_counter = 0 # Helper classes class Polygon(): def __init__(self, polygon): self.poly_data = polygon self.vert...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/mesh.py", "copies": "1", "size": "19438", "license": "mit", "hash": -5553498407615670000, "line_mean": 28.7217125382, "line_max": 131, "alpha_frac": 0.5892581541, "autogenerated": false, "ratio": 3.7546841800270427, "config_test": false, ...
__author__ = 'SolarLune' import math from bge import logic # input constants KEY = 0 # Different input types; Keyboard key JOYBUTTON = 1 # Joystick button JOYHAT = 2 # Joystick hat (D-Pad on a lot of controllers) JOYAXIS = 3 # Joystick axes (sticks and triggers on a 360 controller) MOUSEAXIS = 4 # Mouse moveme...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/input.py", "copies": "1", "size": "12359", "license": "mit", "hash": -7467391450120153000, "line_mean": 25.1289640592, "line_max": 140, "alpha_frac": 0.5917954527, "autogenerated": false, "ratio": 3.798094652735095, "config_test": false, ...
__author__ = 'SolarLune' import math from bge import logic class _spritemap_base(): def __init__(self, obj): """ Creates a SpriteMap to animate an object by. :param obj: KX_GameObject - Sprite object to perform operations on :return: _spritemap_base """ self.o...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/sprites.py", "copies": "1", "size": "13485", "license": "mit", "hash": 3176800452024564000, "line_mean": 29.7175398633, "line_max": 120, "alpha_frac": 0.5687059696, "autogenerated": false, "ratio": 3.997924696116217, "config_test": false,...
__author__ = 'SolarLune' import mathutils from bge import logic, render def lerp(a, b, scalar): """Lerp - Linearly interpolates between 'a' when 'scalar' is 0 and 'b' when 'scalar' is 1. a = number or Vector b = number or Vector scaler = number between 0 and 1 """ return (a + scalar * (b...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/math.py", "copies": "1", "size": "7626", "license": "mit", "hash": -6687717748885803000, "line_mean": 31.594017094, "line_max": 152, "alpha_frac": 0.6258851298, "autogenerated": false, "ratio": 3.795918367346939, "config_test": false, "...
__author__ = 'SolarLune' import os import random import aud from bge import logic class AudioDevice(): BGM_STATUS_STOPPED = 0 BGM_STATUS_FADING_IN = 1 BGM_STATUS_PLAYING = 2 BGM_STATUS_FADING_OUT = 3 def __init__(self, sound_folder='//assets/snd/'): self.device = aud.device() ...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/audio.py", "copies": "1", "size": "4013", "license": "mit", "hash": -6715722711832264000, "line_mean": 24.4050632911, "line_max": 97, "alpha_frac": 0.5193122352, "autogenerated": false, "ratio": 3.441680960548885, "config_test": false, ...
__author__ = 'SolarLune' import sys from bge import logic class Scenes: def __str__(self): return str(logic.getSceneList()) def __len__(self): return len(logic.getSceneList()) def __iter__(self): return iter(logic.getSceneList()) def __contains__(self, key): if isi...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/api.py", "copies": "1", "size": "6090", "license": "mit", "hash": -4133337015903561700, "line_mean": 30.7239583333, "line_max": 152, "alpha_frac": 0.6085385878, "autogenerated": false, "ratio": 4.120433017591339, "config_test": false, "...
__author__ = 'SolarLune' # Random level generation module. # TODO: Add rectangular rooms to the GenNodes room styles. import random import math import copy from bge import logic import mathutils from .mesh import get_dimensions from .math import clamp # CONSTANTS # Connection styles for the GenNodes function; GN...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/rlg.py", "copies": "1", "size": "29884", "license": "mit", "hash": 3442336741467101700, "line_mean": 32.4272930649, "line_max": 152, "alpha_frac": 0.5291460313, "autogenerated": false, "ratio": 3.876005188067445, "config_test": false, "...
__author__ = 'SolarLune' # This is a library of 2D filters that either # 1) I made, or # 2) I Adapted from other scripts (I don't think any were direct copies, just re-adaptation. If I am wrong, though, # please point it out to me). # # Hopefully someone can use them. # As a note to myself, the 2D filter system in th...
{ "repo_name": "SolarLune/SolHelp", "path": "BGE/bghelper/filters.py", "copies": "1", "size": "84463", "license": "mit", "hash": -7185492720833701000, "line_mean": 41.0009945301, "line_max": 230, "alpha_frac": 0.5677752389, "autogenerated": false, "ratio": 3.161750393052332, "config_test": false...
from __future__ import print_function import argparse try: from collections import OrderedDict except: from ordereddict import OrderedDict import json import os import traceback from time import time import logging from jinja2 import Template import numpy as np import matplotlib.pyplot as plt # imports for m...
{ "repo_name": "numfocus/python-benchmarks", "path": "run_benchmarks.py", "copies": "1", "size": "12930", "license": "mit", "hash": 4566370429309599000, "line_mean": 34.4246575342, "line_max": 84, "alpha_frac": 0.5662026295, "autogenerated": false, "ratio": 3.9517114914425426, "config_test": fal...
from sys import version_info import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.exceptions import ConvergenceWarning from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal ...
{ "repo_name": "waterponey/scikit-learn", "path": "sklearn/linear_model/tests/test_coordinate_descent.py", "copies": "1", "size": "28883", "license": "bsd-3-clause", "hash": 7761960668239689000, "line_mean": 37.4082446809, "line_max": 79, "alpha_frac": 0.6210573694, "autogenerated": false, "ratio"...
from sys import version_info import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal fro...
{ "repo_name": "RPGOne/Skynet", "path": "scikit-learn-0.18.1/sklearn/linear_model/tests/test_coordinate_descent.py", "copies": "5", "size": "28669", "license": "bsd-3-clause", "hash": -6725876812057270000, "line_mean": 37.3788487282, "line_max": 79, "alpha_frac": 0.6202169591, "autogenerated": false...
import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.exceptions import ConvergenceWarning from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing imp...
{ "repo_name": "aflaxman/scikit-learn", "path": "sklearn/linear_model/tests/test_coordinate_descent.py", "copies": "21", "size": "30080", "license": "bsd-3-clause", "hash": -8347457253142707000, "line_mean": 37.5641025641, "line_max": 79, "alpha_frac": 0.6183510638, "autogenerated": false, "ratio"...
import numpy as np import pytest from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.exceptions import ConvergenceWarning from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.uti...
{ "repo_name": "BiaDarkia/scikit-learn", "path": "sklearn/linear_model/tests/test_coordinate_descent.py", "copies": "5", "size": "30882", "license": "bsd-3-clause", "hash": -5927743042237156000, "line_mean": 37.0789149199, "line_max": 79, "alpha_frac": 0.6186451655, "autogenerated": false, "ratio"...
import warnings from sys import version_info import numpy as np from scipy import interpolate from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import SkipTest from sklearn.utils....
{ "repo_name": "rsivapr/scikit-learn", "path": "sklearn/linear_model/tests/test_coordinate_descent.py", "copies": "2", "size": "11993", "license": "bsd-3-clause", "hash": 2056348480227364600, "line_mean": 34.3775811209, "line_max": 78, "alpha_frac": 0.6077711999, "autogenerated": false, "ratio": 3...
import numpy as np from scipy import sparse from scipy import linalg from scipy import stats from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn...
{ "repo_name": "Sklearn-HMM/scikit-learn-HMM", "path": "sklean-hmm/utils/tests/test_extmath.py", "copies": "3", "size": "13048", "license": "bsd-3-clause", "hash": -4459053539787982000, "line_mean": 33.1570680628, "line_max": 79, "alpha_frac": 0.5951103617, "autogenerated": false, "ratio": 3.26608...
import numpy as np from scipy import sparse from scipy import linalg from scipy import stats from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklear...
{ "repo_name": "asnorkin/sentiment_analysis", "path": "site/lib/python2.7/site-packages/sklearn/utils/tests/test_extmath.py", "copies": "5", "size": "24372", "license": "mit", "hash": 8451973270393908000, "line_mean": 35.9272727273, "line_max": 90, "alpha_frac": 0.5938782209, "autogenerated": false,...
__author__ = 'Somebody' # -*- coding: utf-8 -*- __date__ = "05/ 04 / 2015" import csv class LectureCSV: def __init__(self, fichier): """ :param fichier: le nom du fichier csv à importer """ self.fichier = fichier def importation(self): chars = [] """ ...
{ "repo_name": "masterchef8/hopfield", "path": "LectureCSV.py", "copies": "1", "size": "1070", "license": "mit", "hash": 3055309968456556000, "line_mean": 21.6595744681, "line_max": 93, "alpha_frac": 0.503286385, "autogenerated": false, "ratio": 3.858695652173913, "config_test": false, "has_no...
__author__ = 'Somebody' import numpy as np def myfun(x, binary=True): """ fonction de seuillage si > theta : 1 si < theta : min sinon theta """ if binary: _min, _theta = 0, .5 else: _min, _theta = -1, 0 if x > _theta: return 1 if x == _theta: return _theta r...
{ "repo_name": "masterchef8/hopfield", "path": "mmc.py", "copies": "1", "size": "9544", "license": "mit", "hash": -323965478375119170, "line_mean": 27.505988024, "line_max": 112, "alpha_frac": 0.4406049785, "autogenerated": false, "ratio": 2.441908181585022, "config_test": false, "has_no_keywo...
__author__ = 'sondredyvik' from common import astar from collections import deque from heapq import heappush, heappop class Astarmod1(astar.Astar): def __init__(self, type, boardobject): self.type = type self.board = boardobject super(Astarmod1, self).__init__() def arc_cost(self, c...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/module1/astarmod1.py", "copies": "1", "size": "1396", "license": "mit", "hash": -2896524007014115000, "line_mean": 28.7234042553, "line_max": 62, "alpha_frac": 0.611747851, "autogenerated": false, "ratio": 3.899441340782123, "confi...
__author__ = 'sondredyvik' from common import state import copy class CspState(state.State): def __init__(self, domains): self.domains = domains super(CspState, self).__init__() #If the domain of any variable is zero, it is a contradictory state def check_if_contradictory(self): ...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/module2/cspstate.py", "copies": "1", "size": "2412", "license": "mit", "hash": 2968319589540557000, "line_mean": 33.9565217391, "line_max": 109, "alpha_frac": 0.5762852405, "autogenerated": false, "ratio": 4.0066445182724255, "conf...
__author__ = 'sondredyvik' from common import state class StateMod1(state.State): ##The methods in this document have names that explain them def __init__(self, xpos, ypos, board, parent): self.board = board self.dimensions = board.dimensions self.xpos = xpos self.ypos = ypos ...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/module1/StateMod1.py", "copies": "1", "size": "1887", "license": "mit", "hash": -1328366692644060400, "line_mean": 33.962962963, "line_max": 100, "alpha_frac": 0.5771065183, "autogenerated": false, "ratio": 3.1502504173622703, "con...
__author__ = 'sondredyvik' from heapq import heappop, heappush class State(object): def __init__(self): # Initialises the searchstate. It has to know about board to calculate neighbours self.h = float('inf') self.g = float('inf') self.nodes_created = 0 self.children = [] ...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/common/state.py", "copies": "1", "size": "1468", "license": "mit", "hash": -7022553648739761000, "line_mean": 27.8039215686, "line_max": 106, "alpha_frac": 0.6117166213, "autogenerated": false, "ratio": 3.935656836461126, "config_t...
__author__ = 'sondredyvik' from Tkinter import * from tkFileDialog import askopenfilename from nonogram import NonoAstarGac import cProfile class Gui: def __init__(self, parent,width=800, height=800 ): self.width = width self.height = height self.parent = Frame(parent, width =self.width, h...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/module3/gui.py", "copies": "1", "size": "4806", "license": "mit", "hash": -3608403185193451500, "line_mean": 42.2972972973, "line_max": 119, "alpha_frac": 0.5977944236, "autogenerated": false, "ratio": 3.445161290322581, "config_te...
__author__ = 'sondredyvik' from Tkinter import * from tkFileDialog import askopenfilename from gac import GAC from common import constraint as cspconstraint from common import constraintnet import variable as cspvariable import astarmod2 import time import cProfile class csp_gui: def __init__(self, parent): ...
{ "repo_name": "pmitche/it3105-aiprogramming", "path": "project1/module2/csp_gui.py", "copies": "1", "size": "7966", "license": "mit", "hash": -6789642456005787000, "line_mean": 41.8279569892, "line_max": 138, "alpha_frac": 0.6112226965, "autogenerated": false, "ratio": 3.3811544991511036, "conf...
__author__ = 'soobash' import os,sys from skimage import io from skimage import measure import numpy as np ### define functions ###################### # incomplete, have to be written in full def universal_quality_index(P,Q): block_size = 8 P = int (P) Q = int (Q) N = block_size**2 s= (N,N) ...
{ "repo_name": "JeromeRisselin/PRJ-medtec_sigproc", "path": "echopen-leaderboard/bootcamp/leaderboard/metrics.py", "copies": "5", "size": "3627", "license": "mit", "hash": 1464394338207511000, "line_mean": 24.7234042553, "line_max": 84, "alpha_frac": 0.5329473394, "autogenerated": false, "ratio": ...
'''Author: Sourabh Bajaj''' import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages setup( name='QSTK', version='0.2.8', author='Sourabh Bajaj', packages=find_packages(), namespace_packages=['QSTK'], include_package_data=True, long_description=open('README.md')...
{ "repo_name": "wogsland/QSTK", "path": "setup.py", "copies": "3", "size": "1344", "license": "bsd-3-clause", "hash": 4640457079178201000, "line_mean": 31.7804878049, "line_max": 64, "alpha_frac": 0.5944940476, "autogenerated": false, "ratio": 3.652173913043478, "config_test": false, "has_no_k...
__author__ = 'sourabhdesai' import nltk import json import re from nltk.corpus import stopwords # nltk.download() def lowercase(tokens): return [w.lower() for w in tokens] #change to lower case def removeStopWords(tokens): return [ word for word in tokens if word not in stopwords.words('english') ] def remov...
{ "repo_name": "sourabhdesai/CS-398-VL-MP1", "path": "book_nlp.py", "copies": "1", "size": "1293", "license": "mit", "hash": 9055920202713293000, "line_mean": 32.1794871795, "line_max": 98, "alpha_frac": 0.6798143852, "autogenerated": false, "ratio": 3.0639810426540284, "config_test": false, "...
__author__ = 'Spasley' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): # open groups page wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): ...
{ "repo_name": "Spasley/python", "path": "fixture/group.py", "copies": "1", "size": "3809", "license": "apache-2.0", "hash": 8787744071381417000, "line_mean": 31.8448275862, "line_max": 100, "alpha_frac": 0.5886059333, "autogenerated": false, "ratio": 3.391807658058771, "config_test": false, "...
__author__ = 'Spasley' from model.recordfields import RecordFields import random def test_record_del(app, db, check_ui): if len(db.get_record_list()) == 0: app.record.filling_form(RecordFields(firstname='Test')) old_records = db.get_record_list() record = random.choice(old_records) record_inde...
{ "repo_name": "Spasley/python", "path": "test/test_modify_record.py", "copies": "1", "size": "1600", "license": "apache-2.0", "hash": -3457357190002987000, "line_mean": 63.04, "line_max": 134, "alpha_frac": 0.556875, "autogenerated": false, "ratio": 3.6281179138321997, "config_test": false, "...
__author__ = 'Spasley' from model.recordfields import RecordFields import re from selenium.webdriver.support.select import Select import random from random import randrange class RecordHelper: def __init__(self, app): self.app = app def open_records_page(self): # open records page wd...
{ "repo_name": "Spasley/python", "path": "fixture/record.py", "copies": "1", "size": "9260", "license": "apache-2.0", "hash": -4021511362470668300, "line_mean": 42.4741784038, "line_max": 116, "alpha_frac": 0.6166306695, "autogenerated": false, "ratio": 3.409425625920471, "config_test": false, ...
__author__ = 'Spasley' from sys import maxsize class RecordFields: def __init__(self, firstname=None, lastname=None, middlename=None, nickname=None, title=None, company=None, address=None, address2=None, home=None, mobile=None, work=None, fax=None, homepage=None, phone2=None, no...
{ "repo_name": "Spasley/python", "path": "model/recordfields.py", "copies": "1", "size": "1865", "license": "apache-2.0", "hash": -8435667842889479000, "line_mean": 35.5882352941, "line_max": 140, "alpha_frac": 0.6, "autogenerated": false, "ratio": 3.607350096711799, "config_test": false, "has...
__author__ = 'Spasley' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): # login wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() w...
{ "repo_name": "Spasley/python", "path": "fixture/session.py", "copies": "1", "size": "1453", "license": "apache-2.0", "hash": -4873294602825145000, "line_mean": 28.6734693878, "line_max": 75, "alpha_frac": 0.557467309, "autogenerated": false, "ratio": 3.386946386946387, "config_test": false, ...
__authors__ = 'Pat and Tony' import random import Player import Message class PBATPlayer(Player.Player): # self variables player_list = [] rock_cut = .3 paper_cut = .6 total = 10 name = None # finds a player and his information def find_player(self, person): found_player = Fa...
{ "repo_name": "geebzter/game-framework", "path": "PBATPlayer.py", "copies": "1", "size": "3439", "license": "apache-2.0", "hash": -1772350514542904000, "line_mean": 28.4017094017, "line_max": 90, "alpha_frac": 0.5644082582, "autogenerated": false, "ratio": 3.682012847965739, "config_test": fals...
import requests, json, math, os, sys import numpy import cv2 from scipy.spatial import Delaunay from PIL import Image import xml.etree.ElementTree as ET import shapely.geometry import shapely.geometry.polygon from common import getStringRangeToArray, getRange, getBoundingBox, remap, remapPoints, remapIPoints, isInBo...
{ "repo_name": "mapzen/terrarium", "path": "data/terrarium.py", "copies": "1", "size": "14113", "license": "mit", "hash": -4161509638660289500, "line_mean": 37.0404312668, "line_max": 117, "alpha_frac": 0.5508396514, "autogenerated": false, "ratio": 3.9632125807357483, "config_test": false, "h...
import csv import sys def hasBottomLeft(row): if int(row[0]) == 1: row.append(1) elif int(row[0]) == 2: row.append(-1) else: row.append(0) def middleThreeColumns(row): p1 = 0 p2 = 0 for piece in range(12,29): if int(row[piece]) == 1: p1 = p...
{ "repo_name": "PatandFioneTakeAI/Weka", "path": "heuristic.py", "copies": "1", "size": "3429", "license": "unlicense", "hash": -7405204160777774000, "line_mean": 27.8235294118, "line_max": 74, "alpha_frac": 0.4983960338, "autogenerated": false, "ratio": 3.6362672322375396, "config_test": false,...
import time from ustruct import unpack, unpack_from from array import array # BME280 default address. BME280_I2CADDR = 0x76 # Operating Modes BME280_OSAMPLE_1 = 1 BME280_OSAMPLE_2 = 2 BME280_OSAMPLE_4 = 3 BME280_OSAMPLE_8 = 4 BME280_OSAMPLE_16 = 5 BME280_REGISTER_CONTROL_HUM = 0xF2 BME280_REGISTER_CONTROL = 0xF4 ...
{ "repo_name": "PinkInk/iocp", "path": "sensor-bh1750-bme280-hygrometer/lib/bme280.py", "copies": "2", "size": "8114", "license": "mit", "hash": 1187223847851717400, "line_mean": 36.5648148148, "line_max": 80, "alpha_frac": 0.5650727138, "autogenerated": false, "ratio": 3.2288101870274573, "conf...
from __future__ import division import warnings from warnings import warn from abc import ABC from abc import abstractmethod import numpy as np from scipy.sparse import issparse from scipy.sparse import hstack as sparse_hstack from ..base import ClassifierMixin, RegressorMixin from .base import BaseEnsemble, _part...
{ "repo_name": "psarka/uplift", "path": "uplift/ensemble/forest.py", "copies": "1", "size": "60915", "license": "bsd-3-clause", "hash": 1097201284932917000, "line_mean": 38.2746615087, "line_max": 93, "alpha_frac": 0.6036772552, "autogenerated": false, "ratio": 4.310125238802802, "config_test": ...
""" First-order ODE integrators. User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: i = 0, ..., len(y0) - 1 class ode --------- A generic ...
{ "repo_name": "minhlongdo/scipy", "path": "scipy/integrate/_ode.py", "copies": "3", "size": "42178", "license": "bsd-3-clause", "hash": 773482070358490900, "line_mean": 33.1799027553, "line_max": 90, "alpha_frac": 0.5433164209, "autogenerated": false, "ratio": 3.671163721820872, "config_test": ...
""" First-order ODE integrators User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: i = 0, ..., len(y0) - 1 class ode --------- A generic i...
{ "repo_name": "stefanv/scipy3", "path": "scipy/integrate/ode.py", "copies": "1", "size": "25739", "license": "bsd-3-clause", "hash": -5441868968838015000, "line_mean": 31.0935162095, "line_max": 93, "alpha_frac": 0.5461362135, "autogenerated": false, "ratio": 3.4820075757575757, "config_test": ...
""" First-order ODE integrators. User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: i = 0, ..., len(y0) - 1 class ode --------- A generic ...
{ "repo_name": "josephcslater/scipy", "path": "scipy/integrate/_ode.py", "copies": "4", "size": "44051", "license": "bsd-3-clause", "hash": 8441206910124214000, "line_mean": 33.3611544462, "line_max": 90, "alpha_frac": 0.544845747, "autogenerated": false, "ratio": 3.7258732978093545, "config_tes...
__author__ = 'Spencer Dodd' # I almost don't want to take credit for this pasta # NOTE: It's spaghetti. God help your soul if you need to debug or maintain this. # to block SeqIO error about it being an experimental module # probably should get a more permanent (and safe) fix import warnings warnings.filterwarnings("...
{ "repo_name": "SpencerDodd/CrossBLAST", "path": "blast_accession.py", "copies": "1", "size": "32910", "license": "mit", "hash": -7326281932975909000, "line_mean": 26.3566084788, "line_max": 202, "alpha_frac": 0.6631419022, "autogenerated": false, "ratio": 3.101206181681116, "config_test": false...
__author__ = 'spersinger' import base64 import time import struct import traceback import pdb from .bit_packing import BitPacking from .configuration import Configuration from .encryption import Encryption from .secret import Secret class Token: class InvalidToken(ValueError): def __init__(self, message):...
{ "repo_name": "heroku/fernet-py", "path": "fernet/token.py", "copies": "1", "size": "5706", "license": "mit", "hash": -8377189836481412000, "line_mean": 32.1744186047, "line_max": 97, "alpha_frac": 0.5937609534, "autogenerated": false, "ratio": 4.116883116883117, "config_test": false, "has_no...
__author__ = 'spersinger' import os try: import M2Crypto from M2Crypto.EVP import Cipher, HMAC except ImportError: # Fall back to pycrypto from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Hash.HMAC import HMAC class Encryption: AES_BLOCK_SIZE = 16 DECODE = 0 ...
{ "repo_name": "heroku/fernet-py", "path": "fernet/encryption.py", "copies": "1", "size": "2468", "license": "mit", "hash": 5633653606298164000, "line_mean": 28.734939759, "line_max": 82, "alpha_frac": 0.6154781199, "autogenerated": false, "ratio": 3.58200290275762, "config_test": false, "has_...
__author__ = 'spersinger' import re import pdb import string import random import os.path from enum import Enum from itertools import imap from functools import partial from datetime import datetime, timedelta # Field types def load_file(name): return [line.rstrip() for line in open(os.path.join(os.path.dirname(_...
{ "repo_name": "heroku/salesforce-utils", "path": "salesforce_utils/data/record_generator.py", "copies": "2", "size": "7765", "license": "mit", "hash": -6296823234920252000, "line_mean": 27.6531365314, "line_max": 107, "alpha_frac": 0.599613651, "autogenerated": false, "ratio": 3.7385652383245067,...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" from abc import ABCMeta, abstractmethod import numpy as np from .sgd_fast import EpsilonInsensitive from .sgd_fast import Hinge from .sgd_fast import Huber from .sgd_fast import Log from .sgd_fast import ModifiedHuber from .sgd_fast import S...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/scikit-learn-master/sklearn/linear_model/stochastic_gradient.py", "copies": "1", "size": "50707", "license": "mit", "hash": 4993240463504691000, "line_mean": 40.0582995951, "line_max": 79, "alpha_frac": 0.5532569468, "autogenerated": fal...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp import warnings from abc import ABCMeta, abstractmethod from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from ..base import BaseEstimator...
{ "repo_name": "ankurankan/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "1", "size": "50480", "license": "bsd-3-clause", "hash": -7876837582741154000, "line_mean": 40.1074918567, "line_max": 85, "alpha_frac": 0.5549722662, "autogenerated": false, "ratio": 4.31932...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod import warnings from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from ..base import BaseEstimator...
{ "repo_name": "Sklearn-HMM/scikit-learn-HMM", "path": "sklean-hmm/linear_model/stochastic_gradient.py", "copies": "3", "size": "42863", "license": "bsd-3-clause", "hash": -6474025814889812000, "line_mean": 39.2469483568, "line_max": 79, "alpha_frac": 0.5630030562, "autogenerated": false, "ratio":...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from ..base import BaseEstimator, RegressorMixin...
{ "repo_name": "chaluemwut/fbserver", "path": "venv/lib/python2.7/site-packages/sklearn/linear_model/stochastic_gradient.py", "copies": "1", "size": "42867", "license": "apache-2.0", "hash": 6050011072785426000, "line_mean": 38.9878731343, "line_max": 79, "alpha_frac": 0.565399958, "autogenerated": ...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import warnings from abc import ABCMeta, abstractmethod from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from .base import make_dataset from ..base import BaseEsti...
{ "repo_name": "raghavrv/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "3", "size": "55145", "license": "bsd-3-clause", "hash": -6046899954372989000, "line_mean": 40.462406015, "line_max": 79, "alpha_frac": 0.5559162209, "autogenerated": false, "ratio": 4.31157154...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import warnings from abc import ABCMeta, abstractmethod from joblib import Parallel, delayed from ..base import clone, is_classifier from ._base import LinearClassifierMixin, SparseCoefMixin from ._base import make_datas...
{ "repo_name": "bnaul/scikit-learn", "path": "sklearn/linear_model/_stochastic_gradient.py", "copies": "2", "size": "65464", "license": "bsd-3-clause", "hash": 2704018222622182400, "line_mean": 40.0690087829, "line_max": 79, "alpha_frac": 0.5907827203, "autogenerated": false, "ratio": 4.2256648592...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import warnings from abc import ABCMeta, abstractmethod from joblib import Parallel from ..base import clone, is_classifier from ._base import LinearClassifierMixin, SparseCoefMixin from ._base import make_dataset from ....
{ "repo_name": "ndingwall/scikit-learn", "path": "sklearn/linear_model/_stochastic_gradient.py", "copies": "2", "size": "65504", "license": "bsd-3-clause", "hash": -6717294397479884000, "line_mean": 40.068338558, "line_max": 79, "alpha_frac": 0.5908188813, "autogenerated": false, "ratio": 4.225519...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import warnings from abc import ABCMeta, abstractmethod from ..utils import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from .base import make_dataset from ..base import BaseEstimator, Regr...
{ "repo_name": "vortex-ape/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "2", "size": "64475", "license": "bsd-3-clause", "hash": -1979827478802195500, "line_mean": 40.3566388711, "line_max": 79, "alpha_frac": 0.5769367972, "autogenerated": false, "ratio": 4.21102...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np from abc import ABCMeta, abstractmethod from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin, SparseCoefMixin from .base import make_dataset from ..base import BaseEstimator, Regressor...
{ "repo_name": "giorgiop/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "20", "size": "51086", "license": "bsd-3-clause", "hash": -5905984327763754000, "line_mean": 40, "line_max": 79, "alpha_frac": 0.5532044004, "autogenerated": false, "ratio": 4.321630995685644, ...
"""Classification, regression and One-Class SVM using Stochastic Gradient Descent (SGD). """ import numpy as np import warnings from abc import ABCMeta, abstractmethod from joblib import Parallel from ..base import clone, is_classifier from ._base import LinearClassifierMixin, SparseCoefMixin from ._base import mak...
{ "repo_name": "kevin-intel/scikit-learn", "path": "sklearn/linear_model/_stochastic_gradient.py", "copies": "2", "size": "82378", "license": "bsd-3-clause", "hash": -7982175830328294000, "line_mean": 39.2629521017, "line_max": 79, "alpha_frac": 0.5859574158, "autogenerated": false, "ratio": 4.222...
"""Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod import warnings from ..externals.joblib import Parallel, delayed from .base import LinearClassifierMixin from ..base import BaseEstimator, RegressorMixin ...
{ "repo_name": "maxlikely/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "1", "size": "39157", "license": "bsd-3-clause", "hash": -7357379114141780000, "line_mean": 37.9621890547, "line_max": 79, "alpha_frac": 0.5612534157, "autogenerated": false, "ratio": 4.219959...
"""Implementation of Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp import warnings from ..externals.joblib import Parallel, delayed from ..base import RegressorMixin from ..base import ClassifierMixin from ..feature_selection.selector_mixin import SelectorMixin from .base import ...
{ "repo_name": "cdegroc/scikit-learn", "path": "sklearn/linear_model/stochastic_gradient.py", "copies": "1", "size": "28259", "license": "bsd-3-clause", "hash": -199644026887212670, "line_mean": 36.3796296296, "line_max": 79, "alpha_frac": 0.5706146714, "autogenerated": false, "ratio": 4.198959881...
__authors__ = 'Petteri Ponsimaa, Ari Kairala' import unittest, os, hashlib import exam_archive import server # Path to the database file, different from the deployment db db_path = 'db/exam_archive_test.db' db = exam_archive.ExamArchiveDatabase(db_path) class BaseTestCase(unittest.TestCase): ''' ...
{ "repo_name": "petterip/exam-archive", "path": "test/database_api_test_common.py", "copies": "1", "size": "1477", "license": "mit", "hash": 3979898260992422400, "line_mean": 30.1086956522, "line_max": 88, "alpha_frac": 0.6283006093, "autogenerated": false, "ratio": 3.949197860962567, "config_te...
''' @author: Sphere ''' import xbmcaddon,xbmcgui,xbmc,os,re,sys,urllib,urllib2 from xbmc import getCondVisibility as condtition,translatePath as translate addon=xbmcaddon.Addon(id='plugin.video.xbmchubmaintenance'); ADDON_TITLE=addon.getAddonInfo('name'); DEBUG=False STRINGS={'do_upload':30000,'upload_id':30001,'up...
{ "repo_name": "aplicatii-romanesti/allinclusive-kodi-pi", "path": ".kodi/addons/plugin.video.xbmchubmaintenance/upload.py", "copies": "1", "size": "6186", "license": "apache-2.0", "hash": 4909086081843018000, "line_mean": 77.3076923077, "line_max": 254, "alpha_frac": 0.653895894, "autogenerated": f...
from SingleFileParser import SingleFileParser from os import listdir from os.path import isfile, join, isdir, splitext, basename parsed_classes = [] parsed_functions = [] using_relations_str = [] lib_headers = [] mypath = "../../include/fertilized" onlysubdirs = ['.'] + [ f for f in listdir(mypath) if isdir(join(mypa...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/ParseHeader.py", "copies": "1", "size": "1701", "license": "bsd-2-clause", "hash": 9012298978733692000, "line_mean": 38.5581395349, "line_max": 82, "alpha_frac": 0.5720164609, "autogenerated": false, "ratio": 3.5961945031712...
from TemplateParameterParser import * from WrappedMethodCreator import * from helper_classes import FertilizedClass, InstantiationTypes, RstDocProvider import CppHeaderParser import sys import os from DoxygenTypeExtractor import DoxygenTypeExtractor class SingleFileParser(object): r""" Parses a cpp header file...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/SingleFileParser.py", "copies": "1", "size": "11211", "license": "bsd-2-clause", "hash": 646379672649598100, "line_mean": 46.5042372881, "line_max": 114, "alpha_frac": 0.5557042191, "autogenerated": false, "ratio": 4.8012847...
from TypeTranslations import _dtype_c_translation, _dtype_str_translation,\ _matlab_cpp_translation, _cpp_matlab_translation from collections import namedtuple import re class Node(object): r""" A very simple node object for the graph based dependency analysis. """ def __init__(self, content):...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/helper_classes.py", "copies": "1", "size": "40650", "license": "bsd-2-clause", "hash": -6332629898298690000, "line_mean": 39.7314629259, "line_max": 200, "alpha_frac": 0.5726937269, "autogenerated": false, "ratio": 4.0443736...
import re from helper_classes import Argument, CppType def PostprocessDefaultValue(defaultValue): if not defaultValue == None: return defaultValue \ .replace("false", "0") \ .replace("true", "1") \ .replace(" ", "") \ .replace("f", "") # 0.1f -> 0...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/ParameterWrapper.py", "copies": "1", "size": "7585", "license": "bsd-2-clause", "hash": 8744962896906734000, "line_mean": 45.5337423313, "line_max": 153, "alpha_frac": 0.5550428477, "autogenerated": false, "ratio": 4.0867456...
import re from helper_classes import CppType, WrappedMethod, Argument, RstDocProvider from ParameterWrapper import ParameterWrapper, parse_raw_type class WrappedMethodCreator(object): """Uses a raw cpp header method (from CppHeaderParser) to create a WrapperMethod object, which is required to generate the m...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/WrappedMethodCreator.py", "copies": "1", "size": "4899", "license": "bsd-2-clause", "hash": -6267216670027406000, "line_mean": 43.1441441441, "line_max": 119, "alpha_frac": 0.5180649112, "autogenerated": false, "ratio": 5.10...
import re from TypeTranslations import _dtype_str_translation from helper_classes import InstantiationTypes class DoxygenTypeExtractor(object): """Extracts types and available interfaces from a doxygen class comment.""" def __init__(self, doxygenComment): self.DoxygenComment = doxygenComment ...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/DoxygenTypeExtractor.py", "copies": "1", "size": "4679", "license": "bsd-2-clause", "hash": -8568160827867649000, "line_mean": 38.6525423729, "line_max": 87, "alpha_frac": 0.577901261, "autogenerated": false, "ratio": 4.6977...
import re class TemplateParameterParser(object): """Parses a template definition of a cpp class into an array of those template parameters""" def __init__(self, filename, line): self.Filename = filename self.LineNo = line def RetrieveTemplateParameters(self): templateParamsStr = N...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/TemplateParameterParser.py", "copies": "1", "size": "1281", "license": "bsd-2-clause", "hash": -704034146320608900, "line_mean": 34.6111111111, "line_max": 96, "alpha_frac": 0.5706479313, "autogenerated": false, "ratio": 4.3...
import jinja2 import os import shutil import collections import operator import itertools import glob import sys import traceback from os.path import basename from helper_classes import InstantiationTypes, Node from TypeTranslations import _dtype_str_translation from ordered_set import OrderedSet BASE_DIR = os.path.j...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/generate.py", "copies": "1", "size": "29116", "license": "bsd-2-clause", "hash": -6848194631837365000, "line_mean": 44.7080062794, "line_max": 165, "alpha_frac": 0.6564088474, "autogenerated": false, "ratio": 3.5377885783718...
__author__ = 'Spiderman' import requests from requests_oauthlib import OAuth1 from random import randint from time import sleep from sys import argv, exc_clear, exc_info #If you want my Twitter OAuth key, shoot me an email at suckmyspiderdick@gmail.com authkey = OAuth1('') previousTrend = 'goddamnit python'...
{ "repo_name": "SUCKMYSPIDERDICK/SUCKMYSPIDERDIC-Twitter-Bot", "path": "twitter_bot.py", "copies": "1", "size": "2115", "license": "mit", "hash": 6973741424008134000, "line_mean": 33.25, "line_max": 129, "alpha_frac": 0.6671394799, "autogenerated": false, "ratio": 3.253846153846154, "config_test...
__author__ = 'spousty aka TheSteve0' import csv infile_txt = '/home/spousty/data/MOLW/bird/BasicData/ebd_US-CA-087_prv_relNov-2016/ebd_US-CA-087_prv_relNov-2016.txt' outfile = open('./all_obs.sql', 'w') first_sql = '''INSERT INTO public.birdobs(global_unique_identifier, taxonomic_order, category,common_name, scientif...
{ "repo_name": "molw/ScriptsAndDDL", "path": "dbwork/ebird/scripts_orig_data/translator.py", "copies": "1", "size": "3513", "license": "apache-2.0", "hash": -7768959097908265000, "line_mean": 42.925, "line_max": 140, "alpha_frac": 0.6501565613, "autogenerated": false, "ratio": 3.381135707410972, ...
__author__ = 'spousty aka TheSteve0' import csv infile_txt = '/home/spousty/data/MOLW/marine/859583.csv' outfile = open('./all_obs.sql', 'w') fields_in_order = ['identification', 'location', 'time_of_observation', 'sea_level_pressure', \ 'characteristics_of_pressure_tendency', 'pressure_tendency', 'air_temperature',...
{ "repo_name": "molw/ScriptsAndDDL", "path": "dbwork/marine/scripts_orig_data/translator.py", "copies": "1", "size": "3143", "license": "apache-2.0", "hash": 3132758659000657000, "line_mean": 35.1379310345, "line_max": 120, "alpha_frac": 0.6261533567, "autogenerated": false, "ratio": 3.25362318840...
__author__ = 'spousty' import psycopg2 from bottle import route, run, get, DEBUG import os @route('/') def index(): return "<h1> hello OpenShift Ninja without DB</h1>" # since this is a read only talk to the replicas @get('/db') def dbexample(): try: conn = psycopg2.connect(database=os.environ.get(...
{ "repo_name": "thesteve0/v3simple-spatial", "path": "2_app.py", "copies": "1", "size": "1114", "license": "apache-2.0", "hash": -8203884455535503000, "line_mean": 28.3157894737, "line_max": 116, "alpha_frac": 0.6068222621, "autogenerated": false, "ratio": 3.164772727272727, "config_test": false...
__author__ = 'spousty' import psycopg2 from bottle import route, run, get, post, DEBUG import os import random from random_words import RandomWords @route('/') def index(): return "<h1>Hello OpenShift Ninja without a DB!</h1>" # since this is a read only talk to the replicas @get('/db') def dbexample(): tr...
{ "repo_name": "thesteve0/v3simple-spatial", "path": "app.py", "copies": "1", "size": "2521", "license": "apache-2.0", "hash": -3752425116580868600, "line_mean": 31.7402597403, "line_max": 116, "alpha_frac": 0.606505355, "autogenerated": false, "ratio": 3.286831812255541, "config_test": false, ...
__author__ = 'spousty' import psycopg2 from bottle import route, run, get, static_file, DEBUG import os,json @route('/') def index(): return static_file("index.html", root='./') @get('/ws/zips') def getzips(): results = [] try: conn = psycopg2.connect(database=os.environ.get('POSTGRES_DB'), u...
{ "repo_name": "thesteve0/awsdemo", "path": "app.py", "copies": "1", "size": "3536", "license": "apache-2.0", "hash": -5644042837866656000, "line_mean": 29.4827586207, "line_max": 115, "alpha_frac": 0.6001131222, "autogenerated": false, "ratio": 3.2650046168051707, "config_test": false, "has_n...
import urllib2 import json import demjson k=0 while True: #####################bot379578526:AAGDRqKr3d2N8uWj6sHuBC3fS8_mOaEpqkk in the below link have to be raplaced by your bot's token #Gets the data from the user in JSON Format a=urllib2.urlopen('https://api.telegram.org/bot379578526:AAGDRqKr3d2N8uWj6sH...
{ "repo_name": "PradeepNalluri/News-Bot-in-Telegram", "path": "Telegram News Bot.py", "copies": "1", "size": "3002", "license": "apache-2.0", "hash": 2766737992589900300, "line_mean": 53.5818181818, "line_max": 194, "alpha_frac": 0.6329113924, "autogenerated": false, "ratio": 2.658990256864482, ...
__author__ = 'Spyridon Samothrakis ssamot@essex.ac.uk' import numpy as np # shamelessly stollen from wikipedia def int2bin(n): 'From positive integer to list of binary bits, msb at index 0' if n: bits = [] while n: n,remainder = divmod(n, 2) bits.insert(0, remainder) return bits else: return [0] def...
{ "repo_name": "ssamot/infoGA", "path": "pbil.py", "copies": "1", "size": "3681", "license": "apache-2.0", "hash": 5668294995945563000, "line_mean": 25.6739130435, "line_max": 106, "alpha_frac": 0.5536538984, "autogenerated": false, "ratio": 3.0573089700996676, "config_test": false, "has_no_ke...
__author__ = 'squiresrb' def parse_blast_result(blast_file_path): from Bio.Blast import NCBIXML output_file = "%s.alignments.txt" % blast_file_path output_handle = open(output_file, 'w') result_handle = open(blast_file_path) blast_records = NCBIXML.parse(result_handle) #E_VALUE_THRESH = 0.04 ...
{ "repo_name": "parasite-genomics/Pipelines", "path": "blast_xml_to_text.py", "copies": "1", "size": "2170", "license": "apache-2.0", "hash": 5601193782145786000, "line_mean": 47.2222222222, "line_max": 124, "alpha_frac": 0.5857142857, "autogenerated": false, "ratio": 3.4887459807073955, "config...
import sys import pickle from sklearn.utils.deprecation import _is_deprecated from sklearn.utils.deprecation import deprecated from sklearn.utils.testing import assert_warns_message from sklearn.utils.testing import assert_no_warnings from sklearn.utils.testing import SkipTest from sklearn.utils.deprecation import D...
{ "repo_name": "herilalaina/scikit-learn", "path": "sklearn/utils/tests/test_deprecation.py", "copies": "25", "size": "2158", "license": "bsd-3-clause", "hash": 2588762470472899600, "line_mean": 26.6666666667, "line_max": 79, "alpha_frac": 0.6816496756, "autogenerated": false, "ratio": 3.785964912...
__author__ = 'sravi' from flask.ext.restful import Resource, reqparse, abort from datetime import timedelta from offload import async, sched_in, get_tasks_scheduled from qq.server import auth from qq.tasks.task import count_words_at_url, query_postgres class HelloWorld(Resource): def get(self): task = as...
{ "repo_name": "codeforgood/qq", "path": "server/qq/views/views.py", "copies": "1", "size": "1193", "license": "mit", "hash": 7066738437991489000, "line_mean": 28.825, "line_max": 106, "alpha_frac": 0.667225482, "autogenerated": false, "ratio": 3.5825825825825826, "config_test": false, "has_no...
__author__ = 'sravi' import os from flask import Flask from flask_environments import Environments from flask.ext import restful from flask.ext.bcrypt import Bcrypt from flask.ext.httpauth import HTTPBasicAuth from redis import Redis from rq import Queue from rq_dashboard import RQDashboard from rq_scheduler import S...
{ "repo_name": "codeforgood/qq", "path": "server/qq/server.py", "copies": "1", "size": "1219", "license": "mit", "hash": -7956013461265504000, "line_mean": 21.5740740741, "line_max": 86, "alpha_frac": 0.724364233, "autogenerated": false, "ratio": 3.2334217506631298, "config_test": false, "has_...
__author__ = 'sravi' import unittest import api import json class MultiCasterFunctionalTest(unittest.TestCase): def setUp(self): api.app.config['TESTING'] = True self.app = api.app.test_client() def tearDown(self): pass def test_api_valid_single_recipient(self): data = ...
{ "repo_name": "codeforgood/muticaster", "path": "tests/functional_test_multicaster.py", "copies": "1", "size": "10975", "license": "unlicense", "hash": -1922805001728501500, "line_mean": 49.8148148148, "line_max": 91, "alpha_frac": 0.517904328, "autogenerated": false, "ratio": 3.592471358428805, ...
__author__ = 'sravi' # Relays dict as represented in the problem description relays_dict = { "S": {"name": "Small", "throughput": 1, "cost": 0.01, "subnet": "10.0.1.0/24"}, "M": {"name": "Medium", "throughput": 5, "cost": 0.05, "subnet": "10.0.2.0/24"}, "L": {"name": "Large", "throughput": 10, "cost": 0.10...
{ "repo_name": "codeforgood/muticaster", "path": "api/multicastservice.py", "copies": "1", "size": "2576", "license": "unlicense", "hash": -8630372094048080000, "line_mean": 39.8888888889, "line_max": 96, "alpha_frac": 0.6013198758, "autogenerated": false, "ratio": 3.4209827357237717, "config_te...
__author__ = 'sreeder' from ...ODM2.models import * from .. import serviceBase import datetime as dt import uuid class CreateODM2( serviceBase): ''' def __init__(self, session): self._session = session ''' # ################################################################################ # Annotat...
{ "repo_name": "Castronova/ODM2PythonAPI", "path": "src/api/ODM2/services/createService.py", "copies": "1", "size": "21123", "license": "bsd-3-clause", "hash": 1359754424817506000, "line_mean": 29.5687409551, "line_max": 127, "alpha_frac": 0.523883918, "autogenerated": false, "ratio": 4.9514767932...
""" Routines that wrap AmberTools programs This module defines two public functions: run_antechamber run_parmchk Can be executed from the command line as a stand-alone program Modified by Samuel Genheden """ import os import subprocess import tempfile def run_program ( name, command ): """ Wrapper...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/ambertools.py", "copies": "1", "size": "3248", "license": "mit", "hash": 8281051604900640000, "line_mean": 25.6229508197, "line_max": 123, "alpha_frac": 0.6200738916, "autogenerated": false, "ratio": 3.67836919592299, "config_test": false, "...
import csv import pdb import math import sys import pydot import random def cal_Entropy(a,b): a = float(a) b = float(b) if a==0 and b==0: return -1 pa = a/(a+b) pb = b/(a+b) if pa == 0: E = -pb*math.log(pb,2) return E elif pb == 0: E = -pa*math.log(pa,2) ...
{ "repo_name": "ganjash/machine-learning", "path": "Decision tree/tree.py", "copies": "1", "size": "13740", "license": "mit", "hash": -8657038118000542000, "line_mean": 30.5862068966, "line_max": 112, "alpha_frac": 0.4558951965, "autogenerated": false, "ratio": 3.2367491166077738, "config_test":...
import re import os try: from urllib.request import urlopen from urllib.parse import quote except ImportError: from urllib import urlopen from urllib import quote # Compatibility functions # Check for existence of builtin function next() try: next except NameError: def next(it): retur...
{ "repo_name": "NcLang/vimrc", "path": "sources_non_forked/vim-latex/ftplugin/latex-suite/bibtools.py", "copies": "1", "size": "7716", "license": "mit", "hash": -8008951495224221000, "line_mean": 29.9879518072, "line_max": 119, "alpha_frac": 0.4489372732, "autogenerated": false, "ratio": 3.9528688...
import re import urllib class Bibliography(dict): def __init__(self, txt, macros={}): """ txt: a string which represents the entire bibtex entry. A typical entry is of the form: @ARTICLE{ellington:84:part3, author = {Ellington, C P}, ...
{ "repo_name": "wathen/dotfiles", "path": ".vim/bundle/vim-latex-1.8.23-20141116.812-gitd0f31c9/ftplugin/latex-suite/bibtools.py", "copies": "6", "size": "7083", "license": "mit", "hash": -1128084705697837400, "line_mean": 30.6205357143, "line_max": 119, "alpha_frac": 0.4270789214, "autogenerated": ...
import re class Bibliography(dict): def __init__(self, txt, macros={}): """ txt: a string which represents the entire bibtex entry. A typical entry is of the form: @ARTICLE{ellington:84:part3, author = {Ellington, C P}, ti...
{ "repo_name": "ppslinux/Vundle.vim", "path": "myvim/ftplugin/latex-suite/bibtools.py", "copies": "3", "size": "7030", "license": "mit", "hash": -1777330411400799200, "line_mean": 30.8099547511, "line_max": 119, "alpha_frac": 0.426458037, "autogenerated": false, "ratio": 3.949438202247191, "conf...
import re class Bibliography(dict): def __init__(self, txt, macros={}): """ txt: a string which represents the entire bibtex entry. A typical entry is of the form: @ARTICLE{ellington:84:part3, author = {Ellington, C P}, ...
{ "repo_name": "nagahar/dotfiles", "path": ".vim/bundle/nosync/vim-latex/ftplugin/latex-suite/bibtools.py", "copies": "1", "size": "7251", "license": "mit", "hash": 6358457038260177000, "line_mean": 30.8099547511, "line_max": 119, "alpha_frac": 0.4134602124, "autogenerated": false, "ratio": 4.0463...
__author__ = 'srio' # https://stackoverflow.com/questions/21566379/fitting-a-2d-gaussian-function-using-scipy-optimize-curve-fit-valueerror-and-m import numpy as np from srxraylib.plot.gol import plot_image import scipy.optimize as opt def fit_gaussian2d(data,x0,y0,p0=None): if p0 is None: p0 = moments(da...
{ "repo_name": "srio/Orange-XOPPY", "path": "orangecontrib/xoppy/util/fit_gaussian2d.py", "copies": "1", "size": "3473", "license": "bsd-2-clause", "hash": -7049742763899613000, "line_mean": 31.7641509434, "line_max": 125, "alpha_frac": 0.5096458393, "autogenerated": false, "ratio": 2.415159944367...
__author__ = 'srio' import sys import numpy import scipy.constants as codata from oasys.widgets import widget from orangewidget import gui from PyQt4 import QtGui from crystalpy.util.PolarizedPhotonBunch import PolarizedPhotonBunch from crystalpy.util.PolarizedPhoton import PolarizedPhoton from crystalpy.util.Vecto...
{ "repo_name": "edocappelli/oasys-crystalpy", "path": "orangecontrib/oasyscrystalpy/widgets/elements/ShadowConverter.py", "copies": "1", "size": "7933", "license": "mit", "hash": -8884561568206631000, "line_mean": 33.1939655172, "line_max": 137, "alpha_frac": 0.5584268247, "autogenerated": false, ...
__author__ = 'srio' import json import numpy from gfile import GFile class OE(object): def __init__(self): self.FMIRR = 5 self.F_TORUS = 0 self.FCYL = 0 self.F_EXT = 0 self.FSTAT = 0 self.F_SCREEN = 0 self.F_PLATE = 0 self.FSLIT = 0 self.F...
{ "repo_name": "srio/minishadow", "path": "minishadow/io/OE.py", "copies": "1", "size": "13465", "license": "mit", "hash": -2573405794111193000, "line_mean": 31.3677884615, "line_max": 67, "alpha_frac": 0.5484589677, "autogenerated": false, "ratio": 3.0658014571948997, "config_test": false, "h...