text
stringlengths
4
1.02M
meta
dict
from setuptools import setup setup(name='vse', version='0.1.5', author='Marcin K. Paszkiewicz', author_email='[email protected]', description='A visual search engine using local features descriptors and bag of words, based on OpenCV', url='https://github.com/mkpaszkiewicz/vse', ...
{ "content_hash": "77a51d4208448e25bfa2c23a67ec43d6", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 110, "avg_line_length": 36.733333333333334, "alnum_prop": 0.6569872958257713, "repo_name": "mkpaszkiewicz/vse", "id": "3b905aae1ac140a07cd4f38590bfc82fd583aa37", "size": "5...
import types import logging import io # Deprecated, remove, everything is parsed in app.py from pywps import namespaces # indicates, if xsd-based validation of the request should return VALIDATE = False class Request: """ Base request class """ version = None request = None service = "wps" r...
{ "content_hash": "3d089d487a9890b04aae6216a683bbd6", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 78, "avg_line_length": 28.04225352112676, "alnum_prop": 0.6180311401305877, "repo_name": "doclements/pywps-4", "id": "72fe58cad9b639557c166a1b516898bec8c1a143", "size": "3...
""" Module handles tasks in the to-do list """ class TodoTask: """ Class represents a task in the to-do list """ TASK_DONE = 'done' TASK_UNDONE = 'todo' def __init__(self, description, position=None, completionStatus=TASK_UNDONE): """ Initialize a to-do list task item ...
{ "content_hash": "49e27b00c5092a9d94eadc6dd6f9ec64", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 81, "avg_line_length": 19.766666666666666, "alnum_prop": 0.5902192242833052, "repo_name": "mes32/mfnd", "id": "4580ea0b3a66718a8dd2cea4b84f060f1eb51c9a", "size": "616", "...
import docker from kippo.core.config import config server_uri=config().get('docker', 'uri') docker_version=config().get('docker','version') docker_name=config().get('docker','image_name') def start_container(): c = docker.Client(base_url=server_uri, version=docker_version) docker_id=str(c.create_container(im...
{ "content_hash": "57000f01f67238c0d4ff640b94e68a9d", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 66, "avg_line_length": 27.31578947368421, "alnum_prop": 0.7071290944123314, "repo_name": "coolhacks/docker-hacks", "id": "8564193cc367b06c2c965475d46cc36e509f701a", "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": "07c5f079c5971d820807e30408e26183", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 72, "avg_line_length": 32.66197183098591, "alnum_prop": 0.6938335489435101, "repo_name": "charlesporter/incubator-metron", "id": "bfae19a2fba8e8f4005e0e9dd9a2a157bedfeb54", ...
""" EntryInstances -------------- Every instance referenced in an xpath expression needs to be added to the relevant entry, so that CommCare knows what data to load when. This includes case list calculations, form display conditions, etc. HQ knows about a particular set of instances (locations, reports, etc.). There...
{ "content_hash": "fa990e57711403ce75ea748f3934e9c9", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 115, "avg_line_length": 38.60847880299252, "alnum_prop": 0.654502002325281, "repo_name": "dimagi/commcare-hq", "id": "975fb0808354deb94e3c5134afe9fe9413967ed4", "size": "1...
import contextlib import functools import os from logging import getLogger from time import time import aspectlib import pytest import hunter from hunter.actions import RETURN_VALUE from hunter.actions import ColorStreamAction try: from cStringIO import StringIO except ImportError: from io import StringIO l...
{ "content_hash": "a08434eadb2d8be915463fa3b4e19875", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 112, "avg_line_length": 35.06417112299465, "alnum_prop": 0.5621473234710996, "repo_name": "ionelmc/python-hunter", "id": "a482af4225a445d7f88f14f006d61f6b43931ab0", "size"...
import os import pytest import stat import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # Define fixture for dynamic ansible role variables. # @see https://github.com/philpep/testinfra/issues/345#issuecomme...
{ "content_hash": "3d4bdc1e84974f87d92e88175eb2178a", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 77, "avg_line_length": 28.9010989010989, "alnum_prop": 0.6064638783269962, "repo_name": "kentr/drupal-vm", "id": "d1011692f191f9838aad8cf04619f703622f08a4", "size": "2630",...
""" Character BLueprint task """ from sqlalchemy.exc import SQLAlchemyError from lazyblacksmith.extension.esipy import esiclient from lazyblacksmith.extension.esipy.operations import get_characters_blueprints from lazyblacksmith.models import Blueprint, TokenScope, User, db from lazyblacksmith.utils.models import (ge...
{ "content_hash": "6c38b3a04e58b5bc3662656cc74b3146", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 79, "avg_line_length": 30.514705882352942, "alnum_prop": 0.5614457831325301, "repo_name": "Kyria/LazyBlacksmith", "id": "c4692362e7ca85ee5d925af4f8b23c5e9a510f93", "size":...
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1Ev...
{ "content_hash": "9d58d9da82f0390505ddae8a8c985a71", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 281, "avg_line_length": 30.927884615384617, "alnum_prop": 0.5970775687859474, "repo_name": "mbohlool/client-python", "id": "b774b495607addfb8cb542d32af32ec3a08c795d", "siz...
from __future__ import absolute_import from __future__ import division import _init_paths from model.config import cfg from datasets.factory import get_imdb from model.test import test_net import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="1" os.environ['TF_CPP_MIN_LOG_LEVEL']...
{ "content_hash": "731907cd5cc79ab297e6c47556ab525f", "timestamp": "", "source": "github", "line_count": 333, "max_line_length": 132, "avg_line_length": 44.351351351351354, "alnum_prop": 0.5219039880831471, "repo_name": "shuang1330/tf-faster-rcnn", "id": "7088edd7aa5a8beaf80255c8d5565b6b2f54f180", "...
from msrest.serialization import Model class RequestStatistics(Model): """RequestStatistics. :param documents_count: Number of documents submitted in the request. :type documents_count: int :param valid_documents_count: Number of valid documents. This excludes empty, over-size limit or non-suppo...
{ "content_hash": "e98d9f58962c84e30a22c75b01f604b2", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 87, "avg_line_length": 46.03225806451613, "alnum_prop": 0.6867554309740714, "repo_name": "Azure/azure-sdk-for-python", "id": "b8cc26575238da2d78af2980347da8680a9d1c94", "si...
import MySQLdb db = MySQLdb.connect(user="beeruser", db="beerdb") c = db.cursor() id = 1 #c.execute("""SELECT Value from Temperature where ID = %s""", (id,)) c.execute("""SELECT Value from Temperature""") print c.fetchall()
{ "content_hash": "a575abeac3db6d6e293cfc6f7ed99b51", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 68, "avg_line_length": 19.083333333333332, "alnum_prop": 0.6681222707423581, "repo_name": "Wollert/beer", "id": "a3f43a3e7424a6ce70624ff89e2091f372ab22b7", "size": "229", ...
import copy import mock import netaddr from webob import exc from nova.api.openstack.compute import hypervisors \ as hypervisors_v21 from nova.cells import utils as cells_utils from nova import exception from nova import objects from nova import test from nova.tests.unit.api.openstack import fakes from nova.te...
{ "content_hash": "b40e13939b3a7a89b710bd39b9527e97", "timestamp": "", "source": "github", "line_count": 498, "max_line_length": 79, "avg_line_length": 38.29317269076305, "alnum_prop": 0.5581541688515994, "repo_name": "bigswitch/nova", "id": "6be2584574f955bbf0114509f8d731a419e7f510", "size": "19710...
from setuptools import setup setup( name='Overtime-Calculator', version='0.1', description='Python application to help calculate work overtime surplus/deficit.', author='Christian Chavez', author_email='[email protected]', # url='https://www.non-existing.com', setup_requires=['pytest-runner...
{ "content_hash": "93fefa0cc4bff3145dfa05ed99f71d2b", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 86, "avg_line_length": 30.153846153846153, "alnum_prop": 0.6785714285714286, "repo_name": "x10an14/overtime-calculator", "id": "8e23b9b0036bb9ad7acd81c50dba87f2ab1864c6", "...
"""Iteratively build Rule objects from RuleData objects.""" __all__ = [ 'build_rules', ] import itertools import iga.context import iga.filetype from iga.core import KeyedSets from iga.core import group from iga.label import Label from iga.rule import Rule def build_rules(package, rule_datas, *...
{ "content_hash": "53c8e95bd9bc28f211c65a4a89638ef3", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 76, "avg_line_length": 33.98863636363637, "alnum_prop": 0.6128385155466399, "repo_name": "clchiou/iga", "id": "848ffb6ee219d43371d76b5b0f7451fe6f87117f", "size": "2991", ...
from JumpScale import j from .GridFactory import GridFactory j.base.loader.makeAvailable(j, 'core') j.core.grid = GridFactory()
{ "content_hash": "814b1430b9b996f56dd66b522245ebe0", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 38, "avg_line_length": 32, "alnum_prop": 0.7890625, "repo_name": "Jumpscale/jumpscale6_core", "id": "31ed2ade20af9027231470a15b7ddadc32efc750", "size": "128", "binary": fa...
from random import choice import sys def generateModel(text, order): model = {} for i in range(0, len(text) - order): fragment = text[i:i+order] next_letter = text[i+order] if fragment not in model: model[fragment] = {} if next_letter not in model[fragment]: model[fragment][next_letter] = 1 else: ...
{ "content_hash": "a8660b348a0966340767ab444af95e34", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 57, "avg_line_length": 26.54054054054054, "alnum_prop": 0.6995926680244399, "repo_name": "HiroIshikawa/21playground", "id": "793b6d10efb3ba9f685454cc41e2613340e90c0d", "siz...
from __future__ import print_function import numpy as np from . import Writer import pyspeckit import warnings fitscheck = True try: import astropy.io.fits as pyfits except ImportError: import pyfits except ImportError: fitscheck = False class write_fits(Writer): def write_data(self, filename=None, ne...
{ "content_hash": "30e7d6e0e37c71d89c69ef1dcb77c707", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 118, "avg_line_length": 39.54216867469879, "alnum_prop": 0.5274223034734917, "repo_name": "bsipocz/pyspeckit", "id": "5fb970699ed2337f933905f1b2c5adfab35ccb68", "size": "32...
import os, sys import numpy as np import cPickle from fnmatch import fnmatch import glob, os filename = '/home/michalis/Documents/sequence-learning/data/user_1/session_3/robot_1' def getUsers(root): user_id = [] for f in os.listdir(root): user_id.append(f.split('/')[-1].split('_')[-1]) return us...
{ "content_hash": "2c9bc59a4fdecb936f253197db53c454", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 120, "avg_line_length": 34.07377049180328, "alnum_prop": 0.4943468847726726, "repo_name": "MikeMpapa/EEG-Sequence-Learning", "id": "61c84aa107a15b653a2682cd05ac618ea068dfbf"...
"""@package test_op @author: Zosia Sobocinska @date Nov 1, 2014 """ import unittest from richtext import op class OpLengthTest(unittest.TestCase): def test_delete(self): self.assertEqual(op.length({'delete': 5}), 5) def test_retain(self): self.assertEqual(op.length({'retain': 2}), 2) de...
{ "content_hash": "605ea0b978240cb4559070c0067d45d9", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 58, "avg_line_length": 22.73076923076923, "alnum_prop": 0.6209813874788495, "repo_name": "zosiakropka/rich-text-py", "id": "8f4b9d6c89efd5f0c4bd855dfa2e2ee84ca2d4d6", "size...
from setuptools import setup, find_packages import os import phillydata CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent',...
{ "content_hash": "50461596ca6ea1b96e9b76d427128973", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 88, "avg_line_length": 30.307692307692307, "alnum_prop": 0.6387478849407784, "repo_name": "ebrelsford/django-phillydata", "id": "93cc64f2f3bf0b3c13412b4973a9969d924c5a40", ...
from __future__ import print_function import Pyro4.naming # A bank client. class client(object): def __init__(self, name): self.name = name def doBusiness(self, bank): print("\n*** %s is doing business with %s:" % (self.name, bank.name())) print("Creating account") try: ...
{ "content_hash": "977ae4d5f0f919bb060b96f164b1649d", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 79, "avg_line_length": 30.32051282051282, "alnum_prop": 0.5987315010570825, "repo_name": "irmen/Pyro4", "id": "92ade28a2bbd128d76623e78e4d7f953e8a8b50b", "size": "2535", ...
from __future__ import unicode_literals import re from netmiko.ssh_connection import BaseSSHConnection class JuniperSSH(BaseSSHConnection): """Implement methods for interacting with Juniper Networks devices. Subclass of SSHConnection. Disables `enable()` and `check_enable_mode()` methods. Overrides se...
{ "content_hash": "474cf55fa50573d88e7ee16f28fba7bc", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 98, "avg_line_length": 32.578947368421055, "alnum_prop": 0.6000718003949022, "repo_name": "mzbenami/netmiko", "id": "0cfa1db4d2f7ebd15d548adf692351950424d7eb", "size": "55...
import urllib.parse from random import randint from app.models import db, Joke from app.bot.constants import * from app.bot.reply_generator import ReplyGenerator from app.bot.rule import Rule, transition STATE_NEW = 'new' STATE_COLD_JOKE = 'STATE_COLD_JOKE' class ColdJokeIntentionRule(Rule): @transition(STATE_N...
{ "content_hash": "9824724df24213452b7c7ccc97ba315f", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 72, "avg_line_length": 29.952380952380953, "alnum_prop": 0.6931637519872814, "repo_name": "tmt514/mtsa-dishes-translator", "id": "437143b6e79bee0190df3c2eccf89759bcbe7858", ...
import numpy.testing as npt import sys import os import pkg_resources from pymatbridge import messenger ROOT = __file__ CONFIG = os.path.realpath(os.path.join(ROOT, '../../../../config.ini')) print(CONFIG) BIN = messenger.get_matlab_bin(config=CONFIG) def test_config(): npt.assert_equal(os.path.isfile(CONFIG)...
{ "content_hash": "49fb76020a6113366991599ad4f08110", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 82, "avg_line_length": 30.454545454545453, "alnum_prop": 0.672636815920398, "repo_name": "jjangsangy/python-matlab-bridge", "id": "e957735e9edcdccf177db8dc6a12172f538167bb", ...
import ninjag from ninjag.tk.ioTK import read_all def test(): f_input = "input/in5.yaml" f_answer = "output/out5.ninja" f_solution = "solution/sol5.ninja" ninjag.main(f_answer, [f_input]) answer = read_all(f_answer) solution = read_all(f_solution) assert answer == solution
{ "content_hash": "24b8f32819b289cdcfb8c21549d342ee", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 38, "avg_line_length": 25.333333333333332, "alnum_prop": 0.6611842105263158, "repo_name": "yuhangwang/ninjag-python", "id": "2c5309ce61bfb9cf7d40253926a1a9361e9c5577", "siz...
from geoportal.templatetags import geoportal_tags
{ "content_hash": "44d57cfba714a4a22d2454a08bfcc406", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 49, "avg_line_length": 50, "alnum_prop": 0.88, "repo_name": "brutasse/django-geoportail", "id": "3d284fb223369f197311d5915c5587f951440eb0", "size": "50", "binary": false, ...
""" model.py Copyright (c) 2010 En-Ran Zhou, Liang-Heng Chen 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, mer...
{ "content_hash": "1a45ad43a2cd15d107db6ca74984c4ba", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 77, "avg_line_length": 31.73972602739726, "alnum_prop": 0.7138541217091066, "repo_name": "zhouer/sagenote", "id": "dbe1b6e5419b4932cd58b1387d893d070e0f1177", "size": "2357"...
__author__ = 'AVIRAM' #sys.path.insert(0, 'lib') #we need this line in order to make libraries imported from lib folder work properly import requests #Used for http requests import symbol symbol2=["SP","NSDQ","DAX","GOLD","C.OIL"] priceForIndex=[50,20,25,500,100] def calculatingRisk(symbolInput,enterPri,s...
{ "content_hash": "5ce08d40a761a20a0606b08acd2a9db8", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 112, "avg_line_length": 29.925925925925927, "alnum_prop": 0.6608910891089109, "repo_name": "yaakov300/ForexApp", "id": "269302360b68e09c4659e6fdde085640a02a36e8", "size": "...
import datetime import factory import factory.fuzzy from pytz import UTC from ...contract_mgt.tests.factories import SupportContractFactory class CostCenterFactory(factory.django.DjangoModelFactory): # total_invoice_amount # total_accrual_amount support_contract = factory.SubFactory(SupportContractFac...
{ "content_hash": "3666ccd6d53c68110a6650796e645038", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 89, "avg_line_length": 29.358974358974358, "alnum_prop": 0.7109170305676856, "repo_name": "mpdevilleres/tbpc_app", "id": "2ae20e4272df41b3ceab90e97dba62a9993d3612", "size":...
import os import socket import random import time import shutil from celery import Celery import subprocess from vpp import log from vpp.config import CONF from vpp.storage.api import get_storage_api minion = Celery( backend=CONF.celery_backend_url, broker=CONF.celery_broker_url, ) minion.conf.task_acks_lat...
{ "content_hash": "15f3588f24b4d26e7d85c03282a6efd7", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 78, "avg_line_length": 31.62962962962963, "alnum_prop": 0.5930913348946136, "repo_name": "ArthurChiao/videoplusplus", "id": "f3c0d10fbda56a47944bf0adf553e93c80d2897b", "si...
def poly_to_line_layer(ds, poly_name, line_name): """Creates a line layer from a polygon layer.""" # Delete the line layer if it exists. if ds.GetLayer(line_name): ds.DeleteLayer(line_name) # Get the polygon layer and its spatial reference. poly_lyr = ds.GetLayer(poly_name) sr = poly_ly...
{ "content_hash": "ac1cdaaf49c7910488c39ba0eca0f6ea", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 63, "avg_line_length": 36.53658536585366, "alnum_prop": 0.6328437917222964, "repo_name": "cgarrard/osgeopy-code", "id": "1a5c8f8195195a4a7556518bb3c3495f0fea7122", "size": ...
from django.conf.urls.defaults import * from django.contrib import admin from django.views.generic.simple import redirect_to from django.conf import settings from oscar.app import Shop from oscar.apps.product import ProductApplication from shop.product.views import MyItemDetailView admin.autodiscover() shop_app = Sh...
{ "content_hash": "59a6d108db6d9c4aeb8069e80cdc2351", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 77, "avg_line_length": 27.958333333333332, "alnum_prop": 0.7228017883755589, "repo_name": "aykut/django-oscar", "id": "efeafa14b513289f9eed869a684e47a15cc2c2bf", "size": "6...
""" ipython -i --pdb scripts/train_model.py -- --model cropped_dec21_3 --data 128_20151029 --use_cropped --as_grey --overwrite --no_test """ import numpy as np from lasagne.layers import dnn import lasagne as nn import theano.tensor as T import theano from utils.nolearn_net import NeuralNet from nolearn.lasagne.hand...
{ "content_hash": "b226984433718975a615b7b83b27e77a", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 132, "avg_line_length": 25.755208333333332, "alnum_prop": 0.6736097067745197, "repo_name": "felixlaumon/kaggle-right-whale", "id": "1e91072f4c0b2b06b0948b246c7e236eba4c20b9"...
import json import re import __ids__ import options import survey_exceptions as se import blocks __qGen__ = __ids__.IdGenerator("q_") __likert__ = "likert" __checkbox__ = "checkbox" __oneof__ = "oneof" __instruction__ = "instruction" __freetext__ = "freetext" qTypes = [__likert__, __checkbox__, __oneof__, __instructi...
{ "content_hash": "d33f66d8295d9166487ae756eab449ee", "timestamp": "", "source": "github", "line_count": 213, "max_line_length": 259, "avg_line_length": 41.12676056338028, "alnum_prop": 0.6150684931506849, "repo_name": "SurveyMan/SMPy", "id": "555eb6edcd3e81062babeb4f2673fb3c3f7e9a0c", "size": "8760...
import pathlib import shutil import tempfile import typing import pytest from airflow import models from ruamel import yaml from scripts import generate_dag, generate_terraform PROJECT_ROOT = generate_dag.PROJECT_ROOT SAMPLE_YAML_PATHS = { "dataset": PROJECT_ROOT / "samples" / "dataset.yaml", "pipeline": PRO...
{ "content_hash": "3edb79172cc8370f7f0b2089af515eab", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 88, "avg_line_length": 32.65384615384615, "alnum_prop": 0.6772673733804476, "repo_name": "GoogleCloudPlatform/public-datasets-pipelines", "id": "d68b865a4f9452fbcb2d85ac8e82...
""" Copyright (c) 2019-2022 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import functools from pathlib import Path from tempfile import _RandomNameSequence from textwrap import dedent import pytest import zipf...
{ "content_hash": "ab527b25aa500506aec61481135e3c70", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 97, "avg_line_length": 39.205479452054796, "alnum_prop": 0.6390635918937806, "repo_name": "projectatomic/atomic-reactor", "id": "be77040e1fec8e2bc5e164c09457c3662e61a509", ...
''' Simple text file config; one key=value pair per line. Global settings will be stored in the user's home directory in a hidden file. Settings can also be stored in the directory of the calling script, or explicitly passed to the TPAMClient constructor. Global settings will be overridden by directory settings, whic...
{ "content_hash": "61263dccb5d346b00894cc10261eb706", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 105, "avg_line_length": 35.07920792079208, "alnum_prop": 0.6223539373412362, "repo_name": "k4otix/python-tpam", "id": "60dad0c1ab2583257dcea5efd84341bc3cd39f55", "size": "...
from .browser import main if __name__ == '__main__': main()
{ "content_hash": "270c2f167a66fef42a218c2aac4dba3a", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 26, "avg_line_length": 9.714285714285714, "alnum_prop": 0.5147058823529411, "repo_name": "ya790206/call_seq_browser", "id": "920bb827131af1f09a3f14d8957a0925c9061d51", "size...
"3-value logic (i.e. the way that boolean ops on nulls propagate up in the expression tree in SQL). doesn't rhyme with 'evil' but should." class ThreeVL: "Implementation of sql's 3VL. Warning: use == != for comparing python values, not for 3vl comparison. Caveat emptor." # todo(awinter): is there any downside to u...
{ "content_hash": "4dc977572614cc0c84b70f12d276ca04", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 138, "avg_line_length": 41.166666666666664, "alnum_prop": 0.6477732793522267, "repo_name": "abe-winter/pg13-py", "id": "05f1ddb4e409e39f283261fb81ceea7dbaa778ea", "size": "...
from __future__ import print_function from multiprocessing import Process from random import choice from vizdoom import * def play(game): game.init() actions = [[True, False, False], [False, True, False], [False, False, True]] episodes = 10 for i in range(episodes): game.new_episode() ...
{ "content_hash": "f2afee9c8614010b0b9e1170dc72fc87", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 84, "avg_line_length": 19.836734693877553, "alnum_prop": 0.6306584362139918, "repo_name": "jeffery-do/Vizdoombot", "id": "5eea41aa0257d8d9bea816e77e943a0aa0bd1b33", "size":...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('debate', '0007_auto_20170807_2314'), ] operations = [ migrations.AddField( model_name='debatetopic', ...
{ "content_hash": "9fc7bd18b864181e5f82d6e77b85e014", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 117, "avg_line_length": 25.7, "alnum_prop": 0.632295719844358, "repo_name": "steventimberman/masterDebater", "id": "a9e762265fa320141062aa01b3b9a7303ea94f6a", "size": "587"...
Creating PDF books from XML text content.
{ "content_hash": "a46a73b75811c73cb90350c4f4db31fd", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 41, "avg_line_length": 42, "alnum_prop": 0.8095238095238095, "repo_name": "ActiveState/code", "id": "b66c5f53559af77717dfe81e6021b6c590513eaf", "size": "42", "binary": fal...
from cmdb import models class AssetHandler(object): def __init__( self, request, asset_data, management_ip=None, project_id=0, created_by='auto'): self.asset_data = asset_data self.created_by = created_by self.request = request self.project_id = project_id self.management_i...
{ "content_hash": "90d495b4d41cf8c57df76183751be68c", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 119, "avg_line_length": 48.96491228070175, "alnum_prop": 0.5078824793980652, "repo_name": "ZhangXiaoyu-Chief/sandwich", "id": "e9a167bbf87643cabaef59c8dfac77361f52e858", "...
from __future__ import absolute_import import os import sys from .xcspec import * class XCSpecBuildSystem(xcspec): def __init__(self, spec_data): super(XCSpecBuildSystem, self).__init__(spec_data);
{ "content_hash": "e714d53af94fd5512abf116fd50d3fcd", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 59, "avg_line_length": 21.6, "alnum_prop": 0.6851851851851852, "repo_name": "samdmarshall/xcparse", "id": "3943cb8e95a094130a6fe934b200acbdffafe065", "size": "216", "bina...
import unittest from ParamSklearn.components.classification.gaussian_nb import \ GaussianNB from ParamSklearn.util import _test_classifier, _test_classifier_iterative_fit import sklearn.metrics class GaussianNBComponentTest(unittest.TestCase): def test_default_configuration(self): for i in range(10)...
{ "content_hash": "d60643106ddf60b49010499208b96f43", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 78, "avg_line_length": 40.24, "alnum_prop": 0.5705765407554672, "repo_name": "automl/paramsklearn", "id": "574c1c49ab452424c836c004e764fdc342961efc", "size": "1006", "bin...
def client_query_w_array_params() -> None: # [START bigquery_query_params_arrays] from google.cloud import bigquery # Construct a BigQuery client object. client = bigquery.Client() query = """ SELECT name, sum(number) as count FROM `bigquery-public-data.usa_names.usa_1910_2013` ...
{ "content_hash": "0f62b00f57801b22bd8c2a7cd199a3b3", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 87, "avg_line_length": 32.42857142857143, "alnum_prop": 0.6024229074889867, "repo_name": "googleapis/python-bigquery", "id": "66971318216cf8ed70823647bead5c59b16d7008", "si...
""" Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4. Note: There may be more than one LIS combination, it is only necessary for you to re...
{ "content_hash": "aec490cd148119f155b481b965b7ae57", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 96, "avg_line_length": 32.82608695652174, "alnum_prop": 0.6139072847682119, "repo_name": "caoxudong/code_practice", "id": "9732113fc562d5a2cae1687d40b5dd6a3eecdabb", "size"...
"""Generates *_test.html files from *_test.js files. Usage: $ cd packages/grpc-web $ python3 ./scripts/gen_test_htmls.py """ import os import re from string import Template import common # The directories containing JS tests. DIRECTORIES_WITH_TESTS = ["../../javascript"] TEST_HTML_TEMPLATE_FILE = './scripts/templa...
{ "content_hash": "eadbe2cfe4259dc09922fe3af08f6113", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 79, "avg_line_length": 31.841269841269842, "alnum_prop": 0.6600199401794616, "repo_name": "grpc/grpc-web", "id": "09621342b267fa68287357d3da5e85b941605ccc", "size": "2603",...
import os from pathlib import Path from typing import Optional from jedi.inference.cache import inference_state_method_cache from jedi.inference.names import AbstractNameDefinition, ModuleName from jedi.inference.filters import GlobalNameFilter, ParserTreeFilter, DictFilter, MergedFilter from jedi.inference import com...
{ "content_hash": "fe304a47032485e8094fd39bee85ee7a", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 95, "avg_line_length": 35.29565217391304, "alnum_prop": 0.590169992609017, "repo_name": "glenngillen/dotfiles", "id": "6461cb4bcd06eea355b02c08b962c014f16b3d9d", "size": "...
""" * ******************************************************* * Copyright (c) VMware, Inc. 2016-2018. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, WHET...
{ "content_hash": "bf57efc5243c341846aa235c01307c33", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 80, "avg_line_length": 39.93700787401575, "alnum_prop": 0.5972003154574133, "repo_name": "tianhao64/vsphere-automation-sdk-python", "id": "5db48a7f11258a61f9861694b383f27d82...
import numpy as np import numpy.testing as nt from nose.tools import assert_true, assert_false import nibabel as nib from nibabel.tmpdirs import TemporaryDirectory from dipy.data import get_data from dipy.workflows.mask import MaskFlow def test_mask(): with TemporaryDirectory() as out_dir: data_path, _,...
{ "content_hash": "d24ac86066faed62a026998de10a1192", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 64, "avg_line_length": 31.272727272727273, "alnum_prop": 0.627906976744186, "repo_name": "villalonreina/dipy", "id": "18ddf9fb0cec1896c95ff1f4df8d155a0b23c168", "size": "10...
import os import tempfile import logging import subprocess logging.basicConfig(level=logging.DEBUG) def call_binary(arguments, home=None): env = dict(os.environ) if home: env.update({'HOME': home}) logging.info("Running: %s", ' '.join(arguments)) logging.info("Env: %s", env) p = subpro...
{ "content_hash": "38f65cc1641bf6ebfa37845ca43da452", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 88, "avg_line_length": 29.912280701754387, "alnum_prop": 0.5818181818181818, "repo_name": "stefanw/froide-redact", "id": "f28983a178d003c3aac5d658299fc929dd38871f", "size"...
__author__ = 'popka' import urlparse import Utils.utils as utils from selenium.common.exceptions import WebDriverException, TimeoutException, NoAlertPresentException, StaleElementReferenceException from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import StaleElementReferenceExcep...
{ "content_hash": "15c8ecc67c0bb013f63f051f635c33f4", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 132, "avg_line_length": 32.33879781420765, "alnum_prop": 0.578573842514363, "repo_name": "MyBeautyTeam/xss-checker", "id": "d96d40e2e2588dd186f89bfff81701f94cd17605", "siz...
import packet_names from packet import Packet,PacketType, PacketDest class Stats: def __init__(self, verbose=False): self.verbose = verbose self.records = 0 self.control = 0 self.game = 0 self.invalid = 0 self.unknown = 0 self.game_types = [0]*len(packet_na...
{ "content_hash": "dcf2a25f7ebab09b1eea81e267d1752f", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 89, "avg_line_length": 28.23175965665236, "alnum_prop": 0.5033444816053512, "repo_name": "psforever/gcapy", "id": "cf428fd99c694966c8ae0eab0cd5e3137bdebdd2", "size": "6578...
""" Given a config file, run a given workflow """ from percept.management.commands import BaseCommand from percept.utils.registry import registry, find_in_registry from percept.workflows.base import NaiveWorkflow from percept.utils.workflow import WorkflowWrapper, WorkflowLoader from optparse import make_option import...
{ "content_hash": "8b1f5c34258715cba2ee9765c4c9f9cd", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 161, "avg_line_length": 37.432432432432435, "alnum_prop": 0.5797833935018051, "repo_name": "VikParuchuri/percept", "id": "5d28a40f5f4a33bef7ab6b89810cfd3900947ce6", "size":...
import math import numpy as np from dp_accounting import accountant from dp_accounting import common class LaplaceMechanism: """Transforms a function using the Laplace mechanism. If f(x) = (Z[1], Z[2], ..., Z[k]), then returns a function that computes (Z'[1], Z'[2], ..., Z'[k]), where Z'[i] = Z[i] + Y[i]...
{ "content_hash": "6bb1cff2a93840634e920f6763413d07", "timestamp": "", "source": "github", "line_count": 212, "max_line_length": 79, "avg_line_length": 38.839622641509436, "alnum_prop": 0.6633470974010202, "repo_name": "world-federation-of-advertisers/cardinality_estimation_evaluation_framework", "id"...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:5078") else: access = Ser...
{ "content_hash": "2a74b8a49b62f5bc8c8ef83af2eba062", "timestamp": "", "source": "github", "line_count": 324, "max_line_length": 79, "avg_line_length": 24.209876543209877, "alnum_prop": 0.6620346761856196, "repo_name": "ECLIeclipse/ECLI-eClipse", "id": "9f3b4b26c15e41243ec48843fd0a5d6f38afd643", "si...
""" EasyBuild support for building and installing GCC, implemented as an easyblock @author: Stijn De Weirdt (Ghent University) @author: Dries Verdegem (Ghent University) @author: Kenneth Hoste (Ghent University) @author: Pieter De Baets (Ghent University) @author: Jens Timmerman (Ghent University) @author: Toon Willem...
{ "content_hash": "32f00800eef81e2c5bb47dd9900f35cb", "timestamp": "", "source": "github", "line_count": 549, "max_line_length": 140, "avg_line_length": 44.970856102003644, "alnum_prop": 0.5289805176394345, "repo_name": "ULHPC/modules", "id": "42f14077fe63a47f956c8bad8e1a404b47ca5d60", "size": "2574...
''' This holds onto the UpdateObject class. It allows us to easily abstract away different update types and provide a uniform way to interpret the results through a set of basic actionable functions. ''' from __future__ import print_function import time from twisted.internet import defer, reactor from twisted.python.fa...
{ "content_hash": "8c85c5e54241f5dbb1fb0035dd6da6bc", "timestamp": "", "source": "github", "line_count": 419, "max_line_length": 458, "avg_line_length": 37.3054892601432, "alnum_prop": 0.6133964557609878, "repo_name": "ParadropLabs/Paradrop", "id": "ed70642c75c6b2d7b8fd35b13e387f93e194891c", "size":...
class Table(object): def __init__(self, columns=()): self.columns = columns def __add__(self, other): return Table(self.columns[:] + other.columns[:]) class Column(object): def __init__(self, header, cell): self.header = header self.cell = cell self.attrs = {} ...
{ "content_hash": "922488b83342d28cef0ce08d9cf7bcd6", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 76, "avg_line_length": 25.636363636363637, "alnum_prop": 0.5709219858156028, "repo_name": "lubomir/monoidal-tables", "id": "245cacd8aca7e618c421d7c5608cb148681f082a", "size...
import math import types import string from panda3d.core import * from DirectUtil import * from direct.showbase.DirectObject import DirectObject from direct.task import Task from DirectGlobals import DIRECT_NO_MOD from DirectCameraControl import DirectCameraControl from DirectManipulation import DirectManipulationCo...
{ "content_hash": "5f4be184d0473e693eaa91bf912536a5", "timestamp": "", "source": "github", "line_count": 1322, "max_line_length": 130, "avg_line_length": 39.726172465960666, "alnum_prop": 0.5777257321299364, "repo_name": "mgracer48/panda3d", "id": "2fb18b5806f167440f938cd4125fd61498bff330", "size": ...
"""Tools for interacting with a GTFS database.""" from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker def get_shape_dicts(route_short_name, septa_fn): """Returns dicts that are useful for mapping from a route_short_name and block_id to a list of coordinates representing the route. Ret...
{ "content_hash": "39d3a99f4cfb9c8a3a0c87acc69c797d", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 134, "avg_line_length": 32.47457627118644, "alnum_prop": 0.6221294363256785, "repo_name": "lewfish/septa-bus-prediction", "id": "4d59671f2134a9c8038221ef7c051755386018de", ...
import sys import os if __name__ == '__main__': pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and os.path.split(parent_dir)[1] == 'pygame') if not is_pygame_pkg: sys.path.insert(0, pa...
{ "content_hash": "2d3aedb7aecf2553c1643b2ef07949ba", "timestamp": "", "source": "github", "line_count": 1035, "max_line_length": 85, "avg_line_length": 37.215458937198065, "alnum_prop": 0.5646451009917441, "repo_name": "motion3/dino_rumble", "id": "c9a08d0b228fa1fdd53487b8fdc2980e3fe1ae0f", "size":...
import json import six from six.moves.urllib.parse import urlencode def _totext(val): """ Py2 and Py3 compatible function that coerces any non-Unicode string types into the official "text type" (unicode in Py2, str in Py3). For objects that are not binary (str/bytes) or text (unicode/str), retur...
{ "content_hash": "55fd8874da34f543604a051ea0d92fe3", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 92, "avg_line_length": 29.979591836734695, "alnum_prop": 0.6446562287270252, "repo_name": "cooncesean/mixpanel-query-py", "id": "f5cf1f4af9b36db3200714d0b716389c45961ed2", ...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from frog.models import ( Gallery, Image, Video, Tag, UserPref, GallerySubscription, VideoQueue, ReleaseNotes, Marmoset, Group, SiteConfig, Badge)...
{ "content_hash": "1f5262d171a630b19ce5e2672b119e71", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 72, "avg_line_length": 23.670886075949365, "alnum_prop": 0.6823529411764706, "repo_name": "theiviaxx/Frog", "id": "14d82244fc71151f52f4082c157ff4f9c8bd3399", "size": "3156"...
from __future__ import with_statement import urlparse import urllib2 import time import shutil import os from os import path as p try: import json except ImportError: import simplejson as json scriptdir = p.dirname(__file__) sourcefile = p.join(scriptdir, "download.json") basedir = p.dirname(p.abspath(sourcef...
{ "content_hash": "7fa67c73578ea8c5387f759c58cb1206", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 75, "avg_line_length": 30.75, "alnum_prop": 0.599713055954089, "repo_name": "rinfo/rdl", "id": "07d1915b5ad7fdd0e7ab19e4e81d29381527692c", "size": "2091", "binary": false...
from cx_Freeze import setup, Executable #import cx_Freeze setup( name = "cidadeBela", author = "Paulo Mateus, Gabriela Valentim, Samara Oliveira", author_email = "[email protected]", #url = "http://cx-oracletools.sourceforge.net", version = "0.3", description = "Programa cidadeBela", ...
{ "content_hash": "a993011013caa67c869c23353ff1f8bd", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 119, "avg_line_length": 44.90625, "alnum_prop": 0.6214335421016005, "repo_name": "SrMouraSilva/Academic-Projects", "id": "2d0ad3e093cd34160a44fd5f3bc6db9d2c8eac86", "size":...
import argparse import os import sys from google.datacatalog_connectors.rdbms import\ datacatalog_cli from .scrape import metadata_scraper class SQLServer2DatacatalogCli(datacatalog_cli.DatacatalogCli): def _get_metadata_scraper(self): return metadata_scraper.MetadataScraper def _get_host_arg(s...
{ "content_hash": "8e555ebf938878bb83961cae8a520705", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 79, "avg_line_length": 39.943820224719104, "alnum_prop": 0.5656821378340365, "repo_name": "GoogleCloudPlatform/datacatalog-connectors-rdbms", "id": "a54ed7cbd25a7c698fe6a43d5...
from new import instancemethod import hashlib import cPickle from twisted.internet.defer import succeed, maybeDeferred, inlineCallbacks from txweb2.dav.util import allDataFromStream from txweb2.stream import MemoryStream from txweb2.http_headers import Headers from twistedcaldav.cache import MemcacheResponseCache, C...
{ "content_hash": "be25f8193293c727e985b37b2cfdbfee", "timestamp": "", "source": "github", "line_count": 585, "max_line_length": 132, "avg_line_length": 28.805128205128206, "alnum_prop": 0.5767016794255534, "repo_name": "trevor/calendarserver", "id": "2562280daf724c450d4437c5cb78c015a0682be0", "size...
import numpy as np def operations(h, w): """ Takes two inputs, h and w, and makes two Numpy arrays A and B of size h x w, and returns A, B, and s, the sum of A and B. Arg: h - an integer describing the height of A and B w - an integer describing the width of A and B Returns (in this or...
{ "content_hash": "ee3458d53e1f8ff160f77c5d0c3a86e2", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 73, "avg_line_length": 29.526315789473685, "alnum_prop": 0.5882352941176471, "repo_name": "xunilrj/sandbox", "id": "dfe608daf2af8fd26758bd6c8f63067da6c6edcd", "size": "561"...
import _plotly_utils.basevalidators class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scatter3d", **kwargs): super(ShowlegendValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
{ "content_hash": "2098cf04806074e919da13bcae237f78", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 84, "avg_line_length": 37.833333333333336, "alnum_prop": 0.6189427312775331, "repo_name": "plotly/python-api", "id": "ee956414f96bc460e097eb37f0b10152d5738bed", "size": "45...
""" Copyright (c) 2009 Marian Tietz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
{ "content_hash": "8d2a57c8a0eb23338feb753745f2d5f3", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 74, "avg_line_length": 32.891304347826086, "alnum_prop": 0.6916721744877726, "repo_name": "sushi-irc/tekka", "id": "ba672e69dee69ab4cdf759d91b3667cbef9e82fe", "size": "3042...
from calvin.actor.actor import Actor, manage, condition, calvinlib class Mustache(Actor): """ Formats string based on template and incoming dictionary Format string uses \"{{access.key.path}}\" to access dict Also refer to Mustache documentation (http://mustache.github.io/) Inputs: dict :...
{ "content_hash": "25b4d6f0c722c8fc3b06607e88ce29bb", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 163, "avg_line_length": 29, "alnum_prop": 0.6003134796238244, "repo_name": "EricssonResearch/calvin-base", "id": "90c15c756b171b76ae628b8dc3174dc3139909b1", "size": "1881",...
import os import shutil import datetime import json import sys if sys.version_info[0] == 2 and sys.version_info[1] < 7: import unittest2 as unittest else: import unittest from pyquery import PyQuery from tempfile import NamedTemporaryFile from Cookie import SimpleCookie import urlparse from django.core.urlreso...
{ "content_hash": "e204d28826282d19e8c8426d79af3cd1", "timestamp": "", "source": "github", "line_count": 897, "max_line_length": 142, "avg_line_length": 42.05016722408027, "alnum_prop": 0.644820912537448, "repo_name": "wpjesus/codematch", "id": "12bd84888b2ecd0331aeb136e3ed279956b298f3", "size": "37...
import numpy as np import random class BasePlant(object): def __init__(self, branch_id, leaf_id): self.branch_id = branch_id self.leaf_id = leaf_id self.set_colors() self.randomize_colors() def randomize_colors(self): self.branch_col = self.branch_col.astype(float) ...
{ "content_hash": "d1aa50c46c5377e2a7d6d004308d9cf7", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 55, "avg_line_length": 24.445652173913043, "alnum_prop": 0.5504668741662961, "repo_name": "ndiamant/arboreum", "id": "b52236771ed0e232b305c1f4ca769b6e375fdc3f", "size": "22...
import setuptools import versioneer LONG_DESCRIPTION = """ **aospy**: automated gridded climate data analysis and management A framework that enables automated calculations using gridded climate data. Following some basic description of where your data lives and defining any functions of variables stored in that dat...
{ "content_hash": "96a6ab404ace830cb7bee04ffec02af5", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 77, "avg_line_length": 37.813559322033896, "alnum_prop": 0.6154190945764231, "repo_name": "spencerahill/aospy", "id": "ec65e73b749f8e01f1c44ff1f2b938550700d702", "size": "2...
from pythonforandroid.recipe import PythonRecipe class IpaddressRecipe(PythonRecipe): name = 'ipaddress' version = '1.0.15' url = 'https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz' depends = ['python2'] recipe = IpaddressRecipe()
{ "content_hash": "11fa7382e7d4ca63e598e13e17b03bc9", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 87, "avg_line_length": 22.416666666666668, "alnum_prop": 0.7472118959107806, "repo_name": "bob-the-hamster/python-for-android", "id": "69410f6d97a4c69579afa969481f11cea5d120b...
from datetime import date from django.test import TestCase, override_settings from django.contrib.auth.models import User from django.test.client import Client from molo.core.tests.base import MoloTestCaseMixin from molo.profiles.models import UserProfile from gem.admin import GemUserAdmin, download_as_csv_gem from g...
{ "content_hash": "a3966505e126162df811141c7e74a12d", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 78, "avg_line_length": 39.53781512605042, "alnum_prop": 0.6129649309245484, "repo_name": "Mitso/springstertestapp", "id": "12216c2e433732a737f298a2a666988127d2162d", "size...
import datetime from oslo_config import cfg from oslo_log import log as logging from testtools import matchers from vitrage.common.constants import DatasourceOpts as DSOpts from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants...
{ "content_hash": "fafdfbbae9f02e730f7286b631a5ad07", "timestamp": "", "source": "github", "line_count": 218, "max_line_length": 79, "avg_line_length": 39.93119266055046, "alnum_prop": 0.6351522113727742, "repo_name": "openstack/vitrage", "id": "6139bf4918db3266d9fc728b1c2e903f536c8055", "size": "92...
from collections import defaultdict from sympy import Mod, Mul from devito.exceptions import InvalidOperator from devito.ir.clusters import Queue from devito.ir.support import Forward, SEQUENTIAL from devito.tools import (DefaultOrderedDict, frozendict, is_integer, indices_to_sections, timed...
{ "content_hash": "e0f1b97e1ef264af1b3d2ffeec944086", "timestamp": "", "source": "github", "line_count": 245, "max_line_length": 90, "avg_line_length": 35.4734693877551, "alnum_prop": 0.5208836727649292, "repo_name": "opesci/devito", "id": "23d278d45bb71b1201813297c2e6ee665da7463d", "size": "8691", ...
""" scanFAAM.py =========== Holds the scanFAAM function that is used to work out the first and last index of real data (i.e. non-missing data in a load of FAAM flight data). It is used in conjunction with nappy to reduce the size of output files by missing out beginning and end periods that hold only misssing values. ...
{ "content_hash": "1fc14ccbf92bf06a37e27bc03788fb45", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 84, "avg_line_length": 25.146788990825687, "alnum_prop": 0.581904414447282, "repo_name": "eufarn7sp/egads-eufar", "id": "6ff0d9aa2dc1bd7dd8ed525703fb91abe6dbdc99", "size":...
import sys import os # 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('.')) # -- General conf...
{ "content_hash": "129c8975176362cc30d4664592b737d2", "timestamp": "", "source": "github", "line_count": 250, "max_line_length": 79, "avg_line_length": 31.692, "alnum_prop": 0.7054146156758804, "repo_name": "ccarvalheira/wsep", "id": "331cf3dc12b5b9d9274c9f273de25923c21399a8", "size": "8347", "bin...
""" Provides various authentication policies. """ from __future__ import unicode_literals import base64 import binascii from django.contrib.auth import authenticate, get_user_model from django.middleware.csrf import CsrfViewMiddleware from django.utils.six import text_type from django.utils.translation import ugettex...
{ "content_hash": "710c57452399c4be49524b1d84a10b0c", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 93, "avg_line_length": 31.163265306122447, "alnum_prop": 0.6836935166994106, "repo_name": "scottbecker/autolims", "id": "9512a2db08574e0ea7550e927ca2b2e7c95a2c0a", "size": ...
import pygame as pg from random import uniform, choice, randint from settings import * from tilemap import collide_hit_rect vec = pg.math.Vector2 def collide_with_walls(sprite, group, dir): if dir == 'x': hits = pg.sprite.spritecollide(sprite, group, False, collide_hit_rect) if hits: if...
{ "content_hash": "6430453aa9505df0bc6a6194dd10f709", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 80, "avg_line_length": 37.5678391959799, "alnum_prop": 0.5593900481540931, "repo_name": "kidscancode/gamedev", "id": "5f8fa99cb2539c11b42ed90a069c7ce09e871a56", "size": "7...
import time import json class Task(): def __init__(self, data, task_time=None): if not isinstance(data, str): raise TypeError("Data must be a JSON string ") self.data = data if not task_time: self.time = int(time.time()) else: self.time = task...
{ "content_hash": "eea73d0b26be7c36556248cf6612ce67", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 105, "avg_line_length": 24.05263157894737, "alnum_prop": 0.5536105032822757, "repo_name": "joshuakarjala/redisq-py", "id": "6f6f45ea34931822dd9d9aadda613af541987c98", "size...
'''Runs the basic test suite through a cross compiler. This is now just a wrapper around run_project_tests.py with specific arguments ''' import argparse import subprocess from mesonbuild import mesonlib from mesonbuild.coredata import version as meson_version def runtests(cross_file, failfast): tests = ['--onl...
{ "content_hash": "ff14d9de38d47c209470d286b8b49639", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 160, "avg_line_length": 34.11538461538461, "alnum_prop": 0.6967305524239008, "repo_name": "becm/meson", "id": "1e67876ab66d9621bd46145e1c8e85eaa6a000b9", "size": "1504", ...
'''author@esilgard''' ''' test 1 - make sure that the path to the nlp_engine is valid (the python script exists) ''' test_num='1' test_desc='make sure that the path to the nlp_engine is valid' def get(engine_path): try: python_script=open(engine_path,'r').read() return test_num,'Pass',t...
{ "content_hash": "be92ad9a2fef9bf476519a61cb1fbae6", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 86, "avg_line_length": 21.5, "alnum_prop": 0.6253229974160207, "repo_name": "esilgard/argos_nlp_tests", "id": "0dc057eec2c3fd619178b509ae158f680673e67d", "size": "547", "...
from basescript import BaseScript class Adder(BaseScript): # The following specifies the script description so that it be used # as a part of the usage doc when --help option is used during running. DESC = "Adds numbers" def __init__(self): super(Adder, self).__init__() self.a = 10 ...
{ "content_hash": "1a1183d0978565c2229b21a0c1b28c9f", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 75, "avg_line_length": 24.884615384615383, "alnum_prop": 0.5965996908809892, "repo_name": "deep-compute/basescript", "id": "0eb57ccf097b53339a403a5fe6478d3ffe4c3fd0", "size...
from __future__ import annotations from .apibible import ApiBible from .biblegateway import BibleGateway __all__ = ('ApiBible', 'BibleGateway')
{ "content_hash": "f553147df31f1dca4de07f3f9d3d4068", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 38, "avg_line_length": 24.333333333333332, "alnum_prop": 0.7534246575342466, "repo_name": "bryanforbes/Erasmus", "id": "9a1a37f3c38baa0aa8c5e8c7db9fc07bbf76a3e3", "size": "1...
import os, glob from distutils.core import setup def find_packages(): here = os.path.dirname(os.path.realpath(__file__)) lib = os.path.join(here, "servequnit", "**.py") packages = [] for name in glob.glob(lib): if os.path.basename(name) == "__init__.py": name = os.path.dirname(name)...
{ "content_hash": "aa43a5a3ad6bc5da41170f214238e109", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 68, "avg_line_length": 35.166666666666664, "alnum_prop": 0.6208530805687204, "repo_name": "bnkr/servequnit", "id": "12a0035d1ff2cbe168c1ba82a2d5cd87a2512db3", "size": "862"...
"""Config flow for Plum Lightpad.""" from __future__ import annotations import logging from typing import Any from aiohttp import ContentTypeError from requests.exceptions import ConnectTimeout, HTTPError import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD,...
{ "content_hash": "91a66c93d72809962308c34f0a2b85ba", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 86, "avg_line_length": 31.636363636363637, "alnum_prop": 0.6537356321839081, "repo_name": "adrienbrault/home-assistant", "id": "40432810cc5fa282e3c082181fcf52fcbc926122", "...
"""Unittest for pyreringconfig.""" __author__ = '[email protected] (Mingyu Wu)' import getpass import unittest from lib import mock_filesystemhandlerextend from lib import pyreringconfig class PyreRingConfigTest(unittest.TestCase): """Unit test cases for PowrRingConfigClass. This will only test the PyreRingConfi...
{ "content_hash": "02a57dc0d2117740505648479088cf39", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 79, "avg_line_length": 42.413953488372094, "alnum_prop": 0.6168439521877399, "repo_name": "kdlucas/pyrering", "id": "d6abc4d6f62cb7a3dc43bc6c3075dee2666f6cb0", "size": "97...
import os import sys import unittest import logging import tempfile import shutil import contextlib import argparse from mock import patch, Mock import test_mic import vocabcompiler import g2p import brain import saschapath import tts import diagnose from stt import TranscriptionMode DEFAULT_PROFILE = { 'prefers_...
{ "content_hash": "02ae82ed6ca30246d3b2ffd0f38a273e", "timestamp": "", "source": "github", "line_count": 422, "max_line_length": 79, "avg_line_length": 34.964454976303315, "alnum_prop": 0.5901728227719417, "repo_name": "tdmike/SASCHA", "id": "71cdab69125a4236b00aca045da52fb1cd5a8870", "size": "14801...
""" Tests for file operations. """ from os.path import dirname, join from unittest import TestCase from nose.tools import eq_, ok_ from confab.files import _import class TestImport(TestCase): def setUp(self): self.dir_name = join(dirname(__file__), 'data/default') def test_import_empty(self): ...
{ "content_hash": "8921c4dbcf6f820e81a868e3ddc3d6f6", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 75, "avg_line_length": 30.285714285714285, "alnum_prop": 0.6339622641509434, "repo_name": "locationlabs/confab", "id": "2353ffec0958de980c5920d9a3d992af972c6767", "size": "...
import logging import logging.handlers import unittest from unittest.mock import patch from ecs_scheduler import env, __version__ @patch('ecs_scheduler.env.triggers') class InitTests(unittest.TestCase): @patch.object(logging, 'basicConfig') @patch.dict('os.environ', clear=True) def test(self, fake_log, t...
{ "content_hash": "17119cbf1d6d04bcbccb7db1cdd7929d", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 78, "avg_line_length": 32.83536585365854, "alnum_prop": 0.6064995357474466, "repo_name": "drmonkeysee/ecs-scheduler", "id": "9b0916ce18bfca18ff8540837480e0ed566e7b9f", "si...
""" Service Support module: views """ from django.shortcuts import get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.db.models import Q from anaf.core.conf import settings from anaf.core.rendering import ren...
{ "content_hash": "ddcab340f02c685b0f5a21ee20d9157b", "timestamp": "", "source": "github", "line_count": 1194, "max_line_length": 108, "avg_line_length": 36.75460636515913, "alnum_prop": 0.6186396262960009, "repo_name": "tovmeod/anaf", "id": "36ae5731a84fcd999208ad5aebc5832d900d3fdc", "size": "43885...
import os from flask import Flask from flask_login import LoginManager from flask_openid import OpenID def project_relative_location(*args): return os.path.join(os.path.dirname(os.path.realpath(__file__)), *args) app = Flask(__name__) default_db = 'sqlite:///{}'.format(project_relative_location('data', 'tv_show...
{ "content_hash": "b1d44f840256b2b6bdc539caee260571", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 83, "avg_line_length": 32.138888888888886, "alnum_prop": 0.7225583405358686, "repo_name": "fahadshaon/tv_tracker", "id": "d9aa2915cad6ea47332f9ed905fff3f8ccf498ab", "size":...
""" =========================== Calculate SHORE scalar maps =========================== We show how to calculate two SHORE-based scalar maps: return to origin probability (rtop) [Descoteaux2011]_ and mean square displacement (msd) [Wu2007]_, [Wu2008]_ on your data. SHORE can be used with any multiple b-value dataset l...
{ "content_hash": "40bf8da6effae406156c38d6b6091baa", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 82, "avg_line_length": 24.931297709923665, "alnum_prop": 0.6956521739130435, "repo_name": "nilgoyyou/dipy", "id": "82fa5f618f1e6d9ae6adbed0476bd1f97899e962", "size": "3266...