text stringlengths 0 1.05M | meta dict |
|---|---|
import os
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Table, Column, Integer, String, Boolean, MetaData, ForeignKey
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import scoped_session
DB_Path = '/var/local/sqlite3/'
DB_File = 'vm_... | {
"repo_name": "luogangyi/bcec-vm-ha",
"path": "bcec_vm_ha/models.py",
"copies": "1",
"size": "3771",
"license": "apache-2.0",
"hash": -5805766917293304000,
"line_mean": 37.4795918367,
"line_max": 128,
"alpha_frac": 0.6420047733,
"autogenerated": false,
"ratio": 3.554194156456173,
"config_test":... |
__author__ = 'Luqman'
import cv2
import numpy as np
import PostProcessing
from BackgroundSubtraction import BackgroundSubtraction
from BackgroundSubtraction import BackgroundSubtractionColor
"""
Author: Luqman A. M.
BackgroundSubtractionImpl.py
Background Subtraction Algorithms Implementation for Object Detection in ... | {
"repo_name": "umanium/trafficmon",
"path": "BackgroundSubtractionImpl.py",
"copies": "1",
"size": "14858",
"license": "mit",
"hash": 9139325276354633000,
"line_mean": 33.0779816514,
"line_max": 119,
"alpha_frac": 0.5738322789,
"autogenerated": false,
"ratio": 3.6054355738898325,
"config_test":... |
__author__ = 'lvapeab'
import logging
logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(message)s', datefmt='%d/%m/%Y %H:%M:%S')
logger = logging.getLogger(__name__)
def check_params(params):
"""
Checks some typical parameters and warns if something wrong was specified.
:param params: Mode... | {
"repo_name": "lvapeab/nmt-keras",
"path": "nmt_keras/__init__.py",
"copies": "1",
"size": "4011",
"license": "mit",
"hash": 5339102539964164000,
"line_mean": 57.1304347826,
"line_max": 153,
"alpha_frac": 0.5447519322,
"autogenerated": false,
"ratio": 4.359782608695652,
"config_test": false,
... |
__author__ = 'lwz'
# ----------- namespaced WSGIHandler used by socketio server --------
# ----------- 2013/05/01 -----------
import os
from socketio import socketio_manage
from socketio.handler import SocketIOHandler
from django.core.handlers.wsgi import WSGIHandler
class NSWSGIHandler(WSGIHandler):
"""
enha... | {
"repo_name": "lwz7512/logtoeye",
"path": "logtoeye/nswsgihandler.py",
"copies": "1",
"size": "2597",
"license": "apache-2.0",
"hash": 2309274307291725300,
"line_mean": 35.0833333333,
"line_max": 83,
"alpha_frac": 0.5579514825,
"autogenerated": false,
"ratio": 4.202265372168285,
"config_test": ... |
__author__ = 'lwz'
import logging
import time
import settings
from json import dumps, loads
from pymongo import MongoClient
from socketio.namespace import BaseNamespace
from socketio.mixins import RoomsMixin, BroadcastMixin
from siostat import collect
# @namespace('')
class RootNamespace(BaseNamespace, RoomsMixin, B... | {
"repo_name": "lwz7512/logtoeye",
"path": "logtoeye/namespaces.py",
"copies": "1",
"size": "5125",
"license": "apache-2.0",
"hash": -4873189285334455000,
"line_mean": 36.4160583942,
"line_max": 104,
"alpha_frac": 0.6011707317,
"autogenerated": false,
"ratio": 4.126409017713366,
"config_test": f... |
__author__ = 'lxr0827'
from evernote.api.client import EvernoteClient
import evernote.edam.type.ttypes as Types
import evernote.edam.notestore.ttypes as NoteTypes
developer_token = "S=s7:U=4d5ee:E=150d624adf8:C=1497e737ff8:P=1cd:A=en-devtoken:V=2:H=3e2cc053475801b183f1e2712cba0cd1"
note_name = "uploadTPLinkIP"
ip_cont... | {
"repo_name": "lxr0827/extractIPupload",
"path": "upload/to_evernote.py",
"copies": "1",
"size": "1269",
"license": "mit",
"hash": 6249413461287905000,
"line_mean": 41.3,
"line_max": 128,
"alpha_frac": 0.6776989756,
"autogenerated": false,
"ratio": 2.8906605922551254,
"config_test": false,
"h... |
__author__ = 'Lyle Scott, III'
__email__ = 'lyle@digitalfoo.net'
import sys
import requests
URL_TIMEOUT = 4
def get_mirror_urls():
mirror_url = 'http://mirrors.ubuntu.com/mirrors.txt'
try:
response = requests.get(mirror_url)
except requests.exceptions.ConnectionError:
print 'Connection ... | {
"repo_name": "LyleScott/fastest_ubuntu_mirror",
"path": "fastest_mirror.py",
"copies": "1",
"size": "1504",
"license": "mit",
"hash": 688683604744638300,
"line_mean": 23.6557377049,
"line_max": 75,
"alpha_frac": 0.5964095745,
"autogenerated": false,
"ratio": 3.722772277227723,
"config_test": f... |
__author__ = 'Lyndon'
import endpoints
from hello.models import Greeting
from protorpc import messages
from protorpc import message_types
from protorpc import remote
from google.appengine.ext import db
package = 'Hello'
class GreetingRequest(messages.Message):
"""Greeting that stores a message."""
message ... | {
"repo_name": "secret-transaction/ScratchPadPython",
"path": "appengine-try-python-django/endpoint/app_api.py",
"copies": "1",
"size": "2278",
"license": "mit",
"hash": -1344712490179699000,
"line_mean": 30.2191780822,
"line_max": 95,
"alpha_frac": 0.6597892888,
"autogenerated": false,
"ratio": 4... |
__author__ = 'm3sc4'
from dbxml import *
from bsddb3.db import *
def db_init(xml_manager):
container_name = '3.dbxml'
mgr = xml_manager
if mgr.existsContainer(container_name) == 0:
raise "No container with name '%s' found" % container_name
cont = mgr.openContainer(container_name)
return c... | {
"repo_name": "kn1m/Lab3-AK",
"path": "operations.py",
"copies": "1",
"size": "2076",
"license": "mit",
"hash": 4939981142682300000,
"line_mean": 30,
"line_max": 69,
"alpha_frac": 0.6445086705,
"autogenerated": false,
"ratio": 3.984644913627639,
"config_test": false,
"has_no_keywords": false,... |
__author__ = 'maanas'
import agms
agms.Configuration.init('init.ini')
# A minimalist example of a quick $20 payment page with template 1
hpp = agms.HPP()
params = {
'transaction_type': {'value': 'sale'},
'amount': {'value': '20.00'},
'first_name': {'setting': 'required'},
'last_name': {'setting': '... | {
"repo_name": "agmscode/agms_python",
"path": "examples/hpp.py",
"copies": "1",
"size": "2834",
"license": "mit",
"hash": 3575122641532743700,
"line_mean": 35.3333333333,
"line_max": 124,
"alpha_frac": 0.586450247,
"autogenerated": false,
"ratio": 3.1108671789242592,
"config_test": false,
"ha... |
__author__ = 'maartenbreddels'
import aplus
import os
"""
Mini library to make working with promises/futures a bit more Python like.
Example:
@delayed
def f(grid):
return grid**2
f(ds.count(delay=True))
"""
def promisify(value):
# TODO, support futures etc..
if isinstance(value, aplus.Promise):
... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/delayed.py",
"copies": "1",
"size": "2514",
"license": "mit",
"hash": 5888387862328040000,
"line_mean": 27.8965517241,
"line_max": 115,
"alpha_frac": 0.5978520286,
"autogenerated": false,
"ratio": 3.5914285714285716,
"config... |
__author__ = 'maartenbreddels'
import asyncio
import atexit
import traceback
import sys
import aplus
from aplus import listPromise
def check_unhandled():
if Promise.unhandled_exceptions:
print("Unhandled exceptions in Promises:")
for exctype, value, tb in Promise.unhandled_exceptions:
... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/promise.py",
"copies": "1",
"size": "4625",
"license": "mit",
"hash": 6217091505392051000,
"line_mean": 30.25,
"line_max": 90,
"alpha_frac": 0.5610810811,
"autogenerated": false,
"ratio": 4.404761904761905,
"config_test": fa... |
__author__ = 'maartenbreddels'
import logging
import pyarrow as pa
import pyarrow.parquet as pq
import vaex.dataset
import vaex.file.other
from .convert import column_from_arrow_array
logger = logging.getLogger("vaex.arrow")
def from_table(table, as_numpy=True):
columns = dict(zip(table.schema.names, table.colu... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/arrow/dataset.py",
"copies": "1",
"size": "1390",
"license": "mit",
"hash": -983899474493899000,
"line_mean": 30.5909090909,
"line_max": 81,
"alpha_frac": 0.6956834532,
"autogenerated": false,
"ratio": 3.3656174334140436,
"c... |
__author__ = 'maartenbreddels'
import numpy as np
import vaex.vaexfast
from vaex.utils import filesize_format
import logging
import vaex.utils
total_bytes = 0
logger = logging.getLogger("vaex.grids")
def dog(grid, sigma1, sigma2):
return gf(grid, sigma1) - gf(grid, sigma2)
def gf(grid, sigma, **kwargs):
im... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/grids.py",
"copies": "1",
"size": "4437",
"license": "mit",
"hash": -5118084964260679000,
"line_mean": 29.6,
"line_max": 86,
"alpha_frac": 0.5629930133,
"autogenerated": false,
"ratio": 3.7411467116357504,
"config_test": fal... |
__author__ = 'maartenbreddels'
import os
import mmap
import collections
import logging
import numpy as np
import numpy.ma
import vaex
import vaex.dataset
import vaex.file
from vaex.expression import Expression
from vaex.file.column import ColumnFile
import struct
logger = logging.getLogger("vaex.file")
dataset_type_m... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/dataset_mmap.py",
"copies": "1",
"size": "2953",
"license": "mit",
"hash": 51913569373033416,
"line_mean": 31.4505494505,
"line_max": 96,
"alpha_frac": 0.5885540129,
"autogenerated": false,
"ratio": 3.7332490518331225,
"conf... |
__author__ = 'maartenbreddels'
import os
import mmap
import itertools
import functools
import collections
import logging
import numpy as np
import numpy.ma
import vaex
import astropy.table
import astropy.units
from vaex.utils import ensure_string
import astropy.io.fits as fits
import re
import six
import vaex.dataset
i... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-hdf5/vaex/hdf5/dataset.py",
"copies": "1",
"size": "26483",
"license": "mit",
"hash": 6693456335888541000,
"line_mean": 42.9187396352,
"line_max": 152,
"alpha_frac": 0.5289053355,
"autogenerated": false,
"ratio": 4.029671332927571,
"c... |
__author__ = 'maartenbreddels'
import os
import numpy as np
import logging
import vaex
import vaex.utils
import vaex.execution
import vaex.export
import vaex.hdf5.dataset
max_length = int(1e5)
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
try:
import h5py
except:
if not on_rtd:
raise
logger ... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-astro/vaex/astro/export.py",
"copies": "1",
"size": "9690",
"license": "mit",
"hash": -2196641530648819000,
"line_mean": 46.5,
"line_max": 153,
"alpha_frac": 0.5979360165,
"autogenerated": false,
"ratio": 4.185745140388769,
"config_te... |
__author__ = 'maartenbreddels'
import os
import sys
import collections
import logging
import concurrent.futures
import threading
import numpy as np
import pyarrow as pa
import vaex
import vaex.utils
import vaex.execution
import vaex.file.colfits
import vaex.file.other
from vaex.column import ColumnStringArrow, _to_st... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/export.py",
"copies": "1",
"size": "23741",
"license": "mit",
"hash": -6611477475640738000,
"line_mean": 47.0587044534,
"line_max": 192,
"alpha_frac": 0.6010698791,
"autogenerated": false,
"ratio": 4.008272834712139,
"config... |
__author__ = 'maartenbreddels'
import os
import sys
import warnings
import collections
import logging
import numpy as np
import vaex
from .convert import arrow_array_from_numpy_array
max_length = int(1e5)
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
try:
import pyarrow as pa
import pyarrow.parquet... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/arrow/export.py",
"copies": "1",
"size": "4047",
"license": "mit",
"hash": -4537934875547102700,
"line_mean": 39.47,
"line_max": 156,
"alpha_frac": 0.6832221399,
"autogenerated": false,
"ratio": 3.936770428015564,
"config_te... |
__author__ = 'maartenbreddels'
import PIL.Image
import PIL.ImageDraw
try:
from StringIO import StringIO
py3 = False
except ImportError:
from io import StringIO, BytesIO
py3 = True
import collections
import numpy as np
import matplotlib.colors
import warnings
from base64 import b64encode
def rgba_2_pil... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/image.py",
"copies": "1",
"size": "5866",
"license": "mit",
"hash": 8978039088679518000,
"line_mean": 32.9075144509,
"line_max": 159,
"alpha_frac": 0.578588476,
"autogenerated": false,
"ratio": 3.0174897119341564,
"config_te... |
__author__ = 'maartenbreddels'
import string
import astropy.io.votable.ucd
import astropy.units
import logging
from vaex.ui.qt import *
# from astropy.utils import data
import astropy.utils.data
# astropy.utils.data
import numpy as np
logger = logging.getLogger("vaex.ui.completer")
# based on http://stackoverflow.com... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-ui/vaex/ui/completer.py",
"copies": "1",
"size": "10998",
"license": "mit",
"hash": 7909641135397126000,
"line_mean": 35.7826086957,
"line_max": 149,
"alpha_frac": 0.6391162029,
"autogenerated": false,
"ratio": 3.8320557491289198,
"co... |
__author__ = 'maartenbreddels'
import sys
import vaex.utils
import vaex as vx
import os
# data_dir = "/tmp/vaex/data"
data_dir = vaex.utils.get_private_dir("data")
try:
from urllib import urlretrieve # py2
except ImportError:
from urllib.request import urlretrieve # py3
def _url_to_filename(url, replace_ex... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/datasets.py",
"copies": "1",
"size": "14424",
"license": "mit",
"hash": 8365870661974237000,
"line_mean": 55.5647058824,
"line_max": 146,
"alpha_frac": 0.72927066,
"autogenerated": false,
"ratio": 2.9346897253306206,
"config... |
__author__ = 'maartenbreddels'
import threading
import time
import queue
import logging
logger = logging.getLogger("vaex.ext.common")
class Job(object):
def __init__(self, f, delay=0.0, **kwargs):
self.cancelled = False
self.f = f
self.delay = delay
self.kwargs = kwargs
#s... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-core/vaex/ext/common.py",
"copies": "1",
"size": "1653",
"license": "mit",
"hash": 3574664245179734500,
"line_mean": 26.0983606557,
"line_max": 77,
"alpha_frac": 0.5353901996,
"autogenerated": false,
"ratio": 4.142857142857143,
"confi... |
__author__ = 'maartenbreddels'
import numpy as np
import vaex.ui.plugin
from vaex.ui.qt import *
import vaex.ui.plot_windows
import logging
logger = logging.getLogger("plugin.zoom")
@vaex.ui.plugin.pluginclass
class Vector3dPlugin(vaex.ui.plugin.PluginLayer):
name = "vector3"
def __init__(self, parent, layer):
... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-ui/vaex/ui/plugin/vector3d.py",
"copies": "1",
"size": "5141",
"license": "mit",
"hash": 6406496239857878000,
"line_mean": 46.6018518519,
"line_max": 289,
"alpha_frac": 0.7377942035,
"autogenerated": false,
"ratio": 2.9393939393939394,
... |
__author__ = 'maartenbreddels'
import numpy as np
import vaex.ui.plugin
from vaex.ui.qt import *
import vaex.ui.plot_windows
#from vaex.ui.icons import iconfile
#import matplotlib.widgets
#import functools
import logging
from vaex.ui import widgets
logger = logging.getLogger("plugin.transferfunction")
@vaex.ui.... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-ui/vaex/ui/plugin/transferfunction.py",
"copies": "1",
"size": "15399",
"license": "mit",
"hash": 5791626905535822000,
"line_mean": 36.5585365854,
"line_max": 195,
"alpha_frac": 0.7039418144,
"autogenerated": false,
"ratio": 2.939301393... |
__author__ = 'maartenbreddels'
import time
import vaex.ui.plugin
from vaex.ui.qt import *
#import vaex.plot_windows
import logging
#import vaex.ui.undo as undo
logger = logging.getLogger("vaex.ui.plugin.animation")
class AnimationPlugin(vaex.ui.plugin.PluginLayer):
name = "animation"
def __init__(self, parent,... | {
"repo_name": "maartenbreddels/vaex",
"path": "packages/vaex-ui/vaex/ui/plugin/animation.py",
"copies": "1",
"size": "10082",
"license": "mit",
"hash": 4056950615041611000,
"line_mean": 34.6254416961,
"line_max": 116,
"alpha_frac": 0.7325927395,
"autogenerated": false,
"ratio": 3.0635065329687023... |
__author__ = 'Maciej Bilas'
from collections import namedtuple
from geojson import Polygon as GJPolygon
from shapely.geometry import Polygon as ShPolygon
from stojaki.util import lazy
# http://python-3-patterns-idioms-test.readthedocs.org/en/latest/Factory.html
def build_way(osm_xml_tree, way_ref):
way_list = o... | {
"repo_name": "maciej/waw-bike-racks",
"path": "stojaki/osm.py",
"copies": "1",
"size": "4713",
"license": "apache-2.0",
"hash": 8055583627615490000,
"line_mean": 31.958041958,
"line_max": 102,
"alpha_frac": 0.6072565245,
"autogenerated": false,
"ratio": 3.532983508245877,
"config_test": false,... |
__author__ = 'Maciej Bilas'
from csv import DictReader
from shapely.geometry import Point
import pandas as pd
from stojaki.settings import RACKS_LOCATION_CSV
from stojaki.waw_suburbs import Suburbs
from stojaki.util import lazy
# latitude,longitude,icon,desc,racks_count,parking_places
# noinspection PyUnresolvedRef... | {
"repo_name": "maciej/waw-bike-racks",
"path": "stojaki/rack_locations.py",
"copies": "1",
"size": "1974",
"license": "apache-2.0",
"hash": 8505386452470155000,
"line_mean": 28.9090909091,
"line_max": 109,
"alpha_frac": 0.5911854103,
"autogenerated": false,
"ratio": 3.710526315789474,
"config_t... |
__author__ = 'Maciej Bilas'
from multiprocessing import pool
import os
import os.path
from veturillo.settings import MAP_XML_DATA_DIR
from veturillo.util import data_file_as_xml_doc, data_file_name_to_datetime
from ily.decorators import lazy
# Funny. Python does seem to have some sort of parallel collection supp... | {
"repo_name": "maciej/veturillo",
"path": "veturillo/map_xmls/readers.py",
"copies": "1",
"size": "2208",
"license": "mit",
"hash": 7678496717103688000,
"line_mean": 27.6753246753,
"line_max": 102,
"alpha_frac": 0.6358695652,
"autogenerated": false,
"ratio": 3.4446177847113884,
"config_test": f... |
__author__ = 'Maciej Bilas'
import numpy as np
from collections import namedtuple
Trip = namedtuple("Trip", ["started_at", "ended_at", "source", "destination"])
Location = namedtuple("Location", ["dt", "station"])
from pandas import isnull
# noinspection PyArgumentList
def detect_location_changes(loc_series):
... | {
"repo_name": "maciej/veturillo",
"path": "veturillo/map_xmls/trips.py",
"copies": "1",
"size": "1437",
"license": "mit",
"hash": -8776190522104969000,
"line_mean": 34.925,
"line_max": 82,
"alpha_frac": 0.5894224078,
"autogenerated": false,
"ratio": 3.5220588235294117,
"config_test": false,
"... |
__author__ = 'Maciej Bilas'
import os
import os.path
from veturillo.map_xmls import docs
from veturillo.util import data_file_as_xml_doc
from veturillo.settings import MAP_XML_DATA_DIR
import pandas as pd
import numpy as np
# Apparently the returned XML has a consistent number of stations (<place> tag).
# It obvio... | {
"repo_name": "maciej/veturillo",
"path": "veturillo/map_xmls/stations.py",
"copies": "1",
"size": "2827",
"license": "mit",
"hash": -1639775151367056100,
"line_mean": 30.4111111111,
"line_max": 119,
"alpha_frac": 0.6604174036,
"autogenerated": false,
"ratio": 3.34160756501182,
"config_test": f... |
__author__ = 'Maciej Bilas'
import os
import urllib.request
from lxml import etree
from .settings import DATA_PATH
from .util import remove_accents, lazy
from .osm import Relation, MissingWay
from geojson import Feature, FeatureCollection
import geojson
_SUBURBS_DATA_PATH = os.path.join(DATA_PATH, "suburbs")
_OSM_... | {
"repo_name": "maciej/waw-bike-racks",
"path": "stojaki/waw_suburbs.py",
"copies": "1",
"size": "3251",
"license": "apache-2.0",
"hash": 5599839906618621000,
"line_mean": 31.6666666667,
"line_max": 106,
"alpha_frac": 0.6716141002,
"autogenerated": false,
"ratio": 2.9806451612903224,
"config_tes... |
__author__ = "Maciej Bilas"
import os.path
from os.path import join as pjoin
from functools import reduce
from pandas import DataFrame, concat, merge
from veturillo.map_xmls.stations import information as station_info
MONTH_TO_PROCESS = '2013-11'
RAW_TRIPS_DATA_DIR = os.path.realpath(pjoin(os.path.dirname(__file__... | {
"repo_name": "maciej/veturillo",
"path": "veturillo/raw_trips/summary.py",
"copies": "1",
"size": "3737",
"license": "mit",
"hash": -2002643724722554000,
"line_mean": 33.2844036697,
"line_max": 105,
"alpha_frac": 0.6505218089,
"autogenerated": false,
"ratio": 3.1089850249584026,
"config_test":... |
__author__ = 'Maciej Bilas'
import unicodedata
def flatten_list(list):
return [item for sub_list in list for item in sub_list]
def remove_accents(string):
# ł doesn't seem to be handled with the unicodedata normalization
l_replaced = string.replace("ł", "l").replace("Ł", "L")
nkfd_form = unicodedat... | {
"repo_name": "maciej/waw-bike-racks",
"path": "stojaki/util.py",
"copies": "1",
"size": "1422",
"license": "apache-2.0",
"hash": 172244030791867680,
"line_mean": 29.847826087,
"line_max": 81,
"alpha_frac": 0.6272022551,
"autogenerated": false,
"ratio": 3.784,
"config_test": false,
"has_no_ke... |
__author__ = 'maciej'
import av
from PIL import Image
import StringIO
import time
class FrameReader(object):
def __init__(self, pathToFile=""):
self.pathToFile = pathToFile
self.container = av.open(pathToFile)
self.current_milli_time = lambda: int(round(time.time()*3000))
self.curr... | {
"repo_name": "MaciejSzaflik/tirt-W4-Project",
"path": "program/streamer_HTTP/FrameFromFile.py",
"copies": "3",
"size": "1226",
"license": "mit",
"hash": 6278476329726578000,
"line_mean": 25.652173913,
"line_max": 73,
"alpha_frac": 0.5799347471,
"autogenerated": false,
"ratio": 3.9676375404530746... |
__author__ = 'maciej'
import cv2
from PIL import Image
import StringIO
class CameraReal(object):
def __init__(self, fromFile=False, pathToFile=""):
self.fromFile = fromFile
self.pathToFile = pathToFile
if self.fromFile:
self.videoFile = cv2.VideoCapture(pathToFile)
... | {
"repo_name": "MaciejSzaflik/tirt-W4-Project",
"path": "program/streamer_HTTP0/CameraReal.py",
"copies": "4",
"size": "1209",
"license": "mit",
"hash": -5323536433576993000,
"line_mean": 30.8157894737,
"line_max": 67,
"alpha_frac": 0.5467328371,
"autogenerated": false,
"ratio": 3.7663551401869158... |
__author__ = 'mackaiver'
import time
import requests
import requests.exceptions
import logging
logger = logging.getLogger(__name__)
class FetcherException(Exception):
def __init__(self, messages):
self.messages = messages
class HtmlFetcher:
#take departure and arrival location and optinaly departur... | {
"repo_name": "mackaiver/sEins-Module",
"path": "seins/HtmlFetcher.py",
"copies": "1",
"size": "1968",
"license": "mit",
"hash": 1029724635121868900,
"line_mean": 32.9482758621,
"line_max": 76,
"alpha_frac": 0.5574186992,
"autogenerated": false,
"ratio": 3.6923076923076925,
"config_test": false... |
__author__ = 'mackaiver'
from colorama import init, Fore, Style
#init colorama so it works on windows as well.
#The autoreset flag keeps me from using RESET on each line I want to color
init(autoreset=True)
import logging
#create a logger for this module
logger = logging.getLogger(__name__)
#use colorama codes to col... | {
"repo_name": "mackaiver/sEins-Module",
"path": "seins/__init__.py",
"copies": "1",
"size": "1081",
"license": "mit",
"hash": -1528441736391436500,
"line_mean": 44.0833333333,
"line_max": 116,
"alpha_frac": 0.7243293247,
"autogenerated": false,
"ratio": 3.8469750889679717,
"config_test": false,... |
__author__ = 'mackaiver'
import logging
from bs4 import BeautifulSoup
from seins.HtmlFetcher import DBHtmlFetcher
logger = logging.getLogger(__name__)
class PageContentError(Exception):
def __init__(self, messages):
self.messages = messages
class PageParser(object):
_html = None
_soup = Non... | {
"repo_name": "mackaiver/sEins-Module",
"path": "seins/PageParser.py",
"copies": "1",
"size": "2864",
"license": "mit",
"hash": 8541774864866232000,
"line_mean": 25.7663551402,
"line_max": 103,
"alpha_frac": 0.6054469274,
"autogenerated": false,
"ratio": 3.7437908496732026,
"config_test": false... |
__author__ = 'Madison'
from datetime import timedelta
from flask import make_response, request, current_app
from functools import update_wrapper
def crossdomain(origin=None, methods=None, headers=None,
max_age=21600, attach_to_all=True,
automatic_options=True):
if methods is not ... | {
"repo_name": "jakemadison/v2",
"path": "app/http_access.py",
"copies": "1",
"size": "1679",
"license": "mit",
"hash": -4586026361330986000,
"line_mean": 34,
"line_max": 67,
"alpha_frac": 0.6021441334,
"autogenerated": false,
"ratio": 4.2292191435768265,
"config_test": false,
"has_no_keywords... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from google.appengine.api import memcache
from model.XMLAnalyser import *
class ADECommunicator():
"""
This class's task is to use/maintain/check/refresh the cache.
Create new methods to manage ADE data in the cache.
"""
parser = None
... | {
"repo_name": "Videl/absentees-blackboard",
"path": "model/ADECommunicator.py",
"copies": "1",
"size": "1585",
"license": "mit",
"hash": -6400064216558327000,
"line_mean": 25.4333333333,
"line_max": 86,
"alpha_frac": 0.6372239748,
"autogenerated": false,
"ratio": 3.7648456057007125,
"config_tes... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from google.appengine.ext import db
import hashlib
import random
import string
cookie_secret = "FrogidelPWEBMASTEROFTHEADEWORLD"
class Accounts(db.Model):
login = db.StringProperty(required=True)
password = db.StringProperty(required=True)
is_ad... | {
"repo_name": "Videl/absentees-blackboard",
"path": "model/Accounts.py",
"copies": "1",
"size": "5067",
"license": "mit",
"hash": -785435698306868500,
"line_mean": 23.4830917874,
"line_max": 108,
"alpha_frac": 0.6348924413,
"autogenerated": false,
"ratio": 3.540880503144654,
"config_test": fals... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from google.appengine.ext import db
class Absentees(db.Model):
student_name = db.StringProperty(required=True)
student_email = db.StringProperty(required=True)
student_group = db.StringProperty(required=True)
class_title = db.StringProperty(re... | {
"repo_name": "Videl/absentees-blackboard",
"path": "model/Absentees.py",
"copies": "1",
"size": "3610",
"license": "mit",
"hash": 5611727970680863000,
"line_mean": 45.2948717949,
"line_max": 119,
"alpha_frac": 0.6612188366,
"autogenerated": false,
"ratio": 3.415326395458846,
"config_test": fal... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Absentees import *
from model.Logs import *
class ShowAbsenteeHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(ShowAbsenteeHandler, self).__init__()
self.initialize(r... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/ShowAbsenteeHandler.py",
"copies": "1",
"size": "4083",
"license": "mit",
"hash": 997048199323653200,
"line_mean": 48.1927710843,
"line_max": 109,
"alpha_frac": 0.5197158952,
"autogenerated": false,
"ratio": 4.27092050209205,
"config_... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Absentees import *
class AbsenteesAdminHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(AbsenteesAdminHandler, self).__init__()
self.initialize(request, response)
... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/AbsenteesAdminHandler.py",
"copies": "1",
"size": "1406",
"license": "mit",
"hash": 6110442486890332000,
"line_mean": 40.3823529412,
"line_max": 107,
"alpha_frac": 0.6308677098,
"autogenerated": false,
"ratio": 3.6614583333333335,
"co... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Accounts import *
from handler.ClassAbsenteesHandler import *
from handler.ClassWeekHandler import *
from model.Absentees import *
from util import *
class HomeHandler(BaseHandler):
def __init__(self, request=No... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/HomeHandler.py",
"copies": "1",
"size": "3860",
"license": "mit",
"hash": -3908224082705242000,
"line_mean": 45.5060240964,
"line_max": 160,
"alpha_frac": 0.5375647668,
"autogenerated": false,
"ratio": 3.848454636091725,
"config_test"... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Accounts import *
import logging
import util
class ProfileHandler(BaseHandler):
current_user = None
def get(self):
if self.is_connected():
self.current_user = get_connected_user(self.re... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/ProfileHandler.py",
"copies": "1",
"size": "4144",
"license": "mit",
"hash": -1445354881549297700,
"line_mean": 39.2330097087,
"line_max": 131,
"alpha_frac": 0.5320945946,
"autogenerated": false,
"ratio": 4.9041420118343195,
"config_t... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.ADECommunicator import *
class StudentsListHandler(BaseHandler):
"""
Display a list of students.
The lists are flattened and the sublists' names are discarded.
"""
ade_communicator = None
d... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/StudentsListHandler.py",
"copies": "1",
"size": "1686",
"license": "mit",
"hash": -942933249558727400,
"line_mean": 30.2222222222,
"line_max": 99,
"alpha_frac": 0.5931198102,
"autogenerated": false,
"ratio": 3.9118329466357307,
"confi... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Logs import *
class LogsHandler(BaseHandler):
def __init__(self, response=None, request=None):
super(LogsHandler, self).__init__()
self.initialize(response, request)
self.page_name = "ad... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/LogsHandler.py",
"copies": "1",
"size": "3300",
"license": "mit",
"hash": 424432515491144300,
"line_mean": 37.3837209302,
"line_max": 113,
"alpha_frac": 0.5218181818,
"autogenerated": false,
"ratio": 4.394141145139813,
"config_test": ... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
from model.Parameters import *
import time
class ParametersHandler(BaseHandler):
def __init__(self, response=None, request=None):
super(ParametersHandler, self).__init__()
self.initialize(response, request... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/ParametersHandler.py",
"copies": "1",
"size": "1196",
"license": "mit",
"hash": -7540104641224331000,
"line_mean": 28.9,
"line_max": 76,
"alpha_frac": 0.6078595318,
"autogenerated": false,
"ratio": 4.167247386759582,
"config_test": fa... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
from handler.BaseHandler import *
class LoginHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(LoginHandler, self).__init__()
self.initialize(request, response)
self.page_name = "login"
def get(self)... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/LoginHandler.py",
"copies": "1",
"size": "1370",
"license": "mit",
"hash": 864836012082945000,
"line_mean": 30.1363636364,
"line_max": 105,
"alpha_frac": 0.5459854015,
"autogenerated": false,
"ratio": 4.3630573248407645,
"config_test"... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
import os
import webapp2
import jinja2
from model.Accounts import *
from frtz import *
template_dir = os.path.join(os.path.dirname(__file__), '../templates')
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir), autoescape=True)
cla... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/BaseHandler.py",
"copies": "1",
"size": "1628",
"license": "mit",
"hash": -6628638550725192000,
"line_mean": 30.9215686275,
"line_max": 106,
"alpha_frac": 0.6068796069,
"autogenerated": false,
"ratio": 3.4935622317596566,
"config_test... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
import re
from handler.BaseHandler import *
from model.Absentees import *
from model.ADECommunicator import *
class AbsenteesMonitorHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(AbsenteesMonitorHandler, self).__init... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/AbsenteesMonitorHandler.py",
"copies": "1",
"size": "1731",
"license": "mit",
"hash": -8156427266939642000,
"line_mean": 36.652173913,
"line_max": 107,
"alpha_frac": 0.5840554593,
"autogenerated": false,
"ratio": 3.9610983981693364,
"... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
import re
from handler.BaseHandler import *
from model.Accounts import *
import util
class SignupHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(SignupHandler, self).__init__()
self.initialize(request, respons... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/SignupHandler.py",
"copies": "1",
"size": "2166",
"license": "mit",
"hash": 1384999881483021600,
"line_mean": 35.1,
"line_max": 127,
"alpha_frac": 0.5817174515,
"autogenerated": false,
"ratio": 4.366935483870968,
"config_test": false,... |
__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'
import time
import datetime
from handler.BaseHandler import *
from model.Accounts import *
from model.Logs import *
class MembersAdminHandler(BaseHandler):
def __init__(self, request=None, response=None):
super(MembersAdminHandler, self).__init__... | {
"repo_name": "Videl/absentees-blackboard",
"path": "handler/MembersAdminHandler.py",
"copies": "1",
"size": "5298",
"license": "mit",
"hash": 5057558526192072000,
"line_mean": 50.4466019417,
"line_max": 119,
"alpha_frac": 0.5611551529,
"autogenerated": false,
"ratio": 4.651448639157155,
"confi... |
__author__ = 'maesker'
import sys
class FiniteStateMachine:
def __init__(self):
self.transitions={}
self.state = None
self.defaultErrorState = 0
self.last_event_ts = 0
self.subsequent_events = []
def add_transition(self, event, src, dest, callback, rules={}):
if... | {
"repo_name": "zdvresearch/fast15-paper-extras",
"path": "tape_mounts/robot_mount_logs/src/StateMachine.py",
"copies": "1",
"size": "2487",
"license": "mit",
"hash": -4500602654372927000,
"line_mean": 35.5882352941,
"line_max": 116,
"alpha_frac": 0.5082428629,
"autogenerated": false,
"ratio": 4.1... |
__author__ = 'maesker'
from bisect import bisect_left, bisect_right
from collections import Counter
import json, os, string, re, csv, StringIO, sys, time, datetime, gzip, glob, calendar, math, copy
import threading, multiprocessing, Queue, gc
from multiprocessing.sharedctypes import Value, Array
from correlation impor... | {
"repo_name": "zdvresearch/fast15-paper-extras",
"path": "tape_mounts/robot_mount_logs/src/robot_components.py",
"copies": "1",
"size": "135522",
"license": "mit",
"hash": 8273651811183202000,
"line_mean": 44.3099297894,
"line_max": 277,
"alpha_frac": 0.4691562993,
"autogenerated": false,
"ratio"... |
__author__ = 'maesker'
import datetime, calendar
import sys
import os
import time
import json
import numpy as np
import gzip
import matplotlib.pyplot as plt
def drawcdf(pltdata,x, figpath, xlable, ylable, title):
fig = plt.figure()
plt.ylabel(ylable)
plt.xlabel(xlable)
plt.title(title)
plt.yscale... | {
"repo_name": "zdvresearch/fast15-paper-extras",
"path": "tape_mounts/robot_mount_logs/src/plots.py",
"copies": "1",
"size": "3570",
"license": "mit",
"hash": -9222827108044991000,
"line_mean": 28.0325203252,
"line_max": 157,
"alpha_frac": 0.5593837535,
"autogenerated": false,
"ratio": 2.76958882... |
__author__ = 'maesker'
import glob, sys,os,datetime, json, re, string, multiprocessing, Queue, calendar, bisect, time
from collections import Counter
import python_daemon
try:
import numpy, scipy, scipy.stats
except:
print "no numpy available"
def mean_confidence_interval(data, confidence=0.95):
a = ... | {
"repo_name": "zdvresearch/fast15-paper-extras",
"path": "tape_mounts/robot_mount_logs/src/tapesystem.py",
"copies": "1",
"size": "15700",
"license": "mit",
"hash": 7829959879784418000,
"line_mean": 33.7345132743,
"line_max": 116,
"alpha_frac": 0.5521656051,
"autogenerated": false,
"ratio": 3.384... |
__author__ = 'maesker'
import gzip,os, sys, csv, re, json, math, glob, StringIO, multiprocessing, Queue, time
try:
from matplotlib import pyplot as plt
import numpy
from scipy.stats import spearmanr, pearsonr
except:
pass
def plot_dict(d, fn=None):
keys = sorted(d.keys())
n = numpy.arange(l... | {
"repo_name": "zdvresearch/fast15-paper-extras",
"path": "tape_mounts/robot_mount_logs/src/correlation.py",
"copies": "1",
"size": "6101",
"license": "mit",
"hash": -2178869581955965000,
"line_mean": 29.0541871921,
"line_max": 121,
"alpha_frac": 0.4928700213,
"autogenerated": false,
"ratio": 3.56... |
__author__ = 'magic'
from pony.orm import *
from datetime import datetime
from model.group import Group
from model.contact import Contact
from pymysql.converters import decoders
class OrmFixture:
db = Database()
class ORMGroup(db.Entity):
_table_ = 'group_list'
id = PrimaryKey(int, column='gr... | {
"repo_name": "elenay/python_training",
"path": "fixture/orm.py",
"copies": "1",
"size": "3111",
"license": "apache-2.0",
"hash": 755809422324503600,
"line_mean": 39.9342105263,
"line_max": 126,
"alpha_frac": 0.6673095468,
"autogenerated": false,
"ratio": 3.5799769850402763,
"config_test": fals... |
__author__ = 'magnus'
stylesheet_instance = None
def get_stylesheet(name):
global stylesheet_instance
if not stylesheet_instance:
stylesheet_instance = Stylesheets()
return stylesheet_instance.get_stylesheet(name)
class Stylesheets(object):
def __init__(self):
self._stylesheets = {}... | {
"repo_name": "pracedru/QupyRibbon",
"path": "GUI/StyleSheets.py",
"copies": "1",
"size": "1083",
"license": "mit",
"hash": -1667201314904033500,
"line_mean": 30.8529411765,
"line_max": 86,
"alpha_frac": 0.648199446,
"autogenerated": false,
"ratio": 3.696245733788396,
"config_test": false,
"h... |
__author__ = 'magreene'
import collections
import re
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import StringList
class progress(nodes.General, nodes.Element):
tagname = 'progress'
class ProgressTable(Directive):
has_content = True
required_argumen... | {
"repo_name": "SecurityInnovation/PGPy",
"path": "docs/source/_ext/progress.py",
"copies": "1",
"size": "4912",
"license": "bsd-3-clause",
"hash": 5113315196378994000,
"line_mean": 31.966442953,
"line_max": 172,
"alpha_frac": 0.5370521173,
"autogenerated": false,
"ratio": 3.990251827782291,
"co... |
__author__ = 'magus0219'
from config import DEBUG as _DEBUG, SERVER_CONFIG as _SERVER_CFG
from utils.decorator import retry
from utils.string_util import remove_quota_pair
import subprocess
import traceback
import uuid
import re
import os
import shutil
import logging
import datetime
import time
from collections import ... | {
"repo_name": "magus0219/niner",
"path": "core/repository.py",
"copies": "1",
"size": "22459",
"license": "mit",
"hash": -5578355110253300000,
"line_mean": 33.7678018576,
"line_max": 154,
"alpha_frac": 0.5502025914,
"autogenerated": false,
"ratio": 4.291802025606726,
"config_test": true,
"has... |
__author__ = 'magus0219'
from .repository import Repository, RepositoryException
from config import REPOSITORY as _REPOSITORY_CFG, DEBUG as _DEBUG
from utils.mongo_handler import mongodb_client, serialize_status
from utils.enums import *
from utils.mail import mail_manager
import datetime
import logging
import time
imp... | {
"repo_name": "magus0219/niner",
"path": "core/deploy_manager.py",
"copies": "1",
"size": "38159",
"license": "mit",
"hash": -4856437354436519000,
"line_mean": 46.8863636364,
"line_max": 126,
"alpha_frac": 0.4888595913,
"autogenerated": false,
"ratio": 4.742996498249124,
"config_test": false,
... |
__author__ = 'magus0219'
import re
import datetime
str_text = """
标签名:{name}
标签作者:{author}
标签作者email:{email}
标签commit:{commit_id}
标签时间:{tag_time}
标签描述:
{desc}
"""
class Tag():
def __init__(self, name, author, email, commit_id, desc, tag_time):
self.name = name
self.author = author
self.em... | {
"repo_name": "11dimension/niner",
"path": "core/tag.py",
"copies": "2",
"size": "2755",
"license": "mit",
"hash": -1880436130192347400,
"line_mean": 27.5578947368,
"line_max": 90,
"alpha_frac": 0.5035016587,
"autogenerated": false,
"ratio": 3.473751600512164,
"config_test": false,
"has_no_ke... |
__author__ = 'magus0219'
import uuid
class PayLoad():
def __init__(self, event_id, event_type, repository_name, is_tag, is_branch, head_commit, username, src,
branch=None, tag=None):
self.event_id = event_id
self.event_type = event_type
self.repository_name = repository_na... | {
"repo_name": "11dimension/niner",
"path": "core/payload.py",
"copies": "2",
"size": "1835",
"license": "mit",
"hash": -6871054288275940000,
"line_mean": 31.0526315789,
"line_max": 124,
"alpha_frac": 0.5407772304,
"autogenerated": false,
"ratio": 3.8544303797468356,
"config_test": false,
"has... |
__author__ = 'magus0219'
from utils.mongo_handler import mongodb_client
from bson.objectid import ObjectId
class Account():
def __init__(self, username, password, email, role, user_id=None):
self.user_id = user_id # string
self.username = username
self.password = password
self.em... | {
"repo_name": "11dimension/niner",
"path": "models/account.py",
"copies": "2",
"size": "1269",
"license": "mit",
"hash": -3251387014832567000,
"line_mean": 30.75,
"line_max": 100,
"alpha_frac": 0.5279747833,
"autogenerated": false,
"ratio": 4.133550488599348,
"config_test": false,
"has_no_key... |
__author__ = 'magus0219'
import logging
from config import DEBUG as _DEBUG, GITHUB as _GITHUB_CFG
from .common_handler import CommonHandler
from core.deploy_manager import dmc
from core.payload import PayLoad
import threading
import json
import hmac
from utils.mongo_handler import mongodb_client
logger_server = loggi... | {
"repo_name": "11dimension/niner",
"path": "handlers/deploy_handler.py",
"copies": "1",
"size": "2766",
"license": "mit",
"hash": 3157681140389836300,
"line_mean": 40.9090909091,
"line_max": 106,
"alpha_frac": 0.5600144613,
"autogenerated": false,
"ratio": 4.116071428571429,
"config_test": fals... |
__author__ = 'magus0219'
import logging
from config import DEBUG as _DEBUG, GITHUB as _GITHUB_CFG
from .common_handler import CommonHandler
from core.deploy_manager import dms
from core.payload import PayLoad
import threading
import json
import hmac
from utils.mongo_handler import mongodb_client
logger_server = loggi... | {
"repo_name": "magus0219/niner",
"path": "handlers/deploy_handler.py",
"copies": "1",
"size": "2734",
"license": "mit",
"hash": -1834580651329215500,
"line_mean": 40.4242424242,
"line_max": 106,
"alpha_frac": 0.5566934894,
"autogenerated": false,
"ratio": 4.1299093655589125,
"config_test": fals... |
__author__ = 'magus0219'
import logging
from tornado.web import authenticated
from .common_handler import CommonHandler
from core.deploy_manager import dmc
from core.payload import PayLoad
import threading
import time
from utils.mongo_handler import mongodb_client
logger_server = logging.getLogger("DeployServer.Rollb... | {
"repo_name": "11dimension/niner",
"path": "handlers/rollback_handler.py",
"copies": "1",
"size": "1867",
"license": "mit",
"hash": -6078722447093267000,
"line_mean": 40.4888888889,
"line_max": 109,
"alpha_frac": 0.5136582753,
"autogenerated": false,
"ratio": 4.655860349127182,
"config_test": f... |
__author__ = 'magus0219'
import logging
from tornado.web import authenticated
from .common_handler import CommonHandler
from core.deploy_manager import dmc
from utils.enums import *
from config import INSTANCE_NAME as _INSTANCE_NAME
logger_server = logging.getLogger("DeployServer.IndexHandler")
class IndexHandler(C... | {
"repo_name": "11dimension/niner",
"path": "handlers/index_handler.py",
"copies": "1",
"size": "1118",
"license": "mit",
"hash": -6542094109773254000,
"line_mean": 45.5833333333,
"line_max": 135,
"alpha_frac": 0.6735241503,
"autogenerated": false,
"ratio": 3.6298701298701297,
"config_test": fal... |
__author__ = 'magus0219'
import logging
from tornado.web import authenticated
from .common_handler import CommonHandler
from core.deploy_manager import dmc
from utils.mongo_handler import mongodb_client, serialize_status
import json
import time
logger_server = logging.getLogger("DeployServer.OperationHandler")
clas... | {
"repo_name": "11dimension/niner",
"path": "handlers/operation_handler.py",
"copies": "1",
"size": "3465",
"license": "mit",
"hash": 3750797074407012400,
"line_mean": 39.2906976744,
"line_max": 107,
"alpha_frac": 0.5168831169,
"autogenerated": false,
"ratio": 4.559210526315789,
"config_test": f... |
__author__ = 'magus0219'
import logging
from tornado.web import authenticated
from .common_handler import CommonHandler
from core.deploy_manager import dms
from core.payload import PayLoad
import threading
import time
from utils.mongo_handler import mongodb_client
logger_server = logging.getLogger("DeployServer.Rollb... | {
"repo_name": "magus0219/niner",
"path": "handlers/rollback_handler.py",
"copies": "1",
"size": "1744",
"license": "mit",
"hash": 7431941878261200000,
"line_mean": 38.6363636364,
"line_max": 109,
"alpha_frac": 0.5235091743,
"autogenerated": false,
"ratio": 4.56544502617801,
"config_test": false... |
__author__ = 'magus0219'
import logging
from tornado.web import authenticated
from .common_handler import CommonHandler
from core.deploy_manager import dms
from utils.mongo_handler import mongodb_client, serialize_status
import json
import time
logger_server = logging.getLogger("DeployServer.OperationHandler")
clas... | {
"repo_name": "magus0219/niner",
"path": "handlers/operation_handler.py",
"copies": "1",
"size": "3299",
"license": "mit",
"hash": 5584694222464288000,
"line_mean": 38.2738095238,
"line_max": 107,
"alpha_frac": 0.5150045468,
"autogenerated": false,
"ratio": 4.569252077562327,
"config_test": fal... |
__author__ = 'magus0219'
import logging
import hashlib
from tornado.web import authenticated
from .common_handler import CommonHandler
from utils.mongo_handler import mongodb_client
from models.account import Account
import time
from config import INSTANCE_NAME as _INSTANCE_NAME
logger_server = logging.getLogger("Dep... | {
"repo_name": "11dimension/niner",
"path": "handlers/register_handler.py",
"copies": "1",
"size": "2240",
"license": "mit",
"hash": -6116422563695914000,
"line_mean": 33.4761904762,
"line_max": 88,
"alpha_frac": 0.5856353591,
"autogenerated": false,
"ratio": 4.160919540229885,
"config_test": fa... |
__author__ = 'magus0219'
import logging
import hashlib
from tornado.web import authenticated
from .common_handler import CommonHandler
import time
from utils.mongo_handler import mongodb_client
from config import INSTANCE_NAME as _INSTANCE_NAME
logger_server = logging.getLogger("DeployServer.ChangePasswordHandler")
... | {
"repo_name": "11dimension/niner",
"path": "handlers/chpwd_handler.py",
"copies": "1",
"size": "1511",
"license": "mit",
"hash": -4961846874612352000,
"line_mean": 29.8958333333,
"line_max": 84,
"alpha_frac": 0.6149696561,
"autogenerated": false,
"ratio": 4.018970189701897,
"config_test": false... |
__author__ = 'magus0219'
import logging
import hashlib
from tornado.web import authenticated
from .common_handler import CommonHandler
import time
from utils.mongo_handler import mongodb_client
logger_server = logging.getLogger("DeployServer.ChangePasswordHandler")
class ChangePasswordHandler(CommonHandler):
@a... | {
"repo_name": "magus0219/niner",
"path": "handlers/chpwd_handler.py",
"copies": "1",
"size": "1370",
"license": "mit",
"hash": -1415266707086882300,
"line_mean": 27.5531914894,
"line_max": 71,
"alpha_frac": 0.5946348733,
"autogenerated": false,
"ratio": 4.042168674698795,
"config_test": false,
... |
__author__ = 'magus0219'
import logging
import hashlib
import uuid
import datetime
from .common_handler import CommonHandler
from utils.mongo_handler import mongodb_client
from utils.saferedisclient import redis_manager
from config import INSTANCE_NAME as _INSTANCE_NAME
logger_server = logging.getLogger("DeployServer... | {
"repo_name": "11dimension/niner",
"path": "handlers/login_handler.py",
"copies": "1",
"size": "1841",
"license": "mit",
"hash": -187023519701893280,
"line_mean": 29.9827586207,
"line_max": 88,
"alpha_frac": 0.5820812465,
"autogenerated": false,
"ratio": 3.993333333333333,
"config_test": false,... |
__author__ = 'magus0219'
import logging
import pymongo
import copy
from config import SERVER_CONFIG as _SERVER_CFG
logger_server = logging.getLogger("DeployServer")
try:
mongodb_client = pymongo.MongoClient(host=_SERVER_CFG["MONGO_HOST"], port=_SERVER_CFG["MONGO_PORT"])
mongodb_client['deployment'].authen... | {
"repo_name": "11dimension/niner",
"path": "utils/mongo_handler.py",
"copies": "2",
"size": "1113",
"license": "mit",
"hash": -3015078287822925300,
"line_mean": 29.9444444444,
"line_max": 104,
"alpha_frac": 0.6891284816,
"autogenerated": false,
"ratio": 3.5445859872611467,
"config_test": false,... |
__author__ = "Mahaveer Verma"
__email__ = "mahaveer.verma1@gmail.com"
import matplotlib.pyplot as plt
import convex_hull
pts=[[0.3215348546593775, 0.03629583077160248], [-0.4404289572876217, -0.2894855991839297],
[0.02402358131857918, -0.2356728797179394], [0.04590851212470659, -0.4156409924995536],
[0.3218384001607... | {
"repo_name": "Yonaba/Algorithm-Implementations",
"path": "Convex_hull/Python/mahaveerverma/convex_hull_test.py",
"copies": "4",
"size": "2395",
"license": "mit",
"hash": -6961889895761365000,
"line_mean": 56.0476190476,
"line_max": 111,
"alpha_frac": 0.7607515658,
"autogenerated": false,
"ratio"... |
__author__ = "Mahaveer Verma"
__email__ = "mahaveer.verma1@gmail.com"
'''
Convex Hull:
In mathematics, the convex hull or convex envelope of a set X of points in the Euclidean plane or Euclidean space is the smallest convex set that contains X.
For instance, when X is a bounded subset of the plane, the convex hull ma... | {
"repo_name": "warreee/Algorithm-Implementations",
"path": "Convex_hull/Python/mahaveerverma/convex_hull.py",
"copies": "4",
"size": "2500",
"license": "mit",
"hash": 598490666249762600,
"line_mean": 51.1041666667,
"line_max": 261,
"alpha_frac": 0.72,
"autogenerated": false,
"ratio": 2.9411764705... |
__author__ = 'mahnve'
from setuptools import setup
from setuptools.command.test import test as TestCommand
# Inspired by the example at https://pytest.org/latest/goodpractises.html
class NoseTestCommand(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ... | {
"repo_name": "mahnve/sinor",
"path": "setup.py",
"copies": "1",
"size": "1235",
"license": "mit",
"hash": 3514949314027966000,
"line_mean": 30.6666666667,
"line_max": 74,
"alpha_frac": 0.555465587,
"autogenerated": false,
"ratio": 4.075907590759076,
"config_test": true,
"has_no_keywords": fa... |
from numpy.testing import assert_array_equal, assert_array_almost_equal
import pytest
import mne
from mne.datasets import sample
from mne.bem import _check_origin
from mne import io
from autoreject.utils import clean_by_interp, interpolate_bads
from autoreject.utils import _interpolate_bads_eeg
import mne.channels.i... | {
"repo_name": "autoreject/autoreject",
"path": "autoreject/tests/test_utils.py",
"copies": "1",
"size": "3477",
"license": "bsd-3-clause",
"hash": 3113236652145783000,
"line_mean": 39.9058823529,
"line_max": 79,
"alpha_frac": 0.6295657176,
"autogenerated": false,
"ratio": 3.1551724137931036,
"c... |
import numpy as np
import pytest
import mne
from mne.datasets import sample
from mne import io
import autoreject
from autoreject.utils import set_matplotlib_defaults
import matplotlib
matplotlib.use('Agg')
data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
raw = io... | {
"repo_name": "autoreject/autoreject",
"path": "autoreject/tests/test_viz.py",
"copies": "1",
"size": "1473",
"license": "bsd-3-clause",
"hash": 4654173009360564000,
"line_mean": 29.6875,
"line_max": 74,
"alpha_frac": 0.6469789545,
"autogenerated": false,
"ratio": 3.1207627118644066,
"config_te... |
from copy import deepcopy
from distutils.version import LooseVersion
import os.path as op
import shutil
from unittest import SkipTest
import numpy as np
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_equal, assert_allclose)
import pytest
from scipy import i... | {
"repo_name": "rkmaddox/mne-python",
"path": "mne/io/eeglab/tests/test_eeglab.py",
"copies": "4",
"size": "19042",
"license": "bsd-3-clause",
"hash": 7467288688383119000,
"line_mean": 42.3758542141,
"line_max": 79,
"alpha_frac": 0.6074992123,
"autogenerated": false,
"ratio": 3.214382174206617,
... |
import os.path as op
import numpy as np
import warnings
from ..utils import _read_segments_file, _find_channels
from ..constants import FIFF
from ..meas_info import _empty_info, create_info
from ..base import _BaseRaw, _check_update_montage
from ...utils import logger, verbose, check_version
from ...channels.montage ... | {
"repo_name": "cmoutard/mne-python",
"path": "mne/io/eeglab/eeglab.py",
"copies": "1",
"size": "18354",
"license": "bsd-3-clause",
"hash": -979443626628993700,
"line_mean": 40.0604026846,
"line_max": 79,
"alpha_frac": 0.5871199738,
"autogenerated": false,
"ratio": 3.885266723116003,
"config_tes... |
import os.path as op
import shutil
import warnings
from nose.tools import assert_raises, assert_equal
from numpy.testing import assert_array_equal
from mne import write_events, read_epochs_eeglab, Epochs, find_events
from mne.io import read_raw_eeglab
from mne.io.tests.test_raw import _test_raw_reader
from mne.io.ee... | {
"repo_name": "alexandrebarachant/mne-python",
"path": "mne/io/eeglab/tests/test_eeglab.py",
"copies": "1",
"size": "5980",
"license": "bsd-3-clause",
"hash": -3769897936112233500,
"line_mean": 44.6488549618,
"line_max": 78,
"alpha_frac": 0.6260869565,
"autogenerated": false,
"ratio": 3.154008438... |
from ..externals.six.moves import queue
import time
import socket
from ..externals.six.moves import socketserver
import threading
import numpy as np
from ..utils import logger, verbose
class _ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
"""Create a threaded TCP server.
Parameter... | {
"repo_name": "jaeilepp/mne-python",
"path": "mne/realtime/stim_server_client.py",
"copies": "7",
"size": "10142",
"license": "bsd-3-clause",
"hash": -8246270888549374000,
"line_mean": 31.0949367089,
"line_max": 79,
"alpha_frac": 0.5459475449,
"autogenerated": false,
"ratio": 4.587064676616915,
... |
import time
import os
import threading
import subprocess
import warnings
import os.path as op
from nose.tools import assert_true
from mne.utils import requires_neuromag2ft
from mne.realtime import FieldTripClient
from mne.externals.six.moves import queue
base_dir = op.join(op.dirname(__file__), '..', '..', 'io', 't... | {
"repo_name": "jaeilepp/eggie",
"path": "mne/realtime/tests/test_fieldtrip_client.py",
"copies": "1",
"size": "2175",
"license": "bsd-2-clause",
"hash": -8226485656136951000,
"line_mean": 30.9852941176,
"line_max": 75,
"alpha_frac": 0.6335632184,
"autogenerated": false,
"ratio": 3.525121555915721... |
import time
import os
import threading
import subprocess
import warnings
import os.path as op
from nose.tools import assert_true
import mne
from mne.utils import requires_neuromag2ft, run_tests_if_main
from mne.realtime import FieldTripClient
from mne.externals.six.moves import queue
base_dir = op.join(op.dirname(_... | {
"repo_name": "effigies/mne-python",
"path": "mne/realtime/tests/test_fieldtrip_client.py",
"copies": "5",
"size": "2801",
"license": "bsd-3-clause",
"hash": -1666255134306550500,
"line_mean": 32.3452380952,
"line_max": 77,
"alpha_frac": 0.5990717601,
"autogenerated": false,
"ratio": 3.5681528662... |
import warnings
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_raises
from numpy.testing import assert_array_equal
from mne import io, read_events, Epochs, pick_types
from mne.decoding.classifier import Scaler, FilterEstimator
from mne.decoding.classifier import PSDEstimator, Conc... | {
"repo_name": "dgwakeman/mne-python",
"path": "mne/decoding/tests/test_classifier.py",
"copies": "6",
"size": "5280",
"license": "bsd-3-clause",
"hash": -2136666226201888000,
"line_mean": 35.4137931034,
"line_max": 79,
"alpha_frac": 0.6524621212,
"autogenerated": false,
"ratio": 3.231334149326805... |
import os.path as op
import numpy as np
import pytest
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_allclose, assert_equal)
from mne import io, read_events, Epochs, pick_types
from mne.decoding import (Scaler, FilterEstimator, PSDEstimator, Vectorizer,
... | {
"repo_name": "larsoner/mne-python",
"path": "mne/decoding/tests/test_transformer.py",
"copies": "7",
"size": "9311",
"license": "bsd-3-clause",
"hash": -3910210575999003000,
"line_mean": 38.1218487395,
"line_max": 79,
"alpha_frac": 0.6207711309,
"autogenerated": false,
"ratio": 3.275061554695744... |
import warnings
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_raises, assert_equal
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_allclose)
from mne import io, read_events, Epochs, pick_types
from mne.decoding import (S... | {
"repo_name": "nicproulx/mne-python",
"path": "mne/decoding/tests/test_transformer.py",
"copies": "2",
"size": "9787",
"license": "bsd-3-clause",
"hash": -8297219297402971000,
"line_mean": 38.7845528455,
"line_max": 79,
"alpha_frac": 0.6208235414,
"autogenerated": false,
"ratio": 3.32664853840924... |
import warnings
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_raises
from numpy.testing import (assert_array_equal, assert_equal,
assert_array_almost_equal)
from mne import io, read_events, Epochs, pick_types
from mne.decoding import Scaler, FilterEstim... | {
"repo_name": "jmontoyam/mne-python",
"path": "mne/decoding/tests/test_transformer.py",
"copies": "3",
"size": "10104",
"license": "bsd-3-clause",
"hash": 1464798977271858700,
"line_mean": 38.0115830116,
"line_max": 79,
"alpha_frac": 0.6415281077,
"autogenerated": false,
"ratio": 3.27414128321451... |
import warnings
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_raises
from numpy.testing import assert_array_equal
from mne import io, read_events, Epochs, pick_types
from mne.decoding import Scaler, FilterEstimator
from mne.decoding import PSDEstimator, ConcatenateChannels
warni... | {
"repo_name": "antiface/mne-python",
"path": "mne/decoding/tests/test_transformer.py",
"copies": "2",
"size": "5665",
"license": "bsd-3-clause",
"hash": -4399173221938078700,
"line_mean": 35.3141025641,
"line_max": 79,
"alpha_frac": 0.6511915269,
"autogenerated": false,
"ratio": 3.191549295774648... |
import copy
import re
import threading
import time
import numpy as np
from ..io import _empty_info
from ..io.pick import pick_info
from ..io.constants import FIFF
from ..epochs import EpochsArray
from ..utils import logger, warn
from ..externals.FieldTrip import Client as FtClient
def _buffer_recv_worker(ft_client... | {
"repo_name": "ARudiuk/mne-python",
"path": "mne/realtime/fieldtrip_client.py",
"copies": "4",
"size": "11139",
"license": "bsd-3-clause",
"hash": 8591424543358199000,
"line_mean": 31.1008645533,
"line_max": 79,
"alpha_frac": 0.5381991202,
"autogenerated": false,
"ratio": 4.297453703703703,
"co... |
import re
import copy
import time
import threading
import warnings
import numpy as np
from ..io import _empty_info
from ..io.pick import pick_info
from ..io.constants import FIFF
from ..epochs import EpochsArray
from ..utils import logger
from ..externals.FieldTrip import Client as FtClient
def _buffer_recv_worker(... | {
"repo_name": "cmoutard/mne-python",
"path": "mne/realtime/fieldtrip_client.py",
"copies": "2",
"size": "11198",
"license": "bsd-3-clause",
"hash": -2977495674412009500,
"line_mean": 30.9942857143,
"line_max": 79,
"alpha_frac": 0.5388462225,
"autogenerated": false,
"ratio": 4.288778245882804,
"... |
import re
import copy
import time
import threading
import warnings
import numpy as np
from ..io.constants import FIFF
from ..io.meas_info import _empty_info
from ..io.pick import pick_info
from ..epochs import EpochsArray
from ..utils import logger
from ..externals.FieldTrip import Client as FtClient
... | {
"repo_name": "yousrabk/mne-python",
"path": "mne/realtime/fieldtrip_client.py",
"copies": "2",
"size": "11595",
"license": "bsd-3-clause",
"hash": 8236847243721092000,
"line_mean": 31.0455840456,
"line_max": 79,
"alpha_frac": 0.5227253126,
"autogenerated": false,
"ratio": 4.390382430897388,
"c... |
import re
import copy
import time
import threading
import warnings
import numpy as np
from ..io.constants import FIFF
from ..io.meas_info import Info
from ..epochs import EpochsArray
from ..utils import logger
from ..externals.FieldTrip import Client as FtClient
def _buffer_recv_worker(ft_client):
... | {
"repo_name": "dgwakeman/mne-python",
"path": "mne/realtime/fieldtrip_client.py",
"copies": "3",
"size": "11743",
"license": "bsd-3-clause",
"hash": -8717537610004195000,
"line_mean": 31.3607954545,
"line_max": 79,
"alpha_frac": 0.5213318573,
"autogenerated": false,
"ratio": 4.3849887976101565,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.