text
stringlengths
4
1.02M
meta
dict
"""Unittests for lkgm_manager""" from __future__ import print_function import contextlib import os import sys import tempfile from xml.dom import minidom import mock from chromite.cbuildbot import lkgm_manager from chromite.cbuildbot import manifest_version from chromite.cbuildbot import repository from chromite.li...
{ "content_hash": "6da2cec79802a5e7e2d6e4e634542d21", "timestamp": "", "source": "github", "line_count": 260, "max_line_length": 80, "avg_line_length": 38.565384615384616, "alnum_prop": 0.6886406701904857, "repo_name": "endlessm/chromium-browser", "id": "16549dbd08d2d56a4a10f04f66ebbe40ed0ba848", "s...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class ZDFIE(InfoExtractor): _VALID_URL = r'^https?://www\.zdf\.de/ZDFmediathek(?P<hash>#)?/(.*beitrag/(?:video/)?)(?P<video_id>[0-9]+)(?:/[^/?]+)?(?:\?.*)?' _TES...
{ "content_hash": "9a660b832f81403c8b076a2e2a031cc8", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 220, "avg_line_length": 38.69444444444444, "alnum_prop": 0.5340990667623834, "repo_name": "Grassboy/plugin.video.plurkTrend", "id": "3b1ac4e9f5246e268e0c0b49d64249196270e9d4...
import time import subprocess SAVE_FILE = '/tmp/udmi_agent.applied' class GitManager: def __init__(self): self._nonce = None self._applied = None def restore(self): try: current = self._exec('git rev-list -n 1 HEAD') print('Current version', current) ...
{ "content_hash": "7cb7fed95d8d6d1e65e05a11bffae0c8", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 76, "avg_line_length": 37.44615384615385, "alnum_prop": 0.5579293344289236, "repo_name": "faucetsdn/udmi", "id": "70b17f1756062bd7f846c634743c4ea6b7739a01", "size": "2434",...
import fnmatch import re import sys from basename_ranker import BasenameRanker from trace_event import * class DBIndexShard(object): def __init__(self, basenames): reload(sys) sys.setdefaultencoding('utf8') # The basenames come out of a hashtable so they are usually pretty badly # shuffled around. ...
{ "content_hash": "83a8fc42d4d76ec9fab34281deda1db7", "timestamp": "", "source": "github", "line_count": 175, "max_line_length": 104, "avg_line_length": 33.27428571428572, "alnum_prop": 0.615146831530139, "repo_name": "natduca/quickopen", "id": "24242635572c0e2ef5525e4f26ad8992ec2f2c5f", "size": "63...
""" Models the WGS raw sequence set object. """ import json import logging import os import string from itertools import count from cutlass.iHMPSession import iHMPSession from cutlass.Base import Base from cutlass.aspera import aspera from cutlass.Util import * # pylint: disable=W0703, C1801 # Create a module logger...
{ "content_hash": "c876d3c3889424498875cc748ac360a2", "timestamp": "", "source": "github", "line_count": 790, "max_line_length": 100, "avg_line_length": 30.29367088607595, "alnum_prop": 0.5567858933645329, "repo_name": "carze/cutlass", "id": "0c71d078ab1a3767e72eb2084971009ac6709999", "size": "23932...
import os import setuptools setuptools.setup( name='climate', version='0.4.6', packages=setuptools.find_packages(), author='Leif Johnson', author_email='leif@lmjohns3.com', description='Command-line utilities', long_description=open(os.path.join(os.path.dirname(os.path.abspath(__file__)), '...
{ "content_hash": "3326ca1506744bf99d51deae3f012b28", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 105, "avg_line_length": 31.724137931034484, "alnum_prop": 0.5902173913043478, "repo_name": "lmjohns3/py-cli", "id": "88b5e90bb9828fd3576a39a636e1ccc5cd24f823", "size": "920...
def print_string(str): print(str)
{ "content_hash": "a288f2621f790b5e08d963bb96b5d869", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 22, "avg_line_length": 17.5, "alnum_prop": 0.7142857142857143, "repo_name": "zzcclp/carbondata", "id": "aff3d818853e51ab53ce792982a9c91cc7f21ec1", "size": "36", "binary": ...
from scrapy.item import Item, Field class AnalyticsCounterItem(Item): # define the fields for your item here like: # name = Field() pass
{ "content_hash": "6520d7b2f458fe92a378dae710a85826", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 48, "avg_line_length": 25, "alnum_prop": 0.7, "repo_name": "ikeikeikeike/analytics-counter", "id": "537b6b2a0c68833b7b47a7fdee530d1b71ca0dc0", "size": "277", "binary": fal...
from xd.tool.layer import * from case import * import os import configparser class ManifestStub(object): def __init__(self, topdir, priority=None): self.topdir = topdir if priority is None: self.priority = {} else: self.priority = priority def get_priority(se...
{ "content_hash": "edc3c17c5e324917d8a75f60b1683ace", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 58, "avg_line_length": 30.756756756756758, "alnum_prop": 0.5852372583479789, "repo_name": "esben/xd-tool", "id": "7e2994306973bc09df0618e5e78905429b95aba0", "size": "2276",...
import logging import os from ctypes import CDLL import pytest from py4j.java_gateway import JVMView from py4j.java_gateway import JavaGateway from conftest import skipif_no_pythonnet from conftest import skipif_no_server32 from msl.examples.loadlib import Cpp64 from msl.examples.loadlib import EXAMPLES_DIR from msl....
{ "content_hash": "74fa35a6e511ea8ea2175024769fcbef", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 83, "avg_line_length": 30.770992366412212, "alnum_prop": 0.6772513024063508, "repo_name": "MSLNZ/msl-loadlib", "id": "49aab8fcf2e0a892dc59a023f48bfe886107e6ed", "size": "4...
from datetime import datetime from django.db import models from pybaulicht import BaulichtDbus bus = BaulichtDbus() class Message(models.Model): created = models.DateTimeField(auto_now_add=True) created_ip = models.GenericIPAddressField(null=True) name = models.CharField(blank=True, max_length=32, defa...
{ "content_hash": "a2795254af012b540f4ee33cde09defe", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 71, "avg_line_length": 32.61764705882353, "alnum_prop": 0.6591523895401262, "repo_name": "elnappo/Baulicht", "id": "99c6777a9c7087714c92090d51b65531a68437db", "size": "1109...
import optparse from locale import gettext as _ from gi.repository import Gtk # pylint: disable=E0611 from malstor import MalstorWindow from malstor_lib import set_up_logging, get_version def parse_options(): """Support for command line options""" parser = optparse.OptionParser(version="%%prog %s" % get_ve...
{ "content_hash": "27af759829da12b1d24b459ef6c7b99a", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 71, "avg_line_length": 26.25, "alnum_prop": 0.673469387755102, "repo_name": "cfossace/test", "id": "3e7d0c802f0efa77bbe1891cb12fdaf145cd10f7", "size": "881", "binary": fa...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Client' db.create_table(u'freshbooks_client', ( (u'id', self.gf('djan...
{ "content_hash": "64cde14da830aac857382a5f71439bdf", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 126, "avg_line_length": 80.55844155844156, "alnum_prop": 0.5845558600677092, "repo_name": "unomena/django-freshbooks", "id": "90e529643cdc40aeee41caabb9587733309ec9b5", "si...
import requests import re import time import datetime import settings from selenium import webdriver from w3lib.html import remove_tags from lxml import etree from raven import Client from lib.tools.spider_tools import get_one_ua from control.db.api.account_api import DBAccountApi from control.db.api.article_api import...
{ "content_hash": "ed204d8ff8cb13596a1b7b4525e218fc", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 153, "avg_line_length": 36.60944206008584, "alnum_prop": 0.5624853458382181, "repo_name": "Svolcano/python_exercise", "id": "4e8327bbc0d5e601253e4514ece909abe92548b3", "si...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('topthree', '0001_initial'), ] operations = [ migrations.RenameField( model_name='categories', old_name='category1', new_...
{ "content_hash": "afd44cd2b3953110d65d067e9d0b4984", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 39, "avg_line_length": 23.357142857142858, "alnum_prop": 0.5336391437308868, "repo_name": "vipulkanade/EventbriteDjango", "id": "bf88d32da996cd73aa8a99a79d8c9db53bc3af73", ...
import os import cattle import pytest import gdapi from docker import Client from docker.utils import kwargs_from_env ADMIN_HEADERS = dict(gdapi.HEADERS) ADMIN_HEADERS['X-API-Project-Id'] = 'USER' class CattleConfig(object): def __init__(self, url_env): self.url_env = url_env def _get_client(self):...
{ "content_hash": "e4141614e167373139efff977abb022f", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 77, "avg_line_length": 30.97452229299363, "alnum_prop": 0.6559736787990952, "repo_name": "imikushin/rancher", "id": "9d61b43c457e5e450dace51524251d0be025ba88", "size": "48...
"""Auto-generated file, do not edit by hand. ST metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ST = PhoneMetadata(id='ST', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2}', possible_length=(3,)), em...
{ "content_hash": "aecb61ea9b0ed2964540b5eca8789454", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 106, "avg_line_length": 68.5, "alnum_prop": 0.75, "repo_name": "gencer/python-phonenumbers", "id": "e65a6b3a50b3745417b731b10294139bb8682b1a", "size": "548", "binary": fal...
import os from sikwidgets.widgets.widget import Widget from sikwidgets.widgets.widget import WidgetError from sikwidgets.widgets.button import Button from sikwidgets import settings class ScrollableWidget(Widget): def __init__(self, parent, name): Widget.__init__(self, parent, name) # create a vi...
{ "content_hash": "2d40225afaab11c6c4f5b9a50bf29268", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 79, "avg_line_length": 33.31818181818182, "alnum_prop": 0.6065484311050477, "repo_name": "griffy/sikwidgets", "id": "da1dc4ca16cee2218e40718c752322b40737f011", "size": "36...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seeker.settings.prod") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
{ "content_hash": "c3066192b401ded6d730f62f532a7a11", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 75, "avg_line_length": 25.77777777777778, "alnum_prop": 0.7112068965517241, "repo_name": "LomaxRx/service-seeker", "id": "f409ea3320994c017196a27b4a8464ea73c126c9", "size": ...
"""This module contains a Google ML Engine Hook.""" import logging import random import time from typing import Callable, Dict, List, Optional from googleapiclient.discovery import Resource, build from googleapiclient.errors import HttpError from airflow.providers.google.common.hooks.base_google import GoogleBaseHook...
{ "content_hash": "22ad935b9128d48bcb58c51fa4cf50f4", "timestamp": "", "source": "github", "line_count": 479, "max_line_length": 109, "avg_line_length": 41.48434237995825, "alnum_prop": 0.6026873332997836, "repo_name": "lyft/incubator-airflow", "id": "b1b6e83918aa4188842043df3896759acd21c042", "size...
import argparse import sys from getpass import getpass from hashlib import md5 from mushi.core.db import db_session from mushi.core.db.models import User from mushi.core.exc import InvalidArgumentError from mushi.factory import create_app class Command(): def __init__(self, argv, **kwargs): self.argv =...
{ "content_hash": "7ba4937ed6d07c0b5673abbdd03e883f", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 93, "avg_line_length": 33.29032258064516, "alnum_prop": 0.5760658914728682, "repo_name": "kyouko-taiga/mushi", "id": "808688ebd11e61df8d20db0914fb9acd4a6b05c1", "size": "26...
from base.AwsService import AwsService class S3(AwsService): def set_serviceConfig(self, config): self.set_s3Service(config) def get_serviceConfig(self): ret=self.get_s3Service() return ret def get_s3Service(self): ## Standard Storage: section = self.get_element('t...
{ "content_hash": "ae8ed8ae08f3bc0ab4644b1a08f4381a", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 119, "avg_line_length": 48.02097902097902, "alnum_prop": 0.5768166593854668, "repo_name": "mkimura3/auto-simple-calculator", "id": "ea63a170af2579d658b04ff169305eded4eee6ae"...
"""Classes to aid in working with the STIX2 patterning language.""" import base64 import binascii import datetime import re from .utils import parse_into_datetime def escape_quotes_and_backslashes(s): return s.replace(u'\\', u'\\\\').replace(u"'", u"\\'") def quote_if_needed(x): if isinstance(x, str): ...
{ "content_hash": "bd643795644af417cad731af86e49399", "timestamp": "", "source": "github", "line_count": 704, "max_line_length": 146, "avg_line_length": 33.13210227272727, "alnum_prop": 0.6247374062165059, "repo_name": "oasis-open/cti-python-stix2", "id": "c53a83f729ae564f85886f24f33e01b6f18a2974", ...
from meowurl import app, db from meowurl.dbmodels import InviteCode @app.cli.command('initdb') def initdb(): db.create_all() @app.cli.command('dropdb') def dropdb(): db.drop_all() @app.cli.command('gencode') def gencode(): code = InviteCode.generate_code(1)[0] db.session.add(code) db.session.c...
{ "content_hash": "ba52b712caae3ca9cbf7dfd8baee567e", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 41, "avg_line_length": 17.2, "alnum_prop": 0.6715116279069767, "repo_name": "maomihz/MeowURL", "id": "b5e617221099d0f06a3d508bc9a77ad8730d76e0", "size": "344", "binary": ...
from jupyterworkflow.data import get_fremont_data import pandas as pd import numpy as np def test_fremont_data(): data = get_fremont_data() assert all(data.columns == ['west', 'east', 'Total']) assert isinstance(data.index, pd.DatetimeIndex) assert len(np.unique(data.index.time)) == 24
{ "content_hash": "c612dc2fdddcfa4be813599782fea878", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 57, "avg_line_length": 30.5, "alnum_prop": 0.7049180327868853, "repo_name": "muxuezi/jupyterworkflow", "id": "5236528405a0102389fc69a4b50520aba2c39e84", "size": "305", "b...
""" MIT License Copyright (c) 2016-2018 Madcore Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
{ "content_hash": "966402b3eaf4a1b614fa9fd2de54ada9", "timestamp": "", "source": "github", "line_count": 296, "max_line_length": 142, "avg_line_length": 36.79391891891892, "alnum_prop": 0.6341933706730328, "repo_name": "madcore-ai/cli", "id": "f78589ba0eb546c2450779c98c8bc4229aec4cbb", "size": "1089...
from elasticsearch_dsl import mapping def test_mapping_saved_into_es(write_client): m = mapping.Mapping('test-type') m.field('name', 'string').field('tags', 'string', index='not_analyzed') m.save('test-mapping', using=write_client) m = mapping.Mapping('other-type') m.field('title', 'string').field...
{ "content_hash": "9de65205ad5a9e2ceb2f9b5889878b2c", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 140, "avg_line_length": 38.57471264367816, "alnum_prop": 0.3787246722288439, "repo_name": "ngokevin/elasticsearch-dsl-py", "id": "3c0492adb15db8652b4cd452267b9765378b68be", ...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BookReview.review' db.add_column(u'demo4_bookreview', 'review', ...
{ "content_hash": "4e063730e116da6c8e1301ac2765944b", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 209, "avg_line_length": 68.67032967032966, "alnum_prop": 0.5525684109457513, "repo_name": "stephanpoetschner/django-vienna", "id": "06efb08c5139aa48f15ec61d8c8a36a566a13c28",...
import builtins import copyreg import gc import itertools import math import pickle import sys import types import unittest import warnings import weakref from copy import deepcopy from test import support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__i...
{ "content_hash": "bb3ff6b47b06cd28495586d985589a2c", "timestamp": "", "source": "github", "line_count": 5535, "max_line_length": 91, "avg_line_length": 34.2579945799458, "alnum_prop": 0.48586632070794966, "repo_name": "FFMG/myoddweb.piger", "id": "0e7728ebf2d7a2d9f7bf1debfa95be4854b7f716", "size": ...
try: from Tkinter import * import tkMessageBox import Pmw from random import randint from wireless.menu_functions import * from wireless.iface_list import ListInterfaces, GetInterfaceList except ImportError, e: pass class DisplayBox: def __init__(self, parent): self.myParent = parent Pmw.initialise() s...
{ "content_hash": "dfb9ccd904418ad4ff5136326d612d24", "timestamp": "", "source": "github", "line_count": 274, "max_line_length": 171, "avg_line_length": 52.18978102189781, "alnum_prop": 0.7227972027972028, "repo_name": "sajjanbh/WLAN-Monitoring", "id": "4a57d7da8effe37655a1cfd70bff034d22b5e0b4", "si...
class SimulationCostStructure(object): def __init__(self): self.expandTechnology = 0 self.reagent = 0 self.labor = 0 self.facility = 0 self.equipmentUsage = 0 self.qualityControl = 0 self.totalCost = 0 sel...
{ "content_hash": "a482bc152ed66bf2ab3e349e5fec365f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 38, "avg_line_length": 31.272727272727273, "alnum_prop": 0.49127906976744184, "repo_name": "catiabandeiras/StemFactory", "id": "ec77d510eb1554d1bda249fe25798d7cba5e139f", "...
from itty import * @get('/simple_post') def simple_post(request): return open('examples/html/simple_post.html', 'r').read() @post('/test_post') def test_post(request): return "'foo' is: %s" % request.POST.get('foo', 'not specified') @get('/complex_post') def complex_post(request): return open('examples/h...
{ "content_hash": "540e01afed0cdee12b4c5759c00040a1", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 94, "avg_line_length": 25.782608695652176, "alnum_prop": 0.6290050590219224, "repo_name": "rystecher/itty", "id": "be03673026f7356ba6c7a296d512155c4af48cbe", "size": "593",...
""" BVT tests for Templates ISO """ #Import Local Modules import marvin from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * from nose.plugins.attrib import attr import ...
{ "content_hash": "6ec4c76b2ed44a3f7e6355af6acdd412", "timestamp": "", "source": "github", "line_count": 550, "max_line_length": 94, "avg_line_length": 37.97818181818182, "alnum_prop": 0.46557832248180775, "repo_name": "mufaddalq/cloudstack-datera-driver", "id": "75289b8fbe3e1878a0d3a3439d58e28931a12f...
from __future__ import (absolute_import, unicode_literals) """ ========== PyOrganism ========== :Authors: Moritz Emanuel Beber :Date: 2012-05-22 :Copyright: Copyright(c) 2012 Jacobs University of Bremen. All rights reserved. :File: organism.py """ __all__ = ["Organism"] import logging from built...
{ "content_hash": "8d07d2effc90b6049e128dc234b799f2", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 79, "avg_line_length": 19.31578947368421, "alnum_prop": 0.6008174386920981, "repo_name": "Midnighter/pyorganism", "id": "1ee041a2e7de1b5c5122f1d81cdcce2bf0ee4704", "size": ...
from __future__ import absolute_import import collections import logging import warnings import netaddr from django.conf import settings from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_lazy as _ from keystoneclient import exceptions as keystone_exceptions from neutron...
{ "content_hash": "59ffb99758ce4ec4f2307b41e70bc206", "timestamp": "", "source": "github", "line_count": 1132, "max_line_length": 79, "avg_line_length": 37.91166077738516, "alnum_prop": 0.6013840991704725, "repo_name": "zhanghui9700/eonboard", "id": "5c3143cc0e0de44e7131696103a6766e52fc665f", "size"...
import os import sys import time from datetime import datetime import traceback import threading import json import shutil import types CRITICAL = 50 FATAL = CRITICAL ERROR = 40 WARNING = 30 WARN = WARNING INFO = 20 DEBUG = 10 NOTSET = 0 class Logger(): def __init__(self, buffer_size=0, file_name=None, roll_num...
{ "content_hash": "9c238ba3708e8d55f245041935d97c79", "timestamp": "", "source": "github", "line_count": 210, "max_line_length": 106, "avg_line_length": 33.70952380952381, "alnum_prop": 0.5187173329566322, "repo_name": "hexlism/xx_net", "id": "56602199eb923c4477ad77104792ea1a7e6ee834", "size": "7080...
from threading import Lock from time import sleep, time class Frequency(object): """Frequency controller, means concurrent running n tasks every interval seconds. Basic Usage:: from torequests.frequency_controller.sync_tools import Frequency from concurrent.futures import ThreadP...
{ "content_hash": "369e78d7c1b797a690ec6dec75bd18c3", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 85, "avg_line_length": 30.470588235294116, "alnum_prop": 0.5180180180180181, "repo_name": "ClericPy/torequests", "id": "cf245620755f9011f9a5a0d40135a72455b93746", "size": ...
from loadwarrior.locustext import setup from path import path setup(__name__, conffile=path(__file__).parent/'test_locust.yml')
{ "content_hash": "4ad5a1cbd0b8c0680d4d70c7847e8a24", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 65, "avg_line_length": 42.666666666666664, "alnum_prop": 0.7578125, "repo_name": "whitmo/loadwarrior", "id": "4d8e8a11dcff94324036ef8cea62c27501d83345", "size": "128", "bi...
''' Created on Jun 8, 2011 @author: evan ''' from lxml import etree from kayako.core.object import KayakoObject class TicketPriority(KayakoObject): ''' Kayako TicketPriority API Object. id title displayorder frcolorcode bgcolorcode displayicon type uservisibilitycustom ...
{ "content_hash": "0452a9126f0bbfe2987a0289bb096a0a", "timestamp": "", "source": "github", "line_count": 213, "max_line_length": 147, "avg_line_length": 31.183098591549296, "alnum_prop": 0.6102077687443541, "repo_name": "ravi-sharma/python-api-library", "id": "02526503717a223c43450464a263d95cfa4290c5"...
from __future__ import absolute_import # Import python libs from StringIO import StringIO import logging # Import salt libs from salt.exceptions import SaltRenderError import salt.utils.templates log = logging.getLogger(__name__) def render(template_file, saltenv='base', sls='', argline='', ...
{ "content_hash": "009f890854d88b7762480b233a0531d3", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 78, "avg_line_length": 34.83720930232558, "alnum_prop": 0.4666221628838451, "repo_name": "MadeiraCloud/salt", "id": "9ba05e47910d7a05cac88372465b5921c5e7c725", "size": "152...
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1Portwor...
{ "content_hash": "2c7459fb4d51b85c78bdef38f647f60c", "timestamp": "", "source": "github", "line_count": 181, "max_line_length": 194, "avg_line_length": 28.81767955801105, "alnum_prop": 0.5655674846625767, "repo_name": "mbohlool/client-python", "id": "a3702485472915494c82bda9550cc0f9eae4924c", "size...
import errno import os import random import signal import socket from time import sleep import unittest from unittest import mock try: from time import monotonic as time except ImportError: from time import time as time try: import resource except ImportError: resource = None import zmq from aiozmq.sel...
{ "content_hash": "6dd657af8c2589a4841f1e0d66c359b4", "timestamp": "", "source": "github", "line_count": 490, "max_line_length": 79, "avg_line_length": 29.722448979591835, "alnum_prop": 0.5597363361713815, "repo_name": "MetaMemoryT/aiozmq", "id": "e44b1ecd7f90b8ac270b62a109580e1a61d26f78", "size": "...
import os import time from dbm import whichdb import py import pytest from doit.dependency import DbmDB, Dependency, MD5Checker from doit.task import Task def get_abspath(relativePath): """ return abs file path relative to this file""" return os.path.join(os.path.dirname(__file__), relativePath) # fixture ...
{ "content_hash": "82734be6ee0caedfa38778048b409f7d", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 79, "avg_line_length": 30.05095541401274, "alnum_prop": 0.6034336583298008, "repo_name": "Hinidu/doit", "id": "a2f00ae6cb976ca7fdc0f150cafe5477ce2cf0d6", "size": "4718", ...
import pygame import random from os import path img_dir = path.join(path.dirname(__file__), 'img') snd_dir = path.join(path.dirname(__file__), 'snd') WIDTH = 480 HEIGHT = 600 FPS = 60 # define colors WHITE = (255, 255, 255) BLACK = (0, 0, 0) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) YELLOW = (255, 255...
{ "content_hash": "3f54046fec986a935f6b91b2f9513aa6", "timestamp": "", "source": "github", "line_count": 290, "max_line_length": 97, "avg_line_length": 33.96896551724138, "alnum_prop": 0.6084661455689778, "repo_name": "kidscancode/gamedev", "id": "3f858a5164326a94b7a510e66aa8d43a5451044a", "size": "...
import json import responses import pytest from django.conf import settings TEST_JSON_RESPONSE = { "error_post_list": [ { "id": 8, "url": "http://www.fixmydjango.com/1/", "exception_type": "DataError", "error_message": "value too long for type character vary...
{ "content_hash": "73fe80ecc7adb30ec3c94e3caa47b269", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 78, "avg_line_length": 30.755555555555556, "alnum_prop": 0.5903179190751445, "repo_name": "vintasoftware/fix-my-django-lib", "id": "e6a623010077bd97fdf3ad2d47593f785a6d7579",...
import time import sys import urllib2 import urllib2 n = int(sys.argv[1]) url = sys.argv[2] headers = {"Accept-Language" : "en" } req = urllib2.Request(url, None, headers) t0 = time.time() for k in xrange(n): data = urllib2.urlopen(req).read() print (time.time()-t0)/n if n==1: print data
{ "content_hash": "e5319c60d39d78d5107ae755a896ef79", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 41, "avg_line_length": 19.666666666666668, "alnum_prop": 0.6745762711864407, "repo_name": "andersonsilvade/python_C", "id": "ffb98452ebbea715f2255a30c59b43a9c45ee931", "siz...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import compas if not compas.IPY: from .fd_numpy import * # noqa: F401 F403 __all__ = [name for name in dir() if not name.startswith("_")]
{ "content_hash": "dc2dc3277ad329fa38711aa35533cc70", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 62, "avg_line_length": 23.272727272727273, "alnum_prop": 0.6875, "repo_name": "compas-dev/compas", "id": "30ab16da8165d1b497e07c15225a7859561b5b79", "size": "256", "binar...
"""Implements the RelFS entity class.""" #------------------------------------------------------------------------------# import BTrees.OOBTree import persistent from .component import Component #------------------------------------------------------------------------------# class EntityBase(persistent.Persistent): ...
{ "content_hash": "fe117d2b5974026ec43bb8a0c5bdf969", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 80, "avg_line_length": 41.45871559633027, "alnum_prop": 0.4711219296304492, "repo_name": "matus-chochlik/various", "id": "aaf9557ac46e3354041282b7594a90510472994f", "size"...
import numbers from itertools import chain from itertools import count from math import ceil import numpy as np from scipy import sparse from scipy.stats.mstats import mquantiles from joblib import Parallel, delayed from .. import partial_dependence from ...base import is_regressor from ...utils import check_array fr...
{ "content_hash": "a65f9b8d6c1176f43cf54e44bca58bc6", "timestamp": "", "source": "github", "line_count": 730, "max_line_length": 92, "avg_line_length": 43.798630136986304, "alnum_prop": 0.5883088856222438, "repo_name": "bnaul/scikit-learn", "id": "504a7a5a334ad36f23b7203cb73283a1615d9de1", "size": "...
from __future__ import print_function from collections import namedtuple, defaultdict import copy from types import MethodType import numpy from llvmlite import ir as llvmir import llvmlite.llvmpy.core as lc from llvmlite.llvmpy.core import Type, Constant, LLVMException import llvmlite.binding as ll from numba impor...
{ "content_hash": "f789087f91929ae454bb6d9814d35b1c", "timestamp": "", "source": "github", "line_count": 1137, "max_line_length": 85, "avg_line_length": 36.666666666666664, "alnum_prop": 0.5814343967378268, "repo_name": "ssarangi/numba", "id": "a5d9c8e9dc4b185d9ac2c78a887e1517ea161b2d", "size": "416...
""" modified from seq2seq.py in tensorflow """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange # pylint: disable=redefined-builtin from six.moves import zip # pylint: disable=redefined-builtin import tensorflow as tf from te...
{ "content_hash": "8c184c29bc4ab777be2ebc25d35e56c3", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 95, "avg_line_length": 36.45205479452055, "alnum_prop": 0.7147688838782412, "repo_name": "sufengniu/DMN-tensorflow", "id": "e53af917b028e534f97f645b44ab9a31ffebb1c8", "size...
from opentelemetry.propagators.aws.aws_xray_propagator import AwsXRayPropagator __all__ = ["AwsXRayPropagator"]
{ "content_hash": "4c22da53a58e4d5a58488d0ec9345124", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 79, "avg_line_length": 37.666666666666664, "alnum_prop": 0.8053097345132744, "repo_name": "open-telemetry/opentelemetry-python-contrib", "id": "f28f1c8b1527a25e2a827ea0727d262...
from collections import deque class ValuesXY: def __init__(self,buffersize): self.x = deque(maxlen=buffersize) self.y = deque(maxlen=buffersize) def append(self,x,y): self.x.append(x) self.y.append(y)
{ "content_hash": "812a6b19a5644aa813d688936bce22d0", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 41, "avg_line_length": 24.3, "alnum_prop": 0.6213991769547325, "repo_name": "Overdrivr/DistantIO", "id": "1721161c45c759a3b2dd36cb6d9f3d58bc45ab0a", "size": "243", "binar...
"""Copyright 2008 Orbitz WorldWide 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 law or agreed to in writing, software...
{ "content_hash": "ecf791e01e523faeff37f822d0043baa", "timestamp": "", "source": "github", "line_count": 343, "max_line_length": 109, "avg_line_length": 31.411078717201168, "alnum_prop": 0.7299053276406163, "repo_name": "obfuscurity/graphite-web", "id": "1c5ba338d785d0d04338a3598d57822ab6d396b4", "s...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Location', fields=[ ('id', models.AutoField(verbose_name='ID', serializ...
{ "content_hash": "30214a19119a8a31f11d3f2e3ff5f079", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 114, "avg_line_length": 28.952380952380953, "alnum_prop": 0.5740131578947368, "repo_name": "mjt145/coffeedapp", "id": "54194f3d07d1c1f3e7bc717f85223ca1061248ea", "size": "6...
import os from io import BytesIO import mock import pytest from twitter.common.contextutil import temporary_dir from apache.aurora.client import config from apache.aurora.client.config import get_config as get_aurora_config from apache.aurora.client.config import PRODUCTION_DEPRECATED_WARNING from apache.aurora.confi...
{ "content_hash": "42412384f1f4ea5a8d0cc609cb56f008", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 92, "avg_line_length": 35.30578512396694, "alnum_prop": 0.674625468164794, "repo_name": "crashlytics/aurora", "id": "3d5289adcb2d53506644604380797ff64227fecd", "size": "90...
from .common import * class IfStatementTest(TestCase): def test_interpret_if(self): root, var_defs = create_if_statement(2) context = Context() context.set_variable(var_defs['IfCondition'], True) root.interpret(context) self.failUnless(context.get_variable(var_defs['IfCond...
{ "content_hash": "e2cfef23ebf9651fb4e7e1bd83ca1303", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 71, "avg_line_length": 43.57142857142857, "alnum_prop": 0.6622950819672131, "repo_name": "vlfedotov/django-business-logic", "id": "d5a1516cf04fa32343ca5e2e49d19050aa817c7b", ...
""" Test that debug symbols have the correct order as specified by the order file. """ import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class OrderFileTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipU...
{ "content_hash": "b0be45ff4d615d2d903a78a66410d7f3", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 78, "avg_line_length": 31.86111111111111, "alnum_prop": 0.6442894507410637, "repo_name": "endlessm/chromium-browser", "id": "778d06ddaca90316c93dfcef4885edd636360b41", "siz...
""" Python library for interacting with Project Vote Smart API. Project Vote Smart's API (http://www.votesmart.org/services_api.php) provides rich biographical data, including data on votes, committee assignments, and much more. """ __author__ = "James Turk <jturk@sunlightfoundation.com>" __version__ = "0....
{ "content_hash": "1ef48556e391d7f4919714471688c576", "timestamp": "", "source": "github", "line_count": 690, "max_line_length": 117, "avg_line_length": 39.256521739130434, "alnum_prop": 0.6185254919333998, "repo_name": "jainanisha90/WeVoteServer", "id": "406fe6cf5b9317bbbdcd266bd5783737bdd68170", "...
import contextlib import copy from debtcollector import moves from debtcollector import removals from neutron_lib import exceptions from oslo_config import cfg from oslo_db import api as oslo_db_api from oslo_db import exception as db_exc from oslo_db.sqlalchemy import enginefacade from oslo_log import log as logging ...
{ "content_hash": "9a2c8b8eeb7031b5b73f64079948bc63", "timestamp": "", "source": "github", "line_count": 210, "max_line_length": 79, "avg_line_length": 34.628571428571426, "alnum_prop": 0.6526402640264026, "repo_name": "sebrandon1/neutron", "id": "7612bf85091a1ea20fbda40c780cba77310c9baa", "size": "...
from django import template from django.template import defaultfilters from django.utils.translation import ungettext register = template.Library() # A tuple of standard large number to their converters intword_converters = ( (0, lambda x: x), (3, lambda x: ungettext('%(value)s thousand', '%(value)s thousands...
{ "content_hash": "bbb3c1441fb913df6224d05d2a5907af", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 78, "avg_line_length": 35.02127659574468, "alnum_prop": 0.6506682867557716, "repo_name": "jorgecarleitao/public-contracts", "id": "8927f66d301bbaac844e03dfba5a07ea979c98b7", ...
import os import unittest from pprint import pprint import numpy as np from keras.callbacks import ModelCheckpoint import anago from anago.utils import load_data_and_labels, load_glove get_path = lambda path: os.path.join(os.path.dirname(__file__), path) DATA_ROOT = get_path('../data/conll2003/en/ner') SAVE_ROOT = g...
{ "content_hash": "505f4c196dd39c33b9af964c32fb2916", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 81, "avg_line_length": 38.76923076923077, "alnum_prop": 0.6234567901234568, "repo_name": "Hironsan/anago", "id": "5e522c8105fee76ddf5c03de7758f92477dea2df", "size": "4536"...
# Copyright 2012. Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # This tests the SPLIT_BY_CHARACTERS rule. import BoostBuild def test_invalid(params, expected_error_line): t = ...
{ "content_hash": "000f81140cfe1d0903827d3fa38eae32", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 77, "avg_line_length": 41.089285714285715, "alnum_prop": 0.6949152542372882, "repo_name": "ycsoft/FatCat-Server", "id": "cdf5b04f9e3bd2af0ece7bcbe2012e54497122a9", "size": ...
import sys from setuptools import setup # attempt automatic python2 to python3 conversion if using python3 extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name='fido', version='1.1.1', install_requires=['distribute'], description='Format Identification for Digital Obje...
{ "content_hash": "50f9dae8fc46024757f1c7965e52a103", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 70, "avg_line_length": 30.8125, "alnum_prop": 0.6186612576064908, "repo_name": "opf-attic/ref", "id": "517a8d0f5c291392a87312af928e17f88c7530ab", "size": "493", "binary":...
import datetime from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import Pi...
{ "content_hash": "a6bee51ffebc72d921a32d290a8b1799", "timestamp": "", "source": "github", "line_count": 1966, "max_line_length": 986, "avg_line_length": 43.61342828077314, "alnum_prop": 0.6180840641910804, "repo_name": "Azure/azure-sdk-for-python", "id": "99838f3b94ef92c0ea7ecc818bd08af8be0fd22e", ...
import json import logging import subprocess import sys import gflags as flags FLAGS = flags.FLAGS flags.DEFINE_integer('num_streams', 1, 'Number of netperf processes to run') flags.DEFINE_string('netperf_cmd', None, 'netperf command to run') flags.DEFINE_integer('port_start', None, ...
{ "content_hash": "85707ad74114babe55cc4fd0e647eef3", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 79, "avg_line_length": 30.40740740740741, "alnum_prop": 0.666869671132765, "repo_name": "meteorfox/PerfKitBenchmarker", "id": "fb5705b15c0461bd020e6354fc7717ac40a263d2", "s...
from pathlib import Path import numpy as np import pandas as pd def load_srim_data(directory_path): ''' assume files were saved as energy-{value}eV_depth-{value}A.txt''' directory_path = Path(directory_path) df = pd.DataFrame() for i, filename in enumerate(directory_path.iterdir()): energy_eV...
{ "content_hash": "064b476838e3c4617084a203c2e3afd0", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 73, "avg_line_length": 32.705882352941174, "alnum_prop": 0.6160071942446043, "repo_name": "mmoran0032/pyne", "id": "a9060bacde05e65acf42492f7fea72bdb1266fbd", "size": "1114...
import threading,xbmc,xbmcplugin,xbmcgui,re,os,xbmcaddon,sys import shutil import glob import zipfile import urlparse import xbmcgui import time import extract ADDON=xbmcaddon.Addon(id='plugin.video.stargate-streams') dialog = xbmcgui.Dialog() dialogprocess = xbmcgui.DialogProgress() log_path = xbmc.transla...
{ "content_hash": "d9e1b3f08b3f0d4f39e1bb18851913e9", "timestamp": "", "source": "github", "line_count": 400, "max_line_length": 172, "avg_line_length": 44.1575, "alnum_prop": 0.5572666025024061, "repo_name": "TheWardoctor/Wardoctors-repo", "id": "61b8f2602cce0ddf10d3509dbca36ccbb1a60c11", "size": "...
""" Turbogo has to call cosmoprep. Cosmoprep is a huge mess of pexpect calls and expectations, it is broken out here for isolation purposes and to track differences between changes to the turbogo file and adjustments to cosmo case handling. Calls expect a job. Not a standalone script. Called only from turbogo.py """ i...
{ "content_hash": "8a41bfc984ead8e0d04e221e1458725d", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 90, "avg_line_length": 34, "alnum_prop": 0.5667016806722689, "repo_name": "pbulsink/turbocontrol", "id": "9b8c9baa65765254609d665b40213353d8b9b798", "size": "5734", "bin...
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf im...
{ "content_hash": "6b8e56b953fbb798f737ff0021284654", "timestamp": "", "source": "github", "line_count": 278, "max_line_length": 998, "avg_line_length": 37.82374100719424, "alnum_prop": 0.7111745126010461, "repo_name": "huangkuan/hack", "id": "922b663ce603d7cdf2199c25dba7a9224b10ad41", "size": "1061...
from .fetchers import NUPermissionsFetcher from .fetchers import NUMetadatasFetcher from .fetchers import NUGlobalMetadatasFetcher from .fetchers import NUOSPFAreasFetcher from bambou import NURESTObject class NUOSPFInstance(NURESTObject): """ Represents a OSPFInstance in the VSD Notes: ...
{ "content_hash": "54e29f2bdd237657bdf1063349040f4d", "timestamp": "", "source": "github", "line_count": 586, "max_line_length": 296, "avg_line_length": 30.358361774744026, "alnum_prop": 0.5749859471613266, "repo_name": "nuagenetworks/vspk-python", "id": "17e1d09bf110e24206b41ecb4d0489c6f029ac6d", "...
import os class BaseConfig(object): DEBUG = False TESTING = False SECRET_KEY = "DEFINE SECRET_KEY ENV VAR IN PRODUCTION" ELASTICSEARCH_URL = os.getenv("ELASTICSEARCH_URL") ERROR_404_HELP = False ERROR_INCLUDE_MESSAGE = False class DevelopmentConfig(BaseConfig): DEBUG = True class TestConf...
{ "content_hash": "f15dd93dc7cb47cf7f02c950d4f6c48b", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 71, "avg_line_length": 25.666666666666668, "alnum_prop": 0.7031539888682746, "repo_name": "willrogerpereira/willbuyer", "id": "5379340b2eababff559b5d39040ab868ba1bef21", "s...
def test_1(): import setup
{ "content_hash": "374e247674f03e422f8458a8b32d1e68", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 16, "avg_line_length": 15.5, "alnum_prop": 0.6129032258064516, "repo_name": "ojcastillo/emacs_config", "id": "8677697a84479eb5339bffcc3d2660d4327a9dde", "size": "88", "bin...
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_garyn_theif_zabrak_male_01.iff" result.attribute_template_id = 9 result.stfName("npc_name","zabrak_base_male") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "36d37b154a35699a53a95b1558bc7860", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 80, "avg_line_length": 24.23076923076923, "alnum_prop": 0.6984126984126984, "repo_name": "obi-two/Rebelion", "id": "00754062754d7b3ecb36dac912e3b19ef01725ee", "size": "460"...
import sys sys.path.append('.') sys.path.append('..') from tasks import execute_home_task if __name__ == '__main__': execute_home_task()
{ "content_hash": "078db496c6f8751b0621523b20760ac4", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 35, "avg_line_length": 16, "alnum_prop": 0.625, "repo_name": "yzsz/weibospider", "id": "3c74145c40d192d75ee9e0c315db40cca8278814", "size": "144", "binary": false, "copie...
"""Test the ZMQ API.""" import configparser import os import struct from test_framework.test_framework import PlanbcoinTestFramework, SkipTest from test_framework.util import (assert_equal, bytes_to_hex_str, ) class ZMQTest (PlanbcoinTestFramework): ...
{ "content_hash": "fabfa058c923e61f79dc72b9bf05cc79", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 123, "avg_line_length": 37.19090909090909, "alnum_prop": 0.5939868002933268, "repo_name": "planbcoin/planbcoin", "id": "b436015895a4f2a65d1ee3d833b504d36d1f4108", "size": ...
""" Command and control daemon that runs on each node in the metadata service. It is responsible for managing metadata servers on its node. """ import sys import os import subprocess import socket import time import random import signal import traceback import StringIO import threading import shutil sys.path.append("/...
{ "content_hash": "0fd99330b83b756bcff1c921858ada33", "timestamp": "", "source": "github", "line_count": 1184, "max_line_length": 202, "avg_line_length": 25.18412162162162, "alnum_prop": 0.5878663894292039, "repo_name": "jcnelson/syndicate", "id": "5bd12c502ffc65c3b676ece456dd6d42bca3be6c", "size": ...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from fiware_cloto.cloto.manager import InfoManager from django.core.exceptions import ObjectDoesNotExist import json @csrf_exempt def info(request): try: info = InfoManager.InfoManager().get_information() ret...
{ "content_hash": "35b8844c4e2591fb58842272edba1fb1", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 107, "avg_line_length": 36.05263157894737, "alnum_prop": 0.7182481751824817, "repo_name": "Fiware/cloud.Cloto", "id": "f0369b8991f5525fa847d38e24ba7f4d0ba51758", "size": "1...
"""Generates the appropriate build.json data for all the end2end tests.""" import yaml import collections import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs') default_unsecure_fixture_options = Fixt...
{ "content_hash": "7b59e2d02c929b74938f92cb1543706e", "timestamp": "", "source": "github", "line_count": 241, "max_line_length": 120, "avg_line_length": 40.89626556016597, "alnum_prop": 0.5797483766233766, "repo_name": "shishaochen/TensorFlow-0.8-Win", "id": "3e10ad580fc7a6584017f504f510d274814523ba",...
from __future__ import unicode_literals from django.db import models, migrations import fluent_contents.utils.validators class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='GoogleDocsView...
{ "content_hash": "c926f73ff207cf6cc2ac97d5a289a575", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 249, "avg_line_length": 49.58620689655172, "alnum_prop": 0.6397774687065368, "repo_name": "ixc/django-fluent-contents", "id": "9253f8e2cb3e3477b91d3e02fb5ccee2c8ca3565", "s...
__all__ = ['TException'] class TException(Exception): '''turboengine exception''' def __str__(self): return 'turboengine: %s'%(self.message) def __unicode__(self): return u'turboengine: %s'%(self.message)
{ "content_hash": "2dccab1c3d9460df6c1192bc1ba3e2ef", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 48, "avg_line_length": 24.3, "alnum_prop": 0.5761316872427984, "repo_name": "carlitux/turboengine", "id": "e8e8ba34f90b9d62b9e392bf48a30f9b29261880", "size": "1564", "bin...
import collections from uqbar.containers import UniqueTreeList from supriya.realtime.Node import Node class Group(Node, UniqueTreeList): """ A group. :: >>> import supriya.realtime >>> server = supriya.Server.default() >>> server.boot() <Server: udp://127.0.0.1:57751, 8...
{ "content_hash": "7a13827659aadfec3957ea18ed8520a7", "timestamp": "", "source": "github", "line_count": 294, "max_line_length": 92, "avg_line_length": 33.07823129251701, "alnum_prop": 0.5233933161953728, "repo_name": "Pulgama/supriya", "id": "c2e8a415308540c71a87972b8a2375367e608eb5", "size": "9725...
from unittest import mock import numpy as np import pytest from numpy.linalg import LinAlgError from scipy.stats import norm from pycalphad import Database, variables as v from espei.error_functions.context import setup_context from espei.optimizers.opt_mcmc import EmceeOptimizer from espei.error_functions import get...
{ "content_hash": "6d871070fcd71f55b8d8ab5bfbba585c", "timestamp": "", "source": "github", "line_count": 195, "max_line_length": 169, "avg_line_length": 41.53333333333333, "alnum_prop": 0.6831707618224472, "repo_name": "PhasesResearchLab/ESPEI", "id": "6837c67c239da686a5eefc70bd1e47baf32c4b3b", "siz...
import os from core import colors import traceback import sys from prettytable import PrettyTable from core import getpath from core import moddbparser from xml.etree import ElementTree from xml.dom import minidom from core.messages import * def count(): isfile = os.path.isfile join = os.path.join directo...
{ "content_hash": "21294e00dec9dcd2f4c9551d665e0338", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 160, "avg_line_length": 35.89090909090909, "alnum_prop": 0.5539513677811551, "repo_name": "4shadoww/hakkuframework", "id": "58389a2b8ff80fa0ba29a5c59bdb83f982a2ba20", "siz...
from distutils.core import setup setup( name="pinax.checkers", version="1.1", author="Pinax", author_email="development@eldarion.com", url="https://github.com/pinax/pinax-checkers", description="Style checker for Pinax and Eldarion OSS", license="BSD", packages=[ "pinax", ...
{ "content_hash": "b8a2c0ff1da07dde1d30465ef5ae8501", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 59, "avg_line_length": 23, "alnum_prop": 0.6240409207161125, "repo_name": "pinax-archives/pinax-checkers", "id": "b620d8969e4730d50174b6465d082d814f4dab24", "size": "391", ...
""" test HTTP exceptions """ from zunzuncito import tools class APIResource(object): @tools.allow_methods('get') def dispatch(self, request, response): request.log.debug(tools.log_json({ 'API': request.version, 'Method': request.method, 'URI': request.URI, ...
{ "content_hash": "ed702d9852b3521e78f334e49dd5323e", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 47, "avg_line_length": 23.28125, "alnum_prop": 0.508724832214765, "repo_name": "nbari/zunzuncito", "id": "e14106268b54ee1a0e54669ed0d8744f92b7a47a", "size": "745", "binar...
from ..calendars import REECalendar CALENDAR = REECalendar() def get_holidays(year): return CALENDAR.holidays_set(year)
{ "content_hash": "7213ed0608eb41f261907356fc9b9195", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 38, "avg_line_length": 18.142857142857142, "alnum_prop": 0.7559055118110236, "repo_name": "gisce/enerdata", "id": "257862ba396d2f07586c4af4f069a9992442f3af", "size": "127", ...
''' 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 fcntl import json import time import os import re import shutil import subprocess import tempfile # pylint: disable=import-error try: impo...
{ "content_hash": "911ade439176aa562ca36fec6ccff58a", "timestamp": "", "source": "github", "line_count": 1899, "max_line_length": 118, "avg_line_length": 34.0173775671406, "alnum_prop": 0.5284601928822428, "repo_name": "openshift/openshift-tools", "id": "5cc09460ccd7dec4f8c2153ad97b9a50836eb07c", "s...
from factory import Sequence, PostGenerationMethodCall from factory.alchemy import SQLAlchemyModelFactory from placebo_gov.user.models import User from placebo_gov.database import db class BaseFactory(SQLAlchemyModelFactory): class Meta: abstract = True sqlalchemy_session = db.session class Use...
{ "content_hash": "33e95c70fac98b9dbf68027fc940a0b7", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 66, "avg_line_length": 26.636363636363637, "alnum_prop": 0.726962457337884, "repo_name": "Zarkantho/placebo.gov", "id": "63baa104ac843447cdc0a3e9daaabf27424d8fc7", "size": ...
"""Sensor platform for frigate.""" from __future__ import annotations import logging from typing import Any from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_URL, TEMP_CELSIUS from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import Device...
{ "content_hash": "349591a752f65a26f9e444c3387b6362", "timestamp": "", "source": "github", "line_count": 453, "max_line_length": 166, "avg_line_length": 32.136865342163354, "alnum_prop": 0.5776205522736639, "repo_name": "jnewland/ha-config", "id": "8c73886b3062444db2de82b79de28dca06178af6", "size": ...
""" Plugins go in directories on your PYTHONPATH named piped/plugins: this is the only place where an __init__.py is necessary, thanks to the __path__ variable. """ from twisted.plugin import pluginPackagePaths __path__.extend(pluginPackagePaths(__name__)) __all__ = []#nothing to see here, move along, move along
{ "content_hash": "5f1a473ec12d0b649138aa597503fa2a", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 67, "avg_line_length": 34.888888888888886, "alnum_prop": 0.732484076433121, "repo_name": "alexbrasetvik/Piped", "id": "ea6122cd5c80966490741b2cd8e5f181d177aae3", "size": "31...
""" Fluentd queue check for v3 """ import argparse import time import subprocess import math from dateutil import parser from datetime import datetime from openshift_tools.monitoring.ocutil import OCUtil from openshift_tools.monitoring.metric_sender import MetricSender import logging logging.basicConfig( forma...
{ "content_hash": "5838170b9323921874d907c38741cf20", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 134, "avg_line_length": 39.231404958677686, "alnum_prop": 0.6096481988624395, "repo_name": "drewandersonnz/openshift-tools", "id": "e30d9d200104907a3adac3af1fb8103b332e6163"...
import sys sys.path.append('../API') import solr fp_solr = solr.SolrConnection("http://localhost:8502/solr/fp") fp_solr.delete_query("track_id:[* TO *]") fp_solr.commit()
{ "content_hash": "93e12a19325e53bc10d28827678282b4", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 62, "avg_line_length": 24.571428571428573, "alnum_prop": 0.6976744186046512, "repo_name": "alexonea/3rdyrp", "id": "25aff1ba18fd51a43d28aa31018554ce055e387d", "size": "213",...
''' Created on 13.07.2015 @author: Aaron Klein ''' class BaseMaximizer(object): def __init__(self, objective_function, X_lower, X_upper): """ Interface for optimizers that maximizing the acquisition function. Parameters ---------- objective_function: acquisition ...
{ "content_hash": "1a8da04010e0e8dddfa846d306e0378b", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 61, "avg_line_length": 24.24137931034483, "alnum_prop": 0.5860597439544808, "repo_name": "aaronkl/RoBO", "id": "97290254da796eefcfab5b1ab489e76a42e7333d", "size": "703", ...
with break continue del exec return pass print raise global assert yield for while if elif else import from as try except finally and in is not or lambda: a + 1 lambda x, y: x + y yield from def functionname class Classname def функция class Класс await async def Test async with async for # Type annotations def m...
{ "content_hash": "71c76f4dfa36c529cafd92d69b6a7c3f", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 103, "avg_line_length": 22.22222222222222, "alnum_prop": 0.645, "repo_name": "achimnol/python-syntax", "id": "d19a6f716db676602f914fc0bef4e41fd190b62f", "size": "3982", ...
import _plotly_utils.basevalidators class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="arrayminus", parent_name="bar.error_y", **kwargs): super(ArrayminusValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_...
{ "content_hash": "13ddde3bddbec1f73b378e69bac3b66f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 86, "avg_line_length": 37.54545454545455, "alnum_prop": 0.6319612590799032, "repo_name": "plotly/plotly.py", "id": "3b6605bda833fda5b9f21373dff0428bc9b78e94", "size": "413"...
import os,socket, sys import json from fabric.state import _AttributeDict, env from fabric.operations import run, sudo from fabric.context_managers import cd, settings from fabric.contrib.files import append, contains, exists from fabric.decorators import runs_once from woven.decorators import run_once_per_version fr...
{ "content_hash": "f39fd0f43c83596b7673b004445d37e5", "timestamp": "", "source": "github", "line_count": 369, "max_line_length": 155, "avg_line_length": 37.3739837398374, "alnum_prop": 0.5459357552026685, "repo_name": "bretth/woven", "id": "996b4322eb7543b302e67bc972de908d83aca924", "size": "13813",...
from test_framework.blocktools import ( create_coinbase, create_block, add_witness_commitment, MAX_BLOCK_SIGOPS_WEIGHT, NORMAL_GBT_REQUEST_PARAMS, WITNESS_SCALE_FACTOR, ) from test_framework.messages import ( COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, ToHex, ) ...
{ "content_hash": "29a605d91b0a41cf53a661be7814d173", "timestamp": "", "source": "github", "line_count": 1479, "max_line_length": 363, "avg_line_length": 58.98242055442867, "alnum_prop": 0.6469307044190978, "repo_name": "jnewbery/bitcoin", "id": "6ee2b72c114b351c7cef1faefa1048df73a87db2", "size": "8...
scene.run("BehaviorSetCommon.py") def setupBehaviorSet(): print "Setting up behavior set for gestures..." #scene.loadAssetsFromPath("behaviorsets/MocapReaching/skeletons") #scene.loadAssetsFromPath("behaviorsets/MocapReaching/motions") scene.addAssetPath("script", "behaviorsets/MocapReaching/scripts") # ma...
{ "content_hash": "5179b9aa492a94c918d6fcfdaf0567f3", "timestamp": "", "source": "github", "line_count": 247, "max_line_length": 104, "avg_line_length": 57.31578947368421, "alnum_prop": 0.8311082856537402, "repo_name": "gsi-upm/SmartSim", "id": "1b1df0aa4131707564558a918f84b4f5a07ef349", "size": "14...
import time from dtest import Tester from tools.decorators import since @since("1.2") class TestCQL(Tester): def prepare(self): cluster = self.cluster cluster.populate(1).start() node1 = cluster.nodelist()[0] time.sleep(0.2) session = self.patient_cql_connection(node1) ...
{ "content_hash": "b2e49700725468427238a3492c1bdb97", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 78, "avg_line_length": 23.457142857142856, "alnum_prop": 0.5566382460414129, "repo_name": "carlyeks/cassandra-dtest", "id": "2deab8328166801c3d34fa58cbaadb03ce4a7294", "siz...