text
stringlengths
4
1.02M
meta
dict
"""Mayavi/traits GUI for converting data from KIT systems.""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD-3-Clause from collections import Counter import os import queue import sys from threading import Thread import numpy as np from mayavi.core.ui.mayavi_scene import MayaviScene from...
{ "content_hash": "df4c4f84583a5ff4ebd75611e1b57a4d", "timestamp": "", "source": "github", "line_count": 758, "max_line_length": 79, "avg_line_length": 38.05804749340369, "alnum_prop": 0.5370909595119245, "repo_name": "bloyl/mne-python", "id": "c31d1826e56599c91ff676ef233bbe097d8723cd", "size": "288...
from datetime import datetime, timedelta from nose.tools import eq_ from kitsune.customercare.tests import ReplyFactory from kitsune.questions.tests import AnswerFactory from kitsune.search.tests.test_es import ElasticTestCase from kitsune.users.cron import reindex_users_that_contributed_yesterday from kitsune.users....
{ "content_hash": "3790d82fb6d49436779ca4504bce91bf", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 92, "avg_line_length": 38.22660098522167, "alnum_prop": 0.6364690721649484, "repo_name": "MikkCZ/kitsune", "id": "f37e70136b816518bee85295dc67b57ce439da07", "size": "7790"...
from nova import db from nova import exception from nova.objects import base from nova.objects import fields # TODO(berrange): Remove NovaObjectDictCompat class EC2InstanceMapping(base.NovaPersistentObject, base.NovaObject, base.NovaObjectDictCompat): # Version 1.0: Initial version VE...
{ "content_hash": "f2e750a846253f26ba22d29cef2c8fbc", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 72, "avg_line_length": 33.90853658536585, "alnum_prop": 0.6056464664628664, "repo_name": "alexandrucoman/vbox-nova-driver", "id": "1029ab3862879e5674ececa5cd49d32fa8b5832a",...
import dobby class Graze(dobby.App): def startup(self): self.webview = dobby.WebView() self.url_input = dobby.TextInput('http://pybee.org/', on_keyUp=self.keyUp, on_endEditing=self.load_page) self.url_input.placeholder = 'http://...' self.webview.url = self.url_input.value ...
{ "content_hash": "b7006dfff4360a34e6147ca57699316e", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 112, "avg_line_length": 39.42622950819672, "alnum_prop": 0.6503118503118503, "repo_name": "gabrielcsapo/dobby", "id": "8450950370b0cf622d5d069a912385748e5eecd5", "size": "2...
"""Tests for parameter domain objects.""" from core.domain import param_domain from core.tests import test_utils import utils class ParameterDomainUnitTests(test_utils.GenericTestBase): """Tests for parameter domain objects.""" def test_param_spec_validation(self): """Test validation of param specs....
{ "content_hash": "e6be194e1d4d6294a73d1a4efcb989ff", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 79, "avg_line_length": 37.810344827586206, "alnum_prop": 0.6133150934792522, "repo_name": "terrameijar/oppia", "id": "222585ee8cea615211dbf90d8c0e14b90c7da390", "size": "28...
import json import re from collections.abc import Mapping, Sequence from flask.testing import FlaskClient from .utils import UNDEFINED # ----------------------------------------------------------------------------- class ApiClient(FlaskClient): """A `flask.testing.FlaskClient` with a few conveniences: * P...
{ "content_hash": "2ae79830a2133c6e0ba36b4161d9a609", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 84, "avg_line_length": 28.36756756756757, "alnum_prop": 0.5777439024390244, "repo_name": "4Catalyzer/flask-resty", "id": "410c4287e68ff55896a9fdd38eb1aff643748810", "size"...
from barbie.barbie import * import barbie.susy_interface as susy import subprocess import os.path import sys from shutil import rmtree from threading import Timer constant_DirectoryDuration = 36 # Pode ser removido depois dos testes import time def barbiefy(dir, codes, disc, turma, lab): # Try to compile the sour...
{ "content_hash": "e35cd1402d2806546f14c50063f894f4", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 134, "avg_line_length": 26.884057971014492, "alnum_prop": 0.7202156334231806, "repo_name": "julioalvesMS/barbie-web", "id": "de9789b13a4becbeaae5a71c11e75e0f67f44576", "siz...
from test.support import findfile, TESTFN, unlink import array import io import pickle class UnseekableIO(io.FileIO): def tell(self): raise io.UnsupportedOperation def seek(self, *args, **kwargs): raise io.UnsupportedOperation class AudioTests: close_fd = False def setUp(self): ...
{ "content_hash": "f0b7ab5d3373868d07d679afb74885fb", "timestamp": "", "source": "github", "line_count": 329, "max_line_length": 81, "avg_line_length": 37.66261398176292, "alnum_prop": 0.5988217254458882, "repo_name": "MalloyPower/parsing-python", "id": "d3e8e9ee44a13467f57d56cbffb1c1295fc28c64", "s...
import unittest import responses import requests from imageledger.handlers.handler_500px import photos as search_500 from imageledger.handlers.handler_rijks import photos as search_rijks from imageledger.handlers.handler_flickr import photos as search_flickr from imageledger.handlers.handler_wikimedia import photos as...
{ "content_hash": "29d25a2c4e6a07a56d2adde7c0e9e3fe", "timestamp": "", "source": "github", "line_count": 156, "max_line_length": 102, "avg_line_length": 37.544871794871796, "alnum_prop": 0.667577257981902, "repo_name": "creativecommons/open-ledger", "id": "0fc639032b721d024112a4dc86afb9460e86db6b", ...
"""File data sources for traits GUIs""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import numpy as np from ..externals.six.moves import map # allow import without traits try: from traits.api import (Any, HasTraits, HasPrivateTraits, cached_property, ...
{ "content_hash": "9f81482089220da0addfb63fddc18883", "timestamp": "", "source": "github", "line_count": 550, "max_line_length": 79, "avg_line_length": 32.40181818181818, "alnum_prop": 0.5588350822063857, "repo_name": "jniediek/mne-python", "id": "4dc0714c9cb639810acd5f39c3467c8d293223d8", "size": "...
"""flechas Revision ID: 037 Revises: 036 Create Date: 2014-10-22 08:35:30.469310 """ # revision identifiers, used by Alembic. revision = '037' down_revision = '036' from alembic import op import sqlalchemy as db def upgrade(): op.create_table('flechas', db.Column('id', db.Integer, primary_key=True, nu...
{ "content_hash": "5096f332e395fb1121ac1901b1e18b7e", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 76, "avg_line_length": 29.844444444444445, "alnum_prop": 0.5234549516008935, "repo_name": "tzulberti/entrenamiento-arqueria", "id": "88c73403ee29bdcd9beccce35639f6dfc921bca8"...
from oscar.core.application import Application from django.conf.urls.defaults import patterns, url, include from oscar.apps.product.reviews.views import ProductReviewDetail, CreateProductReview, CreateProductReviewComplete, ProductReviewList class ProductReviewsApplication(Application): name = None detail_vie...
{ "content_hash": "50dfefe556c920f206b3fcd45105d5d7", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 134, "avg_line_length": 45.666666666666664, "alnum_prop": 0.6903023983315955, "repo_name": "aykut/django-oscar", "id": "e54a8120c83d19f0f1a0c340e6768d37d5314d26", "size": "...
""" Site registry for breadcrumb definitions ======================================== """ class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class BreadcrumbSite(object): """ Breadcrumbs site registry Keyword Arguments: initial (dict): Optional initial dict...
{ "content_hash": "a983892a9dd01ace0d7693eecfa7919c", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 79, "avg_line_length": 25.60655737704918, "alnum_prop": 0.5316901408450704, "repo_name": "sveetch/autobreadcrumbs", "id": "0c4e18e2ffdb504d89c7e37e7c0271f23bcad7a7", "size...
from recipe_scrapers.food52 import Food52 from tests import ScraperTest class TestFood52(ScraperTest): scraper_class = Food52 def test_host(self): self.assertEqual("food52.com", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( "https://food52.com/...
{ "content_hash": "a8e6025d06badbd418593228e37706a0", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 458, "avg_line_length": 55.529411764705884, "alnum_prop": 0.637447033898305, "repo_name": "hhursev/recipe-scraper", "id": "b26d9e7fbb7a76f2cf4b4f02f3dcc0f94c91b434", "size"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ProcessedImage', fields=[ ('source_image', models.URLField(max_length=1...
{ "content_hash": "563376fd466f4e54d5ebf8179a31abb1", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 102, "avg_line_length": 24.473684210526315, "alnum_prop": 0.5849462365591398, "repo_name": "mykonosbiennale/mykonosbiennale.github.io", "id": "32e4f4fa11bc03243c607b12d5fb4ef...
"""Provide estimates of sample purity and subclonal copy number using THetA. Identifying cellularity and subclonal populations within somatic calling using tumor normal pairs. https://github.com/raphael-group/THetA """ import os import sys import subprocess import pybedtools import pysam import toolz as tz from bcb...
{ "content_hash": "c9e0943f8f0e0f9a7895d357fafb4a14", "timestamp": "", "source": "github", "line_count": 220, "max_line_length": 113, "avg_line_length": 45.877272727272725, "alnum_prop": 0.568710987813336, "repo_name": "elkingtonmcb/bcbio-nextgen", "id": "028d085b470f6427f8e12ddcf5b75f222a5841da", "...
import abc class Preprocessor: @abc.abstractmethod def __call__(self, sample): """ :param sample: Sample :return: Sample """ raise NotImplementedError
{ "content_hash": "13b114565dc932590868c231bb827104", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 33, "avg_line_length": 18.272727272727273, "alnum_prop": 0.5621890547263682, "repo_name": "nromashchenko/amquery", "id": "4b487e196c7fca6fdbe58a10fb206d79df33440d", "size":...
"""Gather and distinguish Accelerator PCI devices from inventory.""" from oslo_config import cfg import yaml from ironic_inspector.plugins import base from ironic_inspector import utils CONF = cfg.CONF LOG = utils.getProcessingLogger(__name__) class AccelDevicesHook(base.ProcessingHook): """Processing hook fo...
{ "content_hash": "9e61b1b312cdea80117e0344f7c5771e", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 39.56923076923077, "alnum_prop": 0.5820373250388803, "repo_name": "openstack/ironic-inspector", "id": "9b5503d471e801d0eb851eddab95f36390b30f5e", "si...
import pytest from plenum.common.constants import POOL_LEDGER_ID @pytest.mark.taa_acceptance_missed def test_taa_acceptance_missed_when_taa_not_set( validate_taa_acceptance, all_request_types, request_dict ): validate_taa_acceptance(request_dict) @pytest.mark.taa_accepted(('any-text', 'any-version')) def t...
{ "content_hash": "2da2270f8f1e8c0a237ffab504c60207", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 73, "avg_line_length": 30.03125, "alnum_prop": 0.700312174817898, "repo_name": "evernym/zeno", "id": "37fa0813318424874909360b3fc6f108a0693af8", "size": "961", "binary": ...
from copy import deepcopy from django_mongo_rest.utils import to_list from mongoengine import EmbeddedDocumentField, ListField, ReferenceField, Document from mongoengine.base.datastructures import BaseList def _document_typeof(doc_cls, field_name): try: orm_field = doc_cls._fields[field_name] except (K...
{ "content_hash": "3de94fd4ccc842429cf37ac16c4cdf0a", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 103, "avg_line_length": 38.65217391304348, "alnum_prop": 0.6328137554234292, "repo_name": "TrueSkills/django-mongo-rest", "id": "b7afe59994175918da5dd1db5c23fa86964cde39", ...
import os.path import sys clientRoot = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) if not clientRoot in sys.path: sys.path.append(clientRoot) from KalturaCoreClient import * from KalturaClientBase import * ########## enums ########## class KalturaDocumentEntryOrderBy: NAME_ASC = "+name" ...
{ "content_hash": "ed8a6763adceca962d7435fcc04c6b01", "timestamp": "", "source": "github", "line_count": 321, "max_line_length": 96, "avg_line_length": 35.021806853582554, "alnum_prop": 0.6843977939868351, "repo_name": "hashimmm/KTS", "id": "365c7323bc62dcfb6cddb5285d178764d842705c", "size": "11242"...
from __future__ import print_function try: from pywinauto import application except ImportError: import os.path pywinauto_path = os.path.abspath(__file__) pywinauto_path = os.path.split(os.path.split(pywinauto_path)[0])[0] import sys sys.path.append(pywinauto_path) from pywinaut...
{ "content_hash": "b6e51a665c43ba66d5af97eab7e97852", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 78, "avg_line_length": 26.53968253968254, "alnum_prop": 0.6782296650717703, "repo_name": "pywinauto/pywinauto", "id": "b73cb832131f28dccea6b3f58d3a7f05bd5276d2", "size": "3...
from random import randint from django.contrib.auth.models import Group from conf_site.accounts.tests.factories import UserFactory from conf_site.core.tests.test_csv_view import StaffOnlyCsvViewTestCase from conf_site.reviews.views.export import ExportReviewersView class ExportReviewersViewTestCase(StaffOnlyCsvView...
{ "content_hash": "235d7b8bdfb303035198661f9d2d96fa", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 79, "avg_line_length": 34.64102564102564, "alnum_prop": 0.6972612879348631, "repo_name": "pydata/conf_site", "id": "759091ae635004fcfd863ab2f38260dd9f3183a5", "size": "1351...
from .exceptions import GrammarError from .lexer import Token from .tree import Tree from .visitors import InlineTransformer # XXX Deprecated from .visitors import Transformer_InPlace from .visitors import _vargs_meta, _vargs_meta_inline ###{standalone from functools import partial, wraps from itertools import repeat...
{ "content_hash": "35cf93e5f4d96f1325044bb57595681c", "timestamp": "", "source": "github", "line_count": 368, "max_line_length": 151, "avg_line_length": 35.47826086956522, "alnum_prop": 0.5769761029411765, "repo_name": "erezsh/lark", "id": "569761a606401ab3c4dae504558976ac6533f39d", "size": "13056",...
__all__ = ['Pool'] # # Imports # import threading import queue import itertools import collections import time from multiprocess import Process, cpu_count, TimeoutError from multiprocess.util import Finalize, debug # # Constants representing the state of a pool # RUN = 0 CLOSE = 1 TERMINATE = 2 # # Miscellaneous ...
{ "content_hash": "ef491c2534f79bfa65a62088b44fd316", "timestamp": "", "source": "github", "line_count": 725, "max_line_length": 83, "avg_line_length": 32.030344827586205, "alnum_prop": 0.5399621049005253, "repo_name": "seishei/multiprocess", "id": "a96d0f93b6551fee6f5143c582f61bb9f504d469", "size":...
from SysPaths import script, disk, binary from os import environ as env from m5.defines import buildEnv class SysConfig: def __init__(self, script=None, mem=None, disk=None): self.scriptname = script self.diskname = disk self.memsize = mem def script(self): if self.scriptname: ...
{ "content_hash": "a68540cd5fa5bd06cdcfe17ee039d640", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 78, "avg_line_length": 47.285714285714285, "alnum_prop": 0.5630125161847216, "repo_name": "lokeshjindal15/pd-gem5", "id": "44cbef976f9a3fced47e4035844152635b77ad8b", "size"...
import sys import itertools def main(): try: filename = input() word = input() except Exception as e: print('INVALID INPUT') else: words = load_words(filename) anagrams = [] for perm in itertools.permutations(word, len(word)): joined = ''.join(per...
{ "content_hash": "0378e59bc114fdfd3025c973f992b3d9", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 93, "avg_line_length": 27.766666666666666, "alnum_prop": 0.5234093637454982, "repo_name": "ttitto/python", "id": "7bde3a6bf44ac5a074b2289129b7619df7fe07d7", "size": "833", ...
from __future__ import absolute_import from celery import shared_task from celery.utils.log import get_task_logger from celery.task.schedules import crontab from celery.decorators import periodic_task from datetime import datetime # from django.db.models import F from .models import Payment from django.core.mail impo...
{ "content_hash": "64946c0510e5430ffa15c7dba82a0de8", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 152, "avg_line_length": 28.26923076923077, "alnum_prop": 0.5979591836734693, "repo_name": "Arlefreak/ApiArlefreak", "id": "93a13ac181ee359cb19ad2ff418eb2f2a828cf54", "size"...
import os import tensorflow.compat.v2 as tf from absl.testing import parameterized from keras.optimizers.optimizer_v2 import adam class TrainingCheckpointTests(tf.test.TestCase, parameterized.TestCase): @tf.__internal__.distribute.combinations.generate( tf.__internal__.test.combinations.combine( ...
{ "content_hash": "b559cd2d0124df5e443e0489c121ffae", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 109, "avg_line_length": 38.78632478632478, "alnum_prop": 0.5751432349052445, "repo_name": "keras-team/keras", "id": "f1f03dc3fe3a9738b015d26842ca3c8e708c30d6", "size": "52...
"""Example using texture internalformat for higher precision. Generates a gradient texture with high dynamic range and renders it with a fragment shader that tests for quantization errors by comparing adjacent texels and decomposes the gradient values into high and low significance bits, mapping them to separate displ...
{ "content_hash": "72e59d6ab32f4f04287961ea10a3529d", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 77, "avg_line_length": 27.06015037593985, "alnum_prop": 0.6023895526535149, "repo_name": "Eric89GXL/vispy", "id": "704ae9172740249d7b2c9ff5e4fb1c8c52b3ae3a", "size": "4053...
from azure.identity import DefaultAzureCredential from azure.mgmt.synapse import SynapseManagementClient """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-synapse # USAGE python delete_workspace.py Before run the sample, please set the values of the client ID, tenant ID and client ...
{ "content_hash": "3ace987f53b874ec9b67db0b06ccc358", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 126, "avg_line_length": 33.24242424242424, "alnum_prop": 0.7338195077484048, "repo_name": "Azure/azure-sdk-for-python", "id": "756e6acef951be2177e629c9712eccf2046313f9", "s...
""" Script to push the zone configuration to Cisco SAN switches. """ import random import re from eventlet import greenthread from oslo_concurrency import processutils from oslo_log import log as logging from oslo_utils import excutils import six from cinder import exception from cinder.i18n import _, _LE, _LI from c...
{ "content_hash": "9f7e586f237bb2b2503ebef6de0555a4", "timestamp": "", "source": "github", "line_count": 463, "max_line_length": 79, "avg_line_length": 39.93088552915767, "alnum_prop": 0.4969169190826482, "repo_name": "rakeshmi/cinder", "id": "266fc3855944a02153ed4aa593cdf650992850c9", "size": "1913...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('registration', '0001_initial'), ] operations = [ migrations.AlterField( model_name='profile', name='bio', field=...
{ "content_hash": "a0e787632c5a60a3dfd0e57b691009b6", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 47, "avg_line_length": 20.38888888888889, "alnum_prop": 0.5858310626702997, "repo_name": "delitamakanda/BukkakeGram", "id": "1a89fbe9f0fb666891bbcc4114270c40d671560c", "siz...
import numpy as np import pandas as pd from bokeh.plotting import * # Generate some synthetic time series for six different categories cats = list("abcdef") y = np.random.randn(2000) g = np.random.choice(cats, 2000) for i, l in enumerate(cats): y[g == l] += i // 2 df = pd.DataFrame(dict(score=y, group=g)) # Find ...
{ "content_hash": "a6995723c7f13b584c758f7e98504637", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 95, "avg_line_length": 28.723076923076924, "alnum_prop": 0.6770219603642207, "repo_name": "the13fools/Bokeh_Examples", "id": "b49f076bf0f9bb4da6ab9a9ee31fcc2e97fee9f2", "si...
from typing import Union, Type, Any from funcy.funcs import compose TemplateLike = Union[str, 'TemplateString'] class TemplateString(object): """ Storing a formattable string for later use, can be called like a function and supports adding TemplateStrings together and adding strings and TemplateStrings t...
{ "content_hash": "104a59e17fb0e28db078096946092922", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 122, "avg_line_length": 38.415841584158414, "alnum_prop": 0.6059278350515463, "repo_name": "FRC-RS/FRS", "id": "f3d367da8813fe447be050044b5d3da9d21d15df", "size": "3880", ...
import torch import torch.nn as nn import torch.utils.data as data_utils import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim from torch.autograd import Variable from collections import OrderedDict class PreTrainedModel(nn.Module): def __init__(self, pretrained): super(...
{ "content_hash": "76b41800a227c4c84fa7dbfceb873f64", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 225, "avg_line_length": 52.08888888888889, "alnum_prop": 0.6184940273037542, "repo_name": "albertxavier001/graduation-project", "id": "c43f0b12cb1f313c5a4305b8f748d81f465647...
import uuid from openstack_dashboard.test.integration_tests import helpers class TestKeypair(helpers.TestCase): """Checks that the user is able to create/delete keypair.""" KEYPAIR_NAME = 'horizonkeypair_' + str(uuid.uuid4()) def test_keypair(self): keypair_page = self.home_pg.go_to_accessandsec...
{ "content_hash": "bb53c5aa75f55295ae506b2e5110c51e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 76, "avg_line_length": 37.833333333333336, "alnum_prop": 0.7254038179148311, "repo_name": "AlexOugh/horizon", "id": "613d8d075e87182993a08ac73a6d4f8dc5f55e63", "size": "133...
from cms.utils.i18n import get_default_language from distutils.version import LooseVersion from django.conf import settings from django.core.files.storage import get_storage_class from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_...
{ "content_hash": "1730d46c49ffbfe48fef99e212fd82fb", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 121, "avg_line_length": 37.46610169491525, "alnum_prop": 0.6883058131644424, "repo_name": "pbs/django-cms", "id": "52476970455c6265cd92b8d413365cb25b531e17", "size": "4515...
import socket import struct import optparse import pipes import sys from socket import * sys.path.append('../') from odict import OrderedDict from random import randrange from time import sleep from subprocess import call from packets import Packet parser = optparse.OptionParser(usage='python %prog -I eth0 -i 10.20.30...
{ "content_hash": "13cb47d6ecd9769a8031fa892bcbce27", "timestamp": "", "source": "github", "line_count": 221, "max_line_length": 413, "avg_line_length": 44.15384615384615, "alnum_prop": 0.6176470588235294, "repo_name": "tholum/PiBunny", "id": "4ff10ca3ef4f817ddc25ffcf69a8ff713e6b669a", "size": "1056...
import datetime import json import hashlib from urllib.parse import urlparse from c7n.exceptions import PolicyExecutionError, PolicyValidationError from c7n.utils import local_session, type_schema from .core import MethodAction from c7n_gcp.provider import resources as gcp_resources class PostFinding(MethodAction):...
{ "content_hash": "6f944cd3984cf454c589577c0bbc79c4", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 92, "avg_line_length": 33.88695652173913, "alnum_prop": 0.5948165255324609, "repo_name": "capitalone/cloud-custodian", "id": "ff20f3b26f42653c7de2a2c75d7e867752984410", "s...
from oslo_log import log as logging import oslotest.base from designate import exceptions from designate import objects LOG = logging.getLogger(__name__) class RRDataTXTTest(oslotest.base.BaseTestCase): def test_reject_non_quoted_spaces(self): recordset = objects.RecordSet( name='www.example...
{ "content_hash": "3807e884ac1996b24154db197536827b", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 71, "avg_line_length": 31.104477611940297, "alnum_prop": 0.5633397312859885, "repo_name": "openstack/designate", "id": "76edfe6de19ed8f5a87639dc44e3917318f5990e", "size": "...
''' Generate a HTML report of the results of an Annokey search. The report file contains a much more detailed presentation of the search results than what is shown in the annotation on the CSV file. ''' import html import datetime DEFAULT_REPORT_FILE = 'annokey_report.html' NCBI_GENE_ENTRY_URL = "http://www.ncbi.nlm...
{ "content_hash": "fe04bee55843a4bf46eb17ab543958a9", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 78, "avg_line_length": 30.27391304347826, "alnum_prop": 0.6247307195174494, "repo_name": "bjpop/annokey", "id": "62afe66cc45aebbdcfebe234b127f0c9d2077f7e", "size": "6963",...
from sqlalchemy.dialects.postgresql import TEXT from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.dialects.postgresql import BOOLEAN from sqlalchemy.types import Enum from matching import db roles_users = db.Table('roles_users', db.Column('user_lrid',UUID(as_uuid=True), db.ForeignKey('users.lri...
{ "content_hash": "1304c52671f933b89ffc3e750775c41d", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 79, "avg_line_length": 33.11764705882353, "alnum_prop": 0.6062759029011249, "repo_name": "LandRegistry-Attic/matching-alpha", "id": "26270b3ac836d8b86fad84e5c21b933dab00b201"...
import sys, subprocess, re, os, os.path post_review = """c:\server\\app\python27\scripts\post-review""" gnuwin = """c:\program files(x86)\gnuwin32""" username = "admin" password = "msnc500" reviewboard = "http://reviewboard:8080" svn_dir = sys.argv[1] svn_name = os.path.basename(svn_dir) svn_rev = int(sys.argv[2]) re...
{ "content_hash": "6ed407ade5dbbc036792df40d0440d31", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 96, "avg_line_length": 33.825, "alnum_prop": 0.6614929785661493, "repo_name": "martin-kolinek/ReviewBoardTracPlugin", "id": "fd3831a0eeb2b4041f7703b07cd095aec1967c4b", "siz...
"""The Binomial distribution class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.distributions.python.ops import distribution from tensorflow.contrib.distributions.python.ops import distribution_util from tensorflow.python.frame...
{ "content_hash": "e71fbecb3098009e4f15e9b86eeb6f2b", "timestamp": "", "source": "github", "line_count": 221, "max_line_length": 80, "avg_line_length": 35.62443438914027, "alnum_prop": 0.6446081544519243, "repo_name": "sandeepdsouza93/TensorFlow-15712", "id": "e8b1cb412b16ca6ee635e4790992a4a9c0002b7e"...
def main(): x = 0 # define a while loop while (x<5): print(x) x += 1 # define a for loop # An array of values days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] for x in range(5, 10, 5): print(x) for x in range(6, 10): ...
{ "content_hash": "d9aae5b45bdba1ecaf5d5b0c19e1c87b", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 89, "avg_line_length": 22.10810810810811, "alnum_prop": 0.5146699266503667, "repo_name": "mudragada/util-scripts", "id": "840af4377528bb5883c1be9147ffbb366e48c6c6", "size":...
from sqlalchemy.engine import url as sa_url from sqlalchemy import text from sqlalchemy.util import compat from . import config, engines FOLLOWER_IDENT = None class register(object): def __init__(self): self.fns = {} @classmethod def init(cls, fn): return register().for_db("*")(fn) ...
{ "content_hash": "983bff4ba2253162037f7ed63f1decbb", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 77, "avg_line_length": 26.074074074074073, "alnum_prop": 0.6002435064935064, "repo_name": "bdh1011/cupeye", "id": "c8f7fdf304331503dc6ffd7873ca38732ac7ffb3", "size": "4928...
import pygame import Axon from Axon.Ipc import WaitComplete from Kamaelia.UI.GraphicDisplay import PygameDisplay globalsurface = None class PygameComponent(Axon.Component.component): """ Borrows ideas from Kamaelia.UI.MH.PyGameApp.PyGameApp & mainly from Ticker """ Inboxes = { "inbox" : "Specify (n...
{ "content_hash": "84775dcf2681ba7607f00f537b5871d6", "timestamp": "", "source": "github", "line_count": 380, "max_line_length": 106, "avg_line_length": 37.386842105263156, "alnum_prop": 0.5199549517843317, "repo_name": "bbc/kamaelia", "id": "b1236ec7386449f7b527530534f216925a57c9fb", "size": "15031...
import json import unittest import urllib.request from unittest.mock import patch from urllib.error import URLError from django import template from django.core.exceptions import ValidationError from django.test import TestCase, override_settings from django.urls import reverse from wagtail.core import blocks from wa...
{ "content_hash": "aa585f56a39390b8aaa5a299b44e96ff", "timestamp": "", "source": "github", "line_count": 572, "max_line_length": 110, "avg_line_length": 40.09265734265734, "alnum_prop": 0.5925086120437797, "repo_name": "takeflight/wagtail", "id": "994125b16159683db4bd04fd6b714e4c6f4e3bc9", "size": "...
from __future__ import unicode_literals import os import unittest from unotifier import VENDOR_PATH from unotifier.notifiers import NotifySendNotifier from . import NotifierTestsMixin class NotifySendNotifierTests(NotifierTestsMixin, unittest.TestCase): notifier_klass = NotifySendNotifier notifier_cmd = o...
{ "content_hash": "8c1af5479316363d5551286b4249036a", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 69, "avg_line_length": 24, "alnum_prop": 0.8055555555555556, "repo_name": "expobrain/python-unotifier", "id": "3c70afc9dd01e132b4cec6d68fb90348d091c8cd", "size": "360", "...
import time # 3p import dns.resolver # project from checks import AgentCheck from util import Platform # These imports are necessary because otherwise dynamic type # resolution will fail on windows without it. # See more here: https://github.com/rthalley/dnspython/issues/39. if Platform.is_win32(): from dns.rdt...
{ "content_hash": "04b42a96170393b5cc8e71a0a133a825", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 105, "avg_line_length": 37.07692307692308, "alnum_prop": 0.6317427385892116, "repo_name": "c960657/dd-agent", "id": "304e90a6f0f518b272cb8d6c370263ddd18ccb3f", "size": "300...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 5, transform = "Fisher", sigma = 0.0, exog_count = 100, ar_order = 0);
{ "content_hash": "e58121fabd7fe993cd85c64d866c3225", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 162, "avg_line_length": 37.42857142857143, "alnum_prop": 0.7022900763358778, "repo_name": "antoinecarme/pyaf", "id": "43cce08f78e15921218130dd2b9637831cf1bf52", "size": "262...
from lettuce import step, world from lettuce.django import django_url from nose.tools import assert_equal from django.core.urlresolvers import reverse from storybase_story.models import Story @step(u'the "([^"]*)" section is present in the table of contents') def section_in_toc(step, name): world.browser.find_b...
{ "content_hash": "05dbe3d154e984429edbd19fe59e58d1", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 120, "avg_line_length": 40.869565217391305, "alnum_prop": 0.6851063829787234, "repo_name": "denverfoundation/storybase", "id": "d1216adc36336321dd1f99636df7861edfd669ca", "...
from __future__ import annotations from unittest import TestCase, mock from airflow.providers.google.marketing_platform.hooks.display_video import GoogleDisplayVideo360Hook from tests.providers.google.cloud.utils.base_gcp_mock import mock_base_gcp_hook_default_project_id API_VERSION = "v1" GCP_CONN_ID = "google_clou...
{ "content_hash": "10fa9adb1bfa416c79f1936cab9acee2", "timestamp": "", "source": "github", "line_count": 356, "max_line_length": 109, "avg_line_length": 37.37640449438202, "alnum_prop": 0.643168495415602, "repo_name": "cfei18/incubator-airflow", "id": "094350c25b6246b683b3062aa8591594ead015e9", "siz...
""" This file contains pytest configuration settings that are astropy-specific (i.e. those that would not necessarily be shared by affiliated packages making use of astropy's test runner). """ import os import builtins import tempfile import warnings try: from pytest_astropy_header.display import PYTEST_HEADER_MO...
{ "content_hash": "ffd4e8a7ea4a589ecf803ad960fb848c", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 78, "avg_line_length": 34.367924528301884, "alnum_prop": 0.7010705462530881, "repo_name": "stargaser/astropy", "id": "0773cfa4d421359d81861852f643c18b327b0694", "size": "3...
import sys import logging from optparse import make_option from django.core.management.base import BaseCommand from pybrowscap.loader.csv import URL import requests from requests import ConnectionError, HTTPError, Timeout, TooManyRedirects from ... import settings log = logging.getLogger(__name__) class Comman...
{ "content_hash": "2a8b11502ffd09c059b08b8bfd2eb21e", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 104, "avg_line_length": 38.07936507936508, "alnum_prop": 0.5977490621092122, "repo_name": "CodeScaleInc/django-pybrowscap", "id": "2e288c4f2679178017148cbe041356649970c1d9", ...
import scipy.io import numpy as np from lda import update_variables, lda_likelihood # test = scipy.io.loadmat('ng207528x8165itst.mat') # test_data = test['Dtst'].tolist()[0][0][1] # test_label_matrix = test['Dtst'].tolist()[0][0][2] train = scipy.io.loadmat('ng2011293x8165itrn.mat') train_data = train['Dtrn'].tolist()...
{ "content_hash": "b40230485797c11a98aff177dc1f9e4f", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 123, "avg_line_length": 34.256637168141594, "alnum_prop": 0.6608111599070008, "repo_name": "wenchaodudu/SNLDA", "id": "abe8ed137144dc4b6308980a144a411e9fa74efd", "size": "...
import mock import pytest from google.cloud.bigquery.retry import DEFAULT_TIMEOUT from .helpers import make_connection @pytest.mark.parametrize( "extra,query", [({}, {}), (dict(page_size=42), dict(maxResults=42))] ) def test_list_projects_defaults(client, PROJECT, extra, query): from google.cloud.bigquery.cl...
{ "content_hash": "4217fd6f0af527a6f983d03d9f1863e7", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 83, "avg_line_length": 30.62264150943396, "alnum_prop": 0.6127541589648798, "repo_name": "googleapis/python-bigquery", "id": "190612b4458827032c522f50191a585286db3943", "s...
import pytest import core.config import modules.contrib.kernel @pytest.fixture def some_kernel(): return "this-is-my-kernel" @pytest.fixture def kernel_module(): return modules.contrib.kernel.Module(config=core.config.Config([]), theme=None) def test_full_text(mocker, kernel_module): platform = mocke...
{ "content_hash": "aca35e34cbfb7c8c6430e004179bc4b6", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 83, "avg_line_length": 22.857142857142858, "alnum_prop": 0.725, "repo_name": "tobi-wan-kenobi/bumblebee-status", "id": "f74021d156f4b83ec95ab5c157c869eb7958eb2b", "size": "...
""" statistics classes and functions """ from .ClusteringLib import get_silhouette_values from .ClusteringData import dataCircle,dataCircleLabels,dataScatter,dataScatterLabels from .ClusteringData import dataLetters,dataLettersLabels,dataNetwork,dataNetworkLabels from .SpectralClustering import SpectralCluster from ...
{ "content_hash": "b4ed8e0853adfde4f928358cca16946f", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 87, "avg_line_length": 38.5, "alnum_prop": 0.8812615955473099, "repo_name": "ajrichards/htsint", "id": "4606de92003bcd30f9b60bb1d1f2a6499d6d3c3d", "size": "539", "binary"...
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/tatooine/shared_guild_banner_free_style_01.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "3ea9744097e5f9dcf6e0032f23a91a37", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 91, "avg_line_length": 24.615384615384617, "alnum_prop": 0.7, "repo_name": "obi-two/Rebelion", "id": "568215d39f438bcba46467e92e9cb68e3294eb90", "size": "465", "binary": ...
from __future__ import absolute_import import os, collections, operator, arcpy, objects, common, math# , geojson import regional from xml.etree import cElementTree as eltree # TODOS # generator functions for cursors # sequential setter? what for? SHAPE_SLOT = 'shape' SHAPE_FIELD = 'shape' SHAPE_FIELD_DA = 'SHAPE@' S...
{ "content_hash": "c7f9ad2efba31af56f32c8dfc92469b5", "timestamp": "", "source": "github", "line_count": 1506, "max_line_length": 244, "avg_line_length": 34.678618857901725, "alnum_prop": 0.6760425841534867, "repo_name": "simberaj/interactions", "id": "7726fc471a4eec538c8098c036b96d57dc0aa13c", "siz...
from django.db import models from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def _create_user(self, username, password, **kwargs): if not password: raise ValueError('Users must have a password.') user = self.model(username=username, **kwargs)...
{ "content_hash": "50b33a7b4416574fb68a28911a1daa2a", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 62, "avg_line_length": 34.041666666666664, "alnum_prop": 0.6401468788249693, "repo_name": "mstarinteractive/django-mobile-framework", "id": "f96c136f56e7a4373df4f168a26fd4b74...
from __future__ import division, print_function, absolute_import import os from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.system_info import get_info, NotFoundError from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs from scipy._b...
{ "content_hash": "86134b91101cc1eaf6dc954dca8e8401", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 91, "avg_line_length": 31.47482014388489, "alnum_prop": 0.4953142857142857, "repo_name": "dch312/scipy", "id": "35396813e9e571a97273fbb6a1b99419a946b78d", "size": "4397", ...
import pytest from .factories import ContentFactory pytestmark = pytest.mark.django_db def test_get_author_display_should_return_author_text(published): text = 'An author' published.author_text = text assert published.get_author_display() == text def test_get_author_display_should_return_author_if_no_...
{ "content_hash": "46fccc0170dc9d5c2c79e03329e0df58", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 73, "avg_line_length": 27.470588235294116, "alnum_prop": 0.7366167023554604, "repo_name": "Lcaracol/ideasbox.lan", "id": "ed74946ceea9fbd6ace4c42b4054e39ee42fe26e", "size":...
from setuptools import setup, find_packages import parse_html setup( name='parse_html', version=parse_html.version, packages=find_packages(), test_suite='parse_html.tests', install_requires=[ 'parsing==0.1', ], dependency_links=[ 'https://github.com/davesque/parsing.py/tar...
{ "content_hash": "ce30981f5a7146fa3e07a32810c0b35d", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 80, "avg_line_length": 21.11764705882353, "alnum_prop": 0.6434540389972145, "repo_name": "davesque/html.py", "id": "16e031f2560bec993915745c0beb033acb359004", "size": "359"...
from swgpy.object import * def create(kernel): result = Weapon() result.template = "object/weapon/melee/sword/shared_sword_lightsaber_vader.iff" result.attribute_template_id = 10 result.stfName("weapon_name","sword_lightsaber_vader") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return res...
{ "content_hash": "4db4b615e01d2b498a2b1e808d882d75", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 80, "avg_line_length": 24.846153846153847, "alnum_prop": 0.7089783281733746, "repo_name": "anhstudios/swganh", "id": "0bce3dcdaf0c13a800eb2e1cce10f0ff652c1937", "size": "46...
import os import argparse parser = argparse.ArgumentParser(description='Compile & Test.') parser.add_argument('-c', '--compile', action='store_true', default=False) parser.add_argument('-d', '--compile-shared', action='store_true', default=False) parser.add_argument('-t', '--test', nargs=1, type=int) parser.add_argume...
{ "content_hash": "96cac9b4fcfd8af12be194bcc17ca051", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 90, "avg_line_length": 33.205128205128204, "alnum_prop": 0.6254826254826255, "repo_name": "ChillMagic/JitFFI", "id": "e855a8037ee8a7fa50f3368ad4c6306bfb1eb3bf", "size": "13...
def get_times(date): # Fake implementation! Switch data types as you see fit! return ('9:05', '20:20') def update_lamp_status(get_sun_times=get_times): pass
{ "content_hash": "fbc1ddade3405954284853079d75c4a5", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 60, "avg_line_length": 24.428571428571427, "alnum_prop": 0.6666666666666666, "repo_name": "objarni/gothpy_fun", "id": "9e098fed8c8fa1c263ed1fdb3244d8384f3c1ffe", "size": "17...
class Node: def __init__(self,initdata): self.data = initdata self.next = None def getData(self): return self.data def getNext(self): return self.next def setData(self,newdata): self.data = newdata def setNext(self,newnext): self.next = newnext c...
{ "content_hash": "5d4f0807bdc94b562d69912e2c3593e6", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 47, "avg_line_length": 20.32967032967033, "alnum_prop": 0.56, "repo_name": "PyClass/PyClassLessons", "id": "f08fd622c6315add78d6ce166a19131d62ab5c12", "size": "1850", "bi...
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2015 ARM Limited 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.org/licenses/LICENSE-2.0 Unless required by applicable ...
{ "content_hash": "fcd6a5e096c2adeebd44085cc0ca5bb6", "timestamp": "", "source": "github", "line_count": 1310, "max_line_length": 111, "avg_line_length": 35.318320610687024, "alnum_prop": 0.5441891629022846, "repo_name": "adamgreen/pyOCD", "id": "245420b94fc644de0b1023edf8b5d3469fe26a51", "size": "4...
from horizon import views from openstack_dashboard.dashboards.metering.common.usage import NandyUsage from openstack_dashboard.dashboards.project.overview.views \ import ProjectUsageCsvRenderer from openstack_dashboard.usage import ProjectUsageTable from openstack_dashboard.usage import UsageView class ProjectOve...
{ "content_hash": "09a598f345fe64ff5b521e4e335a695e", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 75, "avg_line_length": 33.857142857142854, "alnum_prop": 0.7834036568213784, "repo_name": "absalon-james/metering", "id": "91679889598f661af938e7d82cef765f81857e8a", "size"...
import Axon class CheckpointSequencer(Axon.Component.component): def __init__(self, rev_access_callback = None, rev_checkpoint_callback = None, initial = 1, highest = 1): super(CheckpointSequencer, self).__init__() if rev_access_c...
{ "content_hash": "186e01fadfa3e11e211163094e930bb5", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 78, "avg_line_length": 23.353535353535353, "alnum_prop": 0.5004325259515571, "repo_name": "sparkslabs/kamaelia", "id": "6739572822bac81134ffe89b64ff30bd6de95fca", "size": "...
r""" This module provides some testing functionality for paraview and vtk web applications. It provides the ability to run an arbitrary test script in a separate thread and communicate the results back to the service so that the CTest framework can be notified of the success or failure of the test....
{ "content_hash": "091c18aa577a4fb21bb771048bf9d685", "timestamp": "", "source": "github", "line_count": 405, "max_line_length": 98, "avg_line_length": 40.70617283950617, "alnum_prop": 0.5968094140482834, "repo_name": "biddisco/VTK", "id": "406f0e1127e4e60dfe74388f3efd5fb84be88168", "size": "16486",...
__author__ = 'zhwei' import json from django.views import generic from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.template import RequestContext from django.core.urlresolvers import reverse_lazy, reverse from django.shortcuts import render_to_response as r2r, get_object_or_404, redirec...
{ "content_hash": "bc513934355bd43b73db1fb59e393b1f", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 86, "avg_line_length": 35.775510204081634, "alnum_prop": 0.7575584711922418, "repo_name": "sdutlinux/pahchina", "id": "5370a53a6184a2a0594cfeae573b273f3a853fee", "size": "1...
"""A fabric script for deploying Django-based web applications to a server hosted by WebFaction. The script has three main tasks: boot - define environment variables and setup the virtual environment. setup - create the application, database and web site. deploy - upload a release to the server. ...
{ "content_hash": "51bc311e2d707c17ff2e5ddab3a053ed", "timestamp": "", "source": "github", "line_count": 369, "max_line_length": 90, "avg_line_length": 35.88075880758807, "alnum_prop": 0.6406344410876132, "repo_name": "StuartMacKay/fabric-webfaction-django", "id": "e50ad2d5973a426f8c798fa9cb66dc949571...
""" WSGI config for servicezen project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
{ "content_hash": "ebe040bebd662596398295508f5cb6cc", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 89, "avg_line_length": 47.09375, "alnum_prop": 0.7889847378898474, "repo_name": "ograycode/ServiceZen", "id": "ec650626ce8a42f5df45ec40952b8f75e95b164c", "size": "1507", ...
"""autogenerated by genpy from rosaria/BumperState.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class BumperState(genpy.Message): _md5sum = "f81947761ff7e166a3bbaf937b9869b5" _type = "rosaria/BumperState" _has_header = Tr...
{ "content_hash": "394088526d741189f8ac62c08a59099e", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 123, "avg_line_length": 35.16129032258065, "alnum_prop": 0.6201834862385321, "repo_name": "MRSDTeamI/bud-e", "id": "a71f50637326ced8dbbcb9a4338ade7435dd8e61", "size": "763...
from collections import OrderedDict from functools import reduce from django.template.defaultfilters import slugify import sqlagg from memoized import memoized from sqlagg.columns import SimpleColumn from sqlagg.filters import RawFilter, SqlFilter from corehq.apps.reports.api import ReportDataSource from corehq.apps...
{ "content_hash": "c7a494e19818ea93318b7461a3ae9584", "timestamp": "", "source": "github", "line_count": 419, "max_line_length": 117, "avg_line_length": 33.0071599045346, "alnum_prop": 0.6070137382501808, "repo_name": "dimagi/commcare-hq", "id": "96cab5f798bb4e595b955399773ae72b57a7535b", "size": "1...
from ..util import SimpleBunch import time from timeit import default_timer class BaseApplicationBackend(object): """BaseApplicationBackend() Abstract class that provides an interface between backends and Application. Each backend must implement a subclass of ApplicationBackend, and implement all its...
{ "content_hash": "574994e73ed08ac82fe911293fd1a303", "timestamp": "", "source": "github", "line_count": 285, "max_line_length": 79, "avg_line_length": 36.34035087719298, "alnum_prop": 0.6284638408805638, "repo_name": "astrofrog/glue-3d-viewer", "id": "ce8ae320ccd9ba42969b6f9558acd93abfcaaaf0", "siz...
import os import sys sys.path[0] = os.path.dirname(sys.path[0]) from prefixes import popular words = set([word.lower() for word in open('license.txt').read().split()]) prefixes = [(popular.prefix_score(word), word) for word in words] prefixes.sort() for pair, word in prefixes: score, part = pair print '%.5f %...
{ "content_hash": "634e7ed840dd829f8619293e9997df61", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 29.27777777777778, "alnum_prop": 0.6679316888045541, "repo_name": "jcrocholl/nxdom", "id": "5415d3f9db5298ce5486da356ceadec5533d479d", "size": "604",...
import os, debug, signal, shutil, time import barrelfish class Machine(object): @classmethod def validateArgs(cls, kwargs): try: kwargs['bootarch'] except KeyError as e: raise TypeError("Missing key %s" % e.args[0]) def __init__(self, options, operations, ...
{ "content_hash": "7a14808ad24a9aa6ca390ab6d6b2a7b9", "timestamp": "", "source": "github", "line_count": 546, "max_line_length": 93, "avg_line_length": 32.765567765567766, "alnum_prop": 0.572666294019005, "repo_name": "kishoredbn/barrelfish", "id": "8f110611760ce4f600627ce6e800bffa73b5b03c", "size":...
""" vcenter_vm_os_to_nuage_policygroups is a script that will translate vCenter VM operating system settings to Policy groups on that VM in Nuage for VMs in a certain set of Clusters. This script has the following features: * Assigns Policy Groups depending on regular expressions matching the VM Operating system i...
{ "content_hash": "8f830562b8b020d56628757974b26a82", "timestamp": "", "source": "github", "line_count": 419, "max_line_length": 335, "avg_line_length": 49.79474940334129, "alnum_prop": 0.5784605061349694, "repo_name": "nuagenetworks/vspk-examples", "id": "90484cef626a0da64e19f9a227cdab9f4d7796a2", ...
import logging from dsdev_utils.exceptions import VersionError from dsdev_utils.helpers import EasyAccessDict, Version import pytest log = logging.getLogger() class TestVerson(object): def test_version_short(self): assert Version('1.1') > Version('1.1beta1') assert Version('1.2.1beta1') < Versio...
{ "content_hash": "e3fd52bdf5c3b51a425837ad2c6e1df7", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 62, "avg_line_length": 30.25, "alnum_prop": 0.6060606060606061, "repo_name": "JMSwag/dsdev-utils", "id": "12ebd36c9a96e138d4c33939adaf52cd6a8625c7", "size": "2377", "bina...
from datetime import datetime from email.header import decode_header from email.parser import Parser import email.utils import logging from poplib import POP3, POP3_SSL from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.exc import NoResultFound import warnings from internetpoints import config, models from ...
{ "content_hash": "1cb335c44d83c1157376cbb1ccd19d94", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 77, "avg_line_length": 35.37341772151899, "alnum_prop": 0.5260332796564681, "repo_name": "remram44/internetpoints", "id": "e1edfa36b6e0530712150e5d5277c9d3e16d5cd2", "size...
from lib.ecr.comport_comp import ComportComp class Hierarquia(ComportComp): def selecionar_resposta(self, respostas): if respostas: return respostas[0]
{ "content_hash": "f29bb5f442171acdb64cc6492a979c57", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 45, "avg_line_length": 22.375, "alnum_prop": 0.6983240223463687, "repo_name": "joaofilipevaz/IASA-TP3", "id": "3b3d6cf7b41d9195cacaf95e1b5e2b1ddd8db31d", "size": "179", "b...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Connector(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.connector" _valid_props = {"line", "mode", "visible"} ...
{ "content_hash": "a55cc4c9967c1cb54a918f9162a4358c", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 82, "avg_line_length": 27.736842105263158, "alnum_prop": 0.507695551338815, "repo_name": "plotly/plotly.py", "id": "9808c28ce7ca02bb4ec2343d43f86da6731cc3b6", "size": "474...
"""Discovers the mongo cluster and starts the connector. """ import inspect import logging import oplog_manager import optparse import os import pymongo import re import shutil import subprocess import sys import threading import time import util import imp from locking_dict import LockingDict try: import simple...
{ "content_hash": "f435f6c57b23f578184cb0c307b69bdd", "timestamp": "", "source": "github", "line_count": 437, "max_line_length": 79, "avg_line_length": 41.59496567505721, "alnum_prop": 0.5138911811630082, "repo_name": "YuriyIlyin/mongo-connector", "id": "3aa6d9242f2e8369993d8ed2b6500e23a48cada7", "s...
import uwsgi def print_logs(ip, port, message): print(ip, port, message) uwsgi.udp_callable = print_logs
{ "content_hash": "b09fa43d8aa6b205b39a798bbf1a9d4b", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 34, "avg_line_length": 18, "alnum_prop": 0.7314814814814815, "repo_name": "jyotikamboj/container", "id": "49bffc95da497a8571db99928727ae75249b953a", "size": "108", "binary...
"""Support for the Philips Hue lights.""" from datetime import timedelta from functools import partial import logging import random import aiohue import async_timeout from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_COLOR, ATTR_TRA...
{ "content_hash": "32a1773f96a7fda73f97094531431ae1", "timestamp": "", "source": "github", "line_count": 554, "max_line_length": 88, "avg_line_length": 32.42238267148014, "alnum_prop": 0.6036076160783878, "repo_name": "kennedyshead/home-assistant", "id": "345156de7d7a66591c3df30a8f2650e4904d99f8", "...
import os import sys sys.path.insert(0, os.path.abspath('../..')) # -- Project information ----------------------------------------------------- project = 'Aglyph' copyright = '2006, 2011, 2013-2018 Matthew Zipay' author = 'Matthew Zipay' # The short X.Y version #version = '3.0' # The full version, including alpha/b...
{ "content_hash": "6e8546636f0c50a87de9e690e0d3f2fb", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 78, "avg_line_length": 30.152439024390244, "alnum_prop": 0.6404448938321536, "repo_name": "mzipay/Aglyph", "id": "049cb714e7c9836f285f4a6f80bbd61f27409c4b", "size": "5577"...
"""Simple XML marshaling (serializing) and unmarshaling(de-serializing) module using Python dictionaries and the marshal module. """ from xml.sax.handler import ContentHandler from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import XMLReader from xml.sax import make_parser import marshal import os,...
{ "content_hash": "870d894f2f2f43b319c9320349fdf825", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 66, "avg_line_length": 28.4147465437788, "alnum_prop": 0.5376256892637041, "repo_name": "ActiveState/code", "id": "b62fcfbd4c014754f93454f273eea5933c99144e", "size": "6166...
import math import m5 from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath # # Note: the L1 Cache latency is only used by the sequencer on fast path hits # class L1Cache(RubyCache): latency = 3 # # Note: the L2 Cache latency is not currently used # class L2Cache(RubyCache): l...
{ "content_hash": "fd59af85d4478bb3e843bc84356e1b7d", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 82, "avg_line_length": 34.6390977443609, "alnum_prop": 0.518775775993054, "repo_name": "liangwang/m5", "id": "849d5b62a7f8b00548c55686d388e0c7bbfbb1bc", "size": "6237", ...
import requests import csv import sys import os import shutil from bs4 import BeautifulSoup # Pull in a rug based on id. def getRugPage(rug): item_id = rug page = requests.get(base_url + item_id) rugPage = BeautifulSoup(page.content, "html.parser") return rugPage # get name based on rugPage def getR...
{ "content_hash": "eead3ab2e35645b5d9b94ef5bb0a02af", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 85, "avg_line_length": 31, "alnum_prop": 0.6154499151103565, "repo_name": "Inkering/RugScraper", "id": "4b2836ab88b2520dc9526fcb11410d4e0e6c6221", "size": "3534", "binar...
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='django_form_architect', version=version, description="An easy way to create re-usable customizable forms.", long_description="""\ This package is meant to be a full-featured form builder for non-technical and tech...
{ "content_hash": "5de2922d1d7b92798a5a3f66c4a93368", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 256, "avg_line_length": 36.6, "alnum_prop": 0.6302367941712204, "repo_name": "ceko/django-form-architect", "id": "923f659c59dd574b3397164368bbb525dd0e6340", "size": "1098",...
import random import uuid from clueless import data from clueless import log from clueless.model import game_state from clueless.server import errors _LOG = log.get_logger(__name__) class CardDeck(object): """ The CardDeck represents a deck of game cards """ def __init__(self): #create a li...
{ "content_hash": "a4eed7393f057a16160aa436a98f0fa9", "timestamp": "", "source": "github", "line_count": 609, "max_line_length": 79, "avg_line_length": 37.333333333333336, "alnum_prop": 0.6177427867698804, "repo_name": "PyBro-JHU/Clue-Less", "id": "1547cb1772e805e119cb18fe17127b9526331e94", "size": ...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('openstack_auth', '__first__'), ('django_cloudcix', '0001_initial'), ] operations = [ migrations.CreateModel...
{ "content_hash": "21196dff4198b57a5b4712aa0f60c2e3", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 194, "avg_line_length": 28.44, "alnum_prop": 0.5724331926863573, "repo_name": "CloudCIX/django-cloudcix-sdk", "id": "7c9084d832d2cd35dcffda3d1c006958a49495a5", "size": "784...
""" site.py ~~~~~~~ Flask main app :copyright: (c) 2015 by Vivek R. :license: BSD, see LICENSE for more details. """ import os import datetime from urlparse import urljoin from collections import Counter, OrderedDict from flask import Flask from flask_frozen import Freezer from werkzeug.contrib.atom import Ato...
{ "content_hash": "ea7c2385c31d498c5e04e6c3714d003c", "timestamp": "", "source": "github", "line_count": 553, "max_line_length": 83, "avg_line_length": 24.956600361663654, "alnum_prop": 0.6817621911455691, "repo_name": "vividvilla/olaf", "id": "daf31c2f546153cf76030534d69641dc8961e103", "size": "138...
from mox import IgnoreArg, Func from . import TestCaseWithMox class TestFTPUploader(TestCaseWithMox): def _makeOne(self, host='host', username='foo', password=None, dir='/'): from .. import FTPUploader return FTPUploader(host, username, password, dir) def test_upload(self): import...
{ "content_hash": "ff00b619c55e468b4fe4ad0740bcfb6e", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 76, "avg_line_length": 32.3421052631579, "alnum_prop": 0.6126932465419039, "repo_name": "meteogrid/FTPRelayer", "id": "9af8ee31ae2a85967d3b893e19c874590339e09e", "size": "1...
from __future__ import division, absolute_import, print_function, unicode_literals import os import sys app_root = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, app_root) os.chdir(app_root) # noinspection PyUnresolvedReferences from oucfeed.server import application
{ "content_hash": "138844a95915e0f75b14dcc579423a58", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 82, "avg_line_length": 23.916666666666668, "alnum_prop": 0.7770034843205574, "repo_name": "D6C92FE5/oucfeed.server", "id": "d1b18ba917501f4476f297176726c7f5ee08a5ac", "size...