text
stringlengths
4
1.02M
meta
dict
"""Implements additional custom Pylint checkers to be used as part of presubmit checks. Next message id would be C0041. """ from __future__ import annotations import linecache import os import re import sys import tokenize from core import handler_schema_constants from .. import docstrings_checker _PARENT_DIR = os...
{ "content_hash": "44fb316ce635197b210f99ed008ff83b", "timestamp": "", "source": "github", "line_count": 2295, "max_line_length": 123, "avg_line_length": 40.76514161220044, "alnum_prop": 0.5574629099149173, "repo_name": "kevinlee12/oppia", "id": "9020d546c8ac3483e63d81d150483997e157e1c1", "size": "9...
''' @summary: Abstract Class for events. ''' class Event(object): """ Event is base class providing an interface for all subsequent (inherited) events, that will trigger further events in the trading infrastructure. """ def __init__(self): pass
{ "content_hash": "0a1fc91fd8e7910b18f92157f52775da", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 65, "avg_line_length": 19.928571428571427, "alnum_prop": 0.6487455197132617, "repo_name": "abhipr1/StockForcastEngine", "id": "8404ad1212f57a10705cfd634b45833d1a1a5295", "s...
from __future__ import print_function import sys import os from pyimpute import load_training_rasters, load_targets, impute from pyimpute import stratified_sample_raster from sklearn.ensemble import ExtraTreesClassifier from sklearn import cross_validation from collections import OrderedDict import logging logger = lo...
{ "content_hash": "d22581d47de703214cd7acf16a4f9002", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 112, "avg_line_length": 37.2, "alnum_prop": 0.6906810035842293, "repo_name": "ritviksahajpal/pyimpute", "id": "71d85bdb7ddef81d958808bad5b7c86cb73bb6d3", "size": "2790", ...
''' Return salt data via slack This version of the returner is designed to be used with hubblestack pulsar, as it expects the limited data which pulsar provides. The following fields can be set in the minion conf file:: .. code-block:: yaml slack_pulsar.channel (required) slack_pulsar.api_key (required) ...
{ "content_hash": "9007bb9c4e394dbe225164c4cd43b626", "timestamp": "", "source": "github", "line_count": 296, "max_line_length": 113, "avg_line_length": 28.85472972972973, "alnum_prop": 0.5494672754946728, "repo_name": "madchills/hubble", "id": "0f52b6bb7bcb4c93af7d7c81e0ca38ef2f36ab62", "size": "85...
from datetime import datetime from dateutil.parser import parse from flask_login import login_required from flask_restful import Resource from flask_restful import marshal_with from flask_restful import reqparse from flask_restful_swagger import swagger from sqlalchemy import func from app import db from a...
{ "content_hash": "124f6cef1e3215b3b908a5e0850d6463", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 122, "avg_line_length": 38.68468468468468, "alnum_prop": 0.6346064275733582, "repo_name": "by46/coffee", "id": "e94a645f47a80f8b9dc92395a569deb24bce93dd", "size": "4294", ...
"""This package contains the whole boilerplateapp with all of its models, views and other modules. This particular file additionally contains the applications factory. """ from flask import Flask def create_app(config_name): """Flask app factory function. It takes a `config_name` of the specific configurat...
{ "content_hash": "38c9e383b3f71af78ef2a5862a39baab", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 98, "avg_line_length": 26.86111111111111, "alnum_prop": 0.733195449844881, "repo_name": "svenstaro/python-web-boilerplate", "id": "98811f7a7c1e1d3824a3130cb9a700738548ee9e", ...
"""SCons.Tool.rpm Tool-specific initialization for rpm. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. The rpm tool calls the rpmbuild command. The first and only argument should a tar.gz consisting of the sourc...
{ "content_hash": "ec66c46fc395e572349435d670f52806", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 92, "avg_line_length": 34.06060606060606, "alnum_prop": 0.6548042704626335, "repo_name": "engineer0x47/SCONS", "id": "c14159de6b2172da16ca43ff2b1db51bb452f7b8", "size": "4...
extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information ...
{ "content_hash": "c70eb1b40d46fe28516c1f494c460f3c", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 80, "avg_line_length": 31.469767441860466, "alnum_prop": 0.7044043748152528, "repo_name": "jwhitlock/django-allauth", "id": "a9435fd6de20ba125b680a962f76f623f3b6c984", "si...
import os import sys import operator import gzip import math import numpy as np from collections import defaultdict def main(directory, source): print '' print '===========================' print ' Memory Analysis ' print '===========================' print 'Running mem_analysis.main()' print 'A...
{ "content_hash": "903c9480aeb47f296cd7ac6afb65a680", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 79, "avg_line_length": 29.325, "alnum_prop": 0.6160841148053424, "repo_name": "ysshao/WIICA", "id": "0cb6ea37288600804cb5a7d70bc3ec2caa544f3f", "size": "3541", "binary":...
from __future__ import unicode_literals from importlib import import_module import os import sys from django.apps import apps from django.db.migrations.recorder import MigrationRecorder from django.db.migrations.graph import MigrationGraph, NodeNotFoundError from django.utils import six from django.conf import settin...
{ "content_hash": "995d537518b14cd5e1618834391e7e66", "timestamp": "", "source": "github", "line_count": 341, "max_line_length": 133, "avg_line_length": 46.65982404692082, "alnum_prop": 0.5772107347118346, "repo_name": "edevil/django", "id": "9cc428e1622245e6e705cc7521c37616e2c67224", "size": "15911...
""" Utility functions for Selenium unit tests. """ from metashare import settings from metashare.settings import ROOT_PATH, TEST_MODE_NAME import os from metashare import test_utils import time from selenium import webdriver from selenium.common.exceptions import TimeoutException from django_selenium import s...
{ "content_hash": "76f44a0875f653caf0396bc96498f489", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 139, "avg_line_length": 38.52662721893491, "alnum_prop": 0.6525879281216403, "repo_name": "zeehio/META-SHARE", "id": "6494bfcba37eb3d09510daf4965ef8cc30a222fb", "size": "6...
import os import sys sys.path.insert(0, os.path.dirname(__file__) + '/../lib')
{ "content_hash": "508442518e3e025942613ba7a534179e", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 57, "avg_line_length": 20, "alnum_prop": 0.6375, "repo_name": "casmlab/quac", "id": "6c2e2c6c86de7d24ace84ab3ed33721d76a3b835", "size": "605", "binary": false, "copies":...
import ast import sys from collections import namedtuple from functools import partial from typing import Optional import astroid _ast_py3 = None try: import typed_ast.ast3 as _ast_py3 except ImportError: pass PY38 = sys.version_info[:2] >= (3, 8) if PY38: # On Python 3.8, typed_ast was merged back into...
{ "content_hash": "208c093968cd9a890ab36b7db171dc8f", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 86, "avg_line_length": 25.83969465648855, "alnum_prop": 0.5822747415066469, "repo_name": "ruchee/vimrc", "id": "55e81c687581e0341eed2dc41add40cfd9d0a870", "size": "3385", ...
""" Provide the class Message and its subclasses. """ class Message(object): message = '' message_args = () def __init__(self, filename, loc): self.filename = filename self.lineno = loc.lineno self.col = getattr(loc, 'col_offset', 0) def __str__(self): return '%s:%s: ...
{ "content_hash": "d9bbcd993fa1a3a2b40cee80253cb1ef", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 79, "avg_line_length": 27.963133640552996, "alnum_prop": 0.6423862887277522, "repo_name": "Aorjoa/aiyara-ceph-dash", "id": "05db5bfabbc0cac8008ad118e98acffcb3fbb583", "siz...
"""Application controller for FastTree designed for FastTree v1.1.0 . Also functions with v2.0.1, v2.1.0, and v2.1.3 though only with basic functionality""" from cogent.app.parameters import ValuedParameter, FlagParameter, \ MixedParameter from cogent.app.util import CommandLineApplication, FilePath, system, ...
{ "content_hash": "a67e37302482713db6d51c74d68958a9", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 79, "avg_line_length": 39.5, "alnum_prop": 0.5969936708860759, "repo_name": "sauloal/cnidaria", "id": "3f0c2ff2169fc45c6d2b908ac68e52dd69b0dd38", "size": "6342", "binary...
"""Unit tests for update_webgl_conformance_tests.""" import unittest from webkitpy.webgl import update_webgl_conformance_tests as webgl def construct_script(name): return "<script src=\"" + name + "\"></script>\n" def construct_style(name): return "<link rel=\"stylesheet\" href=\"" + name + "\">" class ...
{ "content_hash": "6c6b5c874948fb6875c544343d362d7c", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 96, "avg_line_length": 37.25352112676056, "alnum_prop": 0.5928166351606805, "repo_name": "wuhengzhi/chromium-crosswalk", "id": "e3e3a52b572a3a4ede86fb7df5747f6d848f1d6d", "...
import sys import matplotlib import numpy as np from mpl_toolkits.basemap import Basemap from array import array import matplotlib.pyplot as plt import urllib import datetime import dateutil.parser import EQMethods ############################################################################## def main(argv=None): ...
{ "content_hash": "b33aa2d85ba788e51c90e1db3d48d053", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 86, "avg_line_length": 21.285714285714285, "alnum_prop": 0.5879194630872483, "repo_name": "jbrundle/earthquake-forecasts", "id": "ea8da73eb753d0205f7c58f2e7e6fe9faed8e8ed", ...
"""Generate template values for an interface. Design doc: http://www.chromium.org/developers/design-documents/idl-compiler """ from collections import defaultdict import itertools from operator import itemgetter import idl_definitions from idl_definitions import IdlOperation, IdlArgument import idl_types from idl_ty...
{ "content_hash": "35114030b98a40e6590ec818fdf284e1", "timestamp": "", "source": "github", "line_count": 1288, "max_line_length": 162, "avg_line_length": 45.536490683229815, "alnum_prop": 0.6367325365296415, "repo_name": "sgraham/nope", "id": "6e4f37812c3fede093a6b387f19839620cd78a2e", "size": "6031...
from msrest.serialization import Model class DiskInstanceView(Model): """The instance view of the disk. :param name: The disk name. :type name: str :param statuses: The resource status information. :type statuses: list[~azure.mgmt.compute.v2016_03_30.models.InstanceViewStatus] """ _...
{ "content_hash": "19cb38c4fd2810ce83db79cea1caa713", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 72, "avg_line_length": 29.772727272727273, "alnum_prop": 0.6137404580152672, "repo_name": "lmazuel/azure-sdk-for-python", "id": "50ab86fe9ecae3b57b9533d5d4b91ca9b0d05393", ...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging from sleekxmpp.stanza import Message from sleekxmpp.xmlstream import register_stanza_plugin from sleekxmpp.xmls...
{ "content_hash": "26ee8f38e98771616c13dce2d848f1bd", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 77, "avg_line_length": 29.066666666666666, "alnum_prop": 0.6220183486238532, "repo_name": "RedbackThomson/LoLShadow", "id": "4e560604d68e7972d3f14b79a55c2b11fbe01b7b", "siz...
"""Prints the size of each given file and optionally computes the size of libchrome.so without the dependencies added for building with android NDK. Also breaks down the contents of the APK to determine the installed size and assign size contributions to different classes of file. """ import collections impor...
{ "content_hash": "f48a38de78952b6ea856cad87485ca67", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 80, "avg_line_length": 37.656716417910445, "alnum_prop": 0.6600607742105958, "repo_name": "highweb-project/highweb-webcl-html5spec", "id": "53743266b90680439c38983aecf271a5a...
from copy import deepcopy from django.contrib import admin from django.core.exceptions import PermissionDenied from django.core.urlresolvers import NoReverseMatch from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from mezzanine.conf import settings from mezzanine.core.admin i...
{ "content_hash": "e7a85e1ece8500466cf1fd206e596f85", "timestamp": "", "source": "github", "line_count": 241, "max_line_length": 79, "avg_line_length": 38.08298755186722, "alnum_prop": 0.610154717803443, "repo_name": "eRestin/Mezz", "id": "ccba88dfa2892272901ed9ff02171831491f0fc0", "size": "9179", ...
from twilio.rest import Client # Initialize the client account = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" token = "your_auth_token" client = Client(account, token) members = client.chat \ .services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \ .channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \ ...
{ "content_hash": "cfb252a16a5d0b5c1354b77576dab3df", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 65, "avg_line_length": 27.666666666666668, "alnum_prop": 0.655421686746988, "repo_name": "teoreteetik/api-snippets", "id": "78042a9365974b2a54c3a0b760a6e016d46c4c6b", "size...
import re import os from compose.cli.command import get_project import compose.cli.command as cmd from compose.cli.main import TopLevelCommand, perform_command from compose.cli.utils import get_version_info from compose.config.config import load from compose.config.environment import Environment from compose.const imp...
{ "content_hash": "8f572da66681750d7507da2bdae0427c", "timestamp": "", "source": "github", "line_count": 329, "max_line_length": 146, "avg_line_length": 34.027355623100306, "alnum_prop": 0.6418043769539973, "repo_name": "iamdork/compose", "id": "f8e9282c75bf1f1cd6036983f4116cabb6e158e0", "size": "11...
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.test_support': raise ImportError('test_support must be imported from the test package') import contextlib import errno import functools import gc import socket import sys import os import platform import shutil import warnings impo...
{ "content_hash": "887e0f2ea6794911a59de4c1c484d9b8", "timestamp": "", "source": "github", "line_count": 1589, "max_line_length": 95, "avg_line_length": 35.667715544367525, "alnum_prop": 0.6084409626649728, "repo_name": "andela-earinde/bellatrix-py", "id": "9c5467a58352048284438147bd47ec9bb1cc3f50", ...
from ._bots_operations import BotsOperations from ._channels_operations import ChannelsOperations from ._direct_line_operations import DirectLineOperations from ._operations import Operations from ._bot_connection_operations import BotConnectionOperations from ._host_settings_operations import HostSettingsOperations fr...
{ "content_hash": "f28d8477a2bdd66aba6cfac2293546f1", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 90, "avg_line_length": 40.19047619047619, "alnum_prop": 0.8175355450236966, "repo_name": "Azure/azure-sdk-for-python", "id": "89604c7b3d5307f5498b3ef8b68ca3aa654272d1", "si...
from seleniumbase import BaseCase class ProxyTests(BaseCase): def test_proxy(self): self.open("https://ipinfo.io/") ip_address = self.get_text('#ip-string span[class*="primary"] span') print("\n\nMy IP Address = %s\n" % ip_address) print("Displaying Host Info:") text = self...
{ "content_hash": "e359891282ab03f6b57f8338c7f0a141", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 77, "avg_line_length": 37.44444444444444, "alnum_prop": 0.5593471810089021, "repo_name": "mdmintz/SeleniumBase", "id": "17f372ed92b5d03a63a47b213da0176091785169", "size": "...
import commands def totalCoresUsed(): return commands.getoutput("nova absolute-limits |grep totalCoresUsed |awk '{print $4}'") def totalInstancesUsed(): return commands.getoutput("nova absolute-limits |grep totalInstancesUsed |awk '{print $4}'") def totalRAMUserInGB(): mem = commands.getoutput("nova ab...
{ "content_hash": "d0f64431985ca7dcd2c0694da9c80456", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 123, "avg_line_length": 35.958333333333336, "alnum_prop": 0.7253765932792584, "repo_name": "forgeservicelab/testautomation.imagecreation", "id": "7723b6a09f5933a53307538467c9...
"""Fichier contenant le module primaire format.""" from abstraits.module import * from primaires.format import commandes from primaires.format.config import cfg_charte from primaires.format.description_flottante import DescriptionFlottante from primaires.format.editeurs.floatedit import EdtFloatedit from primaires.for...
{ "content_hash": "fba436b5c16ee6df464bd7a58d475727", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 80, "avg_line_length": 31.584269662921347, "alnum_prop": 0.6609747420846673, "repo_name": "stormi/tsunami", "id": "d4bcbd3f64f3fdbda47aebc38afa34df372063da", "size": "4386"...
class NormalizeEmptyResultError(Exception): # throw error for normalize() when empty pass
{ "content_hash": "8df6fc4aa3654a8efb0ecdf5769920cc", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 43, "avg_line_length": 31.333333333333332, "alnum_prop": 0.7872340425531915, "repo_name": "DanCech/graphite-web", "id": "1349153d0c5109e6cd67b7afa41a52e8b08ad117", "size": "...
from fabric.api import * from fabric.colors import red,yellow,green from fabric.contrib.console import confirm from fabric.utils import abort,error from pprint import pprint import os # SETTINGS IMAGES = ["base","postgresql", "mysql", "http", "php", "wsgi"] NODES = [ ## PROD CONTAINERS { "id": 1, "name" : "pr...
{ "content_hash": "5c349f9fe1baaa37aa9a12f24f47d38e", "timestamp": "", "source": "github", "line_count": 468, "max_line_length": 146, "avg_line_length": 28.188034188034187, "alnum_prop": 0.5778502122498483, "repo_name": "Quelquechose/dockertools", "id": "2107fd086a35545156601f0030c9bccda8b97091", "s...
from glanceclient.exc import *
{ "content_hash": "d95a46c68138ee94c6d298498d68db79", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 30, "avg_line_length": 31, "alnum_prop": 0.8064516129032258, "repo_name": "mmasaki/python-glanceclient", "id": "64cc01ee49463258d766148bb61df908296c36c4", "size": "174", "...
""" Gauged https://github.com/chriso/gauged (MIT Licensed) Copyright 2014 (c) Chris O'Hara <[email protected]> """ class Aggregate(object): SUM = 'sum' MIN = 'min' MAX = 'max' MEAN = 'mean' STDDEV = 'stddev' PERCENTILE = 'percentile' MEDIAN = 'median' COUNT = 'count' ALL = set([...
{ "content_hash": "10bafdb266dac7c8bcf9ba6041b03ec4", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 71, "avg_line_length": 20.19047619047619, "alnum_prop": 0.6061320754716981, "repo_name": "chriso/gauged", "id": "8a9b685bb0cff705d58935885f5e8d13cdab850e", "size": "424", ...
import json import os import sys import time import docopt import pkg_resources import six import dcoscli from dcos import cmds, emitting, http, jsonitem, marathon, options, util from dcos.errors import DCOSException from dcoscli import tables from dcoscli.subcommand import default_command_info, default_doc from dcos...
{ "content_hash": "4bfa69ec3bd23ca20d9491dfb689cd72", "timestamp": "", "source": "github", "line_count": 1183, "max_line_length": 127, "avg_line_length": 30.772612003381234, "alnum_prop": 0.5590869135259862, "repo_name": "mesosphere/dcos-cli", "id": "e64976c9e251d2d4b531a38de1a86046ae2b90e9", "size"...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('soamgr', '0005_ordersoa_is_adviser_approval'), ] operations = [ migrations.AlterField( model_name='revi...
{ "content_hash": "d9f8b3ece1ba30e84eafb9b3a622f81c", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 129, "avg_line_length": 27.157894736842106, "alnum_prop": 0.6531007751937985, "repo_name": "nikkomidoy/project_soa", "id": "17a91b6e5e3e642f2054999658f5a0021c833c18", "size...
from twilio.twiml.voice_response import Dial, VoiceResponse, Sim response = VoiceResponse() dial = Dial(record='record-from-ringing') dial.sim('DE8caa2afb9d5279926619c458dc7098a8') response.append(dial) print(response)
{ "content_hash": "b3c8028e80a57ba9330e5c95934dcc2f", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 64, "avg_line_length": 27.625, "alnum_prop": 0.8054298642533937, "repo_name": "TwilioDevEd/api-snippets", "id": "72b6c20770005fd0e0ff25ce0011583dbe90c180", "size": "221", ...
from __future__ import absolute_import import numpy as np from .. import backend as K from .. import activations, initializations, regularizers from ..engine import Layer, InputSpec def time_distributed_dense(x, w, b=None, dropout=None, input_dim=None, output_dim=None, timesteps=None): ...
{ "content_hash": "eb79d11e68b2d00f3c83698b1cb6f3f5", "timestamp": "", "source": "github", "line_count": 860, "max_line_length": 130, "avg_line_length": 46.98837209302326, "alnum_prop": 0.5570403365503588, "repo_name": "relh/keras", "id": "0cd3c9d9212c4dbc87218749b215c47c96ba705a", "size": "40436", ...
""" Utilities for NetApp drivers. This module contains common utilities to be used by one or more NetApp drivers to achieve the desired functionality. """ import decimal import platform import socket from oslo_concurrency import processutils as putils from oslo_log import log as logging from oslo_utils import impor...
{ "content_hash": "d416bcb4674e6c9a2b26286295866c2d", "timestamp": "", "source": "github", "line_count": 459, "max_line_length": 78, "avg_line_length": 34.84531590413943, "alnum_prop": 0.6024759284731774, "repo_name": "duhzecca/cinder", "id": "d66e890ea22bb7a6df7834e3d3d18f103d095ced", "size": "1679...
"""Pushsafer platform for notify component.""" import base64 import logging import mimetypes import requests from requests.auth import HTTPBasicAuth import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.notify import ( ATTR_DATA, ATTR_TARGET, ATTR_TIT...
{ "content_hash": "cd0b7cea2eb96f48bfd484a1e9096ed5", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 86, "avg_line_length": 36.544910179640716, "alnum_prop": 0.6006881861379649, "repo_name": "fbradyirl/home-assistant", "id": "461b2540beff454e6abb3d42c12157661a25ff96", "si...
import argparse import os import sys from bakery_cli.ttfont import Font from bakery_cli.scripts.fstype import reset_fstype from fontTools.ttLib import TTLibError parser = argparse.ArgumentParser() parser.add_argument('filename', help="Font file in OpenType (TTF/OTF) format") parser.add_argument(...
{ "content_hash": "22a0354e103b2fe8347900d027310d37", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 66, "avg_line_length": 25.14814814814815, "alnum_prop": 0.6730486008836525, "repo_name": "lowks/fontbakery-cli", "id": "89f4bc34abc6ed2bb39f274fd44ab5050e592d85", "size": "...
from __future__ import with_statement import ConfigParser import copy import errno import glob import logging import os import pprint import re import shutil import signal import subprocess import sys import tempfile import thread import threading import time import traceback import types import unittest.case from col...
{ "content_hash": "36766a678042092d1b94ff3ad95d2a6d", "timestamp": "", "source": "github", "line_count": 1175, "max_line_length": 148, "avg_line_length": 38.733617021276594, "alnum_prop": 0.6122561082791351, "repo_name": "mambocab/cassandra-dtest", "id": "dc5383be7cbb521faae15e181a8b7f78d08936d9", "...
from flask import Flask from flask.ext.testing import TestCase from flask_nicely import nice_json from flask_nicely.errors import NotFound class TestFlaskNicely(TestCase): def create_app(self): app = Flask(__name__) app.config['TESTING'] = True return app def test_success(self): ...
{ "content_hash": "953530ec99ca1bbe0a2ba7fa7d418fa9", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 90, "avg_line_length": 29.33093525179856, "alnum_prop": 0.58719646799117, "repo_name": "Jwpe/Flask-Nicely", "id": "a5e2aa8a88d4cb502cab2fab1a5a9dc2d7ce19a4", "size": "4077...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pytest import ray from ray.experimental.serve import SingleQuery from ray.experimental.serve.examples.adder import ScalerAdder, VectorizedAdder from ray.experimental.serve.examples.co...
{ "content_hash": "08a6f500eba462cf49fa3ef598a53270", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 78, "avg_line_length": 30.455882352941178, "alnum_prop": 0.711733462095606, "repo_name": "atumanov/ray", "id": "3b2748b73bf3d150a8ed8b2b266524ba285e8c76", "size": "2071", ...
import logging import json from webspider.tasks.celery_app import celery_app from webspider.controllers import keyword_statistic_ctl from webspider.models import (KeywordModel, JobModel, JobKeywordModel, KeywordStatisticModel) logger = logging.getLogger(__name__) @celery_app.task() def update_keywords_statistic_tas...
{ "content_hash": "2599e38b79081c6e14d7ad7d2b1358c3", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 104, "avg_line_length": 39.130434782608695, "alnum_prop": 0.7316666666666667, "repo_name": "GuozhuHe/webspider", "id": "d6209ff3cf569c09b183f52fc736a90af13e6c9e", "size": "...
import ctypes as ct import sys import matplotlib.pyplot as plt import matplotlib.patches as patches import numpy as np import os # Setup for individual channels, these are default values class channel_setup: def __init__(self, channel): # Set channel self.channel = channel # Set bit corresponding to chan...
{ "content_hash": "60d0bd90df5c814636c2a2b9a6d60af1", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 82, "avg_line_length": 36.28651685393258, "alnum_prop": 0.575940548072457, "repo_name": "thomasbarillot/DAQ", "id": "2d66700f1af5b621a5094cb4b8ca651d3a46463d", "size": "64...
from __future__ import absolute_import from socket import timeout as SocketTimeout from socket import error as SocketError import time import logging try: from .esthrift import Rest from .esthrift.ttypes import Method, RestRequest from thrift.transport import TTransport, TSocket, TSSLSocket from thrif...
{ "content_hash": "ae1cecf1e98f6f215ff7a611798fa9c3", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 101, "avg_line_length": 38.336633663366335, "alnum_prop": 0.6397210743801653, "repo_name": "liuyi1112/elasticsearch-py", "id": "172868c8d1c518bcf991cf785f7150633e3f2866", ...
""" A module for the binomial distribution node """ import numpy as np import scipy.special as special from .expfamily import (ExponentialFamily, ExponentialFamilyDistribution, useconstructor) from .beta import BetaMoments from .poisson import PoissonMoments from .no...
{ "content_hash": "34ab9e89df683935b7dc6892a2aeff9d", "timestamp": "", "source": "github", "line_count": 221, "max_line_length": 80, "avg_line_length": 26.190045248868778, "alnum_prop": 0.5171043538355218, "repo_name": "dungvtdev/upsbayescpm", "id": "ae0fa2fe311b9f8ef133ac7b445957c821585801", "size"...
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "roomba" PROJECT_SPACE_DIR = "/home/joemelt101/catkin_ws/install" PROJECT_VERSION = "0.0.0"
{ "content_hash": "26f0ae463f09d059b889f54f521f3134", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 68, "avg_line_length": 45.285714285714285, "alnum_prop": 0.6340694006309149, "repo_name": "joemelt101/BIR_Labs", "id": "a7db23b5dddf388dc2b251d3667be7f1dbb09abd", "size": "3...
""" Release script. """ import argparse import sys from subprocess import check_call from colorama import init, Fore from git import Repo, Remote def create_branch(version): """Create a fresh branch from upstream/main""" repo = Repo.init(".") if repo.is_dirty(untracked_files=True): raise RuntimeE...
{ "content_hash": "e6a33f4ad6bbd10f8ada6e3274be7913", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 84, "avg_line_length": 28.28985507246377, "alnum_prop": 0.6542008196721312, "repo_name": "hpk42/pluggy", "id": "e09b8c77b1163d82b4169104dc5f608731559849", "size": "1952", ...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging import os from contextlib import contextmanager from pants.cache.artifact import TarballArtifact from pants.cache.artifact_cache import ArtifactCache, ...
{ "content_hash": "8765fe04d2dbf1759584b1fbf726c262", "timestamp": "", "source": "github", "line_count": 172, "max_line_length": 109, "avg_line_length": 37.79651162790697, "alnum_prop": 0.6892785725273035, "repo_name": "ity/pants", "id": "956645df8bb730dfada2109ec497e69562aaa68c", "size": "6648", ...
""" >>> from opaque_ext import * Check for correct conversion >>> use(get()) Check that None is converted to a NULL opaque pointer >>> useany(get()) 1 >>> useany(None) 0 Check that we don't lose type information by converting NULL opaque pointers to None >>> assert getnull() is None >...
{ "content_hash": "defc1780eb9f0c343d36b92e8b4c0fe8", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 64, "avg_line_length": 20.51851851851852, "alnum_prop": 0.6215403128760529, "repo_name": "hkernbach/arangodb", "id": "311b1893a509f1427bfc47ebf9710ebda2917aff", "size": "18...
from candidator.adapters import CandidatorCalculator from candidator.models import Position class YQSCalculator(CandidatorCalculator): final_results_key = 'puntos' order_reversed = False def determine_match(self, person_position, external_position): try: diff = external_position.answerv...
{ "content_hash": "6dfc565039e94a3be68f3ccc903c59c1", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 90, "avg_line_length": 38.2, "alnum_prop": 0.680628272251309, "repo_name": "yank07/votai-theme", "id": "9ca2fb31e8d4ab024dcc183b9fc659f1a02191be", "size": "955", "binary"...
"""Test the importmulti RPC. Test importmulti by generating keys on node0, importing the scriptPubKeys and addresses on node1 and then testing the address info for the different address variants. - `get_key()` and `get_multisig()` are called to generate keys on node0 and return the privkeys, pubkeys and all variant...
{ "content_hash": "b58465204e77af6383fb3b28ca1cde77", "timestamp": "", "source": "github", "line_count": 858, "max_line_length": 316, "avg_line_length": 50.49650349650349, "alnum_prop": 0.5449845358445276, "repo_name": "jnewbery/bitcoin", "id": "13186b9e1d4e5350afed37580c3541ea518a73fd", "size": "43...
from django import forms import voxel_globe.meta.models as models class OrderVoxelWorldBaseForm(forms.Form): image_set = forms.ModelChoiceField(label="Image Set", queryset=models.ImageSet.objects.all().order_by('name')) camera_set = forms.ModelChoiceField(label="Camera Set", queryset=models.CameraSet....
{ "content_hash": "308a5e25d9e532d171a301aa9da962d0", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 86, "avg_line_length": 50.3235294117647, "alnum_prop": 0.7051431911163063, "repo_name": "ngageoint/voxel-globe", "id": "ae06bdcd6a7859c737f0691c9fcd5a2b0d9eed22", "size": "...
from __future__ import absolute_import from kazoo.client import KazooClient import kazoo import sys, os, time import re from optparse import OptionParser def do_zookeeper_read(zk, path): print path data, stat = zk.get(path) print 'node info:', data print 'node stat:', stat children = zk.get_children(path) pr...
{ "content_hash": "011bebf6eb3d591f319e3ccab0f4c4f9", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 124, "avg_line_length": 28.153846153846153, "alnum_prop": 0.6816939890710383, "repo_name": "naver/arcus-python2-client", "id": "bb8da6c20570a0499b8cb9906c7723d6d0f40712", ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Page.updated_at' db.alter_column(u'radpress_page', 'updated_at', self.gf('django.db.models.fields.DateTimeField')...
{ "content_hash": "9bbc208098149fa2ad11e36e4efaf3d4", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 207, "avg_line_length": 69.08849557522124, "alnum_prop": 0.5561675419495324, "repo_name": "ifearcompilererrors/fle_redesign", "id": "bc819f0c91008a5c3121007191c8001b454cc49d...
import numpy as np from emukit.core.initial_designs.latin_design import LatinDesign from emukit.core.loop import FixedIterationsStoppingCondition, LoopState, UserFunctionWrapper from emukit.core.parameter_space import ParameterSpace from emukit.examples.fabolas import FabolasLoop def fmin_fabolas( func, spac...
{ "content_hash": "f511c7454388b5143164e9ee93ed1293", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 117, "avg_line_length": 35.13333333333333, "alnum_prop": 0.6732447817836812, "repo_name": "EmuKit/emukit", "id": "7f489bb4c2fb5c02361de0f0a8f646bb7cd3c1c7", "size": "2635",...
"""Utility methods""" from __future__ import print_function, unicode_literals from builtins import input try: import configparser except: import ConfigParser as configparser import os import sys import warnings CONFIG_PATH = os.path.expanduser('~/.attbillsplitter.conf') PAGE_LOADING_WAIT_S = 10 DATABASE_PATH ...
{ "content_hash": "76a854e260d6be968f5297a7971f0061", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 79, "avg_line_length": 33.86363636363637, "alnum_prop": 0.6483221476510067, "repo_name": "brianzq/att-bill-splitter", "id": "0fedae1f3cd7f80d6c24b96d0afa4273a9a34cf7", "si...
from __future__ import with_statement import time import pickle import psycopg2 import psycopg2.extensions import psycopg2.extras from psycopg2.extensions import b from testutils import unittest, ConnectingTestCase, skip_before_postgres from testutils import skip_if_no_namedtuple, skip_if_no_getrefcount from testutils...
{ "content_hash": "7b1dc531e7cd78f5e1b59ff384da8bc4", "timestamp": "", "source": "github", "line_count": 531, "max_line_length": 80, "avg_line_length": 38.220338983050844, "alnum_prop": 0.5955161369795516, "repo_name": "zxjzxj9/FlaskBoard", "id": "e435bcc1a744c59c3504d5c38448d7b1216c895e", "size": "...
import os from PyQt4 import QtGui from PyQt4.phonon import Phonon if __name__ == "__main__": app = QtGui.QApplication([]) app.setApplicationName("Phonon Video Player") file_path = "i.mpg" media_src = Phonon.MediaSource(file_path) media_obj = Phonon.MediaObject() media_obj.setCurrentSource(med...
{ "content_hash": "d1767257060755d2efc13aaba7b1bf58", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 56, "avg_line_length": 24.16, "alnum_prop": 0.6821192052980133, "repo_name": "CospanDesign/python", "id": "a956ea08385b11f00955ba1f0a2730646228bae5", "size": "604", "bina...
''' The service module for OpenBSD ''' # Import python libs from __future__ import absolute_import import os import logging # Import 3rd-party libs import salt.ext.six as six from salt.ext.six.moves import map # pylint: disable=import-error,redefined-builtin # Import Salt libs import salt.utils log = logging.getLo...
{ "content_hash": "a14d0d5f9f86f45493d1b02915ae248d", "timestamp": "", "source": "github", "line_count": 302, "max_line_length": 109, "avg_line_length": 25.14569536423841, "alnum_prop": 0.5800632077956281, "repo_name": "smallyear/linuxLearn", "id": "470a414135481ed755fbdc36391845fc8a088bc1", "size":...
from portality.util import url_for from portality.core import app from portality.events.consumer import EventConsumer from portality import constants from portality import models from portality.bll import DOAJ, exceptions from portality.lib.seamless import SeamlessException from portality.lib.dates import human_date ...
{ "content_hash": "13ae4faf1dcfdd93a963112c19b929ab", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 157, "avg_line_length": 38.8, "alnum_prop": 0.6938144329896907, "repo_name": "DOAJ/doaj", "id": "a8df5948f3911137d5720023ea82c94e0d6af935", "size": "1968", "binary": fals...
from .sgd_separator import plot_sgd_separator from .linear_regression import plot_linear_regression from .ML_flow_chart import plot_supervised_chart, plot_unsupervised_chart from .helpers import plot_iris_classification
{ "content_hash": "41b6f0277f0431a8c0ff4015279c175c", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 73, "avg_line_length": 55, "alnum_prop": 0.8363636363636363, "repo_name": "jljones/sklearn_pycon2014", "id": "0723d0d0f09041cc3d9bf01706579f673b32d8f4", "size": "220", "bi...
from setuptools import setup, find_packages import os, sys, glob, fnmatch setup(name="SimpleCV", version=2.0, download_url='https://github.com/sightmachine/SimpleCV/zipball/1.3', description="Make Computers See with SimpleCV, the Python Framework for Machine Vision", long_description="""Framework for computer ...
{ "content_hash": "cf022509604d01c1b05f9e5bbe58115a", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 188, "avg_line_length": 43.96, "alnum_prop": 0.6005459508644222, "repo_name": "jayrambhia/SimpleCV2", "id": "cdf359bb92cdd6f00b7f261a83435aaf5659bfe5", "size": "2198", "b...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cparte', '0001_initial'), ] operations = [ migrations.AddField( model_name='challenge', name='accept_changes', f...
{ "content_hash": "e7432a44742e563b8d15451c92f9a633", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 52, "avg_line_length": 21.736842105263158, "alnum_prop": 0.5883777239709443, "repo_name": "joausaga/participa", "id": "ff07da5c177c79de739bb9a1e5e82fc478fc21d7", "size": "4...
import ast import sys try: from unqlite import UnQLite except: sys.exit("[!] Install the UnQlite library: pip install unqlite") from utils import Utils class KeyStore(object): db = UnQLite() # ================================================= # "private" mathods # ===========================...
{ "content_hash": "40ad245df8cdc1b3c82dbcafed7096b6", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 96, "avg_line_length": 33.49324324324324, "alnum_prop": 0.49041759128505147, "repo_name": "MooseDojo/apt2", "id": "2a4f70b8f1c2c240596a2062b4ec3e764b2bd075", "size": "4957...
"""Common trace code generation.""" # Adjust path import os.path import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import itertools import specs.stdapi as stdapi def getWrapperInterfaceName(interface): return "Wrap" + interface.expr debug = False class ComplexValueSerializer(std...
{ "content_hash": "295a57712b2078861b0cb2d30b340302", "timestamp": "", "source": "github", "line_count": 976, "max_line_length": 185, "avg_line_length": 39.377049180327866, "alnum_prop": 0.5532889258950874, "repo_name": "schulmar/apitrace", "id": "242785c3824109a1035dd95fff6b8a1a063c6994", "size": "...
""" S3 SQL Forms @copyright: 2012-2021 (c) Sahana Software Foundation @license: MIT 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 ...
{ "content_hash": "733150805f0bf1cc429ee4614a35628f", "timestamp": "", "source": "github", "line_count": 4454, "max_line_length": 147, "avg_line_length": 37.63807813201616, "alnum_prop": 0.44738725841088045, "repo_name": "flavour/eden", "id": "5364f7d1b2bc5f2c8dc396c232f460ee9df4aa1c", "size": "1676...
r"""Implement a MSM class that builds a Markov state models from microstate trajectories automatically computes important properties and provides them for later access. .. moduleauthor:: F. Noe <frank DOT noe AT fu-berlin DOT de> """ __docformat__ = "restructuredtext en" import numpy as _np from pyemma.msm.models....
{ "content_hash": "9b685a86184ba279831336a322cf0dfc", "timestamp": "", "source": "github", "line_count": 275, "max_line_length": 120, "avg_line_length": 39.81818181818182, "alnum_prop": 0.6125114155251141, "repo_name": "arokem/PyEMMA", "id": "27fafe628ab356282b4cda00d75043d30d03467e", "size": "12365...
from core_serializers import fields, serializers from core_serializers.utils import BasicObject import pytest class HTMLDict(dict): """ A mock MultiDict that can be used for representing HTML input. """ getlist = None class TestField: def setup(self): self.field = fields.Field() def...
{ "content_hash": "d0f14e678bc1f4bd13709cc2bc4ac048", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 80, "avg_line_length": 31.25358851674641, "alnum_prop": 0.6114513165952236, "repo_name": "pombredanne/core-serializers", "id": "2a9697df5c5226544ae2334690379f72a418c5a5", ...
""" Copyright (c) 2014-2021 Geir Skjotskift 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, publish, distr...
{ "content_hash": "db3dd474597cbeeeb685c6a11f7ede09", "timestamp": "", "source": "github", "line_count": 311, "max_line_length": 90, "avg_line_length": 30.784565916398712, "alnum_prop": 0.5975558805097138, "repo_name": "bunzen/RashlyOutlaid", "id": "7b1e7bc27162e8ef077bce85a3d302d4d470de96", "size":...
from collections import namedtuple import re from GitSavvy.core.git_command import mixin_base Stash = namedtuple("Stash", ("id", "description")) class StashMixin(mixin_base): def get_stashes(self): """ Return a list of stashes in the repo. """ stdout = self.git("stash", "list")...
{ "content_hash": "925e101c0f6e8792ec58df59254669ac", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 89, "avg_line_length": 28.660377358490567, "alnum_prop": 0.5306122448979592, "repo_name": "divmain/GitSavvy", "id": "1a08fb31e7a2d4c3ecc924e15e7111e3eaabadd1", "size": "151...
''' ============================================ General vs. Additive Unscented Kalman Filter ============================================ This example shows the difference between the general Unscented Kalman Filter and the Additive Unscented Kalman Filter. The general Unscented Kalman Filter (UKF) places no limitat...
{ "content_hash": "e98131ec441cb87a37d0213bcb87bb0b", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 79, "avg_line_length": 36.18055555555556, "alnum_prop": 0.7124760076775432, "repo_name": "nils-werner/pykalman", "id": "cd1c5b2039c3121d280d5fefa2359492dd45911c", "size": "...
import numpy as np import scipy.sparse as sp import pytest from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_almost_equal from sklearn.base import ClassifierMixin from sklearn.utils import check_random_state fro...
{ "content_hash": "e3cef6db0cf2544953bbd0733d4966f0", "timestamp": "", "source": "github", "line_count": 286, "max_line_length": 77, "avg_line_length": 34.89160839160839, "alnum_prop": 0.5605772121455056, "repo_name": "glemaitre/scikit-learn", "id": "d0d099eeacc8d34e3d51f651f180cb5bd6e11b03", "size"...
import time import unittest from selenium import webdriver import settings class ModifyStudentInfo(unittest.TestCase): def setUp(self): self.driver = None self.base_url = settings.test_parameters.get("education_base_url") def test_E83_modify_the_students_information(self): ...
{ "content_hash": "abb88e1d364b37e0d2e108a5ad8edf6d", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 113, "avg_line_length": 53.37956204379562, "alnum_prop": 0.5114180226993026, "repo_name": "sysuwuhaibin/vatus", "id": "6bea60c293f113a65bce7b4eb28e9977ec54d2cc", "size": "...
import sys import os import shutil import datetime import glob import zipfile import argparse import re QLXL = "QuantLibXL" VERSION = "1.8.0" VERSION_ = "1_8_0" #VC_VERSION = "vc120" VC_VERSION = "vc90" QLXL_VERSION = QLXL + "-" + VERSION ROOT_DIR = QLXL_VERSION + "\\" class ZipFile: root = None zipFile = No...
{ "content_hash": "e56c50f19a5a7576790a9118bf5bcf34", "timestamp": "", "source": "github", "line_count": 266, "max_line_length": 160, "avg_line_length": 36.221804511278194, "alnum_prop": 0.5981318111053451, "repo_name": "eehlers/QuantLibXL", "id": "d2dadc1ee40afb951163f3424a3646f136771a1d", "size": ...
"""Factory methods for Random Forest baseline agent.""" import dataclasses import chex from neural_testbed import base as testbed_base import numpy as np from sklearn import ensemble @dataclasses.dataclass class RandomForestConfig: n_estimators: int = 100 # Number of elements in random forest criterion: str = ...
{ "content_hash": "244983b4191c979973b71d350f0a3c2f", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 77, "avg_line_length": 36.12244897959184, "alnum_prop": 0.7045197740112994, "repo_name": "deepmind/neural_testbed", "id": "9b101c41437273a290fe94b8617971241962f999", "size"...
import sys print(sys.version.split()[0]) # First part of string
{ "content_hash": "ba8f8215e17524d8a5201c880ba5d34c", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 56, "avg_line_length": 34, "alnum_prop": 0.6911764705882353, "repo_name": "dreadrel/UWF_2014_spring_COP3990C-2507", "id": "0b95335f1faabd63b06892e8c2a9238a4511e7cc", "size":...
import sys import os import shlex # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # --...
{ "content_hash": "b00778d80ce62cbcd9dbf13bb65c2440", "timestamp": "", "source": "github", "line_count": 271, "max_line_length": 79, "avg_line_length": 32.28044280442804, "alnum_prop": 0.7048468221307728, "repo_name": "ilyakava/theanet", "id": "304e334a3fe5d75adb52033b49ccf12d9f3f808d", "size": "919...
from bs4 import BeautifulSoup from urllib import request PERSON_URL = "http://www.imdb.com/name/" def get_movie_titles(imdb_tag): """This function scrapes the person data from imdb.com and then creates a set of all their movies. It also gets the person's name. """ page = request.urlopen(PERSO...
{ "content_hash": "8a47835f3de10f867a245919d92096c8", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 75, "avg_line_length": 32.22727272727273, "alnum_prop": 0.6382228490832158, "repo_name": "corinennis/imdb_shared_movies", "id": "5a713b207fcca982ccd67e0fe8982ec0c4b03c98", ...
calendar_events_mapping = { 'action': '/char/UpcomingCalendarEvents.xml.aspx', 'fields': ['eventID', 'ownerName', 'eventDate', 'eventTitle', 'duration', 'eventText'] } contracts_mapping = { 'action': '/char/Contracts.xml.aspx', 'fields': ['contractID', 'startStationID', 'status', 'price'...
{ "content_hash": "e12f1f8c7e179b1d63f91494184ee4f7", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 77, "avg_line_length": 28.807692307692307, "alnum_prop": 0.6101468624833111, "repo_name": "JudgeGregg/Twisted-EvE-API", "id": "7b0aff458d6fee3dfb245607f8b3b8104635c13e", "s...
import unittest from touchdown.config import expressions from touchdown.core import serializers class TestExpressions(unittest.TestCase): def test_pwgen(self): serializer = expressions.pwgen(length=31, symbols=True) self.assertTrue(isinstance(serializer, serializers.Expression)) rendered ...
{ "content_hash": "5af69a1a308834116622c7891f88ee30", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 72, "avg_line_length": 42.89473684210526, "alnum_prop": 0.6822085889570552, "repo_name": "yaybu/touchdown", "id": "4849a1c85ec5a9c14a228a49111375be0a60975f", "size": "2208"...
import json from twisted.protocols.basic import LineReceiver from twisted.internet import defer class Request(object): def __init__(self,protocol,method): self.protocol = protocol self.method = method def __call__(self,*args,**kwargs): return self.protocol.callRemote(self.method,*args,**kwargs) def n...
{ "content_hash": "a5068eb40dc29d1e1f8072e1338d57df", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 142, "avg_line_length": 32.72222222222222, "alnum_prop": 0.5977645727221279, "repo_name": "johnny-die-tulpe/sauron", "id": "021971335bbc9271c866c47ba455ffbb21fb8690", "siz...
import logging import os import subprocess import sys import threading import unittest THIS_DIR = os.path.dirname(os.path.abspath(__file__)) SWARMING_BOT_DIR = os.path.dirname(THIS_DIR) import singleton PYCODE = """ import sys sys.path.insert(0, '%s') from bot_code import singleton print(singleton.Singleton(%r).acq...
{ "content_hash": "9217f2d18997778bed089f197a5d7580", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 72, "avg_line_length": 27.696969696969695, "alnum_prop": 0.6821663019693655, "repo_name": "luci/luci-py", "id": "02d1145e51897b0a5e855d30901973311afa1c91", "size": "2026", ...
"""The tests for the Tasmota switch platform.""" import copy import json from unittest.mock import patch from hatasmota.utils import ( get_topic_stat_result, get_topic_tele_state, get_topic_tele_will, ) from homeassistant.components import switch from homeassistant.components.tasmota.const import DEFAULT_...
{ "content_hash": "abb066cd5b736165df0e6e8bf35b887f", "timestamp": "", "source": "github", "line_count": 246, "max_line_length": 88, "avg_line_length": 32.67886178861789, "alnum_prop": 0.67595472073641, "repo_name": "FreekingDean/home-assistant", "id": "00b0a922e0a052e71ad54ff17b9ae70ed2a9b080", "si...
from .base import BaseReporter class InformationReporter(BaseReporter): title = 'Information' def run(self, error): return self.from_operator('information', None)
{ "content_hash": "1018713c0dd6f1ddb7c617250064cc4e", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 54, "avg_line_length": 20.333333333333332, "alnum_prop": 0.7103825136612022, "repo_name": "grappa-py/grappa", "id": "7391852b3be28816cbc5abcca4d1ec8597f1300b", "size": "207"...
""" conpaas.services.taskfarm.manager.manager ========================================= ConPaaS TaskFarm manager. :copyright: (C) 2010-2013 by Contrail Consortium. """ from threading import Thread from conpaas.core.expose import expose from conpaas.core.manager import BaseManager from conpaas.core....
{ "content_hash": "78d8f9c8cf4f61b7537ff5e035ebdb50", "timestamp": "", "source": "github", "line_count": 277, "max_line_length": 80, "avg_line_length": 35.90252707581227, "alnum_prop": 0.5983911513323278, "repo_name": "ema/conpaas", "id": "5cecb3b2c79b3542fc105a085d68470a57ac88f4", "size": "9970", ...
import os import sys from ctk_cli import CLIArgumentParser # Append ITK libs sys.path.append(os.path.join(os.environ['ITK_BUILD_DIR'], 'Wrapping/Generators/Python')) sys.path.append(os.path.join(os.environ['ITK_BUILD_DIR'], 'lib') # Append TubeTK libs : sys.path.append(os.environ['TUBETK_...
{ "content_hash": "dd42d686670968583f793d288bfc91ed", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 76, "avg_line_length": 31.384615384615383, "alnum_prop": 0.7769607843137255, "repo_name": "cdeepakroy/TubeTK", "id": "323e02061c83ade50e5da352bf79f6a2035cf027", "size": "16...
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Derived from Cursor3D. This script increases the coverage of the # vtkImageInplaceFilter super class. # global values CURSOR_X = 20 CURSOR_Y = 20 CURSOR_Z = 20 IMAGE_MAG_X = 2 IMAGE_MAG_Y = 2 IMAGE_MAG_...
{ "content_hash": "6a89f615988d50161138eece2d51afaa", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 71, "avg_line_length": 31.017857142857142, "alnum_prop": 0.770293609671848, "repo_name": "msmolens/VTK", "id": "e532162e084c22f8a947b7782511955981945fa6", "size": "1759", ...
import os import re from sdkconfig import SDKConfig from pyparsing import OneOrMore from pyparsing import restOfLine from pyparsing import alphanums from pyparsing import Word from pyparsing import alphas from pyparsing import ParseFatalException from pyparsing import Suppress from pyparsing import Group from pyparsin...
{ "content_hash": "b594fcb11fcf8951afcbfebf1e65ab53", "timestamp": "", "source": "github", "line_count": 408, "max_line_length": 131, "avg_line_length": 38.11029411764706, "alnum_prop": 0.5903916650588462, "repo_name": "krzychb/rtd-test-bed", "id": "dd8295f8692abfe8e39a0394193daa38604859bd", "size":...
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') import pytest from s3streamer import S3Streamer def cat_read(stream): reads = [] while(True): d = stream.read(1000) if not d: break reads.append(d) return b"".join(re...
{ "content_hash": "66c3a23f058a883219a0846bda2f6f65", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 88, "avg_line_length": 34.18867924528302, "alnum_prop": 0.6440397350993378, "repo_name": "diamondman/pys3streamer", "id": "d83a4d720d58c49d301e147c5f011000924e07f5", "size"...
from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM from direct.fsm import State from direct.task import Task from otp.ai.AIBase import * from toontown.building import DistributedElevatorExtAI from toontown.building.ElevatorConstants import * from toontown.toonbase import ToontownGlobals cla...
{ "content_hash": "b81108bb1015ff8790ed3f58db1f3190", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 129, "avg_line_length": 41.48979591836735, "alnum_prop": 0.6522380718150517, "repo_name": "linktlh/Toontown-journey", "id": "15c250145968d7881c481c3f01f68d599033aa8e", "siz...
""" Testing data types for ndimage calls """ import sys import numpy as np from numpy.testing import (assert_array_almost_equal, dec, assert_array_equal) from nose.tools import assert_true, assert_equal, assert_raises from scipy import ndimage def test_map_coordinates_dts(): # check ...
{ "content_hash": "7af654a73becec15fae5e36c02f2f18c", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 82, "avg_line_length": 40.507936507936506, "alnum_prop": 0.5693573667711599, "repo_name": "teoliphant/scipy", "id": "85027e31d04247b3a53a2d8f5dba535f80002388", "size": "255...
from __future__ import division import errno import os import shutil import time import uuid from collections import namedtuple from itertools import izip as zip from itertools import repeat from cassandra import WriteFailure from cassandra.concurrent import (execute_concurrent, exec...
{ "content_hash": "e6ab635fd246b52164b2acd0941f382c", "timestamp": "", "source": "github", "line_count": 545, "max_line_length": 135, "avg_line_length": 41.086238532110094, "alnum_prop": 0.607449088960343, "repo_name": "riptano/cassandra-dtest", "id": "657e61a3bb173dc451fc61c9ce9b0d9f5ac98430", "siz...
"""Implementation of a Tree model for surface data display. """ import numpy as np from PyQt4.QtCore import * from froi.core.dataobject import Surface class TreeModel(QAbstractItemModel): """Definition of class TreeModel.""" # customized signals repaint_surface = pyqtSignal() idChanged = pyqtSignal...
{ "content_hash": "6ae63c5f09f59045e4078fec63284704", "timestamp": "", "source": "github", "line_count": 367, "max_line_length": 96, "avg_line_length": 34.321525885558586, "alnum_prop": 0.5227850111146396, "repo_name": "sunshineDrizzle/FreeROI", "id": "971cece38b8ff0609a987c7a64adce1911fdf92f", "siz...
''' importer mixpanel lib ~~~~~~~~~~~~~~~~~~~~~ pre-installed mixpanel lib. '''
{ "content_hash": "144143db594b3b640f95303d4507c132", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 31, "avg_line_length": 11.875, "alnum_prop": 0.4421052631578947, "repo_name": "mindis/Keen-Importer", "id": "46d92d722da9b9672ce6c598bc872efab8e494bf", "size": "120", "bin...
from setuptools import setup setup( name = 'cenum', packages = ['cenum'], )
{ "content_hash": "6c6bbf0b839d51db7b8958a7dec5d310", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 28, "avg_line_length": 15.166666666666666, "alnum_prop": 0.5714285714285714, "repo_name": "zmic/cenum", "id": "e986b212fb70c85540c513ea43f35b089c11cc5e", "size": "91", "bi...
import os, os.path # The base directory of pnntprss data base_dir = os.path.join(os.environ['HOME'], ".pnntprss") # The directory containing group data groups_dir = os.path.join(base_dir, "groups") # default feed polling interval feed_poll_interval = 1800 # how long an article lives for. may be overridden in group...
{ "content_hash": "f1478f4074e371d79e429d5d273aa14e", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 68, "avg_line_length": 27.81578947368421, "alnum_prop": 0.6868495742667928, "repo_name": "dpw/pnntprss", "id": "0b0eeb3b670d73ed9a63af1c6af9e324c02272ad", "size": "1085", ...
from django.contrib import admin # Register your models here. from polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ ('Question', {'fields':['question'], 'classes':['collapse']}), ('Date Information', {'fields':...
{ "content_hash": "af9ef5fb451d6def2e95ece77d6abe41", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 72, "avg_line_length": 24.904761904761905, "alnum_prop": 0.6940726577437859, "repo_name": "qianyu668899/Django", "id": "476a2a969285a4214ff1154c41db5a3d1a940997", "size": "...
import url from rdflib import ConjunctiveGraph, URIRef def is_url(text): """ Check if the given text looks like a URL. """ if text is None: return False text = text.lower() return text.startswith('http://') or text.startswith('https://') or \ text.startswith('urn:') or text.startswith(...
{ "content_hash": "01ef5327c408f5de5ffb53c4a6d65f61", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 73, "avg_line_length": 25.555555555555557, "alnum_prop": 0.6550724637681159, "repo_name": "pudo/jsongraph", "id": "af7955604830f0e7bb7a5f73921222ab5f940c23", "size": "690",...