text
stringlengths
0
1.05M
meta
dict
"""Base store interface.""" import os.path from pkg_resources import iter_entry_points class Store(object): """Defines the interface of stores. Register implemented stores as `entry points <https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins>`_ in th...
{ "repo_name": "jgosmann/psyrun", "path": "psyrun/store/base.py", "copies": "1", "size": "2662", "license": "mit", "hash": -6563704398451377000, "line_mean": 25.62, "line_max": 123, "alpha_frac": 0.5875281743, "autogenerated": false, "ratio": 4.511864406779661, "config_test": false, "has_no_ke...
# basestring does not exist in python3 try: basestring except NameError: basestring = str class Composite: """ Helper class to identify a composite and store its content A Composite is essentially a wrapped list containing response items. """ def __init__(self, content=None): # tr...
{ "repo_name": "docwalter/py3status", "path": "py3status/composite.py", "copies": "1", "size": "4433", "license": "bsd-3-clause", "hash": 5849467560129063000, "line_mean": 29.5724137931, "line_max": 84, "alpha_frac": 0.5501917437, "autogenerated": false, "ratio": 4.627348643006263, "config_test"...
"""Base stuff for XAL providers.""" class Provider(object): """Base class for XAL providers. A XAL provider implements an API related to some environment actions. """ def __init__(self): """Constructor.""" #: XAL session instance in which the provider is registered. #: ...
{ "repo_name": "benoitbryon/xal", "path": "xal/provider.py", "copies": "1", "size": "1824", "license": "bsd-3-clause", "hash": -1559807184798786600, "line_mean": 33.4150943396, "line_max": 78, "alpha_frac": 0.6217105263, "autogenerated": false, "ratio": 4.713178294573644, "config_test": false, ...
"""Base stuff for XAL resources.""" class Resource(object): """Base class for XAL resources.""" def __init__(self): """Constructor.""" #: Execution context which the resource belongs to. self.xal_session = None #: List of internal methods that provides diagnosis information. ...
{ "repo_name": "benoitbryon/xal", "path": "xal/resource.py", "copies": "1", "size": "1111", "license": "bsd-3-clause", "hash": 1023632214867601200, "line_mean": 29.027027027, "line_max": 78, "alpha_frac": 0.6174617462, "autogenerated": false, "ratio": 4.648535564853557, "config_test": false, "...
"""Base support for creating code checking tools.""" from __future__ import unicode_literals from fnmatch import fnmatchcase from reviewbot.config import config from reviewbot.utils.process import is_exe_in_path class BaseTool(object): """The base class all Review Bot tools should inherit from. This class...
{ "repo_name": "reviewboard/ReviewBot", "path": "bot/reviewbot/tools/base/tool.py", "copies": "1", "size": "11305", "license": "mit", "hash": -1340625910807337200, "line_mean": 31.9591836735, "line_max": 79, "alpha_frac": 0.586377709, "autogenerated": false, "ratio": 4.601139601139601, "config_t...
"""Base support for POSIX-like platforms.""" import py, os, sys from rpython.translator.platform import Platform, log, _run_subprocess import rpython rpydir = str(py.path.local(rpython.__file__).join('..')) class BasePosix(Platform): exe_ext = '' make_cmd = 'make' relevant_environ = ('CPATH', 'LIBRARY_...
{ "repo_name": "jptomo/rpython-lang-scheme", "path": "rpython/translator/platform/posix.py", "copies": "1", "size": "10881", "license": "mit", "hash": -6485951342198828000, "line_mean": 34.6754098361, "line_max": 130, "alpha_frac": 0.5091443801, "autogenerated": false, "ratio": 3.6722915963550458,...
"""Base table class. Define just the bare minimum to build tables.""" from terminaltables.build import build_border, build_row, flatten from terminaltables.width_and_alignment import align_and_pad_cell, max_dimensions class BaseTable(object): """Base table class. :ivar iter table_data: List (empty or list o...
{ "repo_name": "Robpol86/terminaltables", "path": "terminaltables/base_table.py", "copies": "3", "size": "9738", "license": "mit", "hash": -8061354096520986000, "line_mean": 43.8755760369, "line_max": 119, "alpha_frac": 0.6076196344, "autogenerated": false, "ratio": 3.8796812749003986, "config_t...
"""Base tableset Revision ID: b6637f24d0e0 Revises: Create Date: 2016-11-19 13:27:14.909083 """ # revision identifiers, used by Alembic. revision = 'b6637f24d0e0' down_revision = None branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql from hs...
{ "repo_name": "geudrik/homestack-db-library", "path": "alembic/versions/b6637f24d0e0_base_tableset.py", "copies": "1", "size": "5541", "license": "mit", "hash": 5944535430497287000, "line_mean": 36.9520547945, "line_max": 108, "alpha_frac": 0.6733441617, "autogenerated": false, "ratio": 3.4182603...
"""base tables Revision ID: 4e8afd9354a Revises: None Create Date: 2015-11-05 21:07:09.993388 """ # revision identifiers, used by Alembic. revision = '001' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('artist', sa.Column('id', sa.Integer(), nullable=Fa...
{ "repo_name": "Tjorriemorrie/speler", "path": "migrations/versions/001.py", "copies": "1", "size": "5633", "license": "mit", "hash": -1155578697971315200, "line_mean": 47.9826086957, "line_max": 91, "alpha_frac": 0.6545357713, "autogenerated": false, "ratio": 3.3690191387559807, "config_test": ...
"""Base tag database""" import abc import bisect import re import time from graphite.tags.utils import TaggedSeries class BaseTagDB(object): __metaclass__ = abc.ABCMeta def __init__(self, settings, *args, **kwargs): """Initialize the tag db.""" self.settings = settings self.cache = kwargs.get('cache...
{ "repo_name": "DanCech/graphite-web", "path": "webapp/graphite/tags/base.py", "copies": "1", "size": "8902", "license": "apache-2.0", "hash": -9218911437469544000, "line_mean": 29.1762711864, "line_max": 155, "alpha_frac": 0.6449112559, "autogenerated": false, "ratio": 4.03352967829633, "config...
"""Base tag database""" import abc import re from django.conf import settings from django.core.cache import cache from graphite.tags.utils import TaggedSeries from graphite.util import logtime class BaseTagDB(object): __metaclass__ = abc.ABCMeta def __init__(self): """Initialize the tag db.""" pass ...
{ "repo_name": "brutasse/graphite-web", "path": "webapp/graphite/tags/base.py", "copies": "1", "size": "4488", "license": "apache-2.0", "hash": -2261552605549094000, "line_mean": 26.8757763975, "line_max": 123, "alpha_frac": 0.6532976827, "autogenerated": false, "ratio": 4.121212121212121, "conf...
"""Base task implementation.""" from axopy import util from axopy.design import Design from axopy.messaging import Transmitter, TransmitterBase class Task(TransmitterBase): """Base class for tasks. This base class handles iteration through the trials of the task in blocks. Most task implementations wil...
{ "repo_name": "ucdrascal/axopy", "path": "axopy/task/base.py", "copies": "2", "size": "9010", "license": "mit", "hash": -2989076415180285400, "line_mean": 32.0036630037, "line_max": 79, "alpha_frac": 0.6168701443, "autogenerated": false, "ratio": 4.589913397860418, "config_test": false, "has_...
"""Base task.""" import typing import abc from matchzoo.engine import base_metric from matchzoo.engine import parse_metric class BaseTask(abc.ABC): """Base Task, shouldn't be used directly.""" def __init__(self, loss=None, metrics=None): """ Base task constructor. :param loss: By d...
{ "repo_name": "faneshion/MatchZoo", "path": "matchzoo/engine/base_task.py", "copies": "1", "size": "2175", "license": "apache-2.0", "hash": 8754034912602686000, "line_mean": 25.2048192771, "line_max": 73, "alpha_frac": 0.5848275862, "autogenerated": false, "ratio": 4.206963249516441, "config_te...
"""Base test case class for coverage testing.""" import glob, imp, os, random, shlex, shutil, sys, tempfile, textwrap import atexit import coverage from coverage.backward import sorted, StringIO # pylint: disable=W0622 from coverage.backward import to_bytes from coverage.control import _TEST_NAME_FILE from test....
{ "repo_name": "public/testmon", "path": "test/coveragepy/coveragetest.py", "copies": "1", "size": "20137", "license": "mit", "hash": -7042083300675355000, "line_mean": 35.4141048825, "line_max": 93, "alpha_frac": 0.5742166162, "autogenerated": false, "ratio": 4.128972729136764, "config_test": t...
"""Base test case that'll set up all the required appengine stubs for testing """ # stdlib imports import sys from unittest import TestCase # third-party imports from google.appengine.ext import testbed # local imports from app.base import constants class BaseTestCase(TestCase): """Setup and teardown common to ...
{ "repo_name": "rehabstudio/rehabstudio-gae-scaffold", "path": "src/server/tests/testcases.py", "copies": "2", "size": "3101", "license": "apache-2.0", "hash": 3762525656220651500, "line_mean": 34.6436781609, "line_max": 80, "alpha_frac": 0.6123831022, "autogenerated": false, "ratio": 4.1624161073...
"Base test class and helper methods for writing tests." from __future__ import unicode_literals import random import string import unittest from django.conf import settings from django.contrib.auth import get_user_model from django.test import TestCase from allaccess.models import Provider, AccountAccess def skipI...
{ "repo_name": "mlavin/django-all-access", "path": "allaccess/tests/base.py", "copies": "2", "size": "2288", "license": "bsd-2-clause", "hash": -225533099984542750, "line_mean": 32.6470588235, "line_max": 87, "alpha_frac": 0.6354895105, "autogenerated": false, "ratio": 4.0711743772241995, "confi...
"""Base test classes for async_adapter_tests.py """ import datetime import functools import os import select import ssl import sys import logging import unittest import uuid try: from unittest import mock # pylint: disable=C0412 except ImportError: import mock import pika from pika import adapters from pika...
{ "repo_name": "vitaly-krugl/pika", "path": "tests/acceptance/async_test_base.py", "copies": "1", "size": "14085", "license": "bsd-3-clause", "hash": -2706592036336564000, "line_mean": 36.2619047619, "line_max": 92, "alpha_frac": 0.6110046148, "autogenerated": false, "ratio": 4.288976857490865, ...
"""Base test class for DNS authenticators.""" import os import configobj import josepy as jose import mock import six from acme import challenges from certbot import achallenges from certbot.tests import acme_util from certbot.tests import util as test_util DOMAIN = 'example.com' KEY = jose.JWKRSA.load(test_util.lo...
{ "repo_name": "letsencrypt/letsencrypt", "path": "certbot/plugins/dns_test_common.py", "copies": "1", "size": "1649", "license": "apache-2.0", "hash": -6105668716829079000, "line_mean": 25.1746031746, "line_max": 92, "alpha_frac": 0.6882959369, "autogenerated": false, "ratio": 3.6004366812227073,...
"""Base test class for nbconvert""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import io import os import glob import shutil import unittest import IPython from IPython.nbformat import v4, write from IPython.utils.tempdir import TemporaryWorkingDirectory from...
{ "repo_name": "mattvonrocketstein/smash", "path": "smashlib/ipy3x/nbconvert/tests/base.py", "copies": "1", "size": "4802", "license": "mit", "hash": 6588890226868337000, "line_mean": 31.8904109589, "line_max": 88, "alpha_frac": 0.5962099125, "autogenerated": false, "ratio": 4.306726457399103, "...
"""Base test class.""" import re import responses from requests.status_codes import codes base_url = 'https://onesignal.com/api/v1' class BaseTest(): default_uri = re.compile('%s/(\w+)' % (base_url)) requests_mock = { 'test_view_apps': { 'uri': '%s/apps' % (base_url), 'body':...
{ "repo_name": "joaobarbosa/onesignal-python", "path": "tests/base_test.py", "copies": "1", "size": "3188", "license": "mit", "hash": -6751313143024342000, "line_mean": 36.5058823529, "line_max": 79, "alpha_frac": 0.4927854454, "autogenerated": false, "ratio": 3.2663934426229506, "config_test": ...
base_test_dir = "/tdata/QAP/qc_test" def anatomical_reorient_workflow(workflow, resource_pool, config): # resource pool should have: # anatomical_scan import os import sys import nipype.interfaces.io as nio import nipype.pipeline.engine as pe import nipype.interfaces.utility as uti...
{ "repo_name": "ycq90/my_qap", "path": "qap/anatomical_preproc.py", "copies": "3", "size": "17608", "license": "bsd-3-clause", "hash": -4356995608589866500, "line_mean": 26.2569659443, "line_max": 93, "alpha_frac": 0.6172194457, "autogenerated": false, "ratio": 3.775300171526587, "config_test": ...
"""Base test helpers.""" import os.path from functools import partial from django.contrib.staticfiles import finders from optimizations.assetcache import default_asset_cache, StaticAsset from optimizations.thumbnailcache import open_image def iter_test_assets(valid_extensions): for finder in finders.get_finder...
{ "repo_name": "etianen/django-optimizations", "path": "src/tests/test_optimizations/tests/base.py", "copies": "1", "size": "1355", "license": "bsd-3-clause", "hash": 3075549501232026000, "line_mean": 27.2291666667, "line_max": 69, "alpha_frac": 0.6036900369, "autogenerated": false, "ratio": 4.261...
"""Base text style definitions""" import re # # Bold and text reset switches # RESET = '\033[0m' BOLD = '\033[1m' # # grep/zgrep ansi highlight escape codes # # Start: # grep - \x1b[1;32m\x1b[K # zgrep - \x1b[1;32m # Stop: # grep - \x1b[m\x1b[K # zgrep - \x1b[00m\x1b[K # GREP_HIGHLIGHT_START = '\\\x1b\\[...
{ "repo_name": "khughitt/cats", "path": "cats/styles/colors.py", "copies": "1", "size": "1273", "license": "bsd-2-clause", "hash": -8251022617907923000, "line_mean": 23.0188679245, "line_max": 99, "alpha_frac": 0.5985860173, "autogenerated": false, "ratio": 2.3315018315018317, "config_test": fal...
"""Base ThermoState module.""" # Needed to support Python < 3.9 from __future__ import annotations import sys from typing import TYPE_CHECKING import enum from collections import OrderedDict import CoolProp from pint import UnitRegistry, DimensionalityError from pint.unit import UnitsContainer, UnitDefinition from pin...
{ "repo_name": "bryanwweber/thermostate", "path": "src/thermostate/thermostate.py", "copies": "1", "size": "13752", "license": "bsd-3-clause", "hash": 8355644930269277000, "line_mean": 35.2849604222, "line_max": 88, "alpha_frac": 0.5680628272, "autogenerated": false, "ratio": 3.7769843449601757, ...
class _Thingi(): def __init__(self): self.status = None class Thingi(_Thingi): def __init__(self, mqtt_client, main_topic, qos=0): self.mqtt_client = mqtt_client self.main_topic = main_topic self.callbacks = {} # callbacks for receiving if main_topic == "": ...
{ "repo_name": "ulno/ulnoiot", "path": "lib/integriot/thingi.py", "copies": "2", "size": "5508", "license": "mit", "hash": 2153950734958396400, "line_mean": 32.3818181818, "line_max": 82, "alpha_frac": 0.5760711692, "autogenerated": false, "ratio": 3.846368715083799, "config_test": false, "has...
"""Base tools for visualizing data.""" # --- import -------------------------------------------------------------------------------------- import numpy as np import matplotlib from matplotlib.projections import register_projection import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locata...
{ "repo_name": "wright-group/WrightTools", "path": "WrightTools/artists/_base.py", "copies": "1", "size": "20698", "license": "mit", "hash": 7438778026681997000, "line_mean": 37.258780037, "line_max": 99, "alpha_frac": 0.5561406899, "autogenerated": false, "ratio": 4.234451718494272, "config_tes...
"""Base Tornado handlers for the notebook. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as p...
{ "repo_name": "noslenfa/tdjangorest", "path": "uw/lib/python2.7/site-packages/IPython/html/base/handlers.py", "copies": "1", "size": "14268", "license": "apache-2.0", "hash": 9123647535100333000, "line_mean": 33.2158273381, "line_max": 86, "alpha_frac": 0.5501121391, "autogenerated": false, "rati...
"""Base Tornado handlers for the notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import logging import os import re import sys import traceback try: # py3 from http.client import responses except ImportError:...
{ "repo_name": "wolfram74/numerical_methods_iserles_notes", "path": "venv/lib/python2.7/site-packages/IPython/html/base/handlers.py", "copies": "1", "size": "18497", "license": "mit", "hash": -3970226436803275000, "line_mean": 32.4484629295, "line_max": 100, "alpha_frac": 0.5651186679, "autogenerate...
"""Base Tornado handlers for the notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import os import re import sys import traceback try: # py3 from http.client import responses except ImportError: from httpl...
{ "repo_name": "martydill/url_shortener", "path": "code/venv/lib/python2.7/site-packages/IPython/html/base/handlers.py", "copies": "1", "size": "19982", "license": "mit", "hash": 6437800490178182000, "line_mean": 32.3033333333, "line_max": 100, "alpha_frac": 0.5645581023, "autogenerated": false, "...
"""Base Tornado handlers for the notebook server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import datetime import functools import ipaddress import json import mimetypes import os import re import sys import traceback import types import warnings from htt...
{ "repo_name": "sserrot/champion_relationships", "path": "venv/Lib/site-packages/notebook/base/handlers.py", "copies": "1", "size": "33960", "license": "mit", "hash": 1433801299436028200, "line_mean": 35.0892667375, "line_max": 124, "alpha_frac": 0.583745583, "autogenerated": false, "ratio": 4.400...
"""Base Tornado handlers for the notebook server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import os import re import sys import traceback try: # py3 from http.client import responses except ImportError: from httpl...
{ "repo_name": "unnikrishnankgs/va", "path": "venv/lib/python3.5/site-packages/notebook/base/handlers.py", "copies": "3", "size": "23665", "license": "bsd-2-clause", "hash": 4823182799124576000, "line_mean": 33.3968023256, "line_max": 104, "alpha_frac": 0.5785759561, "autogenerated": false, "ratio...
"""Base Tornado server startup. All the boilerplate we don't care so much about. """ # pylint: disable=W0404 from __future__ import print_function import tornado.web import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.autoreload import motor from magpy.server.con...
{ "repo_name": "catsmith/magpy", "path": "magpy/server/base.py", "copies": "2", "size": "1828", "license": "bsd-3-clause", "hash": -4539767532451620400, "line_mean": 32.2363636364, "line_max": 99, "alpha_frac": 0.5869803063, "autogenerated": false, "ratio": 4.404819277108434, "config_test": fals...
"""Base tornado.web.RequestHandler classes. This package provides a common set of RequestHandler objects to be subclassed in the rest of the app for different URLs. """ import json from concurrent import futures import tornado.ioloop import tornado.web from ndscheduler import settings class BaseHandler(tornado.w...
{ "repo_name": "DurgaChowdary/ndscheduler", "path": "ndscheduler/server/handlers/base.py", "copies": "1", "size": "1091", "license": "bsd-2-clause", "hash": -3666211181159418000, "line_mean": 24.9761904762, "line_max": 83, "alpha_frac": 0.6672777269, "autogenerated": false, "ratio": 4.381526104417...
"""Base Transformation class and associated utilities. """ import re import warnings from abc import ABCMeta, abstractmethod from copy import deepcopy import itertools import inspect import numpy as np import pandas as pd from bids.utils import listify, convert_JSON from bids.variables import SparseRunVariable from ...
{ "repo_name": "INCF/pybids", "path": "bids/analysis/transformations/base.py", "copies": "1", "size": "19296", "license": "mit", "hash": 38004992270811420, "line_mean": 41.0392156863, "line_max": 80, "alpha_frac": 0.5906405473, "autogenerated": false, "ratio": 4.8203847114664, "config_test": fal...
"""Base Transitland Entity.""" import json import mzgeohash import geom import util import errors class Entity(object): """A Transitland Entity.""" # OnestopID prefix. onestop_type = None def __init__(self, **data): """Set name, Onestop ID, and geometry.""" if 'onestop_id' in data: data['one...
{ "repo_name": "srthurman/transitland-python-client", "path": "transitland/entity.py", "copies": "2", "size": "4181", "license": "mit", "hash": 1230604552664190500, "line_mean": 24.6564417178, "line_max": 64, "alpha_frac": 0.6180339632, "autogenerated": false, "ratio": 3.487072560467056, "config...
"""Base translators for translating Grow content.""" import copy import json import logging import os import threading import progressbar import texttable import yaml from protorpc import message_types from protorpc import messages from protorpc import protojson from grow.common import progressbar_non from grow.common...
{ "repo_name": "grow/pygrow", "path": "grow/translators/base.py", "copies": "1", "size": "14705", "license": "mit", "hash": 6179518921691473000, "line_mean": 38.1090425532, "line_max": 92, "alpha_frac": 0.5763345801, "autogenerated": false, "ratio": 4.2921774664331585, "config_test": false, "h...
"""Base transport interface.""" # flake8: noqa from __future__ import absolute_import, unicode_literals import errno import socket from amqp.exceptions import RecoverableConnectionError from kombu.exceptions import ChannelError, ConnectionError from kombu.five import items from kombu.message import Message from kom...
{ "repo_name": "cloudera/hue", "path": "desktop/core/ext-py/kombu-4.3.0/kombu/transport/base.py", "copies": "4", "size": "7361", "license": "apache-2.0", "hash": 5974532577048065000, "line_mean": 27.6420233463, "line_max": 79, "alpha_frac": 0.6330661595, "autogenerated": false, "ratio": 4.02680525...
"""Base transport interface.""" # flake8: noqa import errno import socket from amqp.exceptions import RecoverableConnectionError from kombu.exceptions import ChannelError, ConnectionError from kombu.message import Message from kombu.utils.functional import dictfilter from kombu.utils.objects import cached_property ...
{ "repo_name": "ZoranPavlovic/kombu", "path": "kombu/transport/base.py", "copies": "1", "size": "7239", "license": "bsd-3-clause", "hash": -5537921969448263000, "line_mean": 27.5, "line_max": 79, "alpha_frac": 0.6311645255, "autogenerated": false, "ratio": 4.028380634390651, "config_test": false...
"""Base transport interface.""" from __future__ import absolute_import, unicode_literals import errno import socket from amqp.exceptions import RecoverableConnectionError from kombu.exceptions import ChannelError, ConnectionError from kombu.five import items from kombu.message import Message from kombu.utils.functio...
{ "repo_name": "pexip/os-kombu", "path": "kombu/transport/base.py", "copies": "1", "size": "7345", "license": "bsd-3-clause", "hash": 209232227187159500, "line_mean": 27.8039215686, "line_max": 79, "alpha_frac": 0.6330837304, "autogenerated": false, "ratio": 4.033498077979132, "config_test": fal...
"""Base tree adapter class with common methods needed for visualisations.""" from abc import ABCMeta, abstractmethod from functools import reduce from operator import add class BaseTreeAdapter(metaclass=ABCMeta): """Base class for tree representation. Any subclass should implement the methods listed in this ...
{ "repo_name": "cheral/orange3", "path": "Orange/widgets/visualize/utils/tree/treeadapter.py", "copies": "1", "size": "7158", "license": "bsd-2-clause", "hash": 3575629090156243000, "line_mean": 19.2776203966, "line_max": 81, "alpha_frac": 0.5331098072, "autogenerated": false, "ratio": 4.922971114...
"""Base type for objects supporting yakonfig. .. This software is released under an MIT/X11 open source license. Copyright 2014-2015 Diffeo, Inc. Purpose ======= Provides a common place to declare command-line arguments and default configuration to yakonfig. Configurable object classes can be passed into :func:`...
{ "repo_name": "diffeo/yakonfig", "path": "yakonfig/configurable.py", "copies": "1", "size": "11350", "license": "mit", "hash": -4428031728977962500, "line_mean": 34.1393188854, "line_max": 78, "alpha_frac": 0.6665198238, "autogenerated": false, "ratio": 4.412908242612753, "config_test": true, ...
"""Base types for `xcrun simctl`.""" import enum import json from typing import Any, Dict import subprocess class ErrorCodes(enum.Enum): """Simple lookup for all known error codes.""" # Tried to access a file or directory (such as by searching for an app # container) that doesn't exist #no_such_file...
{ "repo_name": "dalemyers/xcrun", "path": "isim/base_types.py", "copies": "1", "size": "3475", "license": "mit", "hash": -4084051533225033700, "line_mean": 33.75, "line_max": 125, "alpha_frac": 0.6474820144, "autogenerated": false, "ratio": 3.904494382022472, "config_test": false, "has_no_keyw...
base_types = [ 'char', 'short', 'int', 'long', 'long long' ] types = ['char'] + ['%s %s' % (signed, t) for signed in ('signed', 'unsigned') for t in base_types] binary_operators = [ ('+', 'plus', False), ('-', 'minus', False), ('*', 'times', Fals...
{ "repo_name": "jchl/tvc", "path": "csyntax.py", "copies": "1", "size": "1348", "license": "mit", "hash": 6000043042650161000, "line_mean": 22.2413793103, "line_max": 100, "alpha_frac": 0.4651335312, "autogenerated": false, "ratio": 3.0636363636363635, "config_test": false, "has_no_keywords": ...
# BaseUI # (open/close, basic commands) # from getpass import getpass from functools import wraps from collections import Counter import itertools import os.path import fcntl import sys from keybox.keybox import Keybox, KeyboxRecord from keybox.stringutil import contains from keybox.editor import InlineEditor DATA_D...
{ "repo_name": "rbrich/keys", "path": "keybox/ui.py", "copies": "1", "size": "13707", "license": "mit", "hash": -1563915306123843800, "line_mean": 33.0124069479, "line_max": 79, "alpha_frac": 0.5644561173, "autogenerated": false, "ratio": 4.330805687203791, "config_test": false, "has_no_keywor...
# base_uploader import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../..") from slideatlas import create_app from slideatlas.models import Collection, Session, View import logging logger = logging.getLogger('slideatlas') import pymongo from bson.objectid import ObjectId, InvalidId ...
{ "repo_name": "SlideAtlas/SlideAtlas-Server", "path": "slideatlas/uploader/mongo_uploader_base.py", "copies": "1", "size": "6759", "license": "apache-2.0", "hash": 8443791498183656000, "line_mean": 32.2955665025, "line_max": 124, "alpha_frac": 0.5789317946, "autogenerated": false, "ratio": 4.4003...
# baseURI: https://www.github.com/superphy# from datetime import datetime from rdflib import Literal from middleware.graphers.turtle_grapher import generate_graph from middleware.graphers.turtle_utils import generate_uri as gu, link_uris from middleware.blazegraph.reserve_id import reservation_triple from scripts.savvy...
{ "repo_name": "superphy/backend", "path": "app/scripts/generate_ontology.py", "copies": "1", "size": "11226", "license": "apache-2.0", "hash": -4210168043458786000, "line_mean": 39.8218181818, "line_max": 204, "alpha_frac": 0.6300552289, "autogenerated": false, "ratio": 3.291116974494283, "conf...
"""Base URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
{ "repo_name": "sundeep-co-in/transtats", "path": "transtats/urls.py", "copies": "1", "size": "1190", "license": "apache-2.0", "hash": 8338390266662954000, "line_mean": 33, "line_max": 79, "alpha_frac": 0.6966386555, "autogenerated": false, "ratio": 3.5, "config_test": false, "has_no_keywords"...
base_url = ('http://gatherer.wizards.com/Pages/Search/Default.aspx' '?action=advanced&') random_url = 'http://gatherer.wizards.com/Pages/Card/Details.aspx?action=random' TYPES = set([ 'artifact', 'basic', 'conspiracy', 'creature', 'enchantment', 'instant', 'land', 'legendar...
{ "repo_name": "chigby/mtg", "path": "mtglib/constants.py", "copies": "1", "size": "3967", "license": "mit", "hash": 4564133936353135000, "line_mean": 23.79375, "line_max": 80, "alpha_frac": 0.575749937, "autogenerated": false, "ratio": 2.940696812453669, "config_test": false, "has_no_keywords...
BASE_URL = "http://thetvdb.com" HEADERS = { "Referer": BASE_URL, } API_URL = "%s/api" % BASE_URL API_KEY = "1D62F2F90030C444" LANG = "en" def dom2dict(node): ret = {} for child in node: if len(child): ret.setdefault(child.tag.lower(), []).append(dom2dict(child)) else: ...
{ "repo_name": "neno1978/xbmctorrent", "path": "resources/site-packages/xbmctorrent/tvdb.py", "copies": "1", "size": "6521", "license": "apache-2.0", "hash": 5424469327790077000, "line_mean": 31.2821782178, "line_max": 142, "alpha_frac": 0.5463885907, "autogenerated": false, "ratio": 3.46125265392...
BASE_URL = "http://www.dev.patentsview.org/api/" import glob, jinja2, json, openpyxl, os, shutil, sys import xml.etree.ElementTree as ET def extract_field_list(ws): ary = [] header = None def encode(s): if s: return s.encode("iso-8859-1", "xmlcharrefreplace").decode("utf-8") ...
{ "repo_name": "CSSIP-AIR/PatentsView-API", "path": "querymodule/doc/make_doc.py", "copies": "1", "size": "3453", "license": "bsd-2-clause", "hash": -7515698446399478000, "line_mean": 27.3032786885, "line_max": 107, "alpha_frac": 0.5893426006, "autogenerated": false, "ratio": 3.3491755577109603, ...
"""Base url routes. This module also dynamically adds url routes to applications present in INSTALLED_APPS; see the comments below. URLs ---- / about/ add_project/ project/ """ from django.conf.urls import patterns, include, url from base import views project_slug = r'^projects/(?P<project_slug>[\w-]+)/' urlpat...
{ "repo_name": "0x0mar/memex-explorer", "path": "source/base/urls.py", "copies": "1", "size": "1253", "license": "bsd-2-clause", "hash": -423405133094091840, "line_mean": 25.1041666667, "line_max": 79, "alpha_frac": 0.6799680766, "autogenerated": false, "ratio": 3.404891304347826, "config_test":...
"""Base utilities and classes for our tests.""" from unittest import TestCase from pyramid import testing from pyramid.testing import DummyRequest as BaseRequest def get_testing_db_session(): from brouz.models import DBSession from brouz.models import initialize_sql initialize_sql('sqlite://') retu...
{ "repo_name": "dbaty/Brouz", "path": "brouz/tests/base.py", "copies": "1", "size": "1440", "license": "bsd-3-clause", "hash": 5513184913543733000, "line_mean": 28.387755102, "line_max": 70, "alpha_frac": 0.6715277778, "autogenerated": false, "ratio": 4.056338028169014, "config_test": true, "h...
"""Base utilities for loading datasets.""" # Copyright 2015-present The Scikit Flow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
{ "repo_name": "shishaochen/TensorFlow-0.8-Win", "path": "tensorflow/contrib/learn/python/learn/datasets/base.py", "copies": "1", "size": "3404", "license": "apache-2.0", "hash": 2330221528600214500, "line_mean": 31.419047619, "line_max": 78, "alpha_frac": 0.6880141011, "autogenerated": false, "ra...
"""baseutilities.py Module of helper functions used in the RDF Framework that require no other framework dependancies """ import copy import datetime import os import re import requests import pdb import logging import inspect import pprint import pydoc from base64 import b64decode from flask import json from jinja2...
{ "repo_name": "KnowledgeLinks/rdfframework", "path": "rdfframework/utilities/baseutilities.py", "copies": "1", "size": "25214", "license": "mit", "hash": -9133811731056929000, "line_mean": 30.1283950617, "line_max": 94, "alpha_frac": 0.5315301023, "autogenerated": false, "ratio": 4.01241247612985...
""" Base variables to build probabilistic graph. """ __author__ = "arnaud.rachez@gmail.com" from abc import ABCMeta, abstractmethod from copy import copy from inspect import getargspec import numpy as np from scipy.stats import beta, invgamma, laplace, norm from scipy.stats import binom, uniform from .distributions...
{ "repo_name": "zermelozf/minipgm", "path": "minipgm/variables.py", "copies": "1", "size": "7665", "license": "bsd-3-clause", "hash": -2160352394883446300, "line_mean": 25.6145833333, "line_max": 80, "alpha_frac": 0.572863666, "autogenerated": false, "ratio": 3.882978723404255, "config_test": fa...
"""Base Vault Resources""" import os import shutil import logging import yaml import hvac.exceptions from aomi.util import vault_time_to_s from aomi.vault import wrap_hvac as wrap_vault from aomi.helpers import is_tagged, hard_path, diff_dict, map_val, \ open_maybe_binary from aomi.model.backend import MOUNT_TUNABL...
{ "repo_name": "otakup0pe/aomi", "path": "aomi/model/resource.py", "copies": "1", "size": "12290", "license": "mit", "hash": -2672803714864046000, "line_mean": 31.5132275132, "line_max": 77, "alpha_frac": 0.5641171684, "autogenerated": false, "ratio": 4.044093451793353, "config_test": true, "h...
"""Base views for autocomplete widgets.""" import json import operator from functools import reduce import django from django import http from django.contrib.admin.utils import lookup_needs_distinct from django.contrib.auth import get_permission_codename from django.core.exceptions import ImproperlyConfigured from dj...
{ "repo_name": "yourlabs/django-autocomplete-light", "path": "src/dal/views.py", "copies": "1", "size": "6684", "license": "mit", "hash": -8567868419778665000, "line_mean": 33.6321243523, "line_max": 88, "alpha_frac": 0.6116098145, "autogenerated": false, "ratio": 4.320620555914673, "config_test...
"""Base views for autocomplete widgets.""" import json from django import http from django.contrib.auth import get_permission_codename from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.views.generic.list import BaseListView class ViewMixin(object): """Common method...
{ "repo_name": "shubhamdipt/django-autocomplete-light", "path": "src/dal/views.py", "copies": "2", "size": "3438", "license": "mit", "hash": -2744886065484019000, "line_mean": 32.0576923077, "line_max": 79, "alpha_frac": 0.6326352531, "autogenerated": false, "ratio": 4.23921085080148, "config_te...
"""Base views for autocomplete widgets.""" import json from django.utils import six from django.views.generic.list import BaseListView class ViewMixin(object): """Common methods for autocomplete views. .. py:attribute:: forwarded Dict of field values that were forwarded from the form, may be used ...
{ "repo_name": "Eraldo/django-autocomplete-light", "path": "src/dal/views.py", "copies": "3", "size": "1490", "license": "mit", "hash": -6800217183480856000, "line_mean": 28.2156862745, "line_max": 78, "alpha_frac": 0.6308724832, "autogenerated": false, "ratio": 4.048913043478261, "config_test":...
"""Base views.""" from __future__ import absolute_import import json import shutil import os from django.shortcuts import render from django.views import generic from django.views.generic import ListView, TemplateView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.con...
{ "repo_name": "kod3r/memex-explorer", "path": "source/base/views.py", "copies": "2", "size": "13167", "license": "bsd-2-clause", "hash": -9204307022716332000, "line_mean": 35.7793296089, "line_max": 121, "alpha_frac": 0.6020353915, "autogenerated": false, "ratio": 4.013105760438891, "config_tes...
"""Base views.""" import json import shutil import os from django.shortcuts import render from django.views import generic from django.views.generic import ListView, TemplateView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.contrib.messages.views import SuccessMessag...
{ "repo_name": "0x0mar/memex-explorer", "path": "source/base/views.py", "copies": "1", "size": "2263", "license": "bsd-2-clause", "hash": -9094605408788927000, "line_mean": 28.0128205128, "line_max": 78, "alpha_frac": 0.7224922669, "autogenerated": false, "ratio": 3.848639455782313, "config_test...
# base views from config import SECRET_KEY, PASSWORD_RESET_EMAIL from datetime import datetime, timedelta from functools import wraps from flask import g, Blueprint, jsonify, make_response, request from flask_restful import Resource, Api import flask_restful from flask_mail import Mail, Message from werkzeug.se...
{ "repo_name": "schiluka/TimeTrack", "path": "app/base_view.py", "copies": "1", "size": "7427", "license": "mit", "hash": -6295247082028463000, "line_mean": 30.1515151515, "line_max": 79, "alpha_frac": 0.5730442978, "autogenerated": false, "ratio": 4.578914919852035, "config_test": false, "has...
"""Base view(s) which parse a model from a controller into a request and a request into a dictionary for the controller. """ from needs import needs from flask import request, jsonify, session from flask.ext.classy import FlaskView from peanuts.lib.auth import app_need, csrf_need __all__ = ['BaseView', 'BaseR...
{ "repo_name": "astex/peanuts", "path": "peanuts/views/base.py", "copies": "1", "size": "2754", "license": "mit", "hash": -5289483158505236000, "line_mean": 27.6875, "line_max": 74, "alpha_frac": 0.5820624546, "autogenerated": false, "ratio": 4.413461538461538, "config_test": false, "has_no_ke...
"""Base VRML97 node prototypes""" from vrml.vrml97 import nodetypes, transformmatrix from vrml import node, field, fieldtypes, cache class Anchor( nodetypes.Children, nodetypes.Grouping, node.Node ): PROTO = 'Anchor' #Fields url = field.newField( 'url', 'MFString', 1, list) description = field.newField(...
{ "repo_name": "alexus37/AugmentedRealityChess", "path": "pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/vrml/vrml97/basenodes.py", "copies": "3", "size": "28273", "license": "mit", "hash": 2808210872496823000, "line_mean": 42.6311728395, "line_max": 130, "alpha_fr...
"""Base Widget class. Allows user to create widgets in the back-end that render in the IPython notebook front-end. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The ...
{ "repo_name": "mattvonrocketstein/smash", "path": "smashlib/ipy3x/html/widgets/widget.py", "copies": "1", "size": "18157", "license": "mit", "hash": 2933190855823550000, "line_mean": 35.9044715447, "line_max": 111, "alpha_frac": 0.5425455747, "autogenerated": false, "ratio": 4.514420686225758, ...
"""Base Widget class. Allows user to create widgets in the back-end that render in the IPython notebook front-end. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from contextlib import contextmanager import collections import sys from IPython.core.getipytho...
{ "repo_name": "fzheng/codejam", "path": "lib/python2.7/site-packages/ipywidgets/widgets/widget.py", "copies": "1", "size": "18340", "license": "mit", "hash": -3841636361718517000, "line_mean": 35.9758064516, "line_max": 146, "alpha_frac": 0.5617230098, "autogenerated": false, "ratio": 4.470989761...
"""Base worker implmentation""" import logging import zmq log = logging.getLogger(__name__) class BaseWorker: """Base worker class. This class cannot be used "as is", it will raises an ``ImplementationError`` in ``process_data`` methode. ``BaseWorker`` provide only a skeleton to help you to develop yo...
{ "repo_name": "TheGhouls/zerolog", "path": "zerolog/worker.py", "copies": "1", "size": "1740", "license": "mit", "hash": 1035422326852587500, "line_mean": 32.4615384615, "line_max": 109, "alpha_frac": 0.6103448276, "autogenerated": false, "ratio": 4.296296296296297, "config_test": false, "has...
"""Base wrapper of scikit-learn-style numpy array predictions. Functionalities: - Hiding implementation details of prediction types (e.g., number of dimensions, semantics of columns). - Providing a numpy array view through ``y_pred``. The ``y_pred`` view is used in ``rampwf.score``s as input, and in the default im...
{ "repo_name": "paris-saclay-cds/ramp-workflow", "path": "rampwf/prediction_types/base.py", "copies": "1", "size": "4750", "license": "bsd-3-clause", "hash": -8993022058399777000, "line_mean": 41.4107142857, "line_max": 79, "alpha_frac": 0.6446315789, "autogenerated": false, "ratio": 4.08777969018...
"""BaseX encoding""" import pandas as pd import numpy as np import math import re from sklearn.base import BaseEstimator, TransformerMixin from category_encoders.ordinal import OrdinalEncoder import category_encoders.utils as util import warnings __author__ = 'willmcginnis' class BaseNEncoder(BaseEstimator, Transfo...
{ "repo_name": "wdm0006/categorical_encoding", "path": "category_encoders/basen.py", "copies": "2", "size": "14209", "license": "bsd-3-clause", "hash": 8417688914743030000, "line_mean": 33.2385542169, "line_max": 123, "alpha_frac": 0.5687240481, "autogenerated": false, "ratio": 4.053922967189729, ...
__author__ = 'Jeffrey' import random import time def doing(activity, use_time): print activity , int(use_time) * 5 + 1, "minutes" class PythonProgrammer(object): real_English_name = "Jeffrey Chu" nick_name = "魔术师Jeffrey Chu" occupation = "Server development engineer" hobbies = ["魔术", "美食", "编程", ...
{ "repo_name": "duanhun/apk_for_linux", "path": "introduction.py", "copies": "1", "size": "1091", "license": "apache-2.0", "hash": -380682773125670850, "line_mean": 26.1282051282, "line_max": 119, "alpha_frac": 0.5752128666, "autogenerated": false, "ratio": 3.136498516320475, "config_test": fals...
#!/bash/bin/python2 """ Usage: python procSpec.py [path to folder containing data files] [title of plot] e.g. python procSpec.py greenlaser/18nov2015 "green laser" Output: eps file inside the folder that datafiles are in, plots with error bars being the standard deviation for that data point. This script ...
{ "repo_name": "sunjerry019/photonLauncher", "path": "0_hcphotonics/0_archive/oceanoptics_outdated/procSpec.py", "copies": "1", "size": "3623", "license": "apache-2.0", "hash": 79925046182456000, "line_mean": 33.5196078431, "line_max": 140, "alpha_frac": 0.482749103, "autogenerated": false, "ratio...
BASH = """ function _passpie() { COMPREPLY=() local word="${COMP_WORDS[COMP_CWORD]}" if [ "$COMP_CWORD" -eq 1 ]; then COMPREPLY=( $(compgen -W "{commands}" -- "$word") ) else local words=("${COMP_WORDS[@]}") unset words[0] unset words[$COMP_CWORD] COMPREPLY=( $(c...
{ "repo_name": "eiginn/passpie", "path": "passpie/completion.py", "copies": "3", "size": "2346", "license": "mit", "hash": -4611751328243717000, "line_mean": 24.7802197802, "line_max": 121, "alpha_frac": 0.5430520034, "autogenerated": false, "ratio": 3.0154241645244215, "config_test": true, "h...
"""Bash-style brace expansion""" import re import string import sys from itertools import chain, product # flake8: noqa __version__ = '0.1.2' __all__ = ['braceexpand', 'alphabet', 'UnbalancedBracesError'] class UnbalancedBracesError(ValueError): pass PY3 = sys.version_info[0] >= 3 if PY3: xrange = range alph...
{ "repo_name": "arnehilmann/yum-repos", "path": "src/main/python/braceexpand.py", "copies": "2", "size": "6234", "license": "apache-2.0", "hash": 3148495384738524000, "line_mean": 28.5450236967, "line_max": 77, "alpha_frac": 0.5911132499, "autogenerated": false, "ratio": 3.6307513104251603, "con...
"""Bash-style brace expansion""" import re import string import sys from itertools import chain, product __version__ = '0.1.6' __all__ = ['braceexpand', 'alphabet', 'UnbalancedBracesError'] class UnbalancedBracesError(ValueError): pass PY3 = sys.version_info[0] >= 3 if PY3: xrange = range alphabet = string.as...
{ "repo_name": "trendels/braceexpand", "path": "braceexpand.py", "copies": "1", "size": "6700", "license": "mit", "hash": 7431161970496582000, "line_mean": 28.6460176991, "line_max": 77, "alpha_frac": 0.5791044776, "autogenerated": false, "ratio": 3.6512261580381473, "config_test": false, "has...
"""bashtasks implementation module """ import json import time from datetime import datetime import pika from bashtasks.constants import TASK_RESPONSES_POOL, TASK_REQUESTS_POOL from bashtasks.constants import Destination, DestinationNames from bashtasks.rabbit_util import connect_and_declare, declare_and_bind, close_c...
{ "repo_name": "javierarilos/bashtasks", "path": "src/bashtasks/bashtasks_client.py", "copies": "1", "size": "3047", "license": "apache-2.0", "hash": -4544215961362344000, "line_mean": 34.8470588235, "line_max": 109, "alpha_frac": 0.6659008861, "autogenerated": false, "ratio": 3.7386503067484664, ...
"""Bashup Usage: bashup (--in=FILE|-i FILE) [--out=FILE|-o FILE] bashup (--run=FILE|-r FILE) [-- <arg>...] bashup -h | --help | --version Options: -h --help Show this help. --version Display the version. -i FILE --in=FILE The bashup file to compile to bash. -o FILE --out=FI...
{ "repo_name": "themattrix/bashup", "path": "bashup/__main__.py", "copies": "1", "size": "1909", "license": "mit", "hash": -2618377452421581000, "line_mean": 28.3692307692, "line_max": 119, "alpha_frac": 0.6102671556, "autogenerated": false, "ratio": 3.1763727121464225, "config_test": false, "...
BASIC = 0 IFELSE = 1 WHILE = 2 FOR = 3 #------------------------------------------------------------------------ # Blocks #------------------------------------------------------------------------ class Block(object): _count = 0 def __init__(self, label=None): self.instrs = [] self.next_b...
{ "repo_name": "seibert/blaze-core", "path": "blaze/blir/blocks.py", "copies": "1", "size": "1542", "license": "bsd-2-clause", "hash": -2718229833234673700, "line_mean": 21.347826087, "line_max": 79, "alpha_frac": 0.4805447471, "autogenerated": false, "ratio": 3.893939393939394, "config_test": f...
"basic 2D vector geometry" from math import acos, sqrt, sin, cos, pi class Vec2D(object): " Simple 2D vector class for euclidean geometry " EPSILON = 0.0001 def __init__(self, x=0.0, y=0.0): self.pos_x = x self.pos_y = y def dot(self, other): "dot product" return sel...
{ "repo_name": "31415us/linda-lidar-rangefinder-playground", "path": "linda/Vec2D.py", "copies": "1", "size": "2599", "license": "mit", "hash": -665069860922158500, "line_mean": 24.99, "line_max": 72, "alpha_frac": 0.5602154675, "autogenerated": false, "ratio": 3.336328626444159, "config_test": ...
"""Basic admin handler.""" from __future__ import annotations import typing as t import inspect import marshmallow as ma from muffin_rest.handler import RESTBase, RESTOptions from .typing import RA_INFO, RA_CONVERTER class AdminOptions(RESTOptions): """Prepare admin handler.""" limit: int = 25 limit...
{ "repo_name": "klen/muffin-admin", "path": "muffin_admin/handler.py", "copies": "1", "size": "7231", "license": "mit", "hash": -6863448615614498000, "line_mean": 31.7194570136, "line_max": 127, "alpha_frac": 0.5433549993, "autogenerated": false, "ratio": 3.9556892778993435, "config_test": false...
#basically all of this code thanks to Google API reference. #added send(message) function and removed main method so that #you can import this file and do one simple call to send(message) #to text yourself when an event occurs in your code from __future__ import print_function import httplib2 import os from apiclient...
{ "repo_name": "rchurch4/georgetown-data-science-fall-2015", "path": "misc/python_message.py", "copies": "1", "size": "3481", "license": "mit", "hash": 8002260889235487000, "line_mean": 27.5409836066, "line_max": 73, "alpha_frac": 0.7385808676, "autogenerated": false, "ratio": 3.5055387713997987, ...
# Basically a stripped-down version of # https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). flags = [ '-Wall', '-Wextra', '-Werror', ...
{ "repo_name": "shwsun/yavc", "path": ".ycm_extra_conf.py", "copies": "1", "size": "1607", "license": "mit", "hash": -797031711688865900, "line_mean": 24.109375, "line_max": 71, "alpha_frac": 0.6303671437, "autogenerated": false, "ratio": 3.383157894736842, "config_test": false, "has_no_keywor...
# Basically just a sanity check to make sure things don't change from underneath us. from django.test import TestCase from apiserver.http import * class HttpTestCase(TestCase): def test_various_statuses(self): created = HttpCreated(location='http://example.com/thingy/1/') self.assertEqual(created....
{ "repo_name": "camayak/django-apiserver", "path": "tests/core/tests/http.py", "copies": "1", "size": "1245", "license": "bsd-2-clause", "hash": 6931210049242093000, "line_mean": 43.4642857143, "line_max": 84, "alpha_frac": 0.6835341365, "autogenerated": false, "ratio": 4.068627450980392, "confi...
# Basically just a sanity check to make sure things don't change from underneath us. from django.test import TestCase from tastefulpy.http import * class HttpTestCase(TestCase): def test_various_statuses(self): created = HttpCreated(location='http://example.com/thingy/1/') self.assertEqual(created...
{ "repo_name": "mjschultz/django-tastefulpy", "path": "tests/core/tests/http.py", "copies": "1", "size": "1693", "license": "bsd-3-clause", "hash": 6538486218191768000, "line_mean": 43.5526315789, "line_max": 84, "alpha_frac": 0.6733608978, "autogenerated": false, "ratio": 4.021377672209026, "co...
# Basically just a sanity check to make sure things don't change from underneath us. from django.test import TestCase from tastypie.http import HttpAccepted, HttpBadRequest, HttpConflict,\ HttpCreated, HttpGone, HttpMethodNotAllowed, HttpNoContent, HttpNotFound,\ HttpNotImplemented, HttpNotModified, HttpSeeOthe...
{ "repo_name": "cbxcube/bezrealitky.py", "path": "tests/core/tests/http.py", "copies": "10", "size": "1911", "license": "bsd-3-clause", "hash": 3001440485656557600, "line_mean": 45.6097560976, "line_max": 84, "alpha_frac": 0.6907378336, "autogenerated": false, "ratio": 4.083333333333333, "config...
# Basically just a sanity check to make sure things don't change from underneath us. from django.test import TestCase from tastypie.http import * class HttpTestCase(TestCase): def test_various_statuses(self): created = HttpCreated(location='http://example.com/thingy/1/') self.assertEqual(created.s...
{ "repo_name": "mozilla/inventory", "path": "vendor-local/src/django-tastypie/tests/core/tests/http.py", "copies": "39", "size": "1691", "license": "bsd-3-clause", "hash": 5377623371942846000, "line_mean": 43.5, "line_max": 84, "alpha_frac": 0.6729745713, "autogenerated": false, "ratio": 4.0261904...
# basically just parse & make it easier to access the DN data from the output of # "dynodelist full" class Dynode(): def __init__(self, collateral, dnstring): (txid, vout_index) = self.parse_collateral_string(collateral) self.txid = txid self.vout_index = int(vout_index) (status, ...
{ "repo_name": "SilkNetwork/DarkSilk-Sentinel", "path": "lib/dynode.py", "copies": "1", "size": "1375", "license": "mit", "hash": 464580796083070850, "line_mean": 32.5365853659, "line_max": 112, "alpha_frac": 0.6385454545, "autogenerated": false, "ratio": 3.696236559139785, "config_test": false,...
# basically just parse & make it easier to access the MN data from the output # of "masternodelist full" class Masternode(): def __init__(self, collateral, mnstring): (txid, vout_index) = self.parse_collateral_string(collateral) self.txid = txid self.vout_index = int(vout_index) (...
{ "repo_name": "nmarley/mn-status-check", "path": "lib/masternode.py", "copies": "1", "size": "1533", "license": "mit", "hash": 1809801032858671400, "line_mean": 27.9245283019, "line_max": 77, "alpha_frac": 0.5779517286, "autogenerated": false, "ratio": 3.9921875, "config_test": false, "has_no...
# basically just parse & make it easier to access the MN data from the output of # "masternodelist full" class Masternode(): def __init__(self, collateral, mnstring): (txid, vout_index) = self.parse_collateral_string(collateral) self.txid = txid self.vout_index = int(vout_index) (...
{ "repo_name": "dashpay/sentinel", "path": "lib/masternode.py", "copies": "1", "size": "1435", "license": "mit", "hash": -3554648714030255000, "line_mean": 32.3720930233, "line_max": 85, "alpha_frac": 0.6139372822, "autogenerated": false, "ratio": 3.727272727272727, "config_test": false, "has_...
""" Basically small util to visualize the graphs """ from core.utils.Aggregators import Approach, Aggregators, PlotTypes from core.db_style.basic_functions import PostgresDBUnit from core.pandas_style.basic_functions import PandasUtil import plotly from typing import List, Tuple import plotly.graph_objs as go from co...
{ "repo_name": "Alisa-lisa/FinReporter", "path": "core/visualizing/OnlinePlotting.py", "copies": "1", "size": "8547", "license": "mit", "hash": -7508762473748861000, "line_mean": 39.8947368421, "line_max": 100, "alpha_frac": 0.5248625249, "autogenerated": false, "ratio": 4.2906626506024095, "con...
"""Basically, this is currently just a class of static utility methods to deal with term identifiers. Assume everything in this file is Waterloo-specific. """ import datetime import logging import mongoengine as me import rmc.shared.util as util # TODO(david): Make naming consistent... prefix all methods with a v...
{ "repo_name": "UWFlow/rmc", "path": "models/term.py", "copies": "8", "size": "5250", "license": "mit", "hash": -1828529790839413200, "line_mean": 29.3468208092, "line_max": 79, "alpha_frac": 0.596, "autogenerated": false, "ratio": 3.367543296985247, "config_test": false, "has_no_keywords": fa...
""" Basically this program makes with python this gst-launch-1.0 -v tcpclientsrc host=192.168.1.70 port=5000 \ ! gdpdepay ! rtph264depay ! avdec_h264 \ ! videoconvert ! autovideosink sync=false """ import gi gi.require_version('Gst','1.0') gi.require_version('Gtk','3...
{ "repo_name": "Laucoonte/cpmx", "path": "gstreamFromRasp.py", "copies": "1", "size": "3647", "license": "mit", "hash": 3027673504868228600, "line_mean": 35.8383838384, "line_max": 128, "alpha_frac": 0.6339457088, "autogenerated": false, "ratio": 3.3184713375796178, "config_test": false, "has_...
"""Basically what I did in WinPredictionBot Value-Network with 3*81-vector as input containing the encoded board """ import os import numpy as np from src.learn.bots.CommonLearn import CommonLearn import src.learn.bots.utils as utils class Learn(CommonLearn): def handle_data(self, data): boards = data[da...
{ "repo_name": "nathbo/GO_DILab", "path": "src/learn/bots/_32/learn.py", "copies": "1", "size": "1148", "license": "mit", "hash": 133883610965370780, "line_mean": 27, "line_max": 75, "alpha_frac": 0.6158536585, "autogenerated": false, "ratio": 3.4893617021276597, "config_test": false, "has_no_...
# Basic application to load a mesh from file and view it in a window # Python imports import sys, os import euclid as eu import time import numpy as np import scipy.sparse import scipy.sparse.linalg ## Imports from this project sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'core')) # hack to allow loc...
{ "repo_name": "nmwsharp/DDGSpring2016", "path": "Assignment3/Assignment3.py", "copies": "1", "size": "15990", "license": "mit", "hash": 6402306295423013000, "line_mean": 36.5352112676, "line_max": 156, "alpha_frac": 0.6233896185, "autogenerated": false, "ratio": 4.523338048090523, "config_test"...
# Basic application to load a mesh from file and view it in a window # Python imports import sys, os import euclid as eu import time import random import numpy as np import scipy.sparse import scipy.sparse.linalg ## Imports from this project sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'core')) # hac...
{ "repo_name": "nmwsharp/DDGSpring2016", "path": "Assignment5/Assignment5.py", "copies": "1", "size": "18984", "license": "mit", "hash": 378826052902557760, "line_mean": 41.6606741573, "line_max": 166, "alpha_frac": 0.6479667088, "autogenerated": false, "ratio": 4.217729393468118, "config_test":...
# Basic application to load a mesh from file and view it in a window # Python imports import sys, os import euclid as eu ## Imports from this project sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'core')) # hack to allow local imports without creaing a module or modifying the path variable from InputO...
{ "repo_name": "nmwsharp/DDGSpring2016", "path": "Assignment2/Assignment2.py", "copies": "1", "size": "11896", "license": "mit", "hash": -4904859701797799000, "line_mean": 35.9440993789, "line_max": 156, "alpha_frac": 0.6683759247, "autogenerated": false, "ratio": 4.193161790623899, "config_test...
"""Basic archetypes for testing the deployment of python facilities from python institutions""" import random from cyclus import lib import cyclus.typesystem as ts from cyclus.agents import Institution, Facility class NOInst(Institution): """ This institution deploys facilities based on demand curves using ...
{ "repo_name": "Baaaaam/cyclus", "path": "tests/bear_deploy.py", "copies": "3", "size": "3732", "license": "bsd-3-clause", "hash": -6712290281395005000, "line_mean": 30.8974358974, "line_max": 95, "alpha_frac": 0.6125401929, "autogenerated": false, "ratio": 3.9201680672268906, "config_test": fal...
"""basic_association.py illustrate a many-to-many relationship between an "Order" and a collection of "Item" objects, associating a purchase price with each via an association object called "OrderItem" The association object pattern is a form of many-to-many which associates additional data with each association betw...
{ "repo_name": "davidjb/sqlalchemy", "path": "examples/association/basic_association.py", "copies": "30", "size": "3233", "license": "mit", "hash": -5717170450066751000, "line_mean": 31.9897959184, "line_max": 78, "alpha_frac": 0.6606866687, "autogenerated": false, "ratio": 3.7418981481481484, "...
""" Basic auction runner """ from pprint import pprint from splitter import Cost from surplus_maximizer import SurplusMaximizer class Auction(object): def run(self): auctions = [] print "Welcome to splitit!" while True: action = raw_input("> ") if action in ("h", "...
{ "repo_name": "jolynch/splitit", "path": "splitit/auction.py", "copies": "1", "size": "3216", "license": "mit", "hash": -6799533335627966000, "line_mean": 34.7333333333, "line_max": 107, "alpha_frac": 0.4925373134, "autogenerated": false, "ratio": 3.73953488372093, "config_test": false, "has_...
"""Basic audio filters""" import sys import numpy as np import librosa.core import librosa.util import librosa.effects from umdone.tools import cache from umdone.sound import Audio def complement_intervals(intervals, size=None): """Returns and interval array (2d ndarray) of all intervals complementing the ...
{ "repo_name": "scopatz/umdone", "path": "umdone/basic_filters.py", "copies": "1", "size": "4989", "license": "bsd-2-clause", "hash": -3845020455906671000, "line_mean": 30.5759493671, "line_max": 89, "alpha_frac": 0.6197634797, "autogenerated": false, "ratio": 3.2001282873636945, "config_test": ...
# basic benchmark for the Float class from time import clock from random import * from sympy.numerics import * from sympy.numerics.functions import * from sympy.numerics.functions2 import * w = """ def f(N): xs = [] seed(1234) for i in range(N): x = Float(random() * 2.0**randint(-10, ...
{ "repo_name": "certik/sympy-oldcore", "path": "bin/bench_float.py", "copies": "1", "size": "1308", "license": "bsd-3-clause", "hash": -650821219770912600, "line_mean": 20.9473684211, "line_max": 58, "alpha_frac": 0.4900611621, "autogenerated": false, "ratio": 2.9727272727272727, "config_test": ...