text
stringlengths
4
1.02M
meta
dict
from setuptools import setup with open('README.md', 'r') as readme_f: long_description = readme_f.read() setup( name='py-wasapi-client', version='1.1.0', url='https://github.com/unt-libraries/py-wasapi-client', author='University of North Texas Libraries', author_email='[email protected]', ...
{ "content_hash": "33605729ba60e81b7cebd9e4e682e7a7", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 86, "avg_line_length": 32.43589743589744, "alnum_prop": 0.6205533596837944, "repo_name": "unt-libraries/py-wasapi-client", "id": "af578d901a88cdea874dbc12ad047e4345b6786c", ...
from django.db import models class Example(models.Model): title = models.CharField(max_length=80) product_type = models.CharField(max_length=100) review = models.TextField(max_length=500, unique=True) media_link = models.URLField(blank=True, null=True, max_length=100) audio_image = models.ImageFie...
{ "content_hash": "18c834ef8fb7cfba76c29d72c171e23b", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 81, "avg_line_length": 36.55102040816327, "alnum_prop": 0.6404243439419319, "repo_name": "SarahJaine/say-it", "id": "58eca26915876043532b99f968301341440fdb38", "size": "179...
import logging from pylons import tmpl_context as c from datetime import datetime from allura.app import Application, SitemapEntry from allura.lib import helpers as h from allura import model as M from allura.eventslistener import EventsListener from model.stats import UserStats from controllers.userstats import Forge...
{ "content_hash": "3e9b2cff12dc9f428c1ee043b59d8498", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 79, "avg_line_length": 31.993243243243242, "alnum_prop": 0.6149947201689546, "repo_name": "apache/incubator-allura", "id": "eb25140ac6d7099b987f80a975ad174ccfdf0ad7", "siz...
import yaml class SettingManager: def __init__(self,path='application.yml'): with open(path, "r+") as f: self.properties = yaml.safe_load(f)
{ "content_hash": "9f7d073fa63aa012fadd394c089a3b60", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 47, "avg_line_length": 21, "alnum_prop": 0.6011904761904762, "repo_name": "yamanakahirofumi/mokobot", "id": "fdde84233f54ac9a24a1349d9814689c48c00e27", "size": "193", "bin...
from __future__ import with_statement try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(): with open('ircclient/version.txt') as f: return f.read().strip() def get_readme(): try: with open('README.rst') as f: return f....
{ "content_hash": "357ee17229d5255f9a76a3a4afd396eb", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 50, "avg_line_length": 20.487179487179485, "alnum_prop": 0.6070087609511889, "repo_name": "youknowone/ircclient", "id": "fe489b4c2d984b35aad3c74b3663a80634a9d6c1", "size": ...
import os DEBUG = True SITE_ID = 1 APP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } ROOT_URLCONF = 'django_csv_tests.tests.urls' STATIC_URL = '/static/' TEMPLATE_DIRS...
{ "content_hash": "8d6f73fdf2d5ccae6e92d7dd2f0fe4ac", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 62, "avg_line_length": 23.375, "alnum_prop": 0.6864973262032086, "repo_name": "enricobarzetti/django_csv_tests", "id": "5a77549b74e8632be3ff1003097e83489154b0b9", "size": "...
from django.conf.urls import include, url from django.views.generic import RedirectView from rest_framework import routers from periods import views as period_views router = routers.DefaultRouter() router.register(r'periods', period_views.FlowEventViewSet, base_name='periods') router.register(r'statistics', period_v...
{ "content_hash": "e6350e1596a397969d2e0d58d7e1accb", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 100, "avg_line_length": 54.333333333333336, "alnum_prop": 0.7105409927495817, "repo_name": "jessamynsmith/eggtimer-server", "id": "10d58fac540d40061496237ac886bfdbc6813686", ...
"""Compatibility layer for different database engines This modules stores logic specific to different database engines. Things like time-related functions that are similar but not identical, or information as to expose certain features or not and how to expose them. For instance, Hive/Presto supports partitions and h...
{ "content_hash": "0f347b3011495ebaf0404c92227b9f8c", "timestamp": "", "source": "github", "line_count": 1008, "max_line_length": 79, "avg_line_length": 37.6875, "alnum_prop": 0.5501066098081023, "repo_name": "nekia/incubator-superset-dev", "id": "0b804b361305d05cc963366f574c6c8cfaba73c5", "size": "...
from os.path import abspath, join, dirname try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='ccm', version='2.0.2', description='Cassandra Cluster Manager', long_description=open(abspath(join(dirname(__file__), 'README.md'))).read(), autho...
{ "content_hash": "10f3526a5b1b8426f69437f53f708922", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 80, "avg_line_length": 30.806451612903224, "alnum_prop": 0.6167539267015707, "repo_name": "spodkowinski/ccm", "id": "bcf57c746b91170dbba9d9331d3ebda410b53f57", "size": "978...
""" Copyright (c) 2020 Ad Schellevis <[email protected]> Copyright (c) 2020 devNan0 <[email protected]> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source cod...
{ "content_hash": "d742381dc7b50aea3b22362a7019a5db", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 104, "avg_line_length": 43.02040816326531, "alnum_prop": 0.709203036053131, "repo_name": "dharrigan/plugins", "id": "23fc0d739840dbda6eb693478f94e256fc7b8c1e", "size": "210...
from django.db.models.signals import post_save from django.dispatch import receiver from django.db import connection from bluebottle.wallposts.models import MediaWallpost, TextWallpost from bluebottle.common.tasks import _post_to_facebook @receiver(post_save, sender=MediaWallpost) @receiver(post_save, sender=TextWa...
{ "content_hash": "621c89e41bfcf823614468dc40c59698", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 67, "avg_line_length": 28, "alnum_prop": 0.7038690476190477, "repo_name": "jfterpstra/bluebottle", "id": "5b7f46863b6a39ebec4d21ad6bf7376e06ff6104", "size": "673", "binar...
"""A module for storage specific test cases""" import testbase from utils import * log = get_logger('auto-cert-kit') class PerfTestClass(testbase.LocalStorageTestClass): """A somewhat generic test class for local storage performance tests that could be expanded to include additional plugin-based tasks"...
{ "content_hash": "10a96b069baa61fb577e462d7288d60a", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 137, "avg_line_length": 44.19166666666667, "alnum_prop": 0.46351122006411466, "repo_name": "bpwook/auto-cert-kit", "id": "19c585f3a6ea655058201b42217db9dabda9861f", "size"...
from __future__ import division, absolute_import import os, sys, errno, warnings try: import pwd, grp except ImportError: pwd = grp = None try: from os import setgroups, getgroups except ImportError: setgroups = getgroups = None from twisted.python.compat import _PY3, unicode if _PY3: ...
{ "content_hash": "2c275ca2eb4c57a6264e7963af21ead8", "timestamp": "", "source": "github", "line_count": 1042, "max_line_length": 90, "avg_line_length": 30.74184261036468, "alnum_prop": 0.5528673555395998, "repo_name": "timkrentz/SunTracker", "id": "950fd6b35ee2e1e61cb20fefaba3a8ce9239b178", "size":...
from . import mtapi GREENLINE = 902 def station_code_to_name_map(): codes_to_station = {} station_to_codes = gather_station_codes() for station in station_to_codes: for code in station_to_codes[station]: codes_to_station[code] = station return codes_to_station def gather_statio...
{ "content_hash": "d5b59ab8846eb474d009f22d65f6f884", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 85, "avg_line_length": 31.710526315789473, "alnum_prop": 0.6049792531120332, "repo_name": "kjschiroo/lightrail", "id": "7053b53afa6d1e78517b4b524563b7c29c623a55", "size": "...
""" Remote python server. Execute Python commands remotely and send output back. WARNING: This version has a gaping security hole -- it accepts requests from any host on the Internet! """ import sys from socket import socket, AF_INET, SOCK_STREAM import io import traceback PORT = 4127 BUFSIZE = 1024 def main(): ...
{ "content_hash": "7a1cc9348a3953b72d32d430f4895c87", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 71, "avg_line_length": 23.196428571428573, "alnum_prop": 0.567359507313318, "repo_name": "massimo-nocentini/on-python", "id": "a18de137fa1cf888e43c2824923de235f8e52af3", "s...
"""Wrapper for _decode_proto_sparse_op.so.""" from tensorflow.python.framework import load_library from tensorflow.python.platform import resource_loader decode_proto_sparse_module = load_library.load_op_library( resource_loader.get_path_to_datafile('_decode_proto_sparse_op.so')) decode_proto_sparse_v2 = decode_...
{ "content_hash": "914cf2ab2619951b9b3878ce12cbf38e", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 74, "avg_line_length": 46.63636363636363, "alnum_prop": 0.7933723196881092, "repo_name": "google/struct2tensor", "id": "35a6f159f76532fea22f0d6ace15c54fe3bf9bc6", "size": "...
__info__ = { 'name' : 'RSI Parsing Tool', 'version' : '0.1', 'description' : 'Reading tens of thousands of lines of RSI is quite time-consuming and it really burns your ' 'eyes. This tool will pre-analyze the RSI file and give you hints on what info may contain ' ...
{ "content_hash": "ddbda945197c74d3f18cecad3a289338", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 115, "avg_line_length": 45.8, "alnum_prop": 0.5065502183406113, "repo_name": "tyrchen/karp", "id": "dc147531700be0f7d81429a972651db88ab19254", "size": "458", "binary": fa...
class FrontPage: """ Page object models allow selectors to be defined in one place and then used by all of the test. """ login_button_css = '#user-actions-footer > a' logout_button_text = 'Sign out' menu_button_data_css = '#main > ul > li:nth-child(1) > a' menu_button_data_alt_css = '#ma...
{ "content_hash": "d177df0a9dcbc7db785863bec74768f6", "timestamp": "", "source": "github", "line_count": 154, "max_line_length": 259, "avg_line_length": 30.428571428571427, "alnum_prop": 0.6323090055484422, "repo_name": "ENCODE-DCC/pyencoded-tools", "id": "3515529203526e21db4a3358e09020f40d3053ec", ...
from .gfycat import Gfycat
{ "content_hash": "f5e47a2b6d4854ce944974a9d730c153", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 26, "avg_line_length": 27, "alnum_prop": 0.8148148148148148, "repo_name": "Tarinu/taribot", "id": "af917b9fc21dced8be2ffc452cd64d52ec0b0a6b", "size": "52", "binary": false...
import RPi.GPIO as GPIO import sys # Setup GPIO.setmode(GPIO.BOARD) GPIO.setup(int(sys.argv[1]), GPIO.OUT) # Turn On GPIO.output(int(sys.argv[1]), True) # Turn off #GPIO.output(sys.argv[1], False) # Will Reset the GPIO #GPIO.cleanup()
{ "content_hash": "a77f44f86930b4db65b59f83bdc3c841", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 38, "avg_line_length": 15.933333333333334, "alnum_prop": 0.702928870292887, "repo_name": "JamesMarino/Home-Automation", "id": "67b2b5511c2d15b5ba77262ae372eb40631c2eb6", "s...
from datetime import datetime from portality.events.consumer import EventConsumer from portality import constants from portality import models from portality.bll import DOAJ, exceptions from portality.lib.seamless import SeamlessException class ApplicationPublisherRevisionNotify(EventConsumer): ID = "application...
{ "content_hash": "53853417981982ef4ccaccc1b0b06855", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 157, "avg_line_length": 40.977777777777774, "alnum_prop": 0.6941431670281996, "repo_name": "DOAJ/doaj", "id": "1b363c445fbd533dbdc9ea38c795ff5031f7ccea", "size": "1844", ...
import unittest from pluginsmanager.observer.observable_list import ObservableList from pluginsmanager.observer.update_type import UpdateType from unittest.mock import MagicMock, call class ObservableListTest(unittest.TestCase): def test_append(self): element = {'test': 5, 'a':[1,2,3,5]} lista...
{ "content_hash": "5b3219b7036f1c6d1bdb3d305ede8876", "timestamp": "", "source": "github", "line_count": 224, "max_line_length": 99, "avg_line_length": 24.308035714285715, "alnum_prop": 0.5651056014692378, "repo_name": "PedalPi/PluginsManager", "id": "ce666f9ab24b4125a4188a10dac96523afe2f987", "size...
from webapp2 import RequestHandler, cached_property from webapp2_extras.sessions import get_store from models.user import User class SessionHandler(RequestHandler): # Override dispatch method to get and save session data with every request def dispatch(self): self.session_store = get_store(request=se...
{ "content_hash": "bab0faed1c7da7bd5ea470b7731e0462", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 78, "avg_line_length": 31.214285714285715, "alnum_prop": 0.6681922196796338, "repo_name": "opendatapress/open_data_press", "id": "855149511719bda801c2464d8aa233ad5e5321ea", ...
import datetime from typing import Dict, Optional import msrest.serialization class CloudEvent(msrest.serialization.Model): """Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema. All required parameters must be populated in order to send to Azure. :param additional_...
{ "content_hash": "ce19151dda5890ff7d95aa335d1aed87", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 98, "avg_line_length": 37.18987341772152, "alnum_prop": 0.6089176310415249, "repo_name": "Azure/azure-sdk-for-python", "id": "782a90f1ad00f2dad5c1fa4dde6f8e7d461c608f", "s...
import string from solvertools.wordlist import WORDS from itertools import cycle ASCII_a = 97 def shift_letter(char, offset): if char not in string.ascii_letters: return char idx = ord(char.lower()) - ASCII_a new_idx = (idx + offset) % 26 new_char = chr(ASCII_a + new_idx) if char.isupper()...
{ "content_hash": "8340d31aaf58ebd6275abf953f45cbb5", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 76, "avg_line_length": 30.50943396226415, "alnum_prop": 0.6150278293135436, "repo_name": "rspeer/solvertools", "id": "f6a9e01b2db4ffada037d30263781c8c4ae2c685", "size": "3...
"""Run a private event loop and then throw a fatal error in it to verify that we shut down cleanly and don't lose the error. """ import thingflow.filters.output from thingflow.base import Scheduler, OutputThing, EventLoopOutputThingMixin, FatalError import unittest import asyncio s = Scheduler(asyncio.get_event_loop(...
{ "content_hash": "16b2d1621d71cb638c8bbfaf9214bab5", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 88, "avg_line_length": 29.09090909090909, "alnum_prop": 0.63671875, "repo_name": "mpi-sws-rse/thingflow-python", "id": "43abc7afb8e3ae790a7af251b41f44aaccebfc72", "size": "...
import os from distutils.core import setup setup( name='fSequenceTools', version='1.0.0', description='Sequence numeric encoding and report building tools', long_description=\ ''' ============== fSequenceTools ============== This package was created to investigate two separate aspects of sequence...
{ "content_hash": "2b121927a0b6b76a2d31740a67dd655c", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 77, "avg_line_length": 31.625, "alnum_prop": 0.6521739130434783, "repo_name": "local-minimum/fseq", "id": "cefe30a55f6277f38ec712cd15bebc7cb95307cf", "size": "1541", "bin...
from django.conf.urls import url from .views import * urlpatterns = [ url(r'^browse-entries/$', BrowseEintrag.as_view(), name='browse_entries'), url(r'^browse-baende/$', BrowseBand.as_view(), name='browse_baende'), url(r'^browse-archivs/$', BrowseArchiv.as_view(), name='browse_archivs'), url(r'^browse-...
{ "content_hash": "365a4b194efe439f3c07d3ee5226e88f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 92, "avg_line_length": 51.18181818181818, "alnum_prop": 0.6873889875666075, "repo_name": "acdh-oeaw/vhioe", "id": "350be3765e66445a402a77c8650ea20ec80c42d0", "size": "563",...
import proto # type: ignore from google.ads.googleads.v11.common.types import criteria from google.ads.googleads.v11.common.types import feed_common from google.ads.googleads.v11.enums.types import ( call_conversion_reporting_state as gage_call_conversion_reporting_state, ) from google.ads.googleads.v11.enums.typ...
{ "content_hash": "9d61e8bb492cb1b3cb46c8bb74a3995a", "timestamp": "", "source": "github", "line_count": 1476, "max_line_length": 153, "avg_line_length": 40.639566395663955, "alnum_prop": 0.6293344891971192, "repo_name": "googleads/google-ads-python", "id": "213a8e9c153f2d22b46e81e4dc5f5c00714f992a", ...
""" Measure resonators, one at a time, with the readout tone centered in the filterbank bin. """ from __future__ import division import time import numpy as np from kid_readout.roach import analog, calculate, hardware_tools, tools from kid_readout.measurement import acquire, basic from kid_readout.equipment import h...
{ "content_hash": "a361c2d32b4eb149f9bbc54f86a0be45", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 119, "avg_line_length": 52.504, "alnum_prop": 0.6286759104068261, "repo_name": "ColumbiaCMB/kid_readout", "id": "ab430e62f12956b0171758b77f7ffe141927d127", "size": "6563",...
import warnings from sympy import Basic, Symbol, Integer from sympy.core import sympify from sympy.core.basic import S from sympy.polys import Poly, roots, cancel from sympy.simplify import simplify from sympy.utilities import any # from sympy.printing import StrPrinter /cyclic/ import random class NonSquareMatrixE...
{ "content_hash": "0b5c96daca62d840530d416f7ecbe38e", "timestamp": "", "source": "github", "line_count": 2127, "max_line_length": 100, "avg_line_length": 31.698166431593794, "alnum_prop": 0.48460443178784374, "repo_name": "tovrstra/sympy", "id": "14ada69963338d9d3b730557c7dcfd2b719d60a8", "size": "6...
import copy import os import sys import time import unittest from app import generator, schedulerv2, sync try: import kvm_player except ImportError: sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import kvm_player class TestKVMK8sEtcdOperator(kvm_player.KernelVirtualMachine...
{ "content_hash": "b1dc8e6f78d80b33d282ddbdb396c2e0", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 118, "avg_line_length": 43.864, "alnum_prop": 0.5619186576691593, "repo_name": "nyodas/enjoliver", "id": "5ba61b5e86dd16d93f1414f329001f5672b5bdeb", "size": "5483", "bin...
from .resource import Resource class SharedAccessAuthorizationRuleResource(Resource): """Description of a namespace authorization rule. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id :vartype id: str :ivar name: Resource name ...
{ "content_hash": "209d243fcc9b4247a251b80c36ef23e1", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 97, "avg_line_length": 32.18181818181818, "alnum_prop": 0.5918079096045198, "repo_name": "rjschwei/azure-sdk-for-python", "id": "d4515ef0e7c72866167516701aaf9d781718bdb0", ...
from subprocess import call import re from common import * class _AnyNumber(int): def __eq__(self, other): return True ANY = _AnyNumber(1) class PathTester(object): def __init__(self, test, root): self.test = test self.root = root self.paths = [] self.m...
{ "content_hash": "af9fea82946beb9193cf3bf5147dbb60", "timestamp": "", "source": "github", "line_count": 313, "max_line_length": 167, "avg_line_length": 38.242811501597444, "alnum_prop": 0.5579782790309106, "repo_name": "westernx/sgfs", "id": "e26d0f51a35487a331e194caf778e1eb831c5bc4", "size": "1197...
import six from trefoil.render.renderers.classified import ClassifiedRenderer from trefoil.render.renderers.stretched import StretchedRenderer from trefoil.render.renderers.unique import UniqueValuesRenderer from trefoil.utilities.color import Color AVAILABLE_RENDERERS = { "classified": ClassifiedRenderer...
{ "content_hash": "2b354257db4023f7bb55dfd647640f92", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 96, "avg_line_length": 34.56060606060606, "alnum_prop": 0.6536606751424814, "repo_name": "consbio/clover", "id": "f5d58a3ccb43e462a7431cf59c8b7c7d7c0c97e5", "size": "2281",...
from django.db import models from django.db.models import Count, Sum from django.contrib.auth.models import AbstractUser from sgce.models import Enrollment, Event, Payment class Person(AbstractUser): MALE = 'M' FEMALE = 'F' SEX_CHOICES = ( (MALE, 'M'), (FEMALE, 'F'), ) PARTICIPANT = 'P' OPERATOR = 'O' REC...
{ "content_hash": "988707f9b155a24c5f0e4b98bb191a5b", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 118, "avg_line_length": 31.7, "alnum_prop": 0.7271293375394322, "repo_name": "ramonsaraiva/sgce", "id": "8820c9968c2e8aab0bb693e31be85e339ba1e9eb", "size": "1902", "binar...
import sys, os from opentreetesting import test_http_json_method, config DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/phylesystem/external_url/pg_99' print SUBMIT_URI r = test_http_json_method(SUBMIT_URI, 'GET', expected_status=200, ...
{ "content_hash": "8064f18b3ad517c68a6e5a8cc18075a2", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 57, "avg_line_length": 32.333333333333336, "alnum_prop": 0.5824742268041238, "repo_name": "OpenTreeOfLife/phylesystem-api", "id": "ab23a9256a7537b5fd8b80853bd0336c86dce867", ...
from __future__ import division # Only py3 string encoding from __future__ import unicode_literals # Only py3 print from __future__ import print_function import os import numpy as np from sklearn.externals import joblib from sklearn.ensemble import ExtraTreesRegressor from sklearn.utils import check_random_state impor...
{ "content_hash": "aa3f3a8ba90a545652cf46b40faf069f", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 48, "avg_line_length": 25.9375, "alnum_prop": 0.7686746987951807, "repo_name": "dtaralla/hearthstone", "id": "13e4c68d09392e811aa7f1a85a7ac8e14cd8937b", "size": "522", "b...
"""Common function to deal with virtual environments""" from __future__ import absolute_import from jupyter_client.kernelspec import KernelSpec from traitlets import default _nothing = object() class EnvironmentLoadingKernelSpec(KernelSpec): """A KernelSpec which loads `env` by activating the virtual environment...
{ "content_hash": "c92720e06c20310c6842e38537c571a3", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 78, "avg_line_length": 26.475, "alnum_prop": 0.5571293673276676, "repo_name": "Cadair/jupyter_environment_kernels", "id": "a153c16d1a3ea3c858f3e6a7facd3efa0a0e3605", "size"...
""" Flip API Flip # noqa: E501 The version of the OpenAPI document: 3.1 Contact: [email protected] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import io import json import logging import re import ssl import certifi # python 2 and python 3...
{ "content_hash": "574b87175a9d28ae8eb12b7bc9a595f5", "timestamp": "", "source": "github", "line_count": 295, "max_line_length": 134, "avg_line_length": 42.10508474576271, "alnum_prop": 0.5212945817567024, "repo_name": "Telestream/telestream-cloud-python-sdk", "id": "e49cce636277af0be4ec0b67cc85c9c789...
import sys import os brief = "test all controllers" def usage(argv0): print("Usage: {} test controllers [--list|--help]".format(argv0)) sys.exit(1) aliases = ['cs'] def execute(argv, argv0, engine): if '--help' in argv or '-h' in argv: usage(argv0) os.environ["AIOWEB_ENV"] = "test" e...
{ "content_hash": "0a1d219d8768b1e78162e75d3606a7d1", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 105, "avg_line_length": 27.17391304347826, "alnum_prop": 0.5768, "repo_name": "kreopt/aioweb", "id": "4f4dbfa51e6d9d9d0bb74455b66988b04da76d31", "size": "1250", "binary":...
from unittest import TestCase, mock from webspider.utils.http_tools import generate_http_request_headers, requests_get, requests_post class TestUtilHttpTools(TestCase): def test_generate_http_request_headers(self): header = generate_http_request_headers() self.assertTrue(isinstance(header, dict))...
{ "content_hash": "58e7972e0323e916a1bdab08fedd5c0f", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 97, "avg_line_length": 39, "alnum_prop": 0.6805555555555556, "repo_name": "GuozhuHe/webspider", "id": "8f4f84be127d25127abb41614f4461824dd3edb4", "size": "951", "binary":...
"""Tests for layout. Includes positioning and dimensioning of boxes, line breaks, page breaks. """
{ "content_hash": "f65cbfd4ea32f701b67b32b25b6d094e", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 73, "avg_line_length": 20.2, "alnum_prop": 0.7425742574257426, "repo_name": "Kozea/WeasyPrint", "id": "04c2657b1ede1a7f0e5ae130ac2e51a4c5be61bf", "size": "101", "binary": ...
import unittest import os import sys import time from streamsx.topology.schema import StreamSchema from streamsx.topology.topology import * from streamsx.topology.tester import Tester import streamsx.topology.context import streamsx.spl.op as op import streamsx.spl.toolkit def random_topic(prefix='RT_'): return ...
{ "content_hash": "b410a0e9757701520b69c9817490eebf", "timestamp": "", "source": "github", "line_count": 309, "max_line_length": 130, "avg_line_length": 29.812297734627833, "alnum_prop": 0.5687147199305254, "repo_name": "ddebrunner/streamsx.topology", "id": "77b6d40ead4dc869f85f571ec8eaf26484813ec5", ...
"""Tests related to django.db.backends that haven't been organized.""" import datetime import threading import unittest import warnings from django.core.management.color import no_style from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, IntegrityError, connection, connections, reset_queries, transaction,...
{ "content_hash": "12eda7b7f2f10e2ab6864fe415c22d6f", "timestamp": "", "source": "github", "line_count": 795, "max_line_length": 112, "avg_line_length": 39.9496855345912, "alnum_prop": 0.6163098236775819, "repo_name": "charettes/django", "id": "6138a3626c60505cd4ad9aaffe2d820f4464b44b", "size": "317...
import re import geocoder from six import string_types class Location(object): """ Location container """ lat = None lng = None def __init__(self, location, **kwargs): self.location = location self.kwargs = kwargs self._check_input(location) @property def ok(self): ...
{ "content_hash": "940a52121ab28c11a1f7413c4940db44", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 95, "avg_line_length": 30.688524590163933, "alnum_prop": 0.532051282051282, "repo_name": "minimedj/geocoder", "id": "b3300bb43a4487f8cc9af71021f082c42014bd6c", "size": "37...
import icat.client url = "https://icat.example.com:8181" client = icat.client.Client(url, checkCert=False) print("Connect to %s\nICAT version %s" % (url, client.apiversion))
{ "content_hash": "f35186a872ff70ed92b2d39531133f99", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 66, "avg_line_length": 35, "alnum_prop": 0.7314285714285714, "repo_name": "icatproject/python-icat", "id": "95b81b302bd042c274b44deb431741f3d048aac2", "size": "195", "bina...
from rest_framework import permissions class IsOwnerOrReadOnly(permissions.BasePermission): """Custom permission to only allow owners of an object to edit it.""" def has_object_permission(self, request, view, obj): """Read permissions are allowed to any request.""" if request.method in permis...
{ "content_hash": "2678344d170e6b2e572c85475f9bca40", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 86, "avg_line_length": 40.38461538461539, "alnum_prop": 0.7028571428571428, "repo_name": "pyphonic/Pyphon", "id": "8639ec1d8b456a3f149e52777445e340b5cad894", "size": "525",...
from reporter.core import SqlReport from reporter.emailing import RECIPIENT_IT_DWH from reporter.uhl_reports.civicrm import get_contact_id_search_link from reporter.connections import get_redcap_link class NationalBioresourceNotInCivicrm(SqlReport): def __init__(self): super().__init__( ...
{ "content_hash": "a435d7b2bc30c8719bd0592aa21f02f1", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 67, "avg_line_length": 28.655172413793103, "alnum_prop": 0.5451263537906137, "repo_name": "LCBRU/reporter", "id": "151e163c6f57153da7002c4f90f02dd3cb3ed74f", "size": "2517"...
"""Defines Fairness Indicator's Jupyter notebook widgets.""" import ipywidgets as widgets from tensorflow_model_analysis.version import VERSION import traitlets from traitlets import List from traitlets import Unicode @widgets.register class FairnessIndicatorViewer(widgets.DOMWidget): """The fairness indicator visu...
{ "content_hash": "20c9f468f48b9a28b6eae8482c08fec8", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 69, "avg_line_length": 36.729729729729726, "alnum_prop": 0.7159676232523915, "repo_name": "tensorflow/model-analysis", "id": "d5e6b72ce79e2c8279fa5933077ad2fc73090a0c", "si...
""" File containing information about which treatment stage Pyccel is executing """ from .metaclasses import Singleton class PyccelStage(metaclass = Singleton): """ Class wrapping a string indicating which treatment stage Pyccel is executing. This string is one of: - syntactic - semantic - codeg...
{ "content_hash": "c72730d274fac501d4b39c5c3ea6acc4", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 85, "avg_line_length": 28.517241379310345, "alnum_prop": 0.6287787182587666, "repo_name": "ratnania/pyccel", "id": "1934aceb519e4b666b188e0875eabab572c7eea7", "size": "1199...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: iam short_description: Manage IAM users, groups, ro...
{ "content_hash": "599816caf42a6f9fd1637ed6e7d7c7f2", "timestamp": "", "source": "github", "line_count": 851, "max_line_length": 158, "avg_line_length": 41.37602820211516, "alnum_prop": 0.5789952003635228, "repo_name": "SergeyCherepanov/ansible", "id": "33ae98485495fddc09c790c4184fee8f526431d2", "si...
"""Minimal setup script to appease buildout for Melange. """ import os import re from setuptools import setup, find_packages match_version = re.compile("version: ([0-9\-]+)") try: appyaml = open(os.path.join("app", "app.yaml.template")) version = match_version.findall(appyaml.read())[0] except: version = "...
{ "content_hash": "3bc3114d58e2452d4457ae27adbd5f16", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 83, "avg_line_length": 29.325581395348838, "alnum_prop": 0.5448057097541633, "repo_name": "MatthewWilkes/mw4068-packaging", "id": "b40e7cfe9b1b93895e1c58349faa7be27e0af84e", ...
"""Tabs API Tests for Version 1.0. This is a testing template for the generated TabsAPI Class. """ import unittest import requests import secrets from pycanvas.apis.tabs import TabsAPI from pycanvas.apis.tabs import Tab class TestTabsAPI(unittest.TestCase): """Tests for the TabsAPI.""" def set...
{ "content_hash": "a794bf01741f5f869342220b5c9b566a", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 125, "avg_line_length": 38.3235294117647, "alnum_prop": 0.6914811972371451, "repo_name": "PGower/PyCanvas", "id": "f38dd89c054f1e92eab425278a678796bc4e43da", "size": "1303"...
import requests response = requests.get('http://localhost:5000/rainfall-api/v1/years/2010/data') response.json()
{ "content_hash": "756dbdd55576182aa9558347f79465ad", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 80, "avg_line_length": 16.714285714285715, "alnum_prop": 0.7521367521367521, "repo_name": "alysbrett/rainfall-api", "id": "3564b6de5bd265375f0008441d30fc2a96055328", "size":...
from django.db import models from django.contrib.auth.models import User from unidecode import unidecode from tagging.fields import TagField, Tag class Categories(models.Model): # yazi basligi ve sef turu title = models.CharField(max_length=255, verbose_name="Baslik") sef_title = models.Cha...
{ "content_hash": "0e2b034883f595f41cb6c5c0bcd16468", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 105, "avg_line_length": 35.51724137931034, "alnum_prop": 0.6679611650485436, "repo_name": "halitalptekin/PyTr", "id": "330bbe22ec81ca832191e77dba1d43c0fb7486c8", "size": "3...
import web2kindle.script.zhihu_collection import web2kindle.script.zhihu_answers import web2kindle.script.zhihu_zhuanlan import web2kindle.script.qdaily import web2kindle.script.guoke_scientific import web2kindle.script.jianshu_wenji import web2kindle.script.jianshu_user import web2kindle.script.jianshu_zhuanti if __n...
{ "content_hash": "ffb523a6f436dcce43df927b286c0db9", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 112, "avg_line_length": 53, "alnum_prop": 0.6535849056603774, "repo_name": "wax8280/web2kindle", "id": "ebbba23cd7ae27b6d4d8611a088ed11f8a6472ba", "size": "1534", "binary...
""" Definition of ListNode class ListNode(object): def __init__(self, val, next=None): self.val = val self.next = next Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param head:...
{ "content_hash": "f6f94b2f569dfc8a0e5d4d47dc2f0a4c", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 71, "avg_line_length": 25.06382978723404, "alnum_prop": 0.5441426146010186, "repo_name": "quake0day/oj", "id": "dd92ed0fedd07bfc7b37e010c827620e8a2c53eb", "size": "1178", ...
import pytest from datadog_checks.etcd import Etcd from .common import REMAPED_DEBUGGING_METRICS, STORE_METRICS, URL from .utils import is_leader, legacy, preview pytestmark = pytest.mark.e2e @preview def test_new(dd_agent_check, instance, openmetrics_metrics): aggregator = dd_agent_check(instance, rate=True) ...
{ "content_hash": "2da6f9c87c547ab2778416828b4d5b66", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 115, "avg_line_length": 37.577777777777776, "alnum_prop": 0.7120047309284447, "repo_name": "DataDog/integrations-core", "id": "239c77f362b11886b9010d997d006b663efb5073", "s...
""" Example demonstrating how to fit a complex H-alpha profile after subtracting off a satellite line (in this case, He I 6678.151704) """ import pyspeckit sp = pyspeckit.OpticalSpectrum('sn2009ip_halpha.fits') # start by plotting a small region around the H-alpha line sp.plotter(xmin=6100,xmax=7000,ymax=2.23,ymin=0...
{ "content_hash": "de8c5a1cf7a001fe4f69e3c541ab77b8", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 170, "avg_line_length": 47.775193798449614, "alnum_prop": 0.7275677429823139, "repo_name": "keflavich/pyspeckit-obsolete", "id": "f6b051222c40e2f25ade5a03bef15c4d9f78d2e5", ...
from os.path import join as pjoin import logging from collections import defaultdict log = logging.getLogger("main") from ete2.tools.phylobuild_lib.task import Msf from ete2.tools.phylobuild_lib.master_task import ConcatAlgTask from ete2.tools.phylobuild_lib.master_job import Job from ete2.tools.phylobuild_lib.utils ...
{ "content_hash": "12cbf61fd038ec390c4724d67254071b", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 100, "avg_line_length": 41.89302325581395, "alnum_prop": 0.5799933385144888, "repo_name": "sauloal/cnidaria", "id": "89e3f0348c2071873828720f6b6c55c4dfde7386", "size": "10...
import json import os from celery import Celery from .models import RecommendRoutesRequest, RecommendRoutesTask, RecommendRoutesTaskStatus from .services import recommend_routes_service app = Celery(__name__) app.conf.update( broker_url=os.environ.get('CELERY_BROKER_URL', "redis://localhost:6379/0"), result_b...
{ "content_hash": "5eb0df7606012dda1070691f9eb33a24", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 109, "avg_line_length": 36.80434782608695, "alnum_prop": 0.7365623154164206, "repo_name": "TRI-AMDD/piro", "id": "ad3a881eea355b5d51532dc8513d4a4da0f114c3", "size": "1693",...
''' phone_communication_backup_coalescer Copyright 2016, Phillip Green II Licensed under MIT. ''' import datetime import logging import rx from rx.core import AnonymousObservable import xml.etree.ElementTree as ET from phone_communication_backup_coalescer.files import dir_to_files_mapper from phone_communication_backu...
{ "content_hash": "8018a2eb253d9bcc4ca366d01ea50958", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 127, "avg_line_length": 35.49438202247191, "alnum_prop": 0.5349794238683128, "repo_name": "phillipgreenii/phone_communication_backup_coalescer", "id": "3e98f653dad95083feaef3...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """code generator for GLES2 command buffers.""" import itertools import os import os.path import sys import re from optparse impor...
{ "content_hash": "d1fb944d70e33795276329a703ce97bb", "timestamp": "", "source": "github", "line_count": 7522, "max_line_length": 81, "avg_line_length": 31.7420898697155, "alnum_prop": 0.5977366772210216, "repo_name": "nacl-webkit/chrome_deps", "id": "1c2b3929151a4182a449c4a5072b83b1c012495a", "size...
import csv import urlparse import sys, os # Per http://stackoverflow.com/questions/2850893/reading-binary-data-from-stdin # Because csv apparently wants binary data sys.stdin = os.fdopen(sys.stdin.fileno(), 'rb', 0) mycsv = csv.DictReader(sys.stdin) sites = {} for data in mycsv: isites = set() warnings = set(...
{ "content_hash": "d9ae382c6eb3d8e16ebd0b473f267ba6", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 96, "avg_line_length": 32.44444444444444, "alnum_prop": 0.5115582191780822, "repo_name": "nandhp/misc-utils", "id": "bd581f1bad5f9d154731e2633c4e9dd5d1e1e3ff", "size": "302...
import codecs import os import unittest import tempfile from tracing_build import vulcanize_trace_viewer class Trace2HTMLTests(unittest.TestCase): def testWriteHTMLForTracesToFile(self): try: # Note: We can't use "with" when working with tempfile.NamedTemporaryFile # as that does not work on Window...
{ "content_hash": "da881bf3f3467a5a1ba919484b806036", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 80, "avg_line_length": 35.04761904761905, "alnum_prop": 0.7146739130434783, "repo_name": "catapult-project/catapult", "id": "b602388eb4a6e2593bd7ad18db4b616e20031f32", "siz...
import os import sys sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extension...
{ "content_hash": "6371f8c2bb155756cfb637f42bbebc90", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 78, "avg_line_length": 29.391304347826086, "alnum_prop": 0.6587771203155819, "repo_name": "nint8835/jigsaw", "id": "7ea07c32a483517ae689aa79205ac499bfbfb530", "size": "473...
from . import cli # noqa
{ "content_hash": "11d98121143e72c306953a3c770d9279", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 25, "avg_line_length": 26, "alnum_prop": 0.6538461538461539, "repo_name": "lucuma/Clay", "id": "338df62ccab866e91e459353deb3488ab6885142", "size": "26", "binary": false, ...
from django.test import TestCase class PackageTests(TestCase): def setUp(self): pass def test_imports(self): import django import pytz import rest_framework import graphene import graphene_django
{ "content_hash": "e0e40c6802dd690c4de0e7f2a0b75414", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 32, "avg_line_length": 17.058823529411764, "alnum_prop": 0.5586206896551724, "repo_name": "foohooboo/graphql-cookiecutter", "id": "4468ab26cf0e70bf0f6d27971a3f925eb0e715ab", ...
import sqlite3 as lite import sys #from scipy.stats import linregress from numpy import empty import math import datetime class DataManager: def __init__(self): self.con = lite.connect('data.db') cur = self.con.cursor() # Table for storing date, time, blood glucose value, carbs, bolus, and ...
{ "content_hash": "7e4033f9243a0c9c67c439a5ca75eb70", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 190, "avg_line_length": 35.65408805031446, "alnum_prop": 0.5597107073557946, "repo_name": "johnyburd/glucometer", "id": "9f1bf559a11c36e5839144464a191ddf134523f1", "size":...
import flask from app import app @app.route('/') def index(): return flask.render_template('index.html', action="") @app.route('/control/<action>') def control(action): actions = ["prev", "play", "pause", "stop", "next"] if action not in actions: flask.abort() return flask.render_template("index.html", ac...
{ "content_hash": "ee2209adb155b5888f8e34af0852d448", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 58, "avg_line_length": 21.75, "alnum_prop": 0.6850574712643678, "repo_name": "hellerbarde/clampdown", "id": "47805bf59ee7931150fa37fcc6c2b73e55931280", "size": "435", "bi...
"""Command for resetting an instance.""" from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.api_lib.compute import utils class Reset(base_classes.NoOutputAsyncMutator): """Reset a virtual machine instance.""" @staticmethod def Args(parser): utils.AddZoneFlag( parser, ...
{ "content_hash": "ca17a8566b924875ec79ac23ee10284c", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 69, "avg_line_length": 26.166666666666668, "alnum_prop": 0.6643312101910828, "repo_name": "flgiordano/netcash", "id": "972b53d951f54b72a43583155bcf13f8cf82ab48", "size": "2...
import json, sys, re, random from bs4 import BeautifulSoup from collections import Counter # Bag implementation from random import choice from datetime import datetime import csv from type_mapping import case_map, organization_map, method_map from type_mapping import case_delist, method_delist, organization_delist fro...
{ "content_hash": "f15fe6da207dc65c81700af389f05ca1", "timestamp": "", "source": "github", "line_count": 729, "max_line_length": 157, "avg_line_length": 40.489711934156375, "alnum_prop": 0.6011789816038215, "repo_name": "participedia/data-transport", "id": "0e16e6e2973dddb46471f434f50fdb0bafe1387e", ...
from livestreamer.compat import urlparse from livestreamer.exceptions import PluginError, NoStreamsError from livestreamer.plugin import Plugin from livestreamer.stream import RTMPStream from livestreamer.utils import urlget import re class Mips(Plugin): SWFURL = "http://mips.tv/content/scripts/eplayer.swf" P...
{ "content_hash": "8e20456c8a605d26c059a97e38fbdfe3", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 85, "avg_line_length": 30.596153846153847, "alnum_prop": 0.6071653048397234, "repo_name": "breunigs/livestreamer", "id": "dffaab99f9d2215d3e40b35f73b965260d1e4b10", "size":...
print("Hello World. \n Welcome to Python!")
{ "content_hash": "333723c170efa082ea03852ca87c965d", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 43, "avg_line_length": 44, "alnum_prop": 0.7045454545454546, "repo_name": "chrlttv/Teaching", "id": "ea6cdae8fa497f25b21371a920dc956486740acd", "size": "44", "binary": fal...
import argparse import datetime from pathlib import Path import time import config from logger import LOGGER from marion_county import scrape_geojson from crime import acquire_crime_data_as_json def validate_date(input_date: str) -> datetime.date: """ Takes an input string argument, ensures it's a date and ...
{ "content_hash": "03d0a28195c096a27206a225c4b35128", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 108, "avg_line_length": 29.391304347826086, "alnum_prop": 0.6503944773175543, "repo_name": "awburgess/irvington_data", "id": "ba64bb1fe4688892aa9bb9a34e7637b314df11fd", "si...
import unittest, json, mock from mock import patch from app import payments from app.db.interface import PaymentService, PaymentNotFoundError from flask_api import status # HTTP Status Codes from flask import make_response,jsonify from app.error_handlers import DataValidationError from mock import patch CC_DETAIL = ...
{ "content_hash": "db9472cb73d8eb4818c32e04d43351b8", "timestamp": "", "source": "github", "line_count": 522, "max_line_length": 181, "avg_line_length": 50.71072796934866, "alnum_prop": 0.6608741641796683, "repo_name": "devops-s17-payments/payments", "id": "c2f57ffbddf208e5c7f0753053c9e59fa2aeec9e", ...
from django.conf.urls import * from .views import * urlpatterns = patterns('guias_cacao.views', url(r'^$', 'index_ficha_sombra', name='index-cacao'), url(r'^sombra/riqueza/$', 'riqueza_sombra', name='riqueza-cacao'), url(r'^sombra/analisis/$', 'analisis_sombra', name='analisis-cacao'), url(r'^sombra/co...
{ "content_hash": "221bed82075cb0a8f61932c687ca8982", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 104, "avg_line_length": 60.10989010989011, "alnum_prop": 0.6616087751371115, "repo_name": "CARocha/ciat_plataforma", "id": "30d2824c1239335afa557a92a8e84d5157e6a578", "size...
cells = AdminConfig.list('Cell').splitlines() for cell in cells: cname = AdminConfig.showAttribute(cell, 'name') cluster_entries = [] server_entries = [] cluster_apps = [] server_apps = [] # Get list of Nodes nodes = AdminConfig.list('Node', cell).splitlines() for node in nodes: nname = AdminConfig.showAtt...
{ "content_hash": "acc4ba0f281697b1261cd210548720cd", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 116, "avg_line_length": 39.473684210526315, "alnum_prop": 0.6593333333333333, "repo_name": "electric-cloud/EC-WebSphere", "id": "0b74d71dae2d428787d30c3871760d2929c0dadf", ...
"""A vtctld2 webdriver test that tests the different views of status page.""" import logging import os from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.wait import WebDriverWait from selenium.common.exc...
{ "content_hash": "6cc841e06212f475dcb12a891a07e44e", "timestamp": "", "source": "github", "line_count": 236, "max_line_length": 80, "avg_line_length": 40.847457627118644, "alnum_prop": 0.6529045643153527, "repo_name": "erzel/vitess", "id": "ff91f8e04909ff6d6dd18464704aea709f0def4d", "size": "9662",...
from __future__ import unicode_literals from collections import defaultdict from checkmate.lib.analysis.base import BaseAnalyzer import logging logger = logging.getLogger(__name__) class FormatAnalyzer(BaseAnalyzer): def diff_summary(self,summary_a,summary_b): return { 'd_number_of_line...
{ "content_hash": "1ae8dabad72f521885e8268164c79459", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 123, "avg_line_length": 33.59649122807018, "alnum_prop": 0.5827676240208878, "repo_name": "quantifiedcode/checkmate", "id": "fda76c20032ad2f46413ec41769d89c9af66eaa1", "siz...
from __future__ import absolute_import from celery import Celery # instantiate Celery object # celery = Celery(include=['abstar.utils.vdj']) celery = Celery(include=['abstar.core.abstar']) # import celery config file celery.config_from_object('abstar.celeryconfig') if __name__ == '__main__': celery.start()
{ "content_hash": "1fc8215c36ab89aba8c1f274c08c670e", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 48, "avg_line_length": 19.9375, "alnum_prop": 0.7084639498432602, "repo_name": "briney/abstar", "id": "3e1a553d9af1ac2506c662f96655d5c52f796f4e", "size": "674", "binary":...
import push.ssh auto_events = [] class PushAborted(Exception): "Raised when the deploy is cancelled." def __init__(self, reason): self.reason = reason def __str__(self): return self.reason class Event(object): """An event that can have an arbitrary number of listeners that get call...
{ "content_hash": "c331fe7e3a784e4ca7422337f315f7d7", "timestamp": "", "source": "github", "line_count": 179, "max_line_length": 79, "avg_line_length": 31.083798882681563, "alnum_prop": 0.5460100647016535, "repo_name": "reddit/push", "id": "870db629b6f972d2b620b937623fdfc7a254b5ed", "size": "5564", ...
"""Django-specific customization.""" from __future__ import absolute_import, unicode_literals import os import sys import warnings from datetime import datetime from importlib import import_module from kombu.utils.imports import symbol_by_name from kombu.utils.objects import cached_property from celery import _state...
{ "content_hash": "10e6bfd4534a1ae4db69303af5672494", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 79, "avg_line_length": 32.206896551724135, "alnum_prop": 0.6211379626797185, "repo_name": "mdworks2016/work_development", "id": "fe2a17224e6a3f3056ef0696045244826d8123bb", ...
from __future__ import print_function import errno import gc import os import pprint import socket import sys import traceback import eventlet import eventlet.backdoor import greenlet from oslo.config import cfg from octavia.openstack.common.gettextutils import _LI from octavia.openstack.common import log as logging...
{ "content_hash": "572624651482da8db81914239bf83a83", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 77, "avg_line_length": 31.503875968992247, "alnum_prop": 0.6304133858267716, "repo_name": "brandonlogan/octavia", "id": "3d4a83685fa75187fe88e1760e8c0c95f725963d", "size":...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_DayOfWeek'] , ['LSTM'] );
{ "content_hash": "c589995c004091440a8cc02034c4591a", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 90, "avg_line_length": 40.75, "alnum_prop": 0.7177914110429447, "repo_name": "antoinecarme/pyaf", "id": "0e84e3133674e4b45490fecfa7f407f795e0e9cb", "size": "163", "binary"...
"""{{ project_name }} URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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'...
{ "content_hash": "9cea73e875e4f99a8b9e4b73f8f0a858", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 80, "avg_line_length": 36.96551724137931, "alnum_prop": 0.6940298507462687, "repo_name": "charlon/mdot", "id": "0202cd0d07ff1c5255ac1def28d4ee6aae436bf4", "size": "1072", ...
""" This example shows how you can use vdist to use a subdirectory under your source tree to use as the base for your OS package You will still be able to use git branching to point to the right release, since vdist will first checkout the parent, and set apart the subdirectory after switching to the right branch """ f...
{ "content_hash": "868c0212f9fa4197959f1899b2c0a871", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 66, "avg_line_length": 30.666666666666668, "alnum_prop": 0.7152173913043478, "repo_name": "objectified/vdist", "id": "8a2fbc29a8cb8d0548f51f7707d356ba56f2dccc", "size": "92...
''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' # pylint: disable=too-many-lines from __future__ import print_function import atexit import copy import json import os import re import shutil import subprocess import tempfile # pylint: disable=import-error try: import ruamel.yaml as yaml ex...
{ "content_hash": "e2ad5b5826ff9b90de6b4a2e1150a8aa", "timestamp": "", "source": "github", "line_count": 2147, "max_line_length": 118, "avg_line_length": 32.69399161620866, "alnum_prop": 0.5389491979371456, "repo_name": "nhr/openshift-ansible", "id": "35168d1a3ceb2634f1e15bd1c3e48f0681dbe91f", "size...
import json from jsonschema import validate, Draft7Validator from glyphsLib.parser import Parser print("----- validate 3") f = open("Glyphs3FileShema.json",) schema = json.load(f) p = Parser() fp = open("../GlyphsFileFormatv3.glyphs", "r", encoding="utf-8") data = p.parse(fp.read()) validate(instance=data, schema=sc...
{ "content_hash": "bac7e8eeb9349e6adf71fd46c75c189e", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 64, "avg_line_length": 25.52173913043478, "alnum_prop": 0.706984667802385, "repo_name": "schriftgestalt/GlyphsSDK", "id": "15e64aa1cf311e2a4898ff6dada94422b4f2aaf8", "size"...
import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accession', '0011_auto_20180409_1353'), ] operations = [ migrations.AddField( model_name='accessionpanel', name='panel_ty...
{ "content_hash": "ff207b712bf8ee140cc517807ba17a65", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 88, "avg_line_length": 27.37037037037037, "alnum_prop": 0.5723951285520974, "repo_name": "coll-gate/collgate", "id": "5468b4126e5e7e547d48c7e01b3e466fa5263c15", "size": "78...
""" __MT_pre__Protocol.py_____________________________________________________ Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY) Author: gehan Modified: Sun Feb 15 10:22:14 2015 __________________________________________________________________________ """ from ASGNode import * from ATOM3Type im...
{ "content_hash": "92f1be2a03b9af5decdf231a99ea4de2", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 630, "avg_line_length": 79.4927536231884, "alnum_prop": 0.5503190519598906, "repo_name": "levilucio/SyVOLT", "id": "642e809f2226e3f2b9a89671291c74aee8e9a2fc", "size": "109...
from __future__ import absolute_import, division, print_function import sys import psycopg2 from nfldb import connect as nfldb_connect, api_version from nfldb import Tx, set_timezone from nfldb.db import _db_name, _mogrify, _bind_type from nfldb.types import _player_categories, _Enum from nfldb.team import teams fro...
{ "content_hash": "0e038794c1525f819599b17c3ddb5cde", "timestamp": "", "source": "github", "line_count": 463, "max_line_length": 98, "avg_line_length": 36.36285097192225, "alnum_prop": 0.5936089332382989, "repo_name": "hsharrison/nfldb-projections", "id": "b36fd13c4b92948f75960676bb1911c879243a46", ...
""" testsuite: runner ~~~~~~~~~~~~~~~~~ """ import unittest import sys import protolint from .base import switchout_streams, restore_streams class RunnerTests(unittest.TestCase): """ Test the entire `protolint` package. """ def test_run_linter(self): """ test a full run of the linter """ switc...
{ "content_hash": "ea7f4ddc7cdcf8f37a460f5e50192bc0", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 134, "avg_line_length": 32.348993288590606, "alnum_prop": 0.6740663900414938, "repo_name": "sgammon/codeclimate-protobuf", "id": "f88d6cfc94544a0a46fef299e4eb4b947458451a", ...
""" Sandbox Panel Estimators References ----------- Baltagi, Badi H. `Econometric Analysis of Panel Data.` 4th ed. Wiley, 2008. """ from scikits.statsmodels.tools.tools import categorical from scikits.statsmodels.regression.linear_model import GLS, WLS import numpy as np __all__ = ["PanelModel"] try: from pand...
{ "content_hash": "90e0d744170b7421682d54ebc7c4e3d0", "timestamp": "", "source": "github", "line_count": 444, "max_line_length": 80, "avg_line_length": 33.13288288288288, "alnum_prop": 0.5990075453742097, "repo_name": "wesm/statsmodels", "id": "22766de7fb51f52e27d8b618bb2528982c15c87b", "size": "147...
from setuptools import setup, find_packages setup( name='apikit', version='0.4', url='http://github.com/pudo/apikit', license='MIT', author='Friedrich Lindenberg', author_email='[email protected]', description='A set of utility functions for RESTful Flask applications.', packages=find_...
{ "content_hash": "6443f2ca831cb4ed988fa5f12a06644e", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 77, "avg_line_length": 34.515151515151516, "alnum_prop": 0.6084284460052678, "repo_name": "pudo/apikit", "id": "ff20bfc54875dccb7707619cfde65ab8d1f7c65e", "size": "1139", ...
class Objeto(): """Clase que al ser instanciada hará referencia a un objeto dentro de la base el cuál tendrá diferentes tipos de variables almacenadas en la misma las cuales podrán ser de atributos heterogéneos""" def __init__(self, name=""): self._name = name self._variables = None ...
{ "content_hash": "2dcb2008134ea865c211b4abd4d2f9ad", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 73, "avg_line_length": 22.676470588235293, "alnum_prop": 0.6108949416342413, "repo_name": "cabaag/serp", "id": "9b798d00dba5daa555062c3e8792017912e6e558", "size": "802", ...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frog', '0013_siteconfig'), ] operations = [ migrations.AddField( model_name='siteconfig', name='image_size_cap', ...
{ "content_hash": "e1711c9b047f6fc2bb77aeb206de3833", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 57, "avg_line_length": 25.214285714285715, "alnum_prop": 0.5637393767705382, "repo_name": "theiviaxx/Frog", "id": "be9b9b51d5d3c7eb7347e30ace766492d41dcc93", "size": "780",...
import requests from threading import Thread import sys import getopt def banner(): print "\n***************************************" print "* ForzaBruta 0.1*" print "***************************************" def usage(): print "Usage:" print " -w: url (http://somesite.com/FUZZ)" print " -t: ...
{ "content_hash": "fb38b10ee14e6f591bfa45e1785b2f23", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 89, "avg_line_length": 26.406976744186046, "alnum_prop": 0.48701012769704977, "repo_name": "abhishekjiitr/network-security", "id": "5d133419b45ffde36b67a8d25cb18489460176bb",...
from datadog_checks.base.checks.windows.perf_counters.base import PerfCountersBaseCheckWithLegacySupport from datadog_checks.base.checks.windows.perf_counters.counter import PerfObject from datadog_checks.base.checks.windows.perf_counters.transform import NATIVE_TRANSFORMERS from .metrics import METRICS_CONFIG class...
{ "content_hash": "ac65ef4c6c1c0096e843667278d0ddec", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 115, "avg_line_length": 36.63636363636363, "alnum_prop": 0.5809996455157745, "repo_name": "DataDog/integrations-core", "id": "4dfc18b9572c1c96bf9b7ee69b281b16456b1aa6", "si...