text
stringlengths
4
1.02M
meta
dict
from django.conf.urls import url from djangoql import views class DjangoQLFavoriteQueryMixin(object): @property def media(self): media = super(DjangoQLFavoriteQueryMixin, self).media media.add_js(( 'djangoql/js/favorite.js', )) media.add_css({ '': ( ...
{ "content_hash": "cbca3a80959aec23f1516ff99936c98c", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 91, "avg_line_length": 27.708333333333332, "alnum_prop": 0.48721804511278194, "repo_name": "artinnok/djangoql", "id": "21d211209e96169a0ef6856f3c8140330b834157", "size": "1...
import unittest from datetime import datetime, timedelta from trac.test import locale_en from trac.ticket.query import QueryModule from trac.ticket.report import ReportModule from trac.ticket.roadmap import RoadmapModule from trac.ticket.model import Milestone, Ticket from trac.util.datefmt import format_datetime, pre...
{ "content_hash": "f746b501d959e9685d1717051fc09bf6", "timestamp": "", "source": "github", "line_count": 564, "max_line_length": 275, "avg_line_length": 36.709219858156025, "alnum_prop": 0.5751545595054096, "repo_name": "pkdevbox/trac", "id": "fec42222898d0cc700219f8850fc8e3ebd0b874d", "size": "2126...
__copyright__ = "Copyright 2015-2018 Altova GmbH" __license__ = 'http://www.apache.org/licenses/LICENSE-2.0' __version__ = '5.1.0' # This script implements additional data quality validation rules as specified by the XBRL US Data Quality Committee (http://xbrl.us/data-quality/rules-guidance/). # This script is designe...
{ "content_hash": "48c622f0f0fa093aac5bdc4f669ae559", "timestamp": "", "source": "github", "line_count": 1409, "max_line_length": 585, "avg_line_length": 52.2278211497516, "alnum_prop": 0.6645558439440677, "repo_name": "altova/sec-edgar-tools", "id": "6706b735da2f47bca2d76f8233f4dec5272bc2f8", "size...
from ez_setup import use_setuptools use_setuptools() import os from setuptools import setup, find_packages import djangologdb def read_file(name): return open(os.path.join(os.path.dirname(__file__), name)).read() readme = read_file('README.rst') changes = read_file('CHANGES.rst') setup( name...
{ "content_hash": "22bf03576d0697bb1cc096db2b4d7f85", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 105, "avg_line_length": 30.634146341463413, "alnum_prop": 0.6226114649681529, "repo_name": "joeribekker/django-logdb", "id": "e9ef03b46df7e2d7480983fc30e5985e46af9df4", "si...
"""Tests for t2t_trainer.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensor2tensor.bin import t2t_trainer from tensor2tensor.utils import trainer_lib_test import tensorflow.compat.v1 as tf FLAGS = tf.flags.FLAGS class TrainerTest(tf.test.Tes...
{ "content_hash": "c91b766e46c69b89723be8bc421da348", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 48, "avg_line_length": 23.78125, "alnum_prop": 0.7003942181340341, "repo_name": "tensorflow/tensor2tensor", "id": "64cc7bc2c2c6e5358e70fb8c1f0527b2b93ce749", "size": "1367"...
"""Test environment for client library tests. This module has functions for creating keyspaces, tablets for the client library test. """ #!/usr/bin/env python # coding: utf-8 import hashlib import random import struct import threading import time import traceback import unittest import environment import tablet impo...
{ "content_hash": "744c8de53c5e104acc53bc3256edbb8b", "timestamp": "", "source": "github", "line_count": 650, "max_line_length": 148, "avg_line_length": 42.06461538461539, "alnum_prop": 0.634591470997001, "repo_name": "SDHM/vitess", "id": "9666339d182134f455c3b09d6b62f177e3d1f1c1", "size": "27342", ...
__author__ = 'anna' from PetersScheme.Vertex import Vertex_DooSabin from PetersScheme.Shape import Shape_DooSabin def DooSabin(vertices, faces, alpha, iter): vertices_refined = [] faces_refined = [] vertices_children = [ [] for _ in range(len(vertices))]#[None]*len(vertices) edges = [] #get list...
{ "content_hash": "cf9b4b6a27a2f81c8610f3ff792bffcd", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 194, "avg_line_length": 49.31730769230769, "alnum_prop": 0.5923181906804446, "repo_name": "BGCECSE2015/CADO", "id": "4cc6f13255cffccaa4deffe152945fd1f7643c5f", "size": "10...
import os import datetime import mimetypes from webskewer.common import http_status from webskewer.common import time_util, range_util from webskewer.common.exceptions import RangePastEOFError, BadRangeSpecError from webskewer.common.util import decodeurl from webskewer.wsgi.slash import with_slash, without_slash from...
{ "content_hash": "da548ddc66b145b6db33de64a56eaa2a", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 87, "avg_line_length": 40.81428571428572, "alnum_prop": 0.5042002100105005, "repo_name": "dhain/webskewer", "id": "5b0af22f313dab5cbd541466c22349267421539f", "size": "5714...
from yowsup.structs import ProtocolTreeNode from .iq_sync import SyncIqProtocolEntity class ResultSyncIqProtocolEntity(SyncIqProtocolEntity): ''' <iq type="result" from="491632092557@s.whatsapp.net" id="1417046561-4"> <sync index="0" wait="166952" last="true" version="1417046548593182" sid="1.30615237617e+...
{ "content_hash": "96b056d2dca5b63f009210c2cd039f42", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 116, "avg_line_length": 38.03809523809524, "alnum_prop": 0.6014021031547321, "repo_name": "felix-dumit/campusbot", "id": "f1f16bcfd8585ce3101a7567fe69f5ded5a47b82", "size"...
import numpy.distutils.system_info as sysinfo lib=sysinfo.lapack_mkl_info().get_info()['libraries'] def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config=Configuration('futils',parent_package,top_path) config.add_extension('fmodule',['fysics.f90'],li...
{ "content_hash": "26e799b43e7e845b036043bd2a234629", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 64, "avg_line_length": 38.416666666666664, "alnum_prop": 0.737527114967462, "repo_name": "GiggleLiu/tridmat", "id": "6bd29755af9daaa2077e1d895c097ebdf1617600", "size": "461...
import copy import fixtures import mock from oslo_utils.fixture import uuidsentinel as uuids from nova import block_device from nova import context from nova import exception from nova import objects from nova.objects import fields as obj_fields from nova import test from nova.tests.unit import fake_block_device impo...
{ "content_hash": "a8242ebf8b4b9e0e64a9d0342dc4ca87", "timestamp": "", "source": "github", "line_count": 1246, "max_line_length": 79, "avg_line_length": 44.951845906902086, "alnum_prop": 0.4719157293340475, "repo_name": "rahulunair/nova", "id": "ca31258fc2fe5c948ed5e59ce76123b41887a150", "size": "56...
"""Read and write FLAC Vorbis comments and stream information. Read more about FLAC at http://flac.sourceforge.net. FLAC supports arbitrary metadata blocks. The two most interesting ones are the FLAC stream information block, and the Vorbis comment block; these are also the only ones Mutagen can currently read. This...
{ "content_hash": "ca4146ac4faade71061077b455a22da9", "timestamp": "", "source": "github", "line_count": 680, "max_line_length": 79, "avg_line_length": 37.32205882352941, "alnum_prop": 0.5947830883801568, "repo_name": "tonyg/erlang-jukebox", "id": "1669a029b61ba41b80d9a99b6fc1cbec467afde8", "size": ...
""" Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
{ "content_hash": "13dcfbaaae7bdb2e14f2acd0ace3ad22", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 84, "avg_line_length": 26.576923076923077, "alnum_prop": 0.5691027496382055, "repo_name": "thauser/pnc-cli", "id": "176a76bff4bf1b601a1f6ab176efb4d0f46a9d6c", "size": "554...
from __future__ import unicode_literals from django.db import migrations, models import froide.account.models import froide.helper.storage class Migration(migrations.Migration): dependencies = [ ("account", "0012_application"), ] operations = [ migrations.AddField( model_nam...
{ "content_hash": "ec361f7694934526cee0b8e5c9b35326", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 70, "avg_line_length": 25.966666666666665, "alnum_prop": 0.5673940949935815, "repo_name": "fin/froide", "id": "c71464c118e77b7bf6f2d3bf58bc0d39581e6dbb", "size": "853", "...
import sys # always use shared/modules version SHARED_MODULE_PATH = "../../../../shared/modules" sys.path.insert(0, SHARED_MODULE_PATH) import testcheck_module if __name__ == "__main__": testcheck_module.main()
{ "content_hash": "5038344442bb87f2f54401f1223d4dd5", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 49, "avg_line_length": 24.11111111111111, "alnum_prop": 0.6774193548387096, "repo_name": "ykhodorkovskiy/clip", "id": "b31fc3e21dd081d8a4dc5044600fb783211c8151", "size": "23...
from flask import request from framework.auth import Auth, decorators from framework.utils import iso8601format from website.registries import utils def _view_registries_landing_page(campaign=None, **kwargs): """Landing page for the various registrations""" auth = kwargs['auth'] = Auth.from_kwargs(request.arg...
{ "content_hash": "0dd28a9f800ec4a603e46fc3600fffd8", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 91, "avg_line_length": 33.12698412698413, "alnum_prop": 0.5975083852419741, "repo_name": "icereval/osf.io", "id": "ada0b6e53b0748bc86c300799e9083a8e2cd355b", "size": "2111"...
__title__ = 'pyramid_cli' __summary__ = 'Tools for managing pyramid applications!' __uri__ = 'http://github.com/surveymonkey/pyramid_cli' __version__ = '0.0.2' __author__ = 'John Anderson' __email__ = 'johna@surveymonkey.com' __license__ = 'MIT' __copyright__ = '2015 SurveyMonkey'
{ "content_hash": "ea5918a1401610561415a561e13fb90c", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 56, "avg_line_length": 35.25, "alnum_prop": 0.648936170212766, "repo_name": "SurveyMonkey/pyramid_cli", "id": "8293bcf4586052117352f63c5eb7440016ccc435", "size": "282", "b...
import sys from setuptools.command.test import test as TestCommand from setuptools import setup, find_packages class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args ...
{ "content_hash": "a52192625dc5687619f59b8361f100f3", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 74, "avg_line_length": 28.6, "alnum_prop": 0.6520979020979021, "repo_name": "damonkelley/pattern-matcher", "id": "6f54f774f61e845d80f36d9c5baee1f3df3a670b", "size": "1168",...
from .window import window from strict_functions import strict_globals @strict_globals(window=window) def all_substrings(s): ''' yields all substrings of a string ''' join = ''.join for i in range(1, len(s) + 1): for sub in window(s, i): yield join(sub) del window del strict_globals
{ "content_hash": "9cfdc4f3697908ae914662620689ff08", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 45, "avg_line_length": 22.785714285714285, "alnum_prop": 0.6520376175548589, "repo_name": "CodyKochmann/generators", "id": "1c984c2b4c78d16a7ac42b11120b1030862e206d", "size...
""" Copies the Unity Firestore testapp from the Firebase Unity SDK GitHub repository into another directory and tweaks its structure and configuration to suit local development. For example, it copies the "framework" files into their correct locations even though they are located in a different directory tree in the Gi...
{ "content_hash": "2401002c46b5c3bcf3278fd4ece1222d", "timestamp": "", "source": "github", "line_count": 501, "max_line_length": 99, "avg_line_length": 37.936127744510976, "alnum_prop": 0.6784699568557297, "repo_name": "firebase/firebase-unity-sdk", "id": "08fea64304eb0f198b3eea0c087403cece4ebb88", ...
from lib.test import Shaman queries = [ ( "What is the tallest building in the world?", "Burj Khalifa (2717 feet)", "tallest_building.dat" ), ( "Where was George Washington born?", "Westmoreland County, Virginia", "george_washington_birthplace.dat" ), ( "When is East...
{ "content_hash": "d80151727328489de7647c9b35af553d", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 75, "avg_line_length": 27.102040816326532, "alnum_prop": 0.5143072289156626, "repo_name": "dvrasp/TheTroz", "id": "94be2372c9b6569963e1345ba5e3c4281ad4233a", "size": "1328"...
""" formcontrol.py - The helper class to control form transition and helper decorators $Id: formcontrol.py 639 2010-08-10 04:08:49Z ats $ """ __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'plaintext' __licence__ = 'BSD' __all__ = ('FormControl', 'handle_state', 'validat...
{ "content_hash": "30ab33f1802e0213285da59223d79c99", "timestamp": "", "source": "github", "line_count": 190, "max_line_length": 79, "avg_line_length": 29.094736842105263, "alnum_prop": 0.5300289435600579, "repo_name": "Letractively/aha-gae", "id": "f96bec6ac9ec897f2f5c9b653eeb5faa41b51d40", "size":...
def hello(name): print('Hello ' + name) hello('Alice') hello('Bob')
{ "content_hash": "d0ebc41c02a25eb4a2e28c4cf127960d", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 26, "avg_line_length": 15.6, "alnum_prop": 0.5641025641025641, "repo_name": "jakdept/pythonbook", "id": "7b7b309020d5a98c6f5bb485523ffb777c7641ca", "size": "78", "binary":...
"""Tests for debugger functionalities in tf.Session.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import glob import os import shutil import tempfile import threading import numpy as np from six.moves import xrange ...
{ "content_hash": "a069721d101c5c9b0d92ebfc49a18951", "timestamp": "", "source": "github", "line_count": 1557, "max_line_length": 80, "avg_line_length": 41.04303147077714, "alnum_prop": 0.6384576865297947, "repo_name": "alsrgv/tensorflow", "id": "b438b6500ae2432307720d80b7d957c6bf24aabc", "size": "6...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SteamProfile.userid' db.add_column(u'profiles_steamprofile', 'userid', ...
{ "content_hash": "1ea8d4357557502c22aa915d45278b72", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 195, "avg_line_length": 73.69014084507042, "alnum_prop": 0.5560970948012233, "repo_name": "Ell/goonauth", "id": "098e52bdb246369cdc68958f8f968fcdf45e94dd", "size": "10488"...
""" WSGI config for atmsite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
{ "content_hash": "eea435196b6ca391602f1c96484dbf76", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 24.4375, "alnum_prop": 0.7698209718670077, "repo_name": "andkononykhin/atmsite", "id": "113d75de6403fd635221aa278d9da8d6635e3ee9", "size": "391", "...
import os import sys import sphinx_bootstrap_theme # import your package to obtain the version info to display on the docs website sys.path.insert(0, os.path.abspath("../")) import spaghetti # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx ve...
{ "content_hash": "f9fcda08fed2a918cf6363fcabf840b7", "timestamp": "", "source": "github", "line_count": 297, "max_line_length": 206, "avg_line_length": 33.08080808080808, "alnum_prop": 0.645089058524173, "repo_name": "pysal/spaghetti", "id": "35a5f57e3df0367b8005ac8d461af65b1ab5fd99", "size": "1043...
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="parcoords", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_...
{ "content_hash": "4bab0bd4931e5d316daef94ac8cdf8b0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 78, "avg_line_length": 35.54545454545455, "alnum_prop": 0.6163682864450127, "repo_name": "plotly/plotly.py", "id": "014cc51124093bd58d1c7d8a23d449ab732ae298", "size": "391"...
''' Created on Aug 30, 2015 @author: Amol ''' from pydelicious import get_tagposts, get_userposts, get_urlposts from time import sleep from os.path import exists from pickle import load, dump from itertools import groupby from recommendations import getRecommendations, topMatches import random #Note: This reco syste...
{ "content_hash": "aac015b2fdba70ab6b8d9502ef876b9d", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 119, "avg_line_length": 41.449438202247194, "alnum_prop": 0.6427216047709406, "repo_name": "amolnayak311/Programming-Collective-Intelligence", "id": "8cc6fa6f3e6196b9604584c9...
from kivy.factory import Factory r = Factory.register r('Adapter', module='kivy.adapters.adapter') r('ListAdapter', module='kivy.adapters.listadapter') r('SimpleListAdapter', module='kivy.adapters.simplelistadapter') r('DictAdapter', module='kivy.adapters.dictadapter') r('SelectableDataItem', module='kivy.adapters.mod...
{ "content_hash": "030123d3f9b8aa9aed8da6e0b23354d4", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 67, "avg_line_length": 47.69491525423729, "alnum_prop": 0.7527837005448946, "repo_name": "Farkal/kivy", "id": "72bd3e6815322c8e330a017b71305f71b6bc9191", "size": "8491", ...
import pygame import os import pygame.event import xml.etree.cElementTree as ET from pygame.locals import * from pprint import pprint def load_png(name): """ Load image and return image object """ fullname = os.path.join('data', name) try: image = pygame.image.load(fullname) ...
{ "content_hash": "93726f94de87061e9ca0d943265908e3", "timestamp": "", "source": "github", "line_count": 322, "max_line_length": 114, "avg_line_length": 37.76086956521739, "alnum_prop": 0.48934945308002303, "repo_name": "Reyuu/yiisu", "id": "cd5a78fa6347518fc40d021b84c1dec8d034ef90", "size": "12159"...
import requests from ubersmith_client.exceptions import UbersmithException, get_exception_for def init(url, user, password): return UbersmithApi(url, user, password) class UbersmithApi(object): def __init__(self, url, user, password): self.url = url self.user = user self.password = ...
{ "content_hash": "ece9e8f934fc510d2d12659b963b37c4", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 100, "avg_line_length": 30.470588235294116, "alnum_prop": 0.6172779922779923, "repo_name": "Marx314/python-ubersmithclient", "id": "5796838026ceeaadaecd48f644ac28f93c74e34e",...
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse import os.path from typing import Optional from typing import Sequence def main(argv=None): # type: (Optional[Sequence[str]]) -> int parser = argparse.ArgumentParser(description='...
{ "content_hash": "911b7eac2a2008c2caf9f879e33cfbae", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 79, "avg_line_length": 27.1, "alnum_prop": 0.6396063960639606, "repo_name": "Harwood/pre-commit-hooks", "id": "736bf99c0edb76202fc663f10c071567ab84f39b", "size": "813", "...
import logging from botocore.exceptions import ClientError from concurrent.futures import as_completed from c7n.actions import ActionRegistry, BaseAction from c7n.filters import FilterRegistry, AgeFilter, OPERATORS import c7n.filters.vpc as net_filters from c7n.manager import resources from c7n.query import QueryReso...
{ "content_hash": "74580422a508718cc63c183cc4cabe72", "timestamp": "", "source": "github", "line_count": 214, "max_line_length": 79, "avg_line_length": 34.61214953271028, "alnum_prop": 0.6034831915755366, "repo_name": "jeffastorey/cloud-custodian", "id": "8a01fcb17126a0a45707e722a13a4eba5b8126b7", "...
from __future__ import absolute_import, unicode_literals from . import forms, views from .models import (Application, ConnectedAccount, Charge, Customer, Plan, StandardAccount, Subscription) from copy import copy from django.conf.urls import patterns, url from django.core.urlresolvers import revers...
{ "content_hash": "9ad3e71d78a5f5897d580a4ca5bdc4de", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 79, "avg_line_length": 30.945205479452056, "alnum_prop": 0.6468939058580493, "repo_name": "thecut/thecut-stripe", "id": "a8046275a468efaaab4728f031b27e460e562553", "size":...
from setuptools import setup from setuptools import find_packages version = "0.1" setup( name="rapidsms", version="0.1", maintainer="RapidSMS development community", maintainer_email="rapidsms@googlegroups.com", description="A framework for building messaging applications", url="http://rapidsm...
{ "content_hash": "d8d127c57eaea0cacd1e523122342ab2", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 66, "avg_line_length": 28.642857142857142, "alnum_prop": 0.6097256857855362, "repo_name": "genova/rapidsms-senegal", "id": "bcccab6cce94e9d2a6c3ae5a881c79522afc1d2d", "size...
"""Google Cloud Bigtable HappyBase pool module.""" import contextlib import threading import six from gcloud.bigtable.happybase.connection import Connection from gcloud.bigtable.happybase.connection import _get_instance _MIN_POOL_SIZE = 1 """Minimum allowable size of a connection pool.""" class NoConnectionsAva...
{ "content_hash": "b18effaa594bc5715a6ca41a0d68781d", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 79, "avg_line_length": 37.857142857142854, "alnum_prop": 0.6252830188679245, "repo_name": "elibixby/gcloud-python", "id": "f670065fb049d67fe5ac54a9f7b441c927b1b3a7", "size...
"""Solvers of systems of polynomial equations.""" import collections from ..domains import EX from ..matrices import Matrix from ..polys import groebner, poly, sring from ..polys.polyerrors import ComputationFailed, PolificationFailed from ..polys.polytools import parallel_poly_from_expr from ..polys.solvers import s...
{ "content_hash": "400a2dbefc05a271599cbb72980db4ec", "timestamp": "", "source": "github", "line_count": 245, "max_line_length": 81, "avg_line_length": 29.616326530612245, "alnum_prop": 0.5587100330760749, "repo_name": "skirpichev/omg", "id": "b312f7fcdf3a80ca93bbef354c3635e0bae45220", "size": "7256...
""" ============================== Asynchronous stochastic solver ============================== This example illustrates the convergence speed of the asynchronous version of SVRG and SAGA solvers. This solver respectively called KroMagnon and ASAGA have been introduced in * Mania, H., Pan, X., Papailiopoulos, D., Re...
{ "content_hash": "61e621be8170582ebe661649049bf05f", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 92, "avg_line_length": 32.20987654320987, "alnum_prop": 0.6742046761211192, "repo_name": "Dekken/tick", "id": "d3447be84bd275e623145daec49123804e37e3ec", "size": "2609", ...
import sys, 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('.')) sys.path.insert(0, os.pa...
{ "content_hash": "34eaa544074f584a53b3d8c56cae8eb5", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 95, "avg_line_length": 31.98283261802575, "alnum_prop": 0.6906870638754696, "repo_name": "vmlaker/mpipe", "id": "214fa6cbf133d87ed0ebb81aae0a225000f4cd26", "size": "7581",...
VerbDict = {'verbs':{}, 'phrases':{}, 'transformations' : {}} # verb dictionary ActorDict = {} # actor dictionary ActorCodes = [] # actor code list AgentDict = {} # agent dictionary DiscardList = {} # discard list IssueList = [] IssueCodes = [] ConfigFileName = "PETR_config.ini" VerbFileName = "" # verb dictiona...
{ "content_hash": "feae56161b34c33259136ae9c777231c", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 117, "avg_line_length": 35.62352941176471, "alnum_prop": 0.6984808454425363, "repo_name": "opcoder/zh_ptr", "id": "b2318043b32f41dad459a4c0c75cc651869e6399", "size": "4184"...
from __future__ import absolute_import from pychron.entry.export.base_irradiation_exporter import BaseIrradiationExporter class YAMLIrradiationExporter(BaseIrradiationExporter): """ export irradiations from pychron database to an YAML file """ # ============= EOF ========================================...
{ "content_hash": "9945d6ee9a908228d70a5190047098f0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 82, "avg_line_length": 29.636363636363637, "alnum_prop": 0.6349693251533742, "repo_name": "USGSDenverPychron/pychron", "id": "10d3c94fb5d8bf3e3b4900a520d3165a3c23d27f", "si...
import base64 import binascii import logging import lxml.html import re import time from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union from django.conf import settings from django.db import IntegrityError, transaction from django.db.models import F from django.utils.timezone import now as timez...
{ "content_hash": "076c333149e8eecae7fac861063dbe0a", "timestamp": "", "source": "github", "line_count": 741, "max_line_length": 107, "avg_line_length": 42.472334682860996, "alnum_prop": 0.6217590238942552, "repo_name": "tommyip/zulip", "id": "da65e42375bbf059bc81c42f7406090e14b54199", "size": "3149...
from pythonic_testcase import * from soapfish import xsdspec class XSDSpecSchemaTest(PythonicTestCase): def test_can_parse_references(self): xml = ('<xs:schema targetNamespace="http://site.example/ws/spec" \n' ' xmlns:example="http://site.example/ws/spec" \n' ' xmlns:xs="htt...
{ "content_hash": "d633da4ee967d3c30f19a626a80b6789", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 76, "avg_line_length": 40.38461538461539, "alnum_prop": 0.5073015873015873, "repo_name": "vpistis/soapfish", "id": "3aefaa4e67139de763c5f5fc06130f363453186c", "size": "1576...
import terminal class MyCommand(terminal.Command): def print_title(self, title): if 'Option' in title: print(terminal.magenta(title)) elif 'Command' in title: print(terminal.green(title)) return self program = MyCommand('terminal') # add actions subcommand = te...
{ "content_hash": "81025f14a374521e4b3612560cdef57e", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 59, "avg_line_length": 20.571428571428573, "alnum_prop": 0.6620370370370371, "repo_name": "lepture/terminal", "id": "15de404185ff7baa5f5603ed4f0416b5468ea392", "size": "881...
from __future__ import division import numpy as np from numpy.testing import assert_almost_equal import pytest from statsmodels.datasets import heart from statsmodels.tools import add_constant from statsmodels.emplike.aft_el import emplikeAFT from .results.el_results import AFTRes class GenRes(object): @classme...
{ "content_hash": "315ac799f16d1fe96d83c390f9ad2888", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 70, "avg_line_length": 31.32, "alnum_prop": 0.5983397190293742, "repo_name": "ChadFulton/statsmodels", "id": "e0a04a409863e3df4cac5b2bc998e8c9ee74a2d7", "size": "1566", "...
speech = Runtime.start('speech','Speech')
{ "content_hash": "a58bf92fc5a5430d7f12c379a8103862", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 41, "avg_line_length": 42, "alnum_prop": 0.7142857142857143, "repo_name": "MyRobotLab/pyrobotlab", "id": "1b9162fb8d013704131cd4e34bfc9ed94033a27c", "size": "275", "binary...
import os import sys from neutron_lib import constants from oslo_config import cfg from oslo_log import log as logging import oslo_messaging from oslo_service import service from neutron._i18n import _LE, _LI from neutron.agent.linux import ip_lib from neutron.agent.linux import utils from neutron.agent import securi...
{ "content_hash": "d03bdddeae6b821a7dfca36b37c9aa1e", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 79, "avg_line_length": 39.33990147783251, "alnum_prop": 0.6344853493613825, "repo_name": "igor-toga/local-snat", "id": "41115f8d3945301993c71c71e2dd1410b790cd2b", "size": ...
import collections from ..error import Error from ..language import ast def is_input_type(type): named_type = get_named_type(type) return isinstance(named_type, ( GraphQLScalarType, GraphQLEnumType, GraphQLInputObjectType, )) def is_composite_type(type): named_type = get_name...
{ "content_hash": "03b1d106a0a2dd1818a3d2988d1a2ac8", "timestamp": "", "source": "github", "line_count": 476, "max_line_length": 142, "avg_line_length": 31.24579831932773, "alnum_prop": 0.603173535937605, "repo_name": "gabriel-laet/graphql-py", "id": "61b4cd5a71a98834b7239e53f212217d31fee310", "size...
import os import sys import textwrap from os.path import abspath, dirname, join as pjoin from distutils.command import build #----------------------------------------------------------------------------- try: from setuptools import setup, Extension from setuptools.command import bdist_egg, develop except Impo...
{ "content_hash": "e7183c201ddc260ab45b1c7b46679335", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 92, "avg_line_length": 36.23529411764706, "alnum_prop": 0.5043290043290043, "repo_name": "ev3dev/python-evdev", "id": "76edd6511f7372920c7eddf723cbc099b954e13e", "size": "...
from django.db import models from django.core.urlresolvers import reverse from django.utils.text import slugify from django.utils.datastructures import OrderedSet from polymorphic.models import PolymorphicModel from edtf.fields import EDTFField from icekit.content_collections.abstract_models import TitleSlugMixin, \...
{ "content_hash": "6e1c5e74c6fb89d4ad8554b2215b6958", "timestamp": "", "source": "github", "line_count": 528, "max_line_length": 139, "avg_line_length": 34.75189393939394, "alnum_prop": 0.6169818518720366, "repo_name": "ic-labs/glamkit-collections", "id": "6c1543e5200cc9838a64b4348f70584a3eb7e458", ...
"""The tests for the MQTT light platform. Configuration for RGB Version with brightness: light: platform: mqtt name: "Office Light RGB" state_topic: "office/rgb1/light/status" command_topic: "office/rgb1/light/switch" brightness_state_topic: "office/rgb1/brightness/status" brightness_command_topic: "offic...
{ "content_hash": "1dc30d6d52e0e3384bfc4fec18ec45ce", "timestamp": "", "source": "github", "line_count": 1429, "max_line_length": 78, "avg_line_length": 35.32680195941218, "alnum_prop": 0.623568796798859, "repo_name": "nugget/home-assistant", "id": "cfb0d75d1c721009156f7da668e42b5eb2993d35", "size":...
import os from py2neo import Graph import config def create_p2n_driver(): graph = Graph("http://{}:{}@{}:7474/db/data/".format( os.environ.get('neo4juser') or config.get('neo4j', 'user'), os.environ.get('neo4jpass') or config.get('neo4j', 'pass'), os.environ.get('neo4jhost') or config.get...
{ "content_hash": "b2893fb3fe2960a87223d02541dd6797", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 68, "avg_line_length": 29.75, "alnum_prop": 0.6246498599439776, "repo_name": "nikitamarchenko/open-kilda", "id": "0f7d793311fee8878b5078a03b66c7aeeecfa9fb", "size": "961", ...
""" .. module:: livefyre :platform: Unix, Windows :synopsis: Defines a REST API wrapper for Livefyre's (livefyre.com) v3 commenting system. .. moduleauthor:: Jason Novinger <jnovinger@gmail.com> """ import hashlib import json import os from urllib import urlencode import urlparse import requests from ...
{ "content_hash": "6086a4702414264ec18dbafc107f75dd", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 119, "avg_line_length": 32.48347107438016, "alnum_prop": 0.5997964635542552, "repo_name": "jnovinger/python-livefyre", "id": "b23ff032a1aa90a3f8166e6b63b5363dae783083", "s...
import os import pickle import pandas as pd import numpy as np import xgboost as xgb import lightgbm as lgbm from utils import * def xgboost(XY_train, XY_validate, test_df, features, XY_all=None, restore=False): param = { 'objective': 'multi:softprob', 'eta': 0.1, 'min_child_weight': 10...
{ "content_hash": "d162ed00f03f324be491006650f719b6", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 150, "avg_line_length": 40.21052631578947, "alnum_prop": 0.6154013961605584, "repo_name": "yaxinus/santander-product-recommendation-8th-place", "id": "8edef46081b10f94974749...
"""Creates grid social games from ASCII art diagrams.""" from __future__ import print_function import collections from gym import spaces import numpy as np # Careful with convention 'up' is displayed as -1 on the grid plot. MOVING_ACTIONS = { 'stand': np.array([0, 0]), 'up': np.array([0, -1]), 'down': n...
{ "content_hash": "c8d3281398d2a60ac7d1ec713b6cc97d", "timestamp": "", "source": "github", "line_count": 690, "max_line_length": 80, "avg_line_length": 34.857971014492755, "alnum_prop": 0.6264343921503409, "repo_name": "google-research/google-research", "id": "86ded45238df7a992c2e17a1db33f6a686521397"...
''' This program will generate a list of all subdirectories and files within the current working directory''' import os # Grab current directory and create a file name based upon that. currentdirectory = os.getcwd() dirname = currentdirectory.split('/') pathfile = dirname[-1] + ".path" f = open(pathfile, 'a') #wal...
{ "content_hash": "7598d8270737a4c47669715866d49e4d", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 64, "avg_line_length": 29.333333333333332, "alnum_prop": 0.7059659090909091, "repo_name": "amikiri/path_tree", "id": "52d633b658562feae660f5dfc9f1ca248b7ce290", "size": "72...
"""conll2002 dataset.""" from tensorflow_datasets.text.conll2002.conll2002 import Conll2002
{ "content_hash": "3edbde0f33b9d70f833659722a47eb70", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 66, "avg_line_length": 31, "alnum_prop": 0.8064516129032258, "repo_name": "tensorflow/datasets", "id": "a3aebc466b90d1bd11f4a8d6439bf1ec24af7204", "size": "705", "binary":...
import _plotly_utils.basevalidators class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="bar", **kwargs): super(WidthsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
{ "content_hash": "03269a7d5618462e88ea6e686cb1be72", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 76, "avg_line_length": 35.72727272727273, "alnum_prop": 0.6183206106870229, "repo_name": "plotly/plotly.py", "id": "00296c11f36a7927b10d9d6137b63931b2cf8460", "size": "393"...
from datetime import datetime import email.parser import hashlib import locale import random import six from six.moves import urllib import time import unittest2 import uuid from copy import deepcopy import eventlet from unittest2 import SkipTest from swift.common.http import is_success, is_client_error from email.util...
{ "content_hash": "0a87ca9db8f3ef90771b2a0b89410ec7", "timestamp": "", "source": "github", "line_count": 2866, "max_line_length": 79, "avg_line_length": 40.76587578506629, "alnum_prop": 0.55547567081782, "repo_name": "clayg/swift", "id": "4af65418dda651da934d1115f9537ad4dd3e14a9", "size": "117451", ...
print """ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! !! Flatten files of current folder, recursively. !! !! .eg. moves all files under all sub-folders to !! !! current folder. !! !! ...
{ "content_hash": "cbb44e4c0de617edef756fc9c0e4cef5", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 59, "avg_line_length": 32.029411764705884, "alnum_prop": 0.3948576675849403, "repo_name": "realfun/handyscripts", "id": "1972b80604939f620156f7f1a4fbf74f258562b1", "size": ...
import nltk import re from nltk.stem.snowball import SnowballStemmer from nltk.corpus import stopwords def identificaTitulo(cedula, tituloAnterior): titulo=cedula[0][1:len(cedula[0])] #fiz esse tamanho minimo para ele nao pegar nem um lixo, e como o menor nome de capitulo eh JON, nao teremos problema if titulo.upp...
{ "content_hash": "a9822a162d7176c4c1ced593be0d5c42", "timestamp": "", "source": "github", "line_count": 247, "max_line_length": 131, "avg_line_length": 31.097165991902834, "alnum_prop": 0.7212602525712798, "repo_name": "jonnyguio/GOT-WiSARD", "id": "80f6ae63c594301496e82247842003b875f22a0c", "size"...
from unittest.mock import patch from django.test import TestCase from waldur_core.core import utils as core_utils from waldur_core.structure import models as structure_models from waldur_core.structure.tests import factories as structure_factories from waldur_openstack.openstack import apps from .. import factories ...
{ "content_hash": "f13f7c7b93fe03c0fa50087fa05e8fe4", "timestamp": "", "source": "github", "line_count": 152, "max_line_length": 101, "avg_line_length": 36.57236842105263, "alnum_prop": 0.6292498650836481, "repo_name": "opennode/nodeconductor-assembly-waldur", "id": "0a6d4096aabaa8858421384f7f46578d56...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0136_device_airflow'), ('virtualization', '0023_virtualmachine_natural_ordering'), ] operations = [ migrations.AlterField( model_name='cluster', name...
{ "content_hash": "cb1e6b3d07b191630f0d0f8c1a0adbb8", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 67, "avg_line_length": 25.904761904761905, "alnum_prop": 0.5588235294117647, "repo_name": "digitalocean/netbox", "id": "5ff214d295880c06348c9c38ef2ea939af665231", "size": "...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Snippet' db.create_table('snippet_snippet', ( ('id', self.gf('django.db.models.fields.AutoField'...
{ "content_hash": "1f654b57fd0ac9fb973e57fab7427ac8", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 163, "avg_line_length": 61.23762376237624, "alnum_prop": 0.5535974130962005, "repo_name": "nicksergeant/snipt-old", "id": "8ae0b8232434a5d7e18e2a19c825a4af87933b91", "size...
import unittest from pbxproj.XcodeProject import * class ProjectGroupsTest(unittest.TestCase): def setUp(self): self.obj = { 'objects': { 'root': {'isa': 'PBXGroup', 'children': ['1', '1p']}, '1': {'isa': 'PBXGroup', 'name': 'root', 'children': ['2', '3']}, ...
{ "content_hash": "d957878aff24dba2c352684c0d913d37", "timestamp": "", "source": "github", "line_count": 212, "max_line_length": 103, "avg_line_length": 40.15094339622642, "alnum_prop": 0.5977443609022557, "repo_name": "dayongxie/mod-pbxproj", "id": "c9e9b813f6419141e800caa1a20e8e6c145b7849", "size"...
import datetime from django import http from django.contrib import messages from django.core.urlresolvers import reverse from django.shortcuts import redirect from django_openstack import api from django_openstack import utils from django_openstack.dash.views.floating_ips import FloatingIpAssociate from django_opensta...
{ "content_hash": "831f557cb7371332e4e81c010b98551e", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 80, "avg_line_length": 47.2970297029703, "alnum_prop": 0.5576721791919614, "repo_name": "ntt-pf-lab/horizon", "id": "cd926ca1112eaf4f839b6c76f76b04be5a755bea", "size": "10...
from setuptools import setup, find_packages import mosql with open('README.rst', 'rb') as f: README = f.read() # We want README to be a str, no matter it is byte or text. 'rb' reads bytes, # so we need extra conversion on Python 3. On Python 2 bytes is synonym to str, # and we're good. if not isinstance(README,...
{ "content_hash": "348f29b0f526ac341afee702d07a4583", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 79, "avg_line_length": 32.09756097560975, "alnum_prop": 0.6268996960486323, "repo_name": "uranusjr/mosql", "id": "3d7e7e80c3bdce7cd3ca164309e99aee796eb0e0", "size": "1363",...
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/intangible/ship/shared_prototype_tiefighter_pcd.iff" result.attribute_template_id = 8 result.stfName("space_item_n","tiefighter_pcd") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "d6601c9683f60e235a7ef052a326265e", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 79, "avg_line_length": 24.46153846153846, "alnum_prop": 0.7075471698113207, "repo_name": "obi-two/Rebelion", "id": "118e9d76155331c962c757f7ee08b9fee7251384", "size": "463"...
try: import json except ImportError: import simplejson as json from Base import materializerBase class materializer(materializerBase): """ """ def buildCapture(self): """ Builds the deployment capture base on input. """ stepsCount = 2 nodeCount = 2 ...
{ "content_hash": "cb6c75a6f01311955801910d0bd1baa7", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 163, "avg_line_length": 29.802197802197803, "alnum_prop": 0.49336283185840707, "repo_name": "foundation-runtime/orchestration", "id": "34a0a995a7be1ef17bf657de70e87fca6889ed2...
import hf from sqlalchemy import * from urllib2 import Request, urlopen, URLError from decimal import * import json class DDM(hf.module.ModuleBase): config_keys = { 'site_name': ('Site name', 'GOEGRID'), 'cloud': ('Cloud', 'DE'), 'time_interval': ('Time interval in minutes', '120'), ...
{ "content_hash": "216f10b76a090ea0354bac9ddd436e5f", "timestamp": "", "source": "github", "line_count": 349, "max_line_length": 396, "avg_line_length": 64.79083094555874, "alnum_prop": 0.6122412878117813, "repo_name": "HappyFaceGoettingen/HappyFaceATLASModules", "id": "5578a5ef1b62e72670745e6f444a6af...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) # with open(os.path.join(here, 'README.md')) as f: # README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'pyramid', 'pyramid_jinja2', 'pyramid_d...
{ "content_hash": "2a7fa9f4690c4b2b822062cb4f328c98", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 65, "avg_line_length": 24.147540983606557, "alnum_prop": 0.5661914460285132, "repo_name": "Elections-R-Us/Elections-R-Us", "id": "34430253340dec46322431105a13f7502ef81e46", ...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
{ "content_hash": "69adc2d9331d57e5812929e8b8dfd5e2", "timestamp": "", "source": "github", "line_count": 906, "max_line_length": 460, "avg_line_length": 30.221854304635762, "alnum_prop": 0.6858040246886528, "repo_name": "atopuzov/nitro-python", "id": "dd792e40ed039e7b54c1def20cb300aa2c8068c8", "size...
import unittest from got_1 import contains_palindrome class TestGOTOne(unittest.TestCase): def test_given(self): self.assertTrue(contains_palindrome('aaabbbb')) self.assertFalse(contains_palindrome('cdefghmnopqrstuvw')) self.assertTrue(contains_palindrome('cdcdcdcdeeeef')) if __name__ ==...
{ "content_hash": "7c07e9fd2fbc881087dbdc7751108f61", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 66, "avg_line_length": 27.076923076923077, "alnum_prop": 0.7073863636363636, "repo_name": "Goyatuzo/Challenges", "id": "65c1a4054797ed69977211b1f41d21fd0b095140", "size": "...
"""Support for IKEA Tradfri lights.""" from __future__ import annotations from collections.abc import Callable from typing import Any, cast from pytradfri.command import Command from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_TRANSITION, SUPPORT_...
{ "content_hash": "712a9896038d8514807ddc3f20f9c7a1", "timestamp": "", "source": "github", "line_count": 279, "max_line_length": 86, "avg_line_length": 35.516129032258064, "alnum_prop": 0.5898677969522657, "repo_name": "aronsky/home-assistant", "id": "53309e144ffee30eff9118f4a0a5c057c417c083", "size...
from devilry.restful import restful_modelapi, ModelRestfulView, RestfulManager from devilry.apps.extjshelpers import extjs_restful_modelapi from devilry.apps.administrator.restful import (RestfulSimplifiedAssignment, RestfulSimplifiedDelivery) from ..simplified.administra...
{ "content_hash": "4b3ac12b3994d4f66f558e3fcd602cb9", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 93, "avg_line_length": 40.607142857142854, "alnum_prop": 0.762532981530343, "repo_name": "vegarang/devilry-django", "id": "88e4280b21b36b38f419e54aaab3d822b65e1066", "size"...
import inspect from typing import Any, MutableMapping from ._kernel.types import JSClass, Referenceable _types = {} _data_types: MutableMapping[str, Any] = {} _enums: MutableMapping[str, Any] = {} _interfaces: MutableMapping[str, Any] = {} def register_type(klass: JSClass): _types[klass.__jsii_type__] = klass...
{ "content_hash": "fc1642bf412be173748b52de23c2efcc", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 89, "avg_line_length": 34.017699115044245, "alnum_prop": 0.6061394380853278, "repo_name": "randyzingle/tools", "id": "e183cc8d49d48f1e2dc7233b40adfea824d13afb", "size": "3...
import sys import os import pdb import girder_client import json import urllib2 import numpy as np import scipy import cv2 import math def ensure_path(dir_path): parent, name = os.path.split(dir_path) if name == '': return ensure_path(parent) ensure_dir(dir_path) def ensure_dir(dir_path): ...
{ "content_hash": "01044e657784834d67b7618f7f6083ba", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 65, "avg_line_length": 23.045801526717558, "alnum_prop": 0.60947333554157, "repo_name": "law12019/deep_learning", "id": "2bbb9d2549c1d95865f912e94fc5503865969083", "size":...
from datetime import datetime import dateutil.parser import tornado.ioloop import tornado.web from edb_converter import converter from starcharts import sky_area from starcharts.coord_calc import CoordCalc from starcharts.diagram import Diagram from starcharts.input_file import InputFile class MainHandler(tornado.w...
{ "content_hash": "7ea5e388524f4e7a6e48e26a8728fb3a", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 88, "avg_line_length": 28.949494949494948, "alnum_prop": 0.5565247732030705, "repo_name": "ogun/starmap", "id": "8272ff4400fb95fd7659b76947269ccb02434fbc", "size": "2866", ...
''' Copyright (c) 2017, 2018 Chongzhi Zang, Zhenjia Wang <zhenjia@virginia.edu> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License. @status: release candidate @version: $Id$ @author: Chongzhi Zang, Zhenjia Wang @contact: zhenjia@virginia.edu ''' import sys,io,re...
{ "content_hash": "c529035d380f613d391fc23d06a43457", "timestamp": "", "source": "github", "line_count": 240, "max_line_length": 119, "avg_line_length": 34.295833333333334, "alnum_prop": 0.5757502126108613, "repo_name": "zhenjiawang157/BART_Py2", "id": "9f0cb914037f21fd42f329ef26079f642a155244", "si...
import sys, 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('.')) # adding PhpLexer from ...
{ "content_hash": "999532af2e6c86c2d182d042a47a01f2", "timestamp": "", "source": "github", "line_count": 247, "max_line_length": 91, "avg_line_length": 32.73279352226721, "alnum_prop": 0.700803957946815, "repo_name": "sonata-project/exporter", "id": "db2c84b3dd848bdec7ba89fe5bd23f60424d8ee1", "size"...
import unittest from swift.common.swob import Request, Response from informant import middleware class FakeApp(object): def __init__(self, status_headers_body_iter=None): self.calls = 0 self.status_headers_body_iter = status_headers_body_iter if not self.status_headers_body_iter: ...
{ "content_hash": "b1f8bd31ce1680c2ebc330b8d83b0451", "timestamp": "", "source": "github", "line_count": 375, "max_line_length": 91, "avg_line_length": 50.074666666666666, "alnum_prop": 0.6049100010650762, "repo_name": "rovanleeuwen/informant", "id": "be3b7356a804bda35b83e8e06b4d12b76720e554", "size...
__version_info__ = ('0', '0', '3') __version__ = '.'.join(__version_info__) from .heap import heap from .autovivify import AutovivifiedDict from .objectify import ObjectifiedDict
{ "content_hash": "7250ae9bf13d0283b05b2c570ff83f27", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 40, "avg_line_length": 30, "alnum_prop": 0.6888888888888889, "repo_name": "Ceasar/trees", "id": "961caeb1194a7cec1b89058b5cd7acb03ae93937", "size": "180", "binary": false,...
from gui.options.abstractOption import AbstractOption __author__ = 'andres' class PlayOption(AbstractOption): def accept(self, file_name): dspPlay.start()
{ "content_hash": "6da126b24871ca6c340be5abb635b756", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 53, "avg_line_length": 20.125, "alnum_prop": 0.7577639751552795, "repo_name": "andimarafioti/intercomunicador", "id": "c0f1c08e46f021e49d3228379b9cd2c40ca90e22", "size": "20...
import datetime import os import sys import weakref from distutils.version import StrictVersion import jinja2 from flask import Flask, Request from flask.helpers import safe_join from flask_migrate import upgrade from jinja2 import FileSystemLoader from jinja2.sandbox import SandboxedEnvironment from werkzeug.middlewa...
{ "content_hash": "d76057f2b858030f71a5363e61041787", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 119, "avg_line_length": 36.71661237785016, "alnum_prop": 0.6324520936834634, "repo_name": "isislab/CTFd", "id": "cdda23588fa098d8ca74b4cfee0517080769f68f", "size": "11272"...
"""Node namespace""" # pylint: disable=unused-import from __future__ import absolute_import import ctypes import sys from .. import _api_internal from .node_generic import NodeGeneric, convert_to_node, const from .base import _LIB, check_call, c_str, py_str, _FFI_MODE IMPORT_EXCEPT = RuntimeError if _FFI_MODE == "cyt...
{ "content_hash": "84e943517381f94c8f771a8d7f27ad40", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 79, "avg_line_length": 29.294117647058822, "alnum_prop": 0.5953815261044176, "repo_name": "mlperf/training_results_v0.6", "id": "98ece19f77f2048e582e5ff13f473784112c0582", ...
def create_mqb_steering_control(packer, bus, apply_steer, idx, lkas_enabled): values = { "SET_ME_0X3": 0x3, "Assist_Torque": abs(apply_steer), "Assist_Requested": lkas_enabled, "Assist_VZ": 1 if apply_steer < 0 else 0, "HCA_Available": 1, "HCA_Standby": not lkas_enabled, "HCA_Active": lkas...
{ "content_hash": "2892330f1afc060adc957ea476610ec6", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 117, "avg_line_length": 39.729166666666664, "alnum_prop": 0.6953329837441007, "repo_name": "vntarasov/openpilot", "id": "3cd47a0957ee12bcda407f1bd04af9fe79b1e58a", "size": ...
""" Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. """...
{ "content_hash": "5b7c3e01db3b5a25bac1efda7a3a0c55", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 140, "avg_line_length": 21.51851851851852, "alnum_prop": 0.6006884681583476, "repo_name": "marshallhumble/Coding_Challenges", "id": "d781c7892a9084dd050d3244f7feaf57b2c51de9"...
import struct import decimal D = decimal.Decimal import logging from . import (util, config, exceptions, worldcoin, util, blockchain) FORMAT = '>QQQQHQ' LENGTH = 8 + 8 + 8 + 8 + 2 + 8 ID = 10 def exact_penalty (db, address, block_index, order_match_id): # Penalize addresses that don’t make WDC payments. If an ad...
{ "content_hash": "34394f19b877475f15b33114ad1e3416", "timestamp": "", "source": "github", "line_count": 608, "max_line_length": 326, "avg_line_length": 49.82401315789474, "alnum_prop": 0.5797048823160467, "repo_name": "Bluejudy/bluejudyd", "id": "6d54b2136a7ca8fae9c7ad1341769eaeaa761abd", "size": "...
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import batma class Game(batma.Scene): def initialize(self): pass def load_content(self): self.label = batma.Text(u'Hello World!', batma.display.center) def unload_content(self): pass def ...
{ "content_hash": "517ff4a61e9a02840fffdf68fde1fb2a", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 70, "avg_line_length": 18.083333333333332, "alnum_prop": 0.6036866359447005, "repo_name": "renatopp/batma", "id": "2c7f204ddc99c779a48f921ebf06d9adc478018c", "size": "458",...
"""Definition of bifrost operator strategy.""" # pylint: disable=invalid-name,unused-argument,wildcard-import,unused-wildcard-import import re from tvm import topi from .generic import * from .. import op as _op @conv2d_strategy.register("bifrost") def conv2d_strategy_bifrost(attrs, inputs, out_type, target): """...
{ "content_hash": "2f01523bfb3caff7594ce92537eb8305", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 95, "avg_line_length": 41.5, "alnum_prop": 0.5998609823911029, "repo_name": "sxjscience/tvm", "id": "24e68a47bbeb2364bb3d1e56dd46a61afea4ca79", "size": "5101", "binary":...
import re import sys import eventlet eventlet.monkey_patch() from oslo.config import cfg from oslo import messaging from neutron.agent.common import config from neutron.agent.linux import ip_lib from neutron.agent.linux import utils from neutron.common import config as common_cfg from neutron.common import rpc from...
{ "content_hash": "e990524015f137ce3ab41d21de9a2227", "timestamp": "", "source": "github", "line_count": 330, "max_line_length": 79, "avg_line_length": 36.236363636363635, "alnum_prop": 0.579110219100184, "repo_name": "CiscoSystems/neutron", "id": "b747bb9a5422d40947033fdb91388e08ddc7a442", "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('.')) sys.path.insert(0...
{ "content_hash": "0268e59d3d43d15d787b912ed7e6be97", "timestamp": "", "source": "github", "line_count": 290, "max_line_length": 87, "avg_line_length": 32.16896551724138, "alnum_prop": 0.6971808339586236, "repo_name": "Valentijn1995/Kn0ckKn0ck", "id": "e14bd9a48c877b53d6786efb7b33b23a2704aee4", "siz...
import sys from sqlQueries import dropQuery, createQuery, insertEmptyRacerQuery, createRaceQuery, dropRaceQuery, incrementRaceQuery, getRaceNumQuery, getNumberOfRacersQuery from PySide import QtCore from PySide.QtSql import * from PySide.QtGui import * from PySide.QtDeclarative import QDeclarativeView from track import...
{ "content_hash": "3165278e11187242d733f02bdc6c16aa", "timestamp": "", "source": "github", "line_count": 188, "max_line_length": 217, "avg_line_length": 37.1968085106383, "alnum_prop": 0.6406406406406406, "repo_name": "Sam-Gram/PiWood-Derby", "id": "d58fbe4eb2504fd3de954b988d9caf4246bdbebd", "size":...
__author__ = "Matteo Turilli, Andre Merzky" __copyright__ = "Copyright 2013, AIMES project" __license__ = "MIT"
{ "content_hash": "caab78e97486581f0e83422dbc867308", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 47, "avg_line_length": 22.8, "alnum_prop": 0.6491228070175439, "repo_name": "mturilli/aimes.emanager", "id": "fdbd086688b2db5a12c36160efe9f83531928126", "size": "115", "bi...
from .market import Market, TradeException import time import base64 import hmac import urllib.request import urllib.parse import urllib.error import urllib.request import urllib.error import urllib.parse import hashlib import sys import json import config class PrivateBitstampUSD(Market): balance_url = "https://...
{ "content_hash": "6687b43718359cf29283da74ec09a9d7", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 74, "avg_line_length": 33.34782608695652, "alnum_prop": 0.6101694915254238, "repo_name": "taariq/btcmarketdata", "id": "cf95a310adf1ee36dd06a9ce983fd624c9f5e56b", "size": "...
from __future__ import absolute_import, unicode_literals import sys from functools import partial from billiard.einfo import ExceptionInfo from django.core.urlresolvers import reverse from django.http import HttpResponse from django.test.testcases import TestCase as DjangoTestCase from django.template import Templat...
{ "content_hash": "424a29fabce2c4c72d2f79990b6846be", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 74, "avg_line_length": 32.19095477386934, "alnum_prop": 0.627536684358414, "repo_name": "alexhayes/django-celery", "id": "c858de3e8ad522c5444f067bb7a8726e347fe18a", "size"...
import theano import theano.tensor as T import numpy as np from collections import OrderedDict from functools import reduce from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from lasagne.utils import floatX __all__ = [ 'softmin', 'join', 'lsum', 'joinc', 'ldot', 'lmean', 'log_barri...
{ "content_hash": "a80b89d67b99cb4f720e72020f7c7b72", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 91, "avg_line_length": 21.244094488188978, "alnum_prop": 0.636767976278725, "repo_name": "maxim-borisyak/craynn", "id": "04da861352381168909561a1b32dacb3558f5aaf", "size":...
import random from datetime import datetime, timedelta from urllib.parse import urlencode import pytest from django.urls import reverse from django.utils import timezone from rest_framework.test import APIClient, APITestCase from metaci.conftest import PlanFactory, StaffSuperuserFactory, TestResultFactory rand = ran...
{ "content_hash": "8c4e948d22d637ca53d795163250c9ce", "timestamp": "", "source": "github", "line_count": 372, "max_line_length": 88, "avg_line_length": 38.876344086021504, "alnum_prop": 0.6127783155856728, "repo_name": "SalesforceFoundation/mrbelvedereci", "id": "c1034444d4f59fa0a2b9659dceb919981b99ec...
""" ==================== SimpleFitter wrapper ==================== Adds a variable height (background) component to any model Module API ^^^^^^^^^^ """ import numpy from pyspeckit.mpfit import mpfit from numpy.ma import median from pyspeckit.spectrum.moments import moments class SimpleFitter(object): def __init...
{ "content_hash": "53a2b5e8093ae72587653d756baf4c8a", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 69, "avg_line_length": 25, "alnum_prop": 0.5853658536585366, "repo_name": "jpinedaf/pyspeckit", "id": "529eec1bcef85b8fd28e82d209882084bb1c3e9f", "size": "1025", "binary"...