text
stringlengths
4
1.02M
meta
dict
"""Client side of the heat engine RPC API.""" from oslo_utils import reflection from heat.common import messaging from heat.rpc import api as rpc_api class EngineClient(object): """Client side of the heat engine rpc API. API version history:: 1.0 - Initial version. 1.1 - Add support_status...
{ "content_hash": "7da04148e59cc7e787f7d64116479724", "timestamp": "", "source": "github", "line_count": 763, "max_line_length": 79, "avg_line_length": 46.2437745740498, "alnum_prop": 0.5345765786192042, "repo_name": "jasondunsmore/heat", "id": "be4ece09dd25f20eca69aba6a5645a0411fbbd22", "size": "35...
from datetime import datetime from django.dispatch import receiver from django.db.models.signals import post_save from django.contrib.auth.models import User from django_stripe.shortcuts import stripe from django_stripe.contrib.registration.backends import StripeSubscriptionBackend from django_stripe.contrib.registra...
{ "content_hash": "8dd8d62aae6c10759f015c657f22091b", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 91, "avg_line_length": 38.82051282051282, "alnum_prop": 0.7123513870541611, "repo_name": "amccloud/django-stripe", "id": "d5d45a75e267f0a6625dafdd3592800dd699f925", "size":...
"""A HTTPSConnection/Handler with additional proxy and cert validation features. In particular, monkey patches in Python r74203 to provide support for CONNECT proxies and adds SSL cert validation if the ssl module is present. """ __author__ = "{frew,nick.johnson}@google.com (Fred Wulff and Nick Johnson)" import base...
{ "content_hash": "e7c60bdbcfb3ded07cc322b177cde36b", "timestamp": "", "source": "github", "line_count": 372, "max_line_length": 80, "avg_line_length": 34.873655913978496, "alnum_prop": 0.6256070299853542, "repo_name": "octavioturra/aritial", "id": "1ae40b3a840d0b1e88d1752b8416f8b1f7ea95fd", "size":...
""" A management command which deletes expired accounts (e.g., accounts which signed up but never activated) from the database. Calls ``RegistrationProfile.objects.delete_expired_users()``, which contains the actual logic for determining which accounts are deleted. """ from django.core.management.base import NoArgsC...
{ "content_hash": "e06f16a52ed8f62202c0cf0f3805df91", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 117, "avg_line_length": 35.340425531914896, "alnum_prop": 0.6285370258880193, "repo_name": "znick/anytask", "id": "31cd29fe46fb2cc9e365cab3624eaf907308847e", "size": "1661"...
""" Helpers for converting Strava's units to something more practical. These are really just thin wrappers to the brilliant 'units' python library. """ from units import unit import units.predefined # Setup the units we will use in this module. units.predefined.define_units() meter = meters = unit('m') second = seco...
{ "content_hash": "d4a2967c05db10c82079714f49f890cf", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 85, "avg_line_length": 28.195652173913043, "alnum_prop": 0.6707787201233616, "repo_name": "Wisees/stravalib", "id": "7f19e168f608415dcbf2e67a23a8dae2d3c5371e", "size": "129...
import cards import hands import preflop_sim import afterflop_sim import pickle # add more features if we have time features = { 'high-pair':0, 'middle-pair':1, 'low-pair':2, '2-pair-good':3, '3-kind':4, 'straight':5, 'flush':6, 'full-house':7, '4-kind':8, 'straight-flush':9, 'really-good-high':10, 'good-high':11, 'm...
{ "content_hash": "ff2fe64d8325c77db20c39b363df9d3d", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 272, "avg_line_length": 30.423076923076923, "alnum_prop": 0.6425410872313527, "repo_name": "pmaddi/CPSC458_Final-Project", "id": "c3cac786a055fb51c259f0a7222a58866882f859", ...
__author__ = 'Franko' from google.appengine.ext import ndb from lib.models import Randomstevilka from datetime import datetime import time import random from google.appengine.api import users def Random(stevilka,params): R=params #samo kontrola alijerandom=preveri_random() stevilka=int(...
{ "content_hash": "343d9728f1a4cbd57ccd042330c77eff", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 129, "avg_line_length": 31.59016393442623, "alnum_prop": 0.6196159833938765, "repo_name": "igorpodobnik/koncniprojek", "id": "86a4a5d2ccd531e4b02cb57036d7da8a49cddd85", "si...
""" This module defines all the hotword detection engines present in the app. Presently, it support * PocketSphinx KeyPhrase Search for Hotword Detection * Snowboy Hotword Detection While Snowboy gives marginally better results, if it is unavailable on your device, you may use PocketSphinx """ from .snowboy_detector i...
{ "content_hash": "c281bf7aeac80b2efef9b52f8391e819", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 83, "avg_line_length": 35.63636363636363, "alnum_prop": 0.8214285714285714, "repo_name": "betterclever/susi_linux", "id": "f49895a6f180bfd6e57d83439e8c5ec72ec31047", "size"...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
{ "content_hash": "2dc43789206c790239fd82b62ce2a5b3", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 114, "avg_line_length": 43.18181818181818, "alnum_prop": 0.7752631578947369, "repo_name": "radicalbit/ambari", "id": "6057a8b8e4441f88144e98af5212791bab1b08e8", "size": "19...
''' This script is intended to evaluate dataset using SVM and 10-folds cross validation in n times. ''' import collections import csv import datetime import json import os import random import re import statistics import sys import time as t import nltk import nltk.classify from nltk.metrics import scores from sklear...
{ "content_hash": "d6ebe9b7c3d7356640c85b84ec8487db", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 177, "avg_line_length": 37.50359712230216, "alnum_prop": 0.6602723959332438, "repo_name": "dwiajik/twit-macet-mining-v3", "id": "c6e69adc08b24a67aec30cee77757fc394848963", ...
from __future__ import absolute_import from django.forms.widgets import SelectMultiple from django.utils.translation import ugettext_lazy as _ from fobi.base import FormFieldPlugin, get_theme from fobi.constants import ( SUBMIT_VALUE_AS_VAL, SUBMIT_VALUE_AS_REPR ) from fobi.helpers import get_select_field_cho...
{ "content_hash": "6f1da392c9cc793d1a62bb1838f90ccf", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 76, "avg_line_length": 34.013698630136986, "alnum_prop": 0.5698751510269835, "repo_name": "mansonul/events", "id": "bf0a54b50bd7a95216f9ff5b260d31d90815ca4c", "size": "496...
import os import os.path from subprocess import Popen, PIPE import time from datetime import datetime import socket import httplib, urllib import urllib2 from datetime import datetime import logging import logging.handlers import db import csv import json import tempfile import ala import paramiko class HPCConfig: ...
{ "content_hash": "6bea96e56ae1760cdc6840cfcb2577b0", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 86, "avg_line_length": 29.74137931034483, "alnum_prop": 0.6927536231884058, "repo_name": "jcu-eresearch/Edgar", "id": "0c43ae30d31c7aa7e419d389346cd9357b341b51", "size": "1...
from . import AWSObject, AWSProperty, PropsDictType, Tags from .validators import boolean, double, integer from .validators.wafv2 import ( validate_comparison_operator, validate_custom_response_bodies, validate_ipaddress_version, validate_positional_constraint, validate_statement, validate_state...
{ "content_hash": "7570ae00a21c3323bff31faf314906a8", "timestamp": "", "source": "github", "line_count": 689, "max_line_length": 172, "avg_line_length": 30.494920174165458, "alnum_prop": 0.6596544667079149, "repo_name": "cloudtools/troposphere", "id": "631fbfdbbb7413b471691e7fd15044b754ea846f", "siz...
from __future__ import absolute_import from pyes.tests import ESTestCase from pyes import exceptions class ErrorReportingTestCase(ESTestCase): def setUp(self): super(ErrorReportingTestCase, self).setUp() #self.conn.indices.set_alias('test-alias', ['_river']) #self.conn.indices.delete_alias(...
{ "content_hash": "130630ca36eb9284daf84c71bd60e176", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 116, "avg_line_length": 50.52777777777778, "alnum_prop": 0.6468755726589701, "repo_name": "Fiedzia/pyes", "id": "4d0d385603dc6884b64f9283a9d9341ae5f86b58", "size": "5481",...
""" Batch alignment script using Toil Runs BWA to produce the SAM followed by BAMSORT to produce the BAM If the option is specified (s3_dir), the output bam will be placed in S3. ~/.boto config file and S3AM: https://github.com/BD2KGenomics/s3am are required for this step. Dependencies: Docker - apt-get install ...
{ "content_hash": "d0386243a4def62ae0053e6d2f2d43a2", "timestamp": "", "source": "github", "line_count": 294, "max_line_length": 120, "avg_line_length": 39.023809523809526, "alnum_prop": 0.6064673581452105, "repo_name": "BD2KGenomics/toil-scripts", "id": "67ee6b41bd0fd6f41d6253100ba4a0f9626ef21c", "...
"""SCons.Tool.fortran Tool-specific initialization for a generic Posix f77/f90 Fortran compiler. 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. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 20...
{ "content_hash": "cfdcdd0cf8397ff8d516a574ae1dedba", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 83, "avg_line_length": 34.05263157894737, "alnum_prop": 0.7557959814528593, "repo_name": "frew/simpleproto", "id": "ef6be0a2a399f712d4988bb5e64259e6ab026f69", "size": "1941...
import argparse import pysam import sys import Tools import pdb DELTA = 50 def Close(a, b): return (abs(a-b) < DELTA) # ---*==========*----- # --*===*---------- fromTo = 0 contains = 1 partial = 2 def Order(aln, boundaries): tb = boundaries[aln.tName] qb = boundaries[aln.title] ...
{ "content_hash": "e525cdafc8c4ec206b828ec44efb0835", "timestamp": "", "source": "github", "line_count": 326, "max_line_length": 128, "avg_line_length": 35.25766871165644, "alnum_prop": 0.5535931790499391, "repo_name": "EichlerLab/chm1_scripts", "id": "ee59daa09a0a08bd21e52e6c8317f1de6d729b7d", "siz...
"""Copyright 2022 The MediaPipe Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
{ "content_hash": "3532df09bd4ffc7d8a1e23d79a1f3957", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 72, "avg_line_length": 37.0625, "alnum_prop": 0.7841483979763912, "repo_name": "google/mediapipe", "id": "6a840518948927aa2cd812411fceebade73546da", "size": "593", "binar...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mocker', '0005_auto_20171012_2103'), ] operations = [ migrations.RemoveField( model_name='mocker', ...
{ "content_hash": "e4b4b3f3152115b42b649a7ed347cc32", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 137, "avg_line_length": 26.958333333333332, "alnum_prop": 0.6058732612055642, "repo_name": "paveu/api_mocker", "id": "b9732a8072a87f16cb833e14e4af7bfe246bbb41", "size": "72...
"""A module for registering all known parsers.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from grr_response_core.lib import parsers from grr_response_core.lib.parsers import chrome_history from grr_response_core.lib.parsers import config_file from ...
{ "content_hash": "3b4f4d776b6ae833ffa2d059fb21748f", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 77, "avg_line_length": 45.32432432432432, "alnum_prop": 0.7773404889683959, "repo_name": "dunkhong/grr", "id": "8fb919ba7f99a08c0af2a862abeb8e78204950df", "size": "8407", ...
import json import unittest import unittest.mock as mock from blinkpy.web_tests.flake_suppressor import web_tests_expectations from blinkpy.web_tests.flake_suppressor import web_tests_queries as queries from blinkpy.web_tests.flake_suppressor import web_tests_tag_utils as tag_utils from blinkpy.web_tests.flake_suppres...
{ "content_hash": "b7638d3e018cf919a014c3021127bc12", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 82, "avg_line_length": 38.833333333333336, "alnum_prop": 0.5155937052932761, "repo_name": "chromium/chromium", "id": "a2a7f1b96e31152bb0e1bc799615083990ec13a5", "size": "36...
""" This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs_to_gcs`. """ import warnings from airflow.providers.google.cloud.operators.gcs_to_gcs import GCSToGCSOperator warnings.warn( "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs_to_gcs`.", ...
{ "content_hash": "b041cb32cca70f5db9a59f32b9efafe0", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 99, "avg_line_length": 32, "alnum_prop": 0.6979166666666666, "repo_name": "wileeam/airflow", "id": "309353f57c728874f22172400054327c585b1386", "size": "1651", "binary": f...
from __future__ import absolute_import, division, print_function from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) import pytest import yaml import json with open('tests/vars/sensor.vars', 'r') a...
{ "content_hash": "5687813aefdfbf59e1549800f67e50d4", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 102, "avg_line_length": 40, "alnum_prop": 0.628030303030303, "repo_name": "rocknsm/SimpleRock", "id": "20a789a54c22b11d67edca884b8a6cf02dc46600", "size": "1473", "binary"...
class Solution(object): def isSymmetric(self, root): """ :type root: TreeNode :rtype: bool """ return None == root or (None == root.left and None == root.right) or self.isMirror(root.left, root.right) def isMirror(self, left, right): return (None == left and Non...
{ "content_hash": "f282e6acadd44560555cf61a0b9e37dc", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 193, "avg_line_length": 43.45454545454545, "alnum_prop": 0.6213389121338913, "repo_name": "FeiZhan/Algo-Collection", "id": "4c55dce4f8ce7c526915f346cfdcb9996e6a32fb", "size...
import re def readBP(filename): file = open(filename, 'r') while file.readline().find("ORIGIN") == -1: pass contents = file.read() return re.sub('[^AGCTagct]', '', contents).upper() def writeBP(filename, bp): file = open(filename, 'w') file.write("LOCUS\n") file.write("ORIGIN\n") file.write(bp) file.close(...
{ "content_hash": "9437430268c077b80062fa7514d407ac", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 51, "avg_line_length": 19.61111111111111, "alnum_prop": 0.6543909348441926, "repo_name": "tricorder42/pcr-simulator-2015", "id": "a545074dcae396a0790da042a75aaec8ba29f4a3", ...
__author__ = "Satish Palaniappan" import os import pickle from os import path import learner ''' Pickle Formats 2#review,pos_neg 3#review,pos_neg,score 4#review,pos_neg,score,title ''' def learn_save(newLearner,feature_i,label_i): newLearner.clearOld() newLearner.loadXY(feature_index = feature_i,label_index = labe...
{ "content_hash": "4fd4adc3c28a883109a15cc9f7c458ef", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 114, "avg_line_length": 25.102040816326532, "alnum_prop": 0.6626016260162602, "repo_name": "tpsatish95/Universal-MultiDomain-Sentiment-Classifier", "id": "0d3e08357defbda5324...
from direct.directnotify.DirectNotifyGlobal import directNotify from direct.stdpy import threading import errno from panda3d.core import TP_normal import select import socket import urlparse from toontown.rpc.ToontownRPCConnection import ToontownRPCConnection class ToontownRPCServer: notify = directNotify.newCat...
{ "content_hash": "d5e59aba63318306d1d0535b7bb72c7b", "timestamp": "", "source": "github", "line_count": 154, "max_line_length": 93, "avg_line_length": 32.4025974025974, "alnum_prop": 0.593186372745491, "repo_name": "linktlh/Toontown-journey", "id": "1f1a1b913c81b7bc736cad271b9af8950101d8b5", "size"...
import mock import sys import pytest from org.company.frobnicator import Frobnicator def fake_get(url, headers=None): return mock.Mock(json=[{'apples': 4}]) @mock.patch('org.company.frobnicator.requests.get', side_effect=fake_get) def test_queries(requests_get): """ Shows how requests.get is mocked in a tes...
{ "content_hash": "e3d0d4d20a2c14925e457a3d17a49dc6", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 73, "avg_line_length": 21.863636363636363, "alnum_prop": 0.6756756756756757, "repo_name": "noelevans/sandpit", "id": "5963ae1c296dd627f390b3d3034af3d9fa6c5c94", "size": "48...
"""hotspots visualization.""" from apps.managers.team_mgr.models import Team def supply(request, page_name): """ Handle the request for viz_hotspots widget.""" _ = request _ = page_name all_lounges = Team.objects.order_by('name').all() return { "all_lounges": all_lounges, }
{ "content_hash": "f245a460ca28a2ad8ac10af18f1619a9", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 54, "avg_line_length": 19.875, "alnum_prop": 0.6163522012578616, "repo_name": "KendyllD/boukenda-project", "id": "65a1b67df04cedaf9137afb37e905a327027fe90", "size": "318", ...
__author__ = 'Chirstoph Reimers' __email__ = 'christoph@superservice-international.com' __version__ = '0.1.0.b1'
{ "content_hash": "6bcf210d770df5399a1f3aeeecb153e7", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 54, "avg_line_length": 37.666666666666664, "alnum_prop": 0.672566371681416, "repo_name": "creimers/djangocms_oembed", "id": "7e4c8ab007b931fa972c19127c64c57aa68e70a9", "size...
import os import sys import time from . import error class Logger: """ Abstract class for all logger implementations. Concrete classes will log messages using various methods, e.g. write to a file. """ (ERROR, INFO, DEBUG) = (0, 1, 2) TYPES = ("ERROR", "Info", "Debug") debug_level = ERR...
{ "content_hash": "d9743783b64a48083515ac157222c142", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 78, "avg_line_length": 26.5, "alnum_prop": 0.5701997780244173, "repo_name": "joonty/vdebug", "id": "7db9a5ff79988598943d083e2bf0434fda2a677e", "size": "3604", "binary": ...
from __future__ import unicode_literals from celery.utils.log import get_task_logger from djcelery_transactions import task logger = get_task_logger(__name__) @task def send_message(message_id): from .models import Message, STATUS_SENT, STATUS_FAILED message = Message.objects.select_related('org', 'user')....
{ "content_hash": "09d8eae3b5f94afa6ff939f91af852ed", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 98, "avg_line_length": 30.464285714285715, "alnum_prop": 0.6811254396248535, "repo_name": "ewheeler/tracpro", "id": "358e6919cdddf583ee5f50fc04e76cd5f8900f4a", "size": "853...
class Machine( object ): def __init__( self, memory, register_file, debug, reset_addr=0x400 ): self.rf = register_file self.mem = memory self.pc = reset_addr self .debug = debug self.rf .debug = debug self.mem.debug = debug # common registers self.status =...
{ "content_hash": "bfa67bd3a87487a66e55c7b52bd0ef25", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 71, "avg_line_length": 24.869565217391305, "alnum_prop": 0.5769230769230769, "repo_name": "futurecore/pydgin", "id": "ead1dd03438573d4132833ee44d295c59c53fabc", "size": "88...
"""Command for removing public keys to users.""" from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.api_lib.compute import utils from googlecloudsdk.api_lib.compute.users import client as users_client from googlecloudsdk.calliope import arg_parsers from googlecloudsdk.command_lib.compute.users...
{ "content_hash": "5379b9688f7d86e605f97244de9d645f", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 82, "avg_line_length": 31.225806451612904, "alnum_prop": 0.6924931129476584, "repo_name": "KaranToor/MA450", "id": "4e0527fb8f41eaa8d564e1fabe33fe4708219fa4", "size": "3499...
from __future__ import absolute_import from os import path from celery import shared_task from celery import group from celery import chain from tarfile import open as tar_open from json import loads as json_loads from jsonschema import validate as json_validate from jsonschema import ValidationError as JsonValidation...
{ "content_hash": "2107c96f555d233f16d8c22bf35d9bb1", "timestamp": "", "source": "github", "line_count": 513, "max_line_length": 80, "avg_line_length": 38.32943469785575, "alnum_prop": 0.5502212276865178, "repo_name": "stefantsov/blackbox3", "id": "5141733ac3e1654f58215cdce52af758d987bdef", "size": ...
from embeddings.embedding import Embedding class ConcatEmbedding(Embedding): """ A concatenation of multiple embeddings """ def __init__(self, embeddings, default='none'): """ Args: embeddings: embeddings to concatenate. default: how to embed words that are ou...
{ "content_hash": "cf463db7cbda10e7b9f6275d0798231b", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 143, "avg_line_length": 30.482758620689655, "alnum_prop": 0.5871040723981901, "repo_name": "vzhong/embeddings", "id": "edcc081f94d20e80a119ebbb2cf55d6e70473d68", "size": "8...
import sys from os import path def run(verbosity=1,doctest=False): """Run NetworkX tests. Parameters ---------- verbosity: integer, optional Level of detail in test reports. Higher numbers provide more detail. doctest: bool, optional True to run doctests in code modules """ ...
{ "content_hash": "918ba2af5065e325e6a1615e2da7ea5f", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 78, "avg_line_length": 24.205882352941178, "alnum_prop": 0.5978128797083839, "repo_name": "rainest/dance-partner-matching", "id": "5e0565a814912ed796d5c3717ea6020a1fc599b1", ...
class NDLIBError (Exception): """General Errors""" def __init__ (self, value): self.value = value def __str__ (self): return repr(self.value)
{ "content_hash": "67f9f16ad4973b87cf7b88e89ff0f99a", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 29, "avg_line_length": 19.75, "alnum_prop": 0.6075949367088608, "repo_name": "openconnectome/ocplib", "id": "b8b785d9d0a426c93a9981bdd8d2d708a763bbc6", "size": "754", "bin...
from astropy.coordinates.baseframe import frame_transform_graph from astropy.coordinates.matrix_utilities import matrix_transpose, rotation_matrix from astropy.coordinates.transformations import DynamicMatrixTransform from .fk4 import FK4NoETerms from .fk5 import FK5 from .galactic import Galactic from .utils import E...
{ "content_hash": "a281ac5e74f28fd6d33e7f02935b6b30", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 82, "avg_line_length": 39.80487804878049, "alnum_prop": 0.7346813725490197, "repo_name": "larrybradley/astropy", "id": "a9d4fb44e7fcabd9e6f5f002ec66173e21327741", "size": "...
from latinol import *
{ "content_hash": "1a96075c6f4d9f9c851dc8cbc697d0c4", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 21, "avg_line_length": 22, "alnum_prop": 0.7727272727272727, "repo_name": "hso/latinol.py", "id": "215af86d064ba0a8f47794f2a55844036109aa59", "size": "22", "binary": false...
""" This module is the test suite of the update CLI option for bowl. Created on 27 July 2014 @author: Charlie Lewis """ from bowl.cli_opts import update class TestClass: """ This class is responsible for all tests in the update CLI option. """ def test_cli_opts_update(self): assert 1
{ "content_hash": "de15efe8721963868b80a7d0f92a6496", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 69, "avg_line_length": 20.8, "alnum_prop": 0.6826923076923077, "repo_name": "cglewis/bowl", "id": "c5759230fd4e1f01b1bd243aa56a37dde85c9a65", "size": "312", "binary": fal...
from __future__ import print_function import flask import os import threading import time import webbrowser from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop _basedir = os.path.join("..", os.path.dirname(__file__)) app = flask.Flask(__name__, static...
{ "content_hash": "213acc707d104c4a1949b3e31ab26953", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 81, "avg_line_length": 23.32, "alnum_prop": 0.6718124642652945, "repo_name": "phobson/bokeh", "id": "4c7cae008a699a9c4ad63905c2f04b1dc669f4c8", "size": "1749", "binary": ...
from unittest.mock import patch, MagicMock from django.core.urlresolvers import reverse from django.test import RequestFactory from test_plus.test import TestCase from ..models import ( Minion, MinionData ) from ..views import( MinionCreateView, MinionDetailView ) class TestMinionCreateView(TestCase)...
{ "content_hash": "58dabf117a55bcbdc7c6d8d59708779b", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 75, "avg_line_length": 28.976744186046513, "alnum_prop": 0.6653290529695024, "repo_name": "Farforr/overlord", "id": "7211d3623d9e2700a60f1a403b3786f8eb810e82", "size": "124...
from lxml import html from base_test import BaseTest from web import model class UsersTestCase(BaseTest): """ Contains tests for the users blueprint """ def _user_add(self, init_user_email): rv = self.app.post('/admin/users/add/', data={ "name": "Johnny Test", "email":...
{ "content_hash": "e1c278f2e8901514363b31d28fe2039c", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 87, "avg_line_length": 35.710144927536234, "alnum_prop": 0.5722402597402597, "repo_name": "snobbs/code_court", "id": "afc4f19905ecb16e5b914f61818b1273bef781c9", "size": "24...
from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('lobpcg',parent_package,top_path) config.add_data_dir('tests') return config if __name__ == '__main__': ...
{ "content_hash": "b40ad665db6e0f8bd2a0944d7cbfcc33", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 64, "avg_line_length": 29.214285714285715, "alnum_prop": 0.7041564792176039, "repo_name": "ryfeus/lambda-packs", "id": "5015d3252bdd86c37a2e4a27c26d134ff7b09ec3", "size": "...
""" Compile YOLO-V2 in DarkNet Models ================================= **Author**: `Siju Samuel <https://siju-samuel.github.io/>`_ This article is an introductory tutorial to deploy darknet models with NNVM. All the required models and libraries will be downloaded from the internet by the script. This script runs the...
{ "content_hash": "d3b9fb3b40bd5073561a0443de95f295", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 95, "avg_line_length": 32.13986013986014, "alnum_prop": 0.6372932985204526, "repo_name": "mlperf/training_results_v0.6", "id": "87ab60fc28504256cb78f8f91e51dd730917c960", ...
from openprocurement_client.client import Client, EDRClient from openprocurement_client.dasu_client import DasuClient from openprocurement_client.document_service_client \ import DocumentServiceClient from openprocurement_client.plan import PlansClient from openprocurement_client.contract import ContractingClient f...
{ "content_hash": "0b62c5b8a7caa5a541915f900d6bb06f", "timestamp": "", "source": "github", "line_count": 174, "max_line_length": 126, "avg_line_length": 38.47701149425287, "alnum_prop": 0.6442120985810306, "repo_name": "kosaniak/robot_tests", "id": "8aa3cbcdc7d88dc3da28d59130ca5a5b07e1f007", "size":...
print "|--------------------------------------------|" print "| Starting Tutorial 1 |" print "|--------------------------------------------|" print 'media path = ' + scene.getMediaPath() print 'num of pawns in the scene = ' + str(scene.getNumPawns()) print 'num of characters in the scene = ' ...
{ "content_hash": "78c89cb37d59b9f609face39b31aa006", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 73, "avg_line_length": 35.9, "alnum_prop": 0.44846796657381616, "repo_name": "gsi-upm/SmartSim", "id": "a44ce6ed33e51303dce397008966c28f70bba8d4", "size": "359", "binary"...
from django import template register = template.Library() def tablecols(data, cols): rows = [] row = [] index = 0 for user in data: row.append(user) index = index + 1 if index % cols == 0: rows.append(row) row = [] # Still stuff missing? if len(ro...
{ "content_hash": "e2018152fc95b03756a6c465a3e0a4e0", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 35, "avg_line_length": 22.444444444444443, "alnum_prop": 0.556930693069307, "repo_name": "theiviaxx/Frog", "id": "e142f523c31e0bc4274c81673f026e4c7190230f", "size": "1699",...
""" Example of the CEFBrowser widget embedded in a UI with tabs and controls, as known from Chrome on Windows, Mac OS X or Linux. """ import functools import os from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.factory import Factory from kivy.garden.cefpython import...
{ "content_hash": "f0536348b46d60298a3ff48a0a1b899d", "timestamp": "", "source": "github", "line_count": 226, "max_line_length": 224, "avg_line_length": 45.36725663716814, "alnum_prop": 0.6129913196137716, "repo_name": "jegger/garden.cefpython", "id": "ed7b276c054d4e5205f746242cef488ee8ba2ecd", "siz...
from django.db.models import Model from django.db.models import ForeignKey from django.db.models import BooleanField from django.db.models import CharField from django.db.models import TextField from django.db.models import DateField from django.db.models import DateTimeField from django.db.models import URLField from ...
{ "content_hash": "0bf6a13de74e45fe215698644d5c6c09", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 80, "avg_line_length": 30.328358208955223, "alnum_prop": 0.6776574803149606, "repo_name": "F483/bikesurf.org", "id": "9d320155a56f4cb14f27c67b5b535b0a393fbbcd", "size": "21...
from concurrent.futures import ThreadPoolExecutor import grpc from qrl.core import logger from qrl.core.qrlnode import QRLNode from qrl.generated.qrl_pb2_grpc import add_P2PNodeServicer_to_server, add_PublicAPIServicer_to_server from qrl.generated.qrlbase_pb2_grpc import add_BaseServicer_to_server from qrl.services.A...
{ "content_hash": "c7e17d7650c41f62ce3e4ddcc53023c8", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 101, "avg_line_length": 33.8, "alnum_prop": 0.7846153846153846, "repo_name": "elliottdehn/QRL", "id": "9beca33290bc0f8c1cae4097d61ab20b647ccde3", "size": "998", "binary":...
import logging import os import django try: import honeypot except ImportError: honeypot = None BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'iamasecretkeydonttellanyone' ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'djang...
{ "content_hash": "767c8c24e72876a8853e79b988b51951", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 64, "avg_line_length": 22.633333333333333, "alnum_prop": 0.7106038291605302, "repo_name": "maxicecilia/django_site_news", "id": "641d9dc1b302c8fa5e9c10d885bba376a6b4993f", ...
import collections class OrderedSet(collections.MutableSet): def __init__(self, iterable=None): self.end = end = [] end += [None, end, end] # sentinel node for doubly linked list self.map = {} # key --> [key, prev, next] if iterable is not None: ...
{ "content_hash": "2d0775ec74c6eb73805e726c2380b943", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 78, "avg_line_length": 26.535211267605632, "alnum_prop": 0.48089171974522293, "repo_name": "hanw/p4-hlir", "id": "b34e7c46e140966dcbe7b332b8fc7683de8c3cf2", "size": "2559",...
from string import Template from datetime import date bitcoinDir = "./"; inFile = bitcoinDir+"/share/qt/Info.plist" outFile = "Evcoin-Qt.app/Contents/Info.plist" version = "unknown"; fileForGrabbingVersion = bitcoinDir+"bitcoin-qt.pro" for line in open(fileForGrabbingVersion): lineArr = line.replace(" ", ...
{ "content_hash": "73bc72fd5a095bd8f3fad1b0877c2ba3", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 69, "avg_line_length": 27.166666666666668, "alnum_prop": 0.7085889570552147, "repo_name": "evcoin/evcoin", "id": "742abedae6832cb74cb68b4ae4bdba65086702fa", "size": "893", ...
"""The Laplace distribution class.""" # Dependency imports import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import identity as identity_bijector from tensorflow_probability.python.bijectors import softplus as softplus_bijector from tensorflow_probability.python.distrib...
{ "content_hash": "482d6cb5a99fedebeefe99d3eaa194f3", "timestamp": "", "source": "github", "line_count": 235, "max_line_length": 81, "avg_line_length": 36.04255319148936, "alnum_prop": 0.6606847697756789, "repo_name": "tensorflow/probability", "id": "8a8c0ee20da485cec8c3d81993a79b46358a308a", "size"...
from enum import Enum class JudgeResultStatus(Enum): ACCEPT = 1 WRONG_ANSWER = 2 PRESENTATION_ERROR = 2
{ "content_hash": "21e75ca201fdb9f2488eaac9f58b8482", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 30, "avg_line_length": 16.857142857142858, "alnum_prop": 0.6864406779661016, "repo_name": "AJudge-team/AJudge", "id": "359a1a007183b2ebfc1e9398acf482ba55e381e3", "size": "11...
#!/usr/bin/env python3 import os import sys import threading import traceback import queue from pathlib import Path from datetime import datetime import requests import yaml BASE_URL = os.getenv("UPSTREAM_URL", "https://api.github.com/repos/") WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR") WORKERS = int(os.getenv("...
{ "content_hash": "2f153319bae2d348cf337007c60ae32c", "timestamp": "", "source": "github", "line_count": 269, "max_line_length": 89, "avg_line_length": 32.57620817843866, "alnum_prop": 0.5404541823576401, "repo_name": "ustclug/ustcmirror-images", "id": "c8270b1a7cf239a6352cb9c4029ae42900f118b2", "si...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
{ "content_hash": "63560df2555bd502523e3abe5ab89e05", "timestamp": "", "source": "github", "line_count": 2340, "max_line_length": 114, "avg_line_length": 37.2982905982906, "alnum_prop": 0.6035312449872821, "repo_name": "iemejia/incubator-beam", "id": "1cdd273fb3c45147c4d9c212841651eb52979e3e", "size...
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, str_to_int, ) class AdobeTVIE(InfoExtractor): _VALID_URL = r'https?://tv\.adobe\.com/watch/[^/]+/(?P<id>[^/]+)' _TEST = { 'url': 'http://tv.adobe.com/watch/the...
{ "content_hash": "779804aabb88a0c728b28bb262143cbc", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 146, "avg_line_length": 35.34285714285714, "alnum_prop": 0.5440582053354891, "repo_name": "Electroscholars/P.E.E.R.S", "id": "28e07f8b04ed89fe7c79f445f3454adfb04d0561", "si...
import sys,os from operator import itemgetter from xml.etree.ElementTree import Element, SubElement, tostring def write_formatted_xml (tweets, file_name): output = file("tmp.xml",'w') output.write(tostring(create_dataset_xml(tweets))) output.close() os.system('xmllint --format ' + output.name + ' > ' +...
{ "content_hash": "7dc1ef25e8ceb48edc7e0b5341b93160", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 93, "avg_line_length": 33.870588235294115, "alnum_prop": 0.6710663424800278, "repo_name": "utcompling/Scalabha", "id": "a721dc0396626933d26698aae992d9b92e7bfc23", "size": "...
"""All minimum dependencies for scikit-learn.""" from collections import defaultdict import platform import argparse # scipy and cython should by in sync with pyproject.toml # NumPy version should match oldest-supported-numpy for the minimum supported # Python version. # see: https://github.com/scipy/oldest-supporte...
{ "content_hash": "6f16b9dc3e387a8cce86222dc26bd26e", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 86, "avg_line_length": 36.763888888888886, "alnum_prop": 0.6392142047601058, "repo_name": "manhhomienbienthuy/scikit-learn", "id": "64e7f9c8cf395b654989104912b3e11ffd5d5863",...
import os import sys import time import traceback from quixote.qwip import QWIP from quixote.publish import Publisher from vilya import views as controllers from vilya.config import DEVELOP_MODE from vilya.libs.gzipper import make_gzip_middleware from vilya.libs.permdir import get_tmpdir from vilya.libs.auth.check_aut...
{ "content_hash": "5f8bcd7f6050b94f42252db7c22ec26f", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 97, "avg_line_length": 34.91463414634146, "alnum_prop": 0.6475724764233322, "repo_name": "xantage/code", "id": "d1197d4f00f0a69352c56b8e754cc51050ae148c", "size": "2896", ...
import csv, os import SonicScrewdriver as utils import random selecteddates = dict() selected = list() selectedmeta = dict() def get_meta(): meta = dict() meta['aubirth'] = input('Authors year of birth? ') meta['augender'] = input ('Authors gender? ') meta['national origin'] = input('Authors nationali...
{ "content_hash": "1644c904687050aebdb12a43cdb79ba5", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 158, "avg_line_length": 28.732876712328768, "alnum_prop": 0.5744934445768772, "repo_name": "tedunderwood/GenreProject", "id": "92c613a8b46e4db3c8a0c7e309ab75ae67ae4c18", "...
from guardian.models import GroupObjectPermission from rest_framework import serializers as ser from api.base.exceptions import InvalidModelValueError from api.base.serializers import ( BaseAPISerializer, JSONAPISerializer, JSONAPIRelationshipSerializer, VersionedDateTimeField, HideIfDisabled, IDField, Li...
{ "content_hash": "ab472fedc879ef4cadbb32c94b81ba08", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 168, "avg_line_length": 38.710743801652896, "alnum_prop": 0.6263877028181042, "repo_name": "leb2dg/osf.io", "id": "108e04dda45c846fd1307a1527513c5cce74fba4", "size": "9368...
DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': 'haystack_tests.db', } } INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'haystack', 'core', ] ROOT_URLCONF = ...
{ "content_hash": "1e94a87c89350dd7047dc246f579d27e", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 39, "avg_line_length": 19.333333333333332, "alnum_prop": 0.6083743842364532, "repo_name": "calvinchengx/django-haystack", "id": "3283e11392190058c5aa238ddd62c3b171645c53", ...
from __future__ import unicode_literals import re import tempfile from django.contrib.gis import gdal from django.contrib.gis.geos import HAS_GEOS from django.core.management import call_command from django.db import connection from django.test import TestCase, ignore_warnings, skipUnlessDBFeature from django.utils i...
{ "content_hash": "825f52ada2df08a8ec9293840c97d5d5", "timestamp": "", "source": "github", "line_count": 925, "max_line_length": 117, "avg_line_length": 45.63567567567568, "alnum_prop": 0.6126548693530429, "repo_name": "liangazhou/django-rdp", "id": "3472ed094c3df0173c2daf2b0f40750a4f2d0ce6", "size"...
import abc from typing import Awaitable, Callable, Optional, Sequence, Union import pkg_resources import google.auth # type: ignore import google.api_core # type: ignore from google.api_core import exceptions as core_exceptions # type: ignore from google.api_core import gapic_v1 # type: ignore from google.api_core...
{ "content_hash": "660dc9e1c3f202ea0080b4fa2dff3694", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 101, "avg_line_length": 38.20863309352518, "alnum_prop": 0.6207870457540953, "repo_name": "googleads/google-ads-python", "id": "9f9d87ffc8ce7d932a27f748ee954c1f06ee138c", ...
from .euctwfreq import (EUCTW_CHAR_TO_FREQ_ORDER, EUCTW_TABLE_SIZE, EUCTW_TYPICAL_DISTRIBUTION_RATIO) from .euckrfreq import (EUCKR_CHAR_TO_FREQ_ORDER, EUCKR_TABLE_SIZE, EUCKR_TYPICAL_DISTRIBUTION_RATIO) from .gb2312freq import (GB2312_CHAR_TO_FREQ_ORDER, GB2312_TABLE_SIZ...
{ "content_hash": "6f8f8ec27b6c68509109e3ac9b238947", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 85, "avg_line_length": 40.47826086956522, "alnum_prop": 0.6069936746628476, "repo_name": "webmedic/booker", "id": "d8e9e149cd707dddb3f74b078f8020e875f1d463", "size": "9560...
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.ya...
{ "content_hash": "e9fb1e3f82769c1f4fe44fa73c83b3e6", "timestamp": "", "source": "github", "line_count": 498, "max_line_length": 375, "avg_line_length": 39.45381526104418, "alnum_prop": 0.5765472312703583, "repo_name": "napalm-automation/napalm-yang", "id": "1245fa5d1972cb66af3be855f9ec95191883ae50", ...
"""api_server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
{ "content_hash": "8ba15f24b5db2aedfca3df786c778ccb", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 79, "avg_line_length": 37.55, "alnum_prop": 0.6937416777629827, "repo_name": "t103z/interview", "id": "635be2a32c667b4a8feacd2a688879255d0bfc15", "size": "751", "binary":...
"""The first hint for this problem is the title of the webpage: 'peak hell'. When pronounced, it sounds very similar to 'pickle', which is the builtin python object serialization package. When viewing the the source code of the webpage, there is a 'peakhell' tag that links to a pickle file. We'll download the file (pro...
{ "content_hash": "5469123157d0e4a8937d2f62564df161", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 79, "avg_line_length": 31.405405405405407, "alnum_prop": 0.7185886402753873, "repo_name": "cjonsmith/python-challenge", "id": "79f89b45a66430a01d6b259abf350bb78951ef16", "s...
from types import StringTypes import dateutil.parser import datetime import time #from vt_manager.communication.sfa.util.sfalogging import logger DATEFORMAT = "%Y-%m-%dT%H:%M:%SZ" def utcparse(input): """ Translate a string into a time using dateutil.parser.parse but make sure it's in UTC time and strip the time...
{ "content_hash": "0d60ab80dcb38181aa5becc264f72585", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 107, "avg_line_length": 33.18181818181818, "alnum_prop": 0.6917808219178082, "repo_name": "ict-felix/stack", "id": "5e852ae7d05aa875888fd93cd3e152e094a79de1", "size": "2686...
"""Run layout tests.""" import errno import logging import optparse import os import signal import sys from layout_package import json_results_generator from layout_package import printing from layout_package import test_runner from layout_package import test_runner2 from webkitpy.common.system import user from webk...
{ "content_hash": "ff80caff6b427e96d4de61dc52a9fbf9", "timestamp": "", "source": "github", "line_count": 419, "max_line_length": 112, "avg_line_length": 46.763723150358, "alnum_prop": 0.619118097376748, "repo_name": "Xperia-Nicki/android_platform_sony_nicki", "id": "e814008a1606c62241824e1c120138d7070...
import os, sys sys.path.append(os.getcwd()) import time import tflib as lib import tflib.save_images import tflib.mnist import tflib.cifar10 import tflib.plot import tflib.inception_score import numpy as np import torch import torchvision from torch import nn from torch import autograd from torch import optim # Do...
{ "content_hash": "99b0b2b07b87728c61b6d8850e923409", "timestamp": "", "source": "github", "line_count": 278, "max_line_length": 118, "avg_line_length": 34.010791366906474, "alnum_prop": 0.6009518773135907, "repo_name": "caogang/wgan-gp", "id": "cfb8f61c031628b85b3b32fdf01f7dca0022e38c", "size": "94...
what a morning
{ "content_hash": "4f983fcc18f60a3ecbfea080928927a5", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 14, "avg_line_length": 15, "alnum_prop": 0.8, "repo_name": "fanalieri/casimirprogramming", "id": "9e2aec9fbdfda65810e6dd808a5437821374234b", "size": "15", "binary": false,...
import ee import math from cmt.mapclient_qt import addToMap from cmt.util.miscUtilities import safe_get_info from cmt.modis.simple_modis_algorithms import * from modis_utilities import * ''' Contains algorithms and tools for using the built-in Earth Engine classifiers. ''' #=========================================...
{ "content_hash": "e600a5f2a01b96ae03b3e0a066aea8c3", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 134, "avg_line_length": 46.54761904761905, "alnum_prop": 0.5652173913043478, "repo_name": "asurunis/CrisisMappingToolkit", "id": "f11e94c350e974f12562527e1f91e7db00091d8d", ...
import os import tempfile import unittest from py4j.protocol import Py4JJavaError from pyspark.ml import Pipeline from pyspark.sql import types as t from mleap.pyspark.feature.string_map import StringMap from mleap.pyspark.spark_support import SimpleSparkSerializer from tests.pyspark.lib.assertions import assert_df f...
{ "content_hash": "50a1b49addb916e360f0ba2f19d3de4d", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 107, "avg_line_length": 36.46268656716418, "alnum_prop": 0.6318051575931232, "repo_name": "combust/mleap", "id": "e372ca50f1bbb91d278a5aa868f3b3246267b836", "size": "4886"...
u'''\ :mod:`ecoxipy.etree_output` - Building ElementTree Data ======================================================= :class:`ETreeOutput` creates :mod:`xml.etree.ElementTree` structures. .. _ecoxipy.etree_output.examples: Usage Example: >>> from xml.dom.minidom import getDOMImplementation >>> etree_output = ETre...
{ "content_hash": "23a0f69296b9f92efcd03c94bf7319c7", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 265, "avg_line_length": 32.86092715231788, "alnum_prop": 0.5525997581620314, "repo_name": "IvIePhisto/ECoXiPy", "id": "36751486d2554849442d7de96243a58bf0061884", "size": "...
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import Prefetch from django.db.models.query import get_prefetcher from django.test import TestCase, override_se...
{ "content_hash": "cce2f5c666b11d84ca6d180ab132c1a0", "timestamp": "", "source": "github", "line_count": 1322, "max_line_length": 119, "avg_line_length": 43.136913767019664, "alnum_prop": 0.5816718396549003, "repo_name": "karyon/django", "id": "5e64df2c707eee71ef2819ba2e81435da6f6d52b", "size": "570...
from a10sdk.common.A10BaseClass import A10BaseClass class ThalesSecworld(A10BaseClass): """Class Description:: export Thales security world files. Class thales-secworld supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :pa...
{ "content_hash": "291fa780a119b0956763abc26ba19f7a", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 220, "avg_line_length": 44.56521739130435, "alnum_prop": 0.64, "repo_name": "amwelch/a10sdk-python", "id": "4d69ffe7897cf1df951133e46cf04c6d1515b3c2", "size": "2050", "bi...
""" fabfile.py Fabric file for setting up a fully functional staging+production enviornment on heroku. 1. Creates a staging and a production app, adds all the necessary settings, and provisions a list of free addons. 2. Creates a pipeline from staging to production. 3. Creates a git repository and sets up remotes...
{ "content_hash": "3ec1640cd2cd1f0d5937b3289e3e6131", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 124, "avg_line_length": 39.12865497076023, "alnum_prop": 0.668958302196981, "repo_name": "collingreen/startuppong", "id": "3a988441d81642a8f5955a2dad2a6d32fa686c3a", "size...
import logging import logging.config import os from typing import List import click import yaml from blu.config import Config from commander import CommanderImpl, MockCommander from handbrakeCLI.handbrakeCLI_impl import HandbrakeCLI from identifier.identifier_impl import Identifier from makeMKV.makeMKV im...
{ "content_hash": "b72a40c6eb2d957338c3a8a6739e9ba0", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 94, "avg_line_length": 38.8343949044586, "alnum_prop": 0.5852058389371823, "repo_name": "coolman565/blu_two", "id": "d4ebc2afdfe03805f8dcf15557f6a75f5ba88955", "size": "60...
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('movie', '0002_auto_20161115_1957'), ] operations = [ migrations.RenameField( model_name='movie', ...
{ "content_hash": "6f65960dc83b69a310bcc4f1c86c5d93", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 89, "avg_line_length": 26.333333333333332, "alnum_prop": 0.569620253164557, "repo_name": "pyprism/Hiren-Movie", "id": "3922e9d97f428074ece65a505cb24aa8457c5fb8", "size": "8...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("ddcz", "0112_emaillist_autofill"), ] operations = [ migrations.RunSQL("ALTER TABLE `uzivatele_maillist` DROP PRIMARY KEY;"), migrations.RunSQL( "ALTER TABLE uzivatele_maillist M...
{ "content_hash": "f2d511ad642310a1ea0fe7a240a08307", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 106, "avg_line_length": 31.541666666666668, "alnum_prop": 0.5640686922060766, "repo_name": "dracidoupe/graveyard", "id": "5e614e133bb20669a71386c3a4f797a8b2c50118", "size":...
"""Enumerators for coordinate types""" # -*- coding: utf-8 -*- from dlkit.abstract_osid.osid.errors import NotFound CELESTIAL_COORDINATE_TYPES = { # Ecliptic Coordinate System # 'ECLIPTIC': 'Ecliptic', # Equatorial Coordinate System # 'EQUATORIAL': 'Equatorial', # Galactic Coordinate System # ...
{ "content_hash": "8e7b2abad016a7724432e605ccdbe24d", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 75, "avg_line_length": 29, "alnum_prop": 0.6588550385001674, "repo_name": "mitsei/dlkit", "id": "efd523fb9d06493c2a1a97e2e80d1ee9e491ec74", "size": "2987", "binary": fal...
from __future__ import unicode_literals from __future__ import absolute_import from functools import reduce import logging from docker.errors import APIError from .config import get_service_name_from_net, ConfigurationError from .const import DEFAULT_TIMEOUT, LABEL_PROJECT, LABEL_SERVICE, LABEL_ONE_OFF from .containe...
{ "content_hash": "fcfb774a62f35bced2a92b538129dfff", "timestamp": "", "source": "github", "line_count": 358, "max_line_length": 186, "avg_line_length": 34.70670391061452, "alnum_prop": 0.5621730382293763, "repo_name": "feelobot/compose", "id": "c5028492c408fa87ffc94fad1e2d9a0a0884ccab", "size": "12...
def WebIDLTest(parser, harness): threw = False try: results = parser.parse(""" interface VariadicConstraints1 { void foo(byte... arg1, byte arg2); }; """) except: threw = True harness.ok(threw, "Should have thrown.") threw = False ...
{ "content_hash": "81c29c95e24d82797fd289491682a530", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 57, "avg_line_length": 21.384615384615383, "alnum_prop": 0.5011990407673861, "repo_name": "wilebeast/FireFox-OS", "id": "9cba22c584254e527cef728bb80f7c2973b51772", "size": ...
"""Python wrappers for the Google Storage RESTful API.""" __all__ = ['ReadBuffer', 'StreamingBuffer', ] import collections import os import urlparse from . import api_utils from . import common from . import errors from . import rest_api try: from google.appengine.api import urlfetch fr...
{ "content_hash": "ba2201906bde5a32a5a0119a8af0894f", "timestamp": "", "source": "github", "line_count": 856, "max_line_length": 80, "avg_line_length": 29.690420560747665, "alnum_prop": 0.629549478654338, "repo_name": "gdgjodhpur/appengine-opencv-sudoku-python", "id": "9bfb2ee430cc7c68ab02b9fb8aa73a44...
"""Tests for the event object filter.""" import unittest from plaso.containers import events from plaso.filters import event_filter from plaso.lib import errors from tests.filters import test_lib class EventObjectFilterTest(test_lib.FilterTestCase): """Tests for the event object filter.""" def testCompilerFil...
{ "content_hash": "d66034d3d25fa60116223c73269c3117", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 77, "avg_line_length": 29.87323943661972, "alnum_prop": 0.7006129184347006, "repo_name": "joachimmetz/plaso", "id": "e78d96d397f7b7dc0f618cddc73628b5f656be2e", "size": "216...
from test.test_support import verbose, TestSkipped import locale import sys if sys.platform == 'darwin': raise TestSkipped("Locale support on MacOSX is minimal and cannot be tested") oldlocale = locale.setlocale(locale.LC_NUMERIC) if sys.platform.startswith("win"): tlocs = ("en",) else: tlocs = ("en_US.UT...
{ "content_hash": "82f11ca81d68a6a292a7a2852246c849", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 81, "avg_line_length": 38.721739130434784, "alnum_prop": 0.5838760386256456, "repo_name": "MalloyPower/parsing-python", "id": "9e264b9c4ee4389bc4c7dd08311d99c9c19167b9", "...
"""gRPC's Python API.""" import abc import enum import sys import six from grpc._cython import cygrpc as _cygrpc ############################## Future Interface ############################### class FutureTimeoutError(Exception): """Indicates that a method call on a Future timed out.""" class FutureCancell...
{ "content_hash": "a63aea6bdd2246be6aacee28adb02666", "timestamp": "", "source": "github", "line_count": 1354, "max_line_length": 81, "avg_line_length": 35.57016248153619, "alnum_prop": 0.6722519828910759, "repo_name": "kriswuollett/grpc", "id": "5426b47c76185f75774e6006ae5125b1c08fd708", "size": "4...
def is_string(value): return isinstance(value, str)
{ "content_hash": "b4fd34576493a120f86af2d1daaee60c", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 33, "avg_line_length": 28, "alnum_prop": 0.7142857142857143, "repo_name": "cloud4rpi/cloud4rpi", "id": "fcc80d5ba781da8c53aa7a243f30a285090f5d37", "size": "56", "binary": ...
from __future__ import absolute_import import mock from opentracing.span import Span class ScopeCompatibilityCheckMixin(object): """ A mixin class for validation that a given scope manager implementation satisfies the requirements of the OpenTracing API. """ def scope_manager(self): rai...
{ "content_hash": "573474bea432950292f1f783dc45577c", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 76, "avg_line_length": 32.5531914893617, "alnum_prop": 0.6008714596949891, "repo_name": "cloudera/hue", "id": "b70df4893c47eafad69823154f262303bed75d94", "size": "5688", ...
from __future__ import print_function import telnetlib import threading import sys INFORM = '\033[94m' OKGREEN = '\033[92m' REQUEST = '\033[93m' RESPONSE = '\033[91m' INPUT = '\033[0m' class ReadThread(threading.Thread): def __init__(self, name, telnet_session): self.keep_reading = True self.tel...
{ "content_hash": "c0525dae94712d2c7d3a5c17dcea8a1a", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 79, "avg_line_length": 28.181102362204726, "alnum_prop": 0.5043308186644314, "repo_name": "martinslabber/katcp_utils", "id": "dbd7eae9c4903467773424affa48879c5bdf5a34", "s...
"""Tests for create_python_api.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import imp import sys from tensorflow.python.platform import test from tensorflow.python.tools.api.generator import create_python_api from tensorflow.python.util.tf_export i...
{ "content_hash": "e9ce778f00e7698cceb42c1e26622fa9", "timestamp": "", "source": "github", "line_count": 150, "max_line_length": 80, "avg_line_length": 34.00666666666667, "alnum_prop": 0.609684375612625, "repo_name": "adit-chandra/tensorflow", "id": "010f189dcb27f0e1f6276071ca5b1724fa6d12c0", "size"...
import sys, os, re # 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.append(os.path.abspath('.')) # -- General configura...
{ "content_hash": "9ab62c17389014f7ee8cc22f3ddcb0f8", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 80, "avg_line_length": 33.02843601895734, "alnum_prop": 0.6985220261156551, "repo_name": "yingerj/rdflib", "id": "814e1f54dc749c7243a2732823215a2663b24b36", "size": "7386"...
def extractBakaDogeza(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if 'chapter' in item['title'].lower() and (vol or chp): return buildReleaseMessageWithType(item, 'Knights & Magic', vol, chp, frag=frag, postfix=postfix) return False
{ "content_hash": "5d55a2272e285495304f2b35125203dc", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 99, "avg_line_length": 35.75, "alnum_prop": 0.7202797202797203, "repo_name": "fake-name/ReadableWebProxy", "id": "7402b8fc84282e732e497c60a67327b2b06a06be", "size": "286", ...
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', # Or path to database file if...
{ "content_hash": "ce2b2443fc2af07c7efe980547be1496", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 101, "avg_line_length": 34.86274509803921, "alnum_prop": 0.6803524559430071, "repo_name": "fwpz/WeiPython", "id": "2a48b19cf283c2afa390437799d21fa244159de4", "size": "5373...
""" Created on Fri Feb 19 16:55:54 2016 @author: Administrator """ import pandas as pd import pandas.io.sql as pd_sql import sqlite3 as sql df_file = pd.read_csv('CS_table_No2_No4_new.csv',delimiter=";", skip_blank_lines = True, error_bad_lines=False,encoding='utf8') df_file = df_file.drop(['STUDEN...
{ "content_hash": "32140a0c3f49d87f907356ef0dfa9216", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 122, "avg_line_length": 34, "alnum_prop": 0.6246498599439776, "repo_name": "wasit7/book_pae", "id": "31bcabdaf65c4400e5ae950f859c294a82e9dcdf", "size": "738", "binary": f...