text
stringlengths
4
1.02M
meta
dict
import getopt import glob import os import re import shlex import sys import string import warnings from robot.errors import DataError, Information, FrameworkError from robot.version import get_full_version from .encoding import console_decode, system_decode from .filereader import FileReader from .misc import plural...
{ "content_hash": "6d39a796697ece3a0c2ec480005a8f71", "timestamp": "", "source": "github", "line_count": 398, "max_line_length": 84, "avg_line_length": 38.15829145728643, "alnum_prop": 0.5654836373213933, "repo_name": "HelioGuilherme66/robotframework", "id": "fa26a896e628913401f7cdfd36b400309e0f2449",...
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack LLC. # # 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-...
{ "content_hash": "5697ca17447d4f7f20b96074b9c1ce31", "timestamp": "", "source": "github", "line_count": 391, "max_line_length": 79, "avg_line_length": 40.368286445012785, "alnum_prop": 0.5549290420679169, "repo_name": "salv-orlando/MyRepo", "id": "4d6e9d5fbb8feb33e56c5ea3ad2e57d8b924af97", "size": ...
from django.db import models from django.contrib.auth.models import User class Vaccine(models.Model): proper_name = models.CharField(max_length=200) manufacturer = models.CharField(max_length=64) trade_name = models.CharField(max_length=200) prescribing_info_url = models.URLField() active = models....
{ "content_hash": "6a93c13cd8c1d97a84a05ee48f5a792f", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 107, "avg_line_length": 50.55384615384615, "alnum_prop": 0.5419963481436397, "repo_name": "jcrevier/vacsupply", "id": "409eb9c990c1b95c62d88cfd3a49829eb99796de", "size": "3...
""" Enter room controller module """ from smserver.smutils.smpacket import smpacket from smserver.smutils.smpacket import smcommand from smserver.chathelper import with_color from smserver.stepmania_controller import StepmaniaController from smserver.resources.room_resource import RoomResource from smserver import mo...
{ "content_hash": "9cc857282a39d89af235faf536d19fe7", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 84, "avg_line_length": 30.58139534883721, "alnum_prop": 0.5703422053231939, "repo_name": "ningirsu/stepmania-server", "id": "b1dcdabaaefe9d989e301b3777d02c8fdd17e750", "siz...
""" General Object-oriented Abstraction and JSON Textual Model of Rankine Cycle - SimRankineCycle: The Simulator of Rankine Cycle * Input :json file * output: txt file Example Rankine Cycles: Michael J . Moran. Fundamentals of Engineering Thermodynamics(7th Edition). John Wiley & Sons, Inc. 2011 Ch...
{ "content_hash": "1361342298f599face48a91689a7f8e4", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 108, "avg_line_length": 30.56578947368421, "alnum_prop": 0.6603529918209212, "repo_name": "PySEE/PyRankine", "id": "e75afc355f36b6e71a12bd280e30a6b22befd7b8", "size": "2332...
import sublime, sublime_plugin import os.path, string VALID_FILENAME_CHARS = "~-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\") # { "keys": ["alt+o"], "command": "open_filename_under_cursor" } # https://gist.github.com/1186126 class OpenFilenameUnderCursor(sublime_plugin.TextCommand): def run(self, e...
{ "content_hash": "88e6dabff4c6c067cfc4f21e9142b873", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 119, "avg_line_length": 46.280701754385966, "alnum_prop": 0.6300227445034117, "repo_name": "thkprado/sublimetextconfig", "id": "30aa532ae82c084329256ea76459dabe37b6d606", "...
{ '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats d\'une jointure "a JOIN"', '%Y-%m-%d': '%d-%m-%Y', '%Y-%m-%d %H:%M:%S...
{ "content_hash": "bf6bbe8e86481358a0e16235cbfb43d1", "timestamp": "", "source": "github", "line_count": 280, "max_line_length": 720, "avg_line_length": 57.16428571428571, "alnum_prop": 0.7222916406347619, "repo_name": "SEA000/uw-empathica", "id": "42235cbb4813ca278eaf8df884db3a8c7134cc15", "size": ...
from typing import List, Any def all_the_same(elements: List[Any]) -> bool: return len(set(elements)) == 1 or len(elements) == 0 if __name__ == '__main__': print("Example:") print(all_the_same([1, 1, 1])) # These "asserts" are used for self-checking and not for an auto-testing assert all_the_s...
{ "content_hash": "dff030f77a5ee045e3e7a5727725a066", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 76, "avg_line_length": 30.263157894736842, "alnum_prop": 0.5965217391304348, "repo_name": "fbreversg/checkio", "id": "7531bd656e30301f8bd8a93d9731a60baf53fbcc", "size": "57...
"""This file contains a syslog parser in plaso.""" import datetime import logging from plaso.events import text_events from plaso.lib import lexer from plaso.lib import timelib from plaso.lib import utils from plaso.parsers import manager from plaso.parsers import text_parser class SyslogLineEvent(text_events.TextE...
{ "content_hash": "524078527bda011c95da76764e6c7fff", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 78, "avg_line_length": 33.90625, "alnum_prop": 0.6437788018433179, "repo_name": "cvandeplas/plaso", "id": "cf0c9df285521e8fb9e02c6e0d055067b871af26", "size": "7208", "bi...
from commands import getstatusoutput from docutils.core import publish_string, publish_parts from docutils.nodes import SparseNodeVisitor from docutils.readers.standalone import Reader from docutils.writers import Writer from nose.config import Config import nose.plugins from nose.plugins.manager import BuiltinPluginMa...
{ "content_hash": "dbfc1183eabb5659b9063d363d975c67", "timestamp": "", "source": "github", "line_count": 377, "max_line_length": 79, "avg_line_length": 29.73740053050398, "alnum_prop": 0.5461600214075462, "repo_name": "mozilla/sheriffs", "id": "eed9e59803cb3a1a949fc2cf788e59c0215cb862", "size": "112...
""" homeassistant.components.shell_command ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exposes regular shell commands as services. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/shell_command/ """ import logging import subprocess from homeassistant.util impo...
{ "content_hash": "c83c9f81f0403cb904f49c8eac526d25", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 74, "avg_line_length": 28.543478260869566, "alnum_prop": 0.6153846153846154, "repo_name": "badele/home-assistant", "id": "61c9add3f23fb0941de9e6486bdd536ac9d480f4", "size":...
__version__=''' $Id: tables.py 3039 2007-02-12 15:09:09Z rgbecker $ ''' __doc__=""" Tables are created by passing the constructor a tuple of column widths, a tuple of row heights and the data in row order. Drawing of the table can be controlled by using a TableStyle instance. This allows control of the color and weigh...
{ "content_hash": "087b8b026965e72e9927714531adafe5", "timestamp": "", "source": "github", "line_count": 1388, "max_line_length": 204, "avg_line_length": 41.19668587896253, "alnum_prop": 0.5188961368286669, "repo_name": "alexissmirnov/donomo", "id": "20a8ef785973d745ab5e02e29d508773f2f29cf9", "size"...
"""Network layers.""" import copy import tensorflow.compat.v1 as tf from . import network_config from . import signal_util class LayerNormalizationScalarParams(tf.keras.layers.LayerNormalization): """tf.keras.layers.LayerNormalization with scalar bias and scale params.""" def __init__(self, param_shape=None, ...
{ "content_hash": "4ed94f5919e9fba9025b842d56c02154", "timestamp": "", "source": "github", "line_count": 469, "max_line_length": 79, "avg_line_length": 35.62046908315565, "alnum_prop": 0.6456362983359272, "repo_name": "google-research/sound-separation", "id": "5a081f7d71b1ea40d306354560fc7aaa7405ba26"...
"""Provide functionality to keep track of devices.""" from homeassistant.const import ATTR_GPS_ACCURACY, STATE_HOME # noqa: F401 from homeassistant.core import HomeAssistant from homeassistant.helpers.typing import ConfigType from homeassistant.loader import bind_hass from .config_entry import async_setup_entry, asyn...
{ "content_hash": "48e99911cb89f498385d7cf769c64b49", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 77, "avg_line_length": 27.7, "alnum_prop": 0.7032490974729242, "repo_name": "jawilson/home-assistant", "id": "035b1923c4c01cc0ab201eab5462543672c86e58", "size": "1385", "...
""" .. module: security_monkey.tests.watchers.openstack.test_security_group :platform: Unix .. version:: $$VERSION$$ .. moduleauthor:: Michael Stair <mstair@att.com> """ from security_monkey.tests.watchers.openstack import OpenStackWatcherTestCase class OpenStackSecurityGroupWatcherTestCase(OpenStackWatcherTestC...
{ "content_hash": "4955724c765d1aab5a62479f9512cfef", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 110, "avg_line_length": 37.88, "alnum_prop": 0.7423442449841605, "repo_name": "markofu/security_monkey", "id": "1ff31e3e57223cc0a7d9228838574f90fd631354", "size": "1603", ...
import unittest from mock.tests.support import is_instance, X, SomeClass from mock import ( Mock, MagicMock, NonCallableMagicMock, NonCallableMock, patch, create_autospec, ) from mock.mock import CallableMixin class TestCallable(unittest.TestCase): def assertNotCallable(self, mock): self.assertT...
{ "content_hash": "dbdc43c5054d149aa94967e042efa65c", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 74, "avg_line_length": 28.386206896551723, "alnum_prop": 0.5864917395529641, "repo_name": "testing-cabal/mock", "id": "41715ed13da82451cf8e485254c66069b4ea543a", "size": "...
""" :codeauthor: Rupesh Tare <rupesht@saltstack.com> """ import salt.modules.event as event import salt.utils.event from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.runtests import RUNTIME_VARS from tests.support.unit import TestCase class ...
{ "content_hash": "69fec69b6976ff9698719809d6f5c875", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 88, "avg_line_length": 37.61, "alnum_prop": 0.5373570858814145, "repo_name": "saltstack/salt", "id": "bee9977c5e4307ad44db703b2318e98106a48c40", "size": "3761", "binary"...
from os.path import join from raptiformica.actions.prune import list_compute_checkouts_for_server_type_of_compute_type from raptiformica.settings import conf from tests.testcase import TestCase class TestListComputeCheckoutsForServerTypeOfComputeType(TestCase): def setUp(self): self.isdir = self.set_up_p...
{ "content_hash": "a6f97926bd02a6ab9415d35807807713", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 113, "avg_line_length": 42.3, "alnum_prop": 0.6737588652482269, "repo_name": "vdloo/raptiformica", "id": "6b333cb31f2227a7ff328fb6889f5a9595e2cd65", "size": "1692", "bina...
from __future__ import print_function import copy from collections import Counter, defaultdict from functools import reduce from sacremoses.util import pairwise class SubwordTokenizer(object): """ This is a Python port of the Subword NMT from https://github.com/rsennrich/subword-nmt """ def __i...
{ "content_hash": "a1ac30ab48c8a6380f4f1e52c603f5df", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 118, "avg_line_length": 46.43333333333333, "alnum_prop": 0.49988035415171095, "repo_name": "alvations/sacremoses", "id": "1489cc2114873171d9f395b2d67c8ad01e895c80", "size"...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import random import os from captcha.image import ImageCaptcha import config IMAGE_HEIGHT = config.IMAGE_HEIGHT IMAGE_WIDTH = config.IMAGE_WIDTH CHARS_NUM = config.CHARS_NUM TEST_SIZE = 1000 ...
{ "content_hash": "c6823a4dcc8bf57df8a53fc59388e389", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 78, "avg_line_length": 29.616666666666667, "alnum_prop": 0.6758581879572313, "repo_name": "PatrickLib/captcha_recognize", "id": "c096c89c0c7226c4a31d44a61ff41bcaacc78c3f", ...
import pytest from lemur.endpoints.views import * # noqa from lemur.tests.factories import EndpointFactory, CertificateFactory from .vectors import VALID_ADMIN_API_TOKEN, VALID_ADMIN_HEADER_TOKEN, VALID_USER_HEADER_TOKEN def test_rotate_certificate(client, source_plugin): from lemur.deployment.service import ...
{ "content_hash": "3dd5fa795cae4e3e37663fdc9d057d22", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 108, "avg_line_length": 31.89622641509434, "alnum_prop": 0.6888494528246081, "repo_name": "kevgliss/lemur", "id": "4ea0a4aa04becf36b2f7d1bafde0d745dbf4ae6a", "size": "3381...
from collections import OrderedDict from typing import Dict, Type from .base import AdGroupCustomizerServiceTransport from .grpc import AdGroupCustomizerServiceGrpcTransport # Compile a registry of transports. _transport_registry = ( OrderedDict() ) # type: Dict[str, Type[AdGroupCustomizerServiceTransport]] _tra...
{ "content_hash": "630b222fd625d5e7b98c94a3e0ff6894", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 67, "avg_line_length": 30.3125, "alnum_prop": 0.8020618556701031, "repo_name": "googleads/google-ads-python", "id": "e94c2792738c7a647b3d02eda0c553baa28dd6fa", "size": "108...
import copy from netaddr import IPNetwork, IPAddress from nose.tools import * from mock import patch, ANY, call, Mock import unittest import json from etcd import EtcdResult, Client, EtcdAlreadyExist, EtcdKeyNotFound, EtcdCompareFailed from pycalico.ipam import (IPAMClient, BlockHandleReaderWriter, ...
{ "content_hash": "558299d7e4ddd8c367f6eba9473b52e5", "timestamp": "", "source": "github", "line_count": 2305, "max_line_length": 90, "avg_line_length": 39.245553145336224, "alnum_prop": 0.5569693016880203, "repo_name": "caseydavenport/libcalico", "id": "71d3dd2b4a3ac21b4661cadcd11e60caa10bd237", "s...
"""Undocumented Module""" __all__ = ['ClassicFSM'] """Finite State Machine module: contains the ClassicFSM class. This module and class exist only for backward compatibility with existing code. New code should use the FSM module instead. """ from direct.directnotify.DirectNotifyGlobal import directNotify from dire...
{ "content_hash": "2286f310dfa94bdf27f0e2361f127969", "timestamp": "", "source": "github", "line_count": 384, "max_line_length": 105, "avg_line_length": 36.721354166666664, "alnum_prop": 0.5842138855400326, "repo_name": "tobspr/panda3d", "id": "847cf290dbf28c8881a915096a52c9fed36912c9", "size": "141...
""" This file describes a flexible tabbar to move the tabs around or split it out to a dock widget QInteractiveTabBar """ from PyQt4 import QtCore, QtGui ################################################################################ class QInteractiveTabBar(QtGui.QTabBar): """ QInteractiveTabBar is a red...
{ "content_hash": "a7a4a897b7a32632c4b372d31997469a", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 84, "avg_line_length": 37.03658536585366, "alnum_prop": 0.5268356931182088, "repo_name": "CMUSV-VisTrails/WorkflowRecommendation", "id": "7a63f40250292cc7878ca86338a64a6b518...
import hashlib; import passlib.hash; salt="ZDzPE45C" string="password" salt2="1111111111111111111111" print "General Hashes" print "MD5:"+hashlib.md5(string).hexdigest() print "SHA1:"+hashlib.sha1(string).hexdigest() print "SHA256:"+hashlib.sha256(string).hexdigest() print "SHA512:"+hashlib.sha512(string).hexdigest()...
{ "content_hash": "5366d8896b03df0dd54c33046e386e6d", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 88, "avg_line_length": 52.625, "alnum_prop": 0.7622063869094748, "repo_name": "pdm126/billshashingprog", "id": "268c45c33fed3e62a9b9a17ddbdf402839a6dd5b", "size": "3789", ...
"""Device automation helpers for toggle entity.""" from typing import Any, Dict, List import voluptuous as vol from homeassistant.core import Context, HomeAssistant, CALLBACK_TYPE from homeassistant.components.automation import ( state as state_automation, AutomationActionType, ) from homeassistant.components....
{ "content_hash": "d782894e222b90e199cff9ba67de3d20", "timestamp": "", "source": "github", "line_count": 235, "max_line_length": 86, "avg_line_length": 27.548936170212766, "alnum_prop": 0.6294408402842138, "repo_name": "joopert/home-assistant", "id": "5f01f4d9d71aced8b6a0fc2140e1585f6a8441ef", "size...
import uuid from cfgm_common import exceptions as vnc_exc from neutron.common import constants from vnc_api import vnc_api import contrail_res_handler as res_handler import sg_res_handler as sg_handler class SecurityGroupRuleMixin(object): def _security_group_rule_vnc_to_neutron(self, sg_id, sg_rule, ...
{ "content_hash": "0abf900d7224c07f8c88611c97c2a007", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 97, "avg_line_length": 41.73134328358209, "alnum_prop": 0.5224725798760134, "repo_name": "tcpcloud/contrail-neutron-plugin", "id": "f828d1bf29d300960a14aa0a534293071ee4a184"...
import handler handler.run()
{ "content_hash": "e00dcbccdca6c997a63b888152117c1c", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 14, "avg_line_length": 10, "alnum_prop": 0.7666666666666667, "repo_name": "ulno/micropython-extra-ulno", "id": "e8b72e8313a1b6f31b3d34ad9b2ae685501c3afb", "size": "30", "b...
import multiprocessing debug = True daemon = False bind = '0.0.0.0:8000' workers = multiprocessing.cpu_count() * 2 + 1 user = 'git' group = 'git' forwarded_allow_ips = '*' accesslog = '/var/log/gunicorn/access.log' errorlog = '/var/log/gunicorn/error.log'
{ "content_hash": "069e4e8cb7daf3725d83b677672738a4", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 45, "avg_line_length": 23.363636363636363, "alnum_prop": 0.6964980544747081, "repo_name": "gitmill/gitmill", "id": "4544a02727b1e5e04763dddd1bfedb7a6f672726", "size": "257"...
from datetime import datetime import functools import commonware.log from cache_nuggets.lib import Token from django import http from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.shortcuts import get_object_or_404 from django.utils.http import http_date from olympia import amo from ...
{ "content_hash": "6b719f43aac87b0344449d3ea55655b5", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 79, "avg_line_length": 33.791304347826085, "alnum_prop": 0.6176016469377251, "repo_name": "mstriemer/addons-server", "id": "e4ef4eece2ab58e354c436ea3d3d4b5d3550793f", "siz...
from .management.cleanup import CleanupCommand from .management.compilemessages import CompileMessagesCommand from .management.createcachetable import CreateCacheTableCommand from .management.dbshell import DBShellCommand from .management.diffsettings import DiffSettingsCommand from .management.dumpdata import DumpData...
{ "content_hash": "ef27489a11af18af88a8c424b758b1df", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 64, "avg_line_length": 50.925925925925924, "alnum_prop": 0.8821818181818182, "repo_name": "skibblenybbles/django-commando", "id": "e1424f250848bb89e0a6c4e485906b887311c89b", ...
""" Module for gocdapi Agent class """ import json from gocdapi.gobase import GoBase class Agent(GoBase): """ Class to hold Go Server Agent information """ def __init__(self, go_server, data): """Inits Agent objects. Args: go_server (Go): A Go object which this agent bel...
{ "content_hash": "6c7f15f50ca75d4d736460f3fc05dc70", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 117, "avg_line_length": 30.17241379310345, "alnum_prop": 0.5945714285714285, "repo_name": "joaogbcravo/gocdapi", "id": "efef8350a3723b7b71aca3f1a3937bca8d9cbab7", "size": ...
import tamil print("ஒப்பன் தமிழ் வரிசை எண் - ", tamil.VERSION) # copy all test to a new directory and just run them without setting up the PATH. # ensure the tests all ran fine. # this will certify a particular Python installation as installed # suitable version of open-tamil package # run the CLI tools and check: #...
{ "content_hash": "bb5c219eafd8a1152f8896ec77ad448c", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 111, "avg_line_length": 46.92857142857143, "alnum_prop": 0.7808219178082192, "repo_name": "arcturusannamalai/open-tamil", "id": "d960569df9bbeedd457d27516c04bb9a5c1525d9", ...
from CIM14.ENTSOE.Equipment.Core.IdentifiedObject import IdentifiedObject class PowerSystemResource(IdentifiedObject): """A power system resource can be an item of equipment such as a Switch, an EquipmentContainer containing many individual items of equipment such as a Substation, or an organisational entity such...
{ "content_hash": "0ea17ad66b67bfa43eaacb0fb82b808b", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 454, "avg_line_length": 41.644444444444446, "alnum_prop": 0.6905016008537886, "repo_name": "rwl/PyCIM", "id": "7d0ec6ad1e1d32fa70972e97fa9c86fced8c3f2e", "size": "2974", ...
import hashlib import json from rest_framework_extensions.key_constructor import bits from rest_framework_extensions.settings import extensions_api_settings class KeyConstructor(object): def __init__(self, memoize_for_request=None, params=None): if memoize_for_request is None: self.memoize_fo...
{ "content_hash": "7be1c9cbfbbba73f50f4918cc92fcdd9", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 107, "avg_line_length": 35.49523809523809, "alnum_prop": 0.5905554064931581, "repo_name": "Anton-Shutik/drf-extensions", "id": "45577726761c0d120e1fe013bf553283fd40c85d", ...
import wtforms from nose.tools import eq_, ok_ from flask import Flask from werkzeug.wsgi import DispatcherMiddleware from werkzeug.test import Client from wtforms import fields from flask_admin import Admin, form from flask_admin._compat import iteritems, itervalues from flask_admin.model import base, filters fro...
{ "content_hash": "2f243730bf1112919f738450156c3302", "timestamp": "", "source": "github", "line_count": 728, "max_line_length": 94, "avg_line_length": 29.646978021978022, "alnum_prop": 0.596487976648288, "repo_name": "toddetzel/flask-admin", "id": "43b348d7476800f095c6ac8b0ad7ad880208be5f", "size":...
import os import sys sys.path.append(os.path.dirname(os.path.realpath(__file__))+"/statuspage-py") from statuspage.core.component import Component component_name_list = ['Blosc API', 'Image API', 'Jpeg API', 'Raw API', 'Propagate API', 'Time API', 'Autoingest API', 'Anno IO', 'Anno Query', 'Annoid API', 'Json Ramon', ...
{ "content_hash": "e38329ed37f68f8812cb1fe4a09db849", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 265, "avg_line_length": 50.5, "alnum_prop": 0.7089108910891089, "repo_name": "neurodata/ndstore", "id": "2e6e347cd0620ac5237947dc2586930e4898cdb4", "size": "1136", "binar...
from unittest import TestCase from irlib.lm import LM class TestLM(TestCase): def setUp(self): pass def test_n_neq_zero(self): with self.assertRaises(ValueError): LM(n=0) def test_vocabulary(self): lm = LM() lm.add_doc(doc_id='doc1', doc_terms='apple tree'.sp...
{ "content_hash": "888a08dfbb70776e52ac1cd04d927f75", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 67, "avg_line_length": 27.661016949152543, "alnum_prop": 0.4877450980392157, "repo_name": "gr33ndata/irlib", "id": "249314929a451e19423542360926f1ca08f0ce9e", "size": "1632...
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.line.colorbar.tickfont", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=...
{ "content_hash": "f69fe9e843b6785d99caa03ddbcbbeca", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 68, "avg_line_length": 31.57894736842105, "alnum_prop": 0.5666666666666667, "repo_name": "plotly/python-api", "id": "df08a1cc6d7a72913e000b1433828ff1bb0a2bc3", "size": "600...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests, json from flexget....
{ "content_hash": "e981ae307a9aa5ee66626496280f1246", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 114, "avg_line_length": 47.22222222222222, "alnum_prop": 0.5433155080213904, "repo_name": "qk4l/Flexget", "id": "5fbcd84b34901a2603191188e1377952771fd5d5", "size": "4675", ...
""" Tests that indirect Enum variables display correctly """ import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil import os import unittest2 class TestIndirectEnumVariables(TestBase): mydir = TestBase.compute_mydir(__file__) @sw...
{ "content_hash": "f22c3f2f3289df0147dd7d9942e59fd4", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 90, "avg_line_length": 31.58288770053476, "alnum_prop": 0.5396207246867593, "repo_name": "apple/swift-lldb", "id": "78a643267153419342c3455e5347662540913b58", "size": "636...
""" # Пример 3.14 Б.Я.Советов, Моделирование систем. Практикум: Учеб пособие для вузов/Б.Я. Советов, С.А. Яковлев.- 2-е изд., перераб. и доп.-М.:Высш. шк., 2003.-295 с.: ил. Поток заявок поступает в накопитель с допустимой ёмкостью, равной 3 единицам, равномерно каждые 5+/-1 мин. Если заявки после накопителя застают ...
{ "content_hash": "8fe0cb63dc50aa22ca53b0a9eb6ceae5", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 288, "avg_line_length": 31.47741935483871, "alnum_prop": 0.6599713055954088, "repo_name": "vpv11110000/pyss", "id": "b9fd5938f09925c02ca5b69e2ee06c57536561a7", "size": "57...
from setuptools import setup, find_packages long_description = open('README.rst').read() setup( name='prophy', version='1.2.5', author='Krzysztof Laskowski', author_email='aurzenligl@gmail.com', maintainer='Krzysztof Laskowski', maintainer_email='aurzenligl@gmail.com', license='MIT license...
{ "content_hash": "80cd355710dd0e63fccbdf41ee1c7b25", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 82, "avg_line_length": 40.40384615384615, "alnum_prop": 0.6178010471204188, "repo_name": "aurzenligl/prophy", "id": "bdfed4cf9f73375e7aba50ee9a924e5cbc7836dc", "size": "210...
import datetime import random import time import debtcollector from neutron_lib import constants from oslo_config import cfg from oslo_log import log as logging import oslo_messaging from oslo_service import loopingcall from oslo_utils import timeutils from sqlalchemy import orm from sqlalchemy.orm import exc from ne...
{ "content_hash": "2fa3e479df5b72275f4f6a91976f2a6a", "timestamp": "", "source": "github", "line_count": 586, "max_line_length": 79, "avg_line_length": 45.55460750853242, "alnum_prop": 0.5681213710432665, "repo_name": "igor-toga/local-snat", "id": "01fa68e2dad50abf64564bd02209ed2621e0cfee", "size": ...
from decimal import Decimal class JsonSerializableObject(object): __serializable_fields = [] def serialize_value(self, name, value): if isinstance(value, (str, unicode, int, long, float, bool, type(None))): return value elif isinstance(value, dict): return dict((key, s...
{ "content_hash": "6f837c08196c3973414802765d7198ac", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 103, "avg_line_length": 37.707317073170735, "alnum_prop": 0.592496765847348, "repo_name": "mordvin-denis/net-parser", "id": "14a7f7532d8859588730f5ac3349b88a0dc8a125", "siz...
from __future__ import annotations from textwrap import dedent import pytest from pants.backend.go import target_type_rules from pants.backend.go.goals import check from pants.backend.go.goals.check import GoCheckFieldSet, GoCheckRequest from pants.backend.go.target_types import GoModTarget, GoPackageTarget from pan...
{ "content_hash": "f2e930ebe523b8e7793e1dc9e7995c09", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 95, "avg_line_length": 28.5875, "alnum_prop": 0.5557498906864888, "repo_name": "pantsbuild/pants", "id": "33c3d3e1885fa851826e304a329bfc6641bb47d6", "size": "2419", "bina...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
{ "content_hash": "ca31957439d84f6125ff44db129b00ed", "timestamp": "", "source": "github", "line_count": 443, "max_line_length": 336, "avg_line_length": 31.30925507900677, "alnum_prop": 0.6940879596250901, "repo_name": "mahabs/nitro", "id": "9790e9762ebd51d200bbcfb112ca54f533f23f0f", "size": "14484"...
import requests from will.plugin import WillPlugin from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings class TalkBackPlugin(WillPlugin): QUOTES_URL = "https://underquoted.herokuapp.com/api/v2/quotations/?random=true&limit=1" def get_quote(self): ...
{ "content_hash": "497a849e89babd10b95654b627c714ed", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 108, "avg_line_length": 37.58974358974359, "alnum_prop": 0.5429740791268759, "repo_name": "chillipeper/will", "id": "7880202931ca910d6d6f95ba8961ace5d7d7abea", "size": "146...
from section_block import NullTerminatedStringSection class StringMachOInfo(object): def __init__(self, desc, offset): self.desc = desc self.offset = offset self.string_sections = list() self.num_matched = 0 self.num_strings = 0 def add_section(self, seg_name, section,...
{ "content_hash": "de2dc7ac185a36fa2183e61ba9669e43", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 87, "avg_line_length": 35.09756097560975, "alnum_prop": 0.6476719944405838, "repo_name": "hkkwok/MachOTool", "id": "94b30dbf61872296c56d8df227f39a7bfd34d2b9", "size": "1439...
from os import environ from twisted.internet.defer import inlineCallbacks from autobahn.wamp.types import CallResult from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner class Component(ApplicationSession): """ Application component that provides procedures which return complex result...
{ "content_hash": "b15deefe572e4a724fe196e1f6981e89", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 71, "avg_line_length": 28, "alnum_prop": 0.6580357142857143, "repo_name": "tomwire/AutobahnPython", "id": "51765aa9add481ace92da2da20991dd8175b6794", "size": "2397", "bin...
""" Light_gauge ==== The :class:`Knob` widget creates a component that looks like a control Knob or Dial (from Wikipedia : "A control knob is a rotary control used to provide input to a device when grasped by an operator and turned, so that the degree of rotation corresponds to the desired input." http://en.wikipedia....
{ "content_hash": "5e3c68d8fece072d2982356111547265", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 72, "avg_line_length": 28.82608695652174, "alnum_prop": 0.6852689793866265, "repo_name": "CAES-Python/CAES_Kivy_Garden", "id": "7fa95cf706c3544b22bf812f291ac74af2478340", "...
""" Tools for modeling unit generators (UGens). """ from .A2K import A2K # noqa from .AllpassC import AllpassC # noqa from .AllpassL import AllpassL # noqa from .AllpassN import AllpassN # noqa from .AmpComp import AmpComp # noqa from .AmpCompA import AmpCompA # noqa from .Amplitude import Amplitude # noqa from ...
{ "content_hash": "5bb48074dc05c42f64206745267863e6", "timestamp": "", "source": "github", "line_count": 359, "max_line_length": 58, "avg_line_length": 38.14484679665738, "alnum_prop": 0.7596757704103987, "repo_name": "Pulgama/supriya", "id": "242dd9651cadfa38e50ce2a19ed2648df13f4f4d", "size": "1369...
import signal from ..const import IS_WINDOWS_PLATFORM class ShutdownException(Exception): pass class HangUpException(Exception): pass def shutdown(signal, frame): raise ShutdownException() def set_signal_handler(handler): signal.signal(signal.SIGINT, handler) signal.signal(signal.SIGTERM, h...
{ "content_hash": "b8a8b59ac3f9ee9cc2ec309b41bc0419", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 87, "avg_line_length": 21.29268292682927, "alnum_prop": 0.7250859106529209, "repo_name": "thaJeztah/compose", "id": "0244e70189ab3403efdf34b0242a163c5f191158", "size": "873...
import lmfit from .eqn_bm3 import bm3_p from .eqn_vinet import vinet_p from .eqn_kunc import kunc_p class BM3Model(lmfit.Model): """ lmfit Model class for BM3 fitting """ def __init__(self, independent_vars=['v'], param_names=['v0', 'k0', 'k0p'], prefix='', missing=None, name=None, *...
{ "content_hash": "fa36d51888222dccfc78f66089c1e5ff", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 79, "avg_line_length": 36.40909090909091, "alnum_prop": 0.5639825218476904, "repo_name": "SHDShim/pytheos", "id": "06f3ca86f897bcffcf44fb3f3ebf8f46b8b27205", "size": "3204"...
from __future__ import print_function import pkg_resources import os import socket import sys from SocketServer import ThreadingMixIn from trac import __version__ as VERSION from trac.util import autoreload, daemon from trac.web.auth import BasicAuthentication, DigestAuthentication from trac.web.main import dispatch_...
{ "content_hash": "bcbcceb5b4f68b0c648dbfd0208b431c", "timestamp": "", "source": "github", "line_count": 319, "max_line_length": 98, "avg_line_length": 41.3166144200627, "alnum_prop": 0.5485584218512898, "repo_name": "pkdevbox/trac", "id": "b21c1cc226083b07edecee1d8a9febaf19b7276b", "size": "14019",...
""" Library meta information. This module must be stand-alone executable. """ __title__ = "aiohttp-cors" __version__ = "0.5.3" __author__ = "Vladimir Rutsky" __email__ = "vladimir@rutsky.org" __summary__ = "CORS support for aiohttp" __uri__ = "https://github.com/aio-libs/aiohttp-cors" __license__ = "Apache License, V...
{ "content_hash": "8439060af6bd3a45e2edb77533c50ca0", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 56, "avg_line_length": 27.785714285714285, "alnum_prop": 0.6452442159383034, "repo_name": "jules185/IoT_Hackathon", "id": "eb70c30bf6ff94e2e2826de2b8625bab69187d9c", "size"...
from __future__ import print_function, division from .core import C from .sympify import sympify, _sympify, SympifyError from .basic import Basic, Atom from .singleton import S from .evalf import EvalfMixin, pure_complex from .decorators import _sympifyit, call_highest_priority from .cache import cacheit from .compati...
{ "content_hash": "774f5dabaeb3c9973457b13043d56cff", "timestamp": "", "source": "github", "line_count": 3139, "max_line_length": 109, "avg_line_length": 34.436126154826376, "alnum_prop": 0.5125491465840233, "repo_name": "dqnykamp/sympy", "id": "59884c0b8243177b0b573da609d1da43b4ba368d", "size": "10...
import cProfile from datetime import datetime as datetime import functools import json import math import operator import re import time import flask from oslo_config import cfg from oslo_log import log as logging import six from werkzeug import exceptions from stackalytics.dashboard import helpers from stackalytics....
{ "content_hash": "0846a19a369924092c44358ca508ec1b", "timestamp": "", "source": "github", "line_count": 566, "max_line_length": 79, "avg_line_length": 34.48409893992933, "alnum_prop": 0.5457526385900194, "repo_name": "0xf2/stackalytics", "id": "0724b3ef38987c2dc0f36bc9f14772148b7942e8", "size": "20...
from decimal import Decimal as D from django.urls import reverse from oscar.core import prices from oscar.core.loading import get_model from oscar.apps.dashboard.views import IndexView from oscar.apps.order.models import Order from oscar.test.testcases import WebTestCase from oscar.test.factories import create_order,...
{ "content_hash": "82c6ae18d2789f93b8eb190f9a148cb4", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 89, "avg_line_length": 39.82022471910113, "alnum_prop": 0.6423532731376975, "repo_name": "sasha0/django-oscar", "id": "ec9617444a1d2ab5d47a13e4192a41e65c444a09", "size": "...
"""Helpers for managing a pairing with a HomeKit accessory or bridge.""" import asyncio import logging from .const import HOMEKIT_ACCESSORY_DISPATCH, ENTITY_MAP RETRY_INTERVAL = 60 # seconds _LOGGER = logging.getLogger(__name__) def get_accessory_information(accessory): """Obtain the accessory information se...
{ "content_hash": "49cd6784360c436aea3813c922ec0394", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 77, "avg_line_length": 34.447826086956525, "alnum_prop": 0.6044427615802095, "repo_name": "jabesq/home-assistant", "id": "d0fc99de0d7af2139c015ce6b8ebf2d5ca8b84f1", "size"...
"""Recipe adagucserver""" import os import subprocess from mako.template import Template from birdhousebuilder.recipe import conda, supervisor, nginx templ_app = Template(filename=os.path.join(os.path.dirname(__file__), "adagucserver.py")) templ_autoresource = Template(filename=os.path.join(os.path.dirname(__file__)...
{ "content_hash": "3dbfb02ebe9a9fa5f043d606ce60c16b", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 110, "avg_line_length": 34.8125, "alnum_prop": 0.5707360861759425, "repo_name": "bird-house/birdhousebuilder.recipe.adagucserver", "id": "9dfd54334616b5807884d9400f4941b5cf2...
"""Functions to aid in publishing a service in the publication workflow. """ import glob import json import os import random import string import urllib2 import xml.dom.minidom as DOM from xml.sax.saxutils import escape import arcpy import checkError def createMXD(inFolder, template,logs): """Create MXD from th...
{ "content_hash": "de96bb5a341ec961fd2a157e341ba2fe", "timestamp": "", "source": "github", "line_count": 558, "max_line_length": 425, "avg_line_length": 39.225806451612904, "alnum_prop": 0.6468841374269005, "repo_name": "dan-bowerman/PAGER", "id": "29a87d2eca7f4731be18722075846a6e014a843c", "size": ...
import global_init as gi XX = [gi.aa(), 3] #pythran export bb() def bb(): return XX
{ "content_hash": "13eff1543a49e5ad55763bd290a9fd5a", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 24, "avg_line_length": 11.375, "alnum_prop": 0.6043956043956044, "repo_name": "pombredanne/pythran", "id": "546d168d4d6d5568624a5b842abb2841c19cb914", "size": "91", "binar...
from __future__ import division import urllib2, urllib, time from bs4 import BeautifulSoup import json DEBUG = 0 """ This code uses two APIs and several functions to build a list of species interactions. The input is a list of EOL species IDs. The output is a two column list of the EOL ID for the look-up taxa (from ...
{ "content_hash": "021977db50270f40e6d0daa4ea679792", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 201, "avg_line_length": 32.633136094674555, "alnum_prop": 0.6815956482320943, "repo_name": "EOL/pseudonitzchia", "id": "b4786c32929f7613a51779dcbfa5392c03ba5d24", "size": ...
''' FanFilm Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This ...
{ "content_hash": "cfe1533306263f03a674226cb517f0e2", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 102, "avg_line_length": 31.454545454545453, "alnum_prop": 0.6335260115606937, "repo_name": "rysson/filmkodi", "id": "db9013b70cb6193b66c97b04786ae4d3b27d0a32", "size": "175...
""" Implements the base class screen. This provides basic functionality for home screen, explore screen, etc. """ import tkinter as tk class Screen: """ A base class that specific screens can inherit from. """ def __init__(self, master, controller): self.master = master self.controller...
{ "content_hash": "0d5262cd10254bef6254e76f2f18be33", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 71, "avg_line_length": 31.387096774193548, "alnum_prop": 0.5755395683453237, "repo_name": "kirsty-tortoise/mathsmap", "id": "84440df4e53d9a9ed2f6317678d5a05fecd08c3d", "siz...
"""Adds the code parts to a resource APK.""" import argparse import itertools import os import shutil import sys import zipfile from util import build_utils # Taken from aapt's Package.cpp: _NO_COMPRESS_EXTENSIONS = ('.jpg', '.jpeg', '.png', '.gif', '.wav', '.mp2', '.mp3', '.ogg', '.aac',...
{ "content_hash": "c2d329aec726b224c8e31bb1f1babed8", "timestamp": "", "source": "github", "line_count": 314, "max_line_length": 80, "avg_line_length": 39.031847133757964, "alnum_prop": 0.6034595300261096, "repo_name": "chrisdickinson/nojs", "id": "180692521adcfdfba77ec62978a971049d86466e", "size": ...
""" Prefix related APIs. """ import logging from ryu.lib.packet.bgp import EvpnEsi from ryu.lib.packet.bgp import EvpnNLRI from ryu.lib.packet.bgp import EvpnEthernetAutoDiscoveryNLRI from ryu.lib.packet.bgp import EvpnMacIPAdvertisementNLRI from ryu.lib.packet.bgp import EvpnInclusiveMulticastEthernetTagNLRI from ry...
{ "content_hash": "07432b42b2a2a09e71b7dc2f566980fa", "timestamp": "", "source": "github", "line_count": 444, "max_line_length": 80, "avg_line_length": 38.03378378378378, "alnum_prop": 0.6716409072067271, "repo_name": "fujita/ryu", "id": "c3e426220b7c804adec7c418db7e7c67f5f081b5", "size": "17500", ...
import tvm from tvm import te import os def test_plugin_module(): curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) mod = tvm.runtime.load_module(os.path.join(curr_path, "lib", "plugin_module.so")) # NOTE: we need to make sure all managed resources returned # from mod get dest...
{ "content_hash": "28f36a73c1e64def261396ce05dc8cba", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 85, "avg_line_length": 32.81818181818182, "alnum_prop": 0.6380424746075716, "repo_name": "tqchen/tvm", "id": "21e666122e48d9e697c94cee578ad1c19d7e0a2f", "size": "1868", "...
"""A visitor class that generates protobufs for each pyton object.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.platform import tf_logging as logging from tensorflow.python.util import tf_decorator from tensorflow.python.util im...
{ "content_hash": "10472b2cae85ffcada1312a83f09ae62", "timestamp": "", "source": "github", "line_count": 152, "max_line_length": 80, "avg_line_length": 35.36842105263158, "alnum_prop": 0.6514136904761905, "repo_name": "nightjean/Deep-Learning", "id": "3197d0288f8859a9bf5cdb1267dbabae8da6c9ca", "size...
from stacker.blueprints.base import Blueprint from stacker.blueprints.variables.types import TroposphereType from troposphere import ( iam, applicationautoscaling as aas, dynamodb, Ref, GetAtt, Output, Sub, ) from .policies import ( dynamodb_autoscaling_policy, ) # TODO: Factor out t...
{ "content_hash": "199dbb0ec0d815410c67663d3c604730", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 186, "avg_line_length": 34.22222222222222, "alnum_prop": 0.5806493506493506, "repo_name": "remind101/stacker_blueprints", "id": "d43c881f8929af3ea3fb8b3ed6563afcef40b1d3", ...
"""module5 documentation.""" x = "Initial value module5." def printer5(): """Prints variable x.""" print(x)
{ "content_hash": "2d4e358ff1eee3f9886e12ce9cc2ea15", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 28, "avg_line_length": 14.875, "alnum_prop": 0.6050420168067226, "repo_name": "juliotrigo/python-snippets", "id": "e0ee79ee86f819e28ec3d7e409dd4cc365078e64", "size": "144", ...
"""Contains a metaclass and helper functions used to create protocol message classes from Descriptor objects at runtime. Recall that a metaclass is the "type" of a class. (A class is to a metaclass what an instance is to a class.) In this case, we use the GeneratedProtocolMessageType metaclass to inject all the usefu...
{ "content_hash": "4d305759282bb655206f870b37532896", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 80, "avg_line_length": 33.21590909090909, "alnum_prop": 0.7516250427642833, "repo_name": "sklearn-theano/sklearn-theano", "id": "5958727801ed2ec31faaacbc8e953796a4d5aa04", ...
"""Setup file""" # import os from distutils.core import setup # HERE = os.path.abspath(os.path.dirname(__file__)) # with open(os.path.join(HERE, 'README.rst')) as f: # README = f.read() REQUIREMENTS = [ 'colorama==0.3.7', 'nose==1.3.7', 'Pygments==2.7.4', 'python-termstyle==0.1.10', 'rednose...
{ "content_hash": "db3abdc2048cd8c175fba94d4c01b740", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 72, "avg_line_length": 31.638297872340427, "alnum_prop": 0.5971755211835911, "repo_name": "lwgray/pyEntrezId", "id": "d0b1ef7686dc31b466a4c48f560c8d1566bc699c", "size": "14...
""" PushBullet platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushbullet/ """ import logging from homeassistant.components.notify import ( ATTR_TARGET, ATTR_TITLE, BaseNotificationService) from homeassistant.con...
{ "content_hash": "337bac5a8d6f81523d2670d8ded5e84e", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 78, "avg_line_length": 35.30952380952381, "alnum_prop": 0.6053045628231063, "repo_name": "deisi/home-assistant", "id": "20a6daebf0592461d84d337bf3a4697f862111e6", "size": ...
""" Created on Wed Jun 14 10:37:41 2017 @author: chaco001 """ import sys import numpy as np import matplotlib.pyplot as plt import skimage from skimage import io from skimage import filters from skimage import feature import os from scipy import ndimage as ndi import pygame import pandas as pd import math import rand...
{ "content_hash": "390b012c87f30999feca8379bdbde5f6", "timestamp": "", "source": "github", "line_count": 490, "max_line_length": 117, "avg_line_length": 38.381632653061224, "alnum_prop": 0.5578773860796512, "repo_name": "jeremymchacon/colony_counter", "id": "0b139b877dba3dec5c31c239f773754731db2cdf", ...
import sys from PyQt4.QtWebKit import QWebView from PyQt4.QtGui import QApplication from PyQt4.QtCore import QUrl from markdown import markdown import urllib2 # Qt4 app app = QApplication(sys.argv) win = QWidget() win.setWindowTitle('MDBrowser') # open url opener = urllib2.build_opener() req=urllib2.Request("htt...
{ "content_hash": "c7d64b490db5fb039a24509a5444866e", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 160, "avg_line_length": 21.805555555555557, "alnum_prop": 0.759235668789809, "repo_name": "j-tetteroo/MDBrowser", "id": "61fefcb81e8ae40a9681f6ca4f93ab55765a4619", "size": ...
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Validate that use of \glossaries in TeX source files causes SCons to be aware of the necessary created glossary files. Test configuration contributed by Robert Managan. """ import os import TestSCons test = TestSCons.TestSCons() latex = test.where_i...
{ "content_hash": "c1d3ba32118babff62bea5ea80f46420", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 71, "avg_line_length": 26.02127659574468, "alnum_prop": 0.7219950940310711, "repo_name": "azverkan/scons", "id": "40501893aa7b7392fda0300f8cc38313c6555c65", "size": "3548",...
from time import sleep import requests import httplib as http import pymongo from modularodm import fields from framework.auth.core import _get_current_user from framework.auth.decorators import Auth from framework.exceptions import HTTPError from website.addons.base import ( AddonOAuthNodeSettingsBase, AddonOAu...
{ "content_hash": "54ed81e8ff0cacb7f23a1fbb64416ae4", "timestamp": "", "source": "github", "line_count": 319, "max_line_length": 112, "avg_line_length": 34.658307210031346, "alnum_prop": 0.5918053545586107, "repo_name": "HarryRybacki/osf.io", "id": "712f9dca500444026bbe5c341e803c052541397f", "size":...
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SystemJSConfig(AppConfig): name = 'systemjs' verbose_name = _('Django SystemJS') def ready(self): from . import conf # noqa
{ "content_hash": "d78f2ba39476f46b7e94720cf7b00344", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 56, "avg_line_length": 25.166666666666668, "alnum_prop": 0.7119205298013245, "repo_name": "sergei-maertens/django-systemjs", "id": "4fbf7a45a96be5063a942dbd035d4ab9ad66bee0",...
from msrest.serialization import Model class ServerUpdateParameters(Model): """Parameters allowd to update for a server. :param sku: The SKU (pricing tier) of the server. :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param storage_profile: Storage profile of a server. :type storage_profile:...
{ "content_hash": "4dead892bf84b4e7d3b6e5026755ad59", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 163, "avg_line_length": 48.02439024390244, "alnum_prop": 0.6764855256475368, "repo_name": "lmazuel/azure-sdk-for-python", "id": "f7f3a6a1b00b18774a76bd7a1fec15ca19ded9c2", ...
import urllib import logging from bs4 import BeautifulSoup def search(query): url = 'https://duckduckgo.com/html/?q={}'.format(urllib.parse.quote_plus(query)) try: resp = urllib.request.urlopen(url) except Exception as e: logging.info('DuckDuckGo: {}'.format(e)) return 'Something w...
{ "content_hash": "2b2382129b261e1abc8e19e22b89b5bd", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 93, "avg_line_length": 31.864864864864863, "alnum_prop": 0.6335877862595419, "repo_name": "muse/Lytebot", "id": "38f6060e2064041cf0d4f0004e31c25b796fa382", "size": "1179", ...
import json from pyelasticsearch import ElasticSearch from pyelasticsearch import ElasticHttpNotFoundError class IbbdElasticSearch: """ es操作 文档:http://pyelasticsearch.readthedocs.io/en/latest/ """ es = None config = {} mapping_is_set = False # 判断是否已经设置了es的mapping def __init__(self, ...
{ "content_hash": "e13844c60e0482cc38fc5144ab82a4ce", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 82, "avg_line_length": 32.228070175438596, "alnum_prop": 0.5255851932498639, "repo_name": "ibbd-dev/ibbdETL", "id": "daa08cd4b58f4ba5f7549a3003761203357283ac", "size": "42...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import os import numpy as np import pytest from rasa_nlu.tokenizers.mitie_tokenizer import MitieTokenizer @pytest.mark.parametrize("sentence, expected", [ ("hey ho...
{ "content_hash": "1e47051651593ba735710ca94770a85e", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 120, "avg_line_length": 42.16949152542373, "alnum_prop": 0.6768488745980707, "repo_name": "verloop/rasa_nlu", "id": "e91e93c499ed826ac94df0358764b7050d882f58", "size": "248...
""" Global Keys: Space - shoot projectile Z/X - zoom Escape - quit Other keys can be set by the individual test. Mouse: Left click - select/drag body (creates mouse joint) """ import string import time import cv2 import numpy as np import framework from framework import FrameworkBase, fwSettin...
{ "content_hash": "f7ed34125a0cc9e564dc0de505ccce61", "timestamp": "", "source": "github", "line_count": 347, "max_line_length": 81, "avg_line_length": 31.014409221902017, "alnum_prop": 0.5393978814346776, "repo_name": "chrisspen/homebot", "id": "77fe8dd4c05acbf502c38388270841081d1329bd", "size": "1...
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._text import TextValidator from ._position import PositionValidator from ._font import FontValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_i...
{ "content_hash": "71c4d3887f650259ac546e9a6ba88f0e", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 55, "avg_line_length": 26.31578947368421, "alnum_prop": 0.592, "repo_name": "plotly/plotly.py", "id": "bedd4ba1767b62a329e8d92f895db2b659a910dc", "size": "500", "binary":...
""" Module description ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Messenger is an utility to easily disable or enable all your ``print()`` function. Compatibility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Python2: Yes - Python3: Yes Prereq...
{ "content_hash": "ccf2b589a0a34743f07c878b2ae095c6", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 82, "avg_line_length": 27.71578947368421, "alnum_prop": 0.5476642612988986, "repo_name": "MacHu-GWU/angora-project", "id": "01e3937e4c93653b3f15a7cd98b9fac376e29d00", "size...
""" Cliente para correr en sistemas Windows """ from sys import argv, stdout from os.path import exists from subprocess import Popen, PIPE, STDOUT from socket import socket, AF_INET, SOCK_STREAM, error from base64 import b32decode as decode from base64 import b32encode as encode from cPickle import dumps, loads from t...
{ "content_hash": "04d6cd32dd228a8db6a7332c0f748233", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 149, "avg_line_length": 32.60349127182045, "alnum_prop": 0.4489827137830809, "repo_name": "martin882003/Revell", "id": "37421ba4c51758e90c75bc581279cc01113ff57c", "size": ...
"""Base module for end to end tests that run flows on clients.""" import traceback import unittest from grr.lib import aff4 from grr.lib import client_index from grr.lib import config_lib from grr.lib import data_store from grr.lib import flow_utils from grr.lib import rdfvalue from grr.lib import registry from gr...
{ "content_hash": "325df58f2d57d6289e3f10124ae0ae19", "timestamp": "", "source": "github", "line_count": 243, "max_line_length": 82, "avg_line_length": 32.46090534979424, "alnum_prop": 0.6820486815415822, "repo_name": "statik/grr", "id": "21e1c43de069642b06405f14104ae17feca59f45", "size": "7910", ...
'''Neural Net''' from neuron import Neuron class Net(object): '''Neural network composed of layers of Neurons >>> len(Net([5,7,11], 1).layers[0]) 5 >>> len(Net([5,7,11], 1).layers[1]) 7 >>> len(Net([5,7,11], 1).layers[2]) 11 ''' def __init__(self, schema, input_size): imp...
{ "content_hash": "6de297ca3130cdbe0d01a9060b7cea49", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 111, "avg_line_length": 32.28865979381443, "alnum_prop": 0.5696040868454662, "repo_name": "rylans/nn-from-scratch", "id": "d7de8526537721833d66a10c4586c6c7893f005a", "size"...
from setuptools import setup, find_packages setup( name='scrapi', version="DEV", package_dir={'scrapi': 'scrapi'}, packages=find_packages(), platforms=["any"], classifiers=[ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Lang...
{ "content_hash": "36a205e307155835bb47dcdd4bbeae00", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 48, "avg_line_length": 26.666666666666668, "alnum_prop": 0.5825, "repo_name": "CenterForOpenScience/scrapi", "id": "d7cc7f984d60ff5f356409e6eb429cc1b4d01050", "size": "400"...
import cloudstackException import json import inspect from marvin.cloudstackAPI import * class jsonLoader(object): '''The recursive class for building and representing objects with.''' def __init__(self, obj): for k in obj: v = obj[k] if isinstance(v, dict): s...
{ "content_hash": "0661374f402848729d897eb8c3fc5332", "timestamp": "", "source": "github", "line_count": 373, "max_line_length": 79, "avg_line_length": 35.98659517426273, "alnum_prop": 0.5197049839827163, "repo_name": "DaanHoogland/cloudstack", "id": "2cd342f615bf82c198704db0d529f9deafeb58f7", "size...
import datetime import decimal from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import NotSupportedError, transaction from django.db.backends import utils from django.utils import timezone from django.utils.dateparse import pars...
{ "content_hash": "a1469db290a69f4f60b45b88868ce4e1", "timestamp": "", "source": "github", "line_count": 657, "max_line_length": 119, "avg_line_length": 38.5220700152207, "alnum_prop": 0.6281955035758031, "repo_name": "shacker/django", "id": "3d476b77da3c5f973de9dd84487c209ca89b3777", "size": "25309...
from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import (Resolver404, resolve) from django.db import models from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from django.template.loader import render_to_...
{ "content_hash": "b117f495ede2052fd403cfd78f77e67b", "timestamp": "", "source": "github", "line_count": 218, "max_line_length": 79, "avg_line_length": 37.04587155963303, "alnum_prop": 0.5391282813273898, "repo_name": "amboycharlie/Child-Friendly-LCMS", "id": "682d66eae24bb3091d0550df238fed0555974b5b"...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Not installing aliases from python-future; it's unreliable and slow. from builtins import * # noqa from ycm.tests.test_utils import ExtendedMock, MockVimModule MockVim...
{ "content_hash": "1b0186ebaa119594680d92714729dc6e", "timestamp": "", "source": "github", "line_count": 276, "max_line_length": 80, "avg_line_length": 33.35144927536232, "alnum_prop": 0.5826181423139598, "repo_name": "sunchuanleihit/vimrc", "id": "854b498bb96714ce7c8fc812852852e08e85498c", "size": ...
def convert(numerator, denominator): result = str(numerator // denominator) + "." r = numerator % denominator remaining = [] quotient = [] while r != 0 and r not in remaining: remaining.append(r) r *= 10 quotient.append(r // denominator) r = r % denominator if r =...
{ "content_hash": "29f5cb4cc3a07de6d3506cbb96039c7f", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 85, "avg_line_length": 39.2, "alnum_prop": 0.5756802721088435, "repo_name": "edwardzhu/checkio-solution", "id": "207c131e351376c96c29bacdb0857f72fa39fd67", "size": "1176", ...
from django.db import migrations, models import uuid class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ] operations = [ migrations.CreateModel( name="EmailUser", fields=[ ...
{ "content_hash": "ceb52cf85a428ed9cec780432ac45bf0", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 134, "avg_line_length": 36.317460317460316, "alnum_prop": 0.4291958041958042, "repo_name": "zerolab/wagtail", "id": "5b9b125eb2e678f9732a56ffb3fbdd18a05e3fe1", "size": "233...
from django import test from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.db import models from django.db.models.fields.related import ( ForeignKey, ForeignObject, ForeignObjectRel, ManyToManyField, ManyToOneRel, OneToOneField, ) from .models impor...
{ "content_hash": "6498f69fa4c2d7a68e9aeb5c7e7be519", "timestamp": "", "source": "github", "line_count": 224, "max_line_length": 103, "avg_line_length": 33.669642857142854, "alnum_prop": 0.5974542561654733, "repo_name": "yephper/django", "id": "7d0410f9a7db865dd76b42b35e0e8dcb5472ae5d", "size": "754...
from __future__ import absolute_import, print_function, unicode_literals import os import warnings _VCS_TYPES = {} def register_vcs(vcs_type, clazz): """ :param vcs_type: id, ``str`` :param clazz: class extending VcsClientBase """ _VCS_TYPES[vcs_type] = clazz def get_registered_vcs_types(): ...
{ "content_hash": "176c00eb5e3ff74bcfaaead5db81b960", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 82, "avg_line_length": 28.336206896551722, "alnum_prop": 0.6379677517493155, "repo_name": "jpgr87/vcstools", "id": "af5179989f2fcffb577ddf498f4d62fab2f1f48f", "size": "489...