text
stringlengths
4
1.02M
meta
dict
from __future__ import absolute_import import numpy as np from scipy.ndimage import grey_opening from .common import WhittakerSmoother, Baseline def mpls_baseline(intensities, smoothness_param=100, deriv_order=1, window_length=100): '''Perform morphological weighted penalized least squares baselin...
{ "content_hash": "910041a0d26035baf607df0fa3eb1c2d", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 80, "avg_line_length": 37.698113207547166, "alnum_prop": 0.6681681681681682, "repo_name": "all-umass/superman", "id": "b0fe7de1e222611bd15a1ac25f5029cedcdb1944", "size": "1...
from lino.api import ad, _ class Plugin(ad.Plugin): verbose_name = _("Tables") def setup_main_menu(self, site, profile, m): m = m.add_menu(self.app_label, self.verbose_name) m.add_action('tables.Authors') m.add_action('tables.Books')
{ "content_hash": "af3b75c7a20b15961cee507e04111ad0", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 57, "avg_line_length": 22.916666666666668, "alnum_prop": 0.6072727272727273, "repo_name": "lino-framework/book", "id": "65caf14a45739be33c93d8ccf68cc89888553230", "size": "...
import mock from nova import block_device from nova import context from nova.openstack.common import jsonutils from nova import test from nova.tests import matchers from nova.virt import block_device as driver_block_device from nova.virt import driver from nova.volume import cinder from nova.volume import encryptors ...
{ "content_hash": "52aba5d851176806185dc47956f06b08", "timestamp": "", "source": "github", "line_count": 555, "max_line_length": 78, "avg_line_length": 39.792792792792795, "alnum_prop": 0.5712474530224134, "repo_name": "tanglei528/nova", "id": "ae6d16ed1e0dc697966bf71c6acf251a5d98ef69", "size": "226...
from unittest.mock import Mock from unittest.mock import call from unittest.mock import patch import pytest class TestTest: @pytest.fixture def test(self): from palladium.eval import test return test def test_test(self, test): dataset_loader_test, model_persister = Mock(), Mock()...
{ "content_hash": "57aed56d85bfa23dded5f8edacc5dc62", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 73, "avg_line_length": 32.27450980392157, "alnum_prop": 0.6281895504252734, "repo_name": "alexsavio/palladium", "id": "0ae66f9dff3e499a5933414cc8060581364fab52", "size": "1...
""" Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST API...
{ "content_hash": "d92387ed284bd9228bf9cc3c2dae6c6d", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 409, "avg_line_length": 35.86842105263158, "alnum_prop": 0.7358767424798239, "repo_name": "wavefrontHQ/python-client", "id": "5ee465662877427e714714e4d60c9bcdb8f4a08e", "si...
import glob import logging import os.path import subprocess import sys import time import traceback descriptors = [] logging.basicConfig(level=logging.ERROR, format="%(asctime)s - %(name)s - %(levelname)s\t Thread-%(thread)d - %(message)s", filename='/tmp/gmond.log', filemode='w') logging.debug('starting up') last_u...
{ "content_hash": "cc13b96b5a419c169c7337526d8ec57a", "timestamp": "", "source": "github", "line_count": 423, "max_line_length": 173, "avg_line_length": 29.699763593380613, "alnum_prop": 0.5245562365676988, "repo_name": "NoodlesNZ/monitor-core", "id": "b26849b28b977320ba2bcda8d7ca6ca6726f7530", "siz...
import pbr.version __version__ = pbr.version.VersionInfo('python-blazarclient').version_string()
{ "content_hash": "90afb6d839fc3ae48375a212b02c8c46", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 77, "avg_line_length": 24.75, "alnum_prop": 0.7575757575757576, "repo_name": "openstack/python-blazarclient", "id": "3bd8f7b31631b19eecf657584c24dc2ea0cde69b", "size": "682"...
from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import vtk import wx class JPEGReader(ScriptedConfigModuleMixin, ModuleBase): def __init__(self, module_manager): ModuleBase.__init__(self, module_manager) self._reader = vtk.vtkJPEGRea...
{ "content_hash": "d80fbfeeaa41f028c25ff6b298d6961f", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 74, "avg_line_length": 35.714285714285715, "alnum_prop": 0.5897142857142857, "repo_name": "fvpolpeta/devide", "id": "88b78c0fbc093f20cf956f657fb08d6553775446", "size": "350...
from django.dispatch import Signal post_export = Signal(providing_args=["model"]) post_import = Signal(providing_args=["model"])
{ "content_hash": "5e29bb754821c50861b1e1a51d9c12d9", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 46, "avg_line_length": 32.5, "alnum_prop": 0.7538461538461538, "repo_name": "daniell/django-import-export", "id": "0a7ab96b2a1419e3fdbf053cddc1cb763c486286", "size": "130", ...
__title__ = 'djangorestframework-jsonapi' __version__ = '2.0.0-alpha.2' __author__ = '' __license__ = 'MIT' __copyright__ = '' # Version synonym VERSION = __version__
{ "content_hash": "763f454593260006d6427d6baad1ffb9", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 41, "avg_line_length": 21, "alnum_prop": 0.5952380952380952, "repo_name": "aquavitae/django-rest-framework-json-api", "id": "d508ca4377b7a6e34c49466ac23abc2f34957ea3", "size...
from .sub_resource import SubResource class IntegrationRuntimeResource(SubResource): """Integration runtime resource type. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The resource identifier. :vartype id: str :ivar name: The resource name...
{ "content_hash": "903def91e50571bc8d9d8f497e97bf7b", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 74, "avg_line_length": 31.35, "alnum_prop": 0.5956937799043063, "repo_name": "AutorestCI/azure-sdk-for-python", "id": "8568ed26cb1e56ac0c40f242adeccfc78528d31c", "size": "1...
import argparse import datetime import time import sys import configreader import mailer from localstore import LocalStore def get_args(): """ Parses command-line arguments and returns them. returns the argparse namespace with the arguments. """ parser = argparse.ArgumentParser(des...
{ "content_hash": "44f7d34252e67cbda905a03472ccabbf", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 103, "avg_line_length": 40.95238095238095, "alnum_prop": 0.5785714285714286, "repo_name": "CityOfNewOrleans/NoticeMe", "id": "c29ca9dd44124f26792a89ad6709e7ae080dcaea", "s...
import re, os, time import ftplib from behave import * from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC @given('I want a screenshot of page "{page}"') def step_impl(context, page): context.browser.m...
{ "content_hash": "a41d9a663dde8b99040149ae64fb6df2", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 64, "avg_line_length": 33.30434782608695, "alnum_prop": 0.7349869451697127, "repo_name": "raymond91125/amigo", "id": "8e9ccf4d0c6b7d132fe965d3e8e2ab42dc0ed95f", "size": "84...
import os DEBUG = False ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.' + os.environ['DJANGO_DB'], # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'hello_world', # Or path to ...
{ "content_hash": "666421e6efcc945c487ae341822920c8", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 127, "avg_line_length": 31.910714285714285, "alnum_prop": 0.6562208543182242, "repo_name": "raziel057/FrameworkBenchmarks", "id": "86045bc1531ad00672168fa25bc9cfc5b9042343",...
""" Test the Man builder. """ import TestSCons test = TestSCons.TestSCons() try: import libxml2 import libxslt except: try: import lxml except: test.skip_test('Cannot find installed Python binding for libxml2 or lxml, skipping test.\n') test.dir_fixture('image') # Normal invocation ...
{ "content_hash": "9a6e17a245c5696efc17992819152e99", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 100, "avg_line_length": 19.083333333333332, "alnum_prop": 0.6986899563318777, "repo_name": "timj/scons", "id": "d9b16b325d7b5013ef4bea496bdc36400055730e", "size": "1820", ...
import copy import logging import os import shlex import shutil import ssl import socket import sys import uuid from king_phisher import constants from king_phisher import errors from king_phisher import find from king_phisher import ipaddress from king_phisher import its from king_phisher import serializers from king...
{ "content_hash": "2d5f2ce98b7d485d02d1e0caad1ec047", "timestamp": "", "source": "github", "line_count": 723, "max_line_length": 198, "avg_line_length": 41.40940525587828, "alnum_prop": 0.7284812451985704, "repo_name": "hdemeyer/king-phisher", "id": "010ef0b745ddb091411c1102d267499571f2540e", "size"...
"""The anti-commutator: ``{A,B} = A*B + B*A``.""" from __future__ import print_function, division from sympy import S, Expr, Mul, Integer from sympy.printing.pretty.stringpict import prettyForm from sympy.physics.quantum.operator import Operator from sympy.physics.quantum.dagger import Dagger __all__ = [ 'AntiC...
{ "content_hash": "93336afad8635989728a01ce0b44d8e6", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 83, "avg_line_length": 30.02777777777778, "alnum_prop": 0.5393154486586494, "repo_name": "kaushik94/sympy", "id": "142d2f77678b7520801d18b5979fca3cca5e8e5b", "size": "4324...
import os import dj_database_url import re from django.conf import settings from django.core.urlresolvers import reverse_lazy from cabot.settings_utils import environ_get_list, force_bool from cabot.cabot_config import * settings_dir = os.path.dirname(__file__) PROJECT_ROOT = os.path.abspath(settings_dir) DEBUG = for...
{ "content_hash": "146abfb974214fdf82de01196f0ce52d", "timestamp": "", "source": "github", "line_count": 312, "max_line_length": 123, "avg_line_length": 36.26923076923077, "alnum_prop": 0.6724107458465889, "repo_name": "maks-us/cabot", "id": "a23340d7859b60a4382901bd44bfa399bf3d3485", "size": "11316...
import six from django.db import models # Create your models here. from wagtail.wagtailcore.models import Page, PageBase from wagtailmetadata.models import MetadataPageMixin class HomePage(six.with_metaclass(PageBase, MetadataPageMixin, Page)): content_panels = Page.content_panels + [ ] promote_panels = ...
{ "content_hash": "d6772eedb750d10e9d0e4ea01b8c9cca", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 70, "avg_line_length": 30.583333333333332, "alnum_prop": 0.784741144414169, "repo_name": "Mandelbrew/cookiecutter-django", "id": "69769f05c98d1a049d1e8b24dba1f5144decedbf", ...
"""Library to gather runtime performance metrics. This module exposes the ResourceMonitor class, which client code can use to gather resource usage metrics about their program. An example usage would look something like: with ResourceMonitor() as monitor: ... do work ... metrics = monitor.metrics() """ imp...
{ "content_hash": "830967f461615afe675c1b9046be1fd7", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 80, "avg_line_length": 30.54074074074074, "alnum_prop": 0.6689303904923599, "repo_name": "google/deepvariant", "id": "21b479c836659e58e4abc5405208066a712c9f2f", "size": "5...
""" Created on 24 Oct 2014 @author: jmht """ import copy import glob import logging import os import pandas as pd import shutil import sys from ample.util import ample_util, csymmatch, mtz_util, pdb_edit, pdb_model, reforigin, residue_map, rio, shelxe, \ tm_util from pyjob import Script logger = logging.getLogg...
{ "content_hash": "c303255f602a01cc4a9845d06f095cf1", "timestamp": "", "source": "github", "line_count": 568, "max_line_length": 116, "avg_line_length": 37.144366197183096, "alnum_prop": 0.6036591146080197, "repo_name": "rigdenlab/ample", "id": "c0f4a75c515868692fdabf28f0e0e9870157bce7", "size": "21...
from supybot.test import * class SnarferTestCase(ChannelPluginTestCase): plugins = ('Snarfer',) if network: def testTinyurl(self): try: conf.supybot.plugins.Snarfer.shrinkSnarfer.setValue(False) self.assertRegexp( 'shrinkurl tiny http://so...
{ "content_hash": "5b7a3a237304adb7de280ef7b5066837", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 79, "avg_line_length": 46.78021978021978, "alnum_prop": 0.5466290815128024, "repo_name": "jeffmahoney/supybot", "id": "0fffd3f6991b2f16cb24fb44c4ad9d0c4cce9510", "size": "5...
from __future__ import unicode_literals import ckeditor_uploader.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('product', '0008_auto_20170124_1651'), ] operations = [ migrations.CreateModel( name='Accessory', ...
{ "content_hash": "b7417fa52381b7f0d623cb75541f51cb", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 170, "avg_line_length": 41.9375, "alnum_prop": 0.5842026825633383, "repo_name": "skylifewww/pangolin-fog", "id": "3984800b07824bbfd563d1436c22fd9ac33786c7", "size": "1414",...
import re import numpy as np from scipy.sparse import csr_matrix import pytest from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_allclose from sklearn.metrics.pairwise import kernel_metrics from sklearn.kernel_...
{ "content_hash": "e6e092a6b5d0bea2070bc4b4dd8f0362", "timestamp": "", "source": "github", "line_count": 418, "max_line_length": 88, "avg_line_length": 34.37081339712919, "alnum_prop": 0.6656922113176028, "repo_name": "jakirkham/scikit-learn", "id": "29681f32b769519a395b5a3a6fac6e8ea1bc92d7", "size"...
from django.core.files.uploadedfile import SimpleUploadedFile import mock from nose.tools import eq_ from amo.tests import app_factory, TestCase, user_factory from mkt.comm.forms import CommAttachmentFormSet from mkt.comm.tests.test_views import AttachmentManagementMixin from mkt.comm.utils import create_comm_note f...
{ "content_hash": "e3d377dbd0a7331ed242d10c5138ef2e", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 78, "avg_line_length": 39.38532110091743, "alnum_prop": 0.6121593291404612, "repo_name": "ngokevin/zamboni", "id": "a664e901e75d6a793c0f4fa403860388d3c5c698", "size": "429...
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_commoner_naboo_zabrak_male_02.iff" result.attribute_template_id = 9 result.stfName("npc_name","zabrak_base_male") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "3341c4f24d5c7dac0849ed4ceade2b69", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 83, "avg_line_length": 24.46153846153846, "alnum_prop": 0.7012578616352201, "repo_name": "anhstudios/swganh", "id": "dd6125713f9b0e5f2a2abb79e71eecbe66bbe5bc", "size": "463...
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException import sys from .ttypes import *
{ "content_hash": "4cd5ce356202bcc3d33079d08f3dae30", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 93, "avg_line_length": 46, "alnum_prop": 0.8532608695652174, "repo_name": "mikewalch/accumulo", "id": "3b2f97a24e68a8a29e650cdaef5d71fa76661bfe", "size": "1107", "binary":...
""" sentry.cache.redis ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from sentry.utils import json from sentry.utils.redis import get_cluster_from_options from .base import BaseCa...
{ "content_hash": "72bd9b5441bbd110be31cad261d7b41a", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 89, "avg_line_length": 28.44, "alnum_prop": 0.6188466947960619, "repo_name": "jean/sentry", "id": "7ba7625de35cd6a3078745dcd8150f17b71cddb9", "size": "1422", "binary": fa...
import abc from typing import Any, Dict, List, Optional, Sequence, TYPE_CHECKING import numpy as np from cirq import protocols from cirq._compat import proper_repr from cirq.qis import quantum_state_representation from cirq.value import big_endian_int_to_digits, linear_dict, random_state if TYPE_CHECKING: import ...
{ "content_hash": "25e685716f24e97ecd0fcc2c237e92cf", "timestamp": "", "source": "github", "line_count": 642, "max_line_length": 98, "avg_line_length": 38.33177570093458, "alnum_prop": 0.5337071802998903, "repo_name": "quantumlib/Cirq", "id": "bd73daccf768bf87746e90deac793dbef07f0ace", "size": "2519...
from __future__ import division import dirichlet import random import utils import math from collections import Counter class PhraseLDA(object): """ Topic Modeling using lda with collapsed gibbs sampling on "bag-of-phrases". :param partitioned_docs: List of documents, where each document is part...
{ "content_hash": "aa3be3d9f381e5c479b24900db3d2920", "timestamp": "", "source": "github", "line_count": 250, "max_line_length": 118, "avg_line_length": 42.204, "alnum_prop": 0.6079044640318453, "repo_name": "anirudyd/topmine", "id": "5b5aa9b268b4f4fa88e3b7b9bf3159b57a8aa10b", "size": "10551", "bi...
from os import path from setuptools import setup, find_packages MAIN_MODULE = 'agent' # Find the agent package that contains the main module packages = find_packages('.') agent_package = '' for package in find_packages(): # Because there could be other packages such as tests if path.isfile(package + '/' + MAI...
{ "content_hash": "108b9e5dd0ebe0043e9fe5c535262b5c", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 78, "avg_line_length": 33.029411764705884, "alnum_prop": 0.609973285841496, "repo_name": "VOLTTRON/volttron-applications", "id": "2d527eaf23b8fbbc30cb679963a3d43431452807", ...
''' ## License The MIT License (MIT) GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi. Copyright (C) 2015 Dexter Industries Jetduino for the Jetson TK1/TX1: an open source platform for connecting Grove Sensors to the Jetson embedded supercomputers. Copyright (C...
{ "content_hash": "792de75c7d12e119feb57119d0b395d0", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 103, "avg_line_length": 35.95744680851064, "alnum_prop": 0.7775147928994083, "repo_name": "NeuroRoboticTech/Jetduino", "id": "e83208c624eca5aa563382c080a10604beb62d39", "si...
import numpy as np from numpy.random import randint from textwrap import dedent import pytest import pandas as pd from pandas import DataFrame from pandas import read_clipboard from pandas import get_option from pandas.compat import PY2 from pandas.util import testing as tm from pandas.util.testing import makeCustomD...
{ "content_hash": "525dee49ef5c1179cb70b51d113620b3", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 73, "avg_line_length": 36.54644808743169, "alnum_prop": 0.569078947368421, "repo_name": "pratapvardhan/pandas", "id": "a6b331685e72a7126b7db437795fb383073015c7", "size": "...
import os import neutron def find_file(filename, path): """Find a file with name 'filename' located in 'path'.""" for root, _, files in os.walk(path): if filename in files: return os.path.abspath(os.path.join(root, filename)) def find_sample_file(filename): """Find a file with name ...
{ "content_hash": "943ab992f35c169c9323b12ce0a64c29", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 75, "avg_line_length": 27.529411764705884, "alnum_prop": 0.6239316239316239, "repo_name": "alexandrucoman/vbox-neutron-agent", "id": "f6065c0640ca8cd3e1a6fb925fe71672257393d6...
# Copyright 2015 Lukas Kemmer # # 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 to in wr...
{ "content_hash": "f1e3e1a4eee5a74cbfa761978ef0cf9a", "timestamp": "", "source": "github", "line_count": 443, "max_line_length": 89, "avg_line_length": 33.11738148984199, "alnum_prop": 0.5641742212528117, "repo_name": "lukas-ke/faint-graphics-editor", "id": "7b1dab0c6fb89c2210cb9dd123083984ecb7db76", ...
import cPickle import logging import sys import time import traceback import uuid from conary import versions as cny_versions from conary.deps import deps as cny_deps from lxml import etree from django.db import connection from django.conf import settings from django.contrib.redirects import models as redirectmodels f...
{ "content_hash": "bc87705cd5522ce734439e359b9a0304", "timestamp": "", "source": "github", "line_count": 1305, "max_line_length": 151, "avg_line_length": 37.403831417624524, "alnum_prop": 0.6194173563877735, "repo_name": "sassoftware/mint", "id": "2b09d8d7442eb75a079324ba1fd94e5d84acc12d", "size": "...
import attr from typing import ClassVar @attr.s(auto_attribs=True) class A1: bar1: int <error descr="Fields with a default value must come after any fields without a default.">baz1</error>: int = 1 foo1: int <error descr="Fields with a default value must come after any fields without a default.">bar2<...
{ "content_hash": "ba8c3d3d270faf4d229a79e20c559a80", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 144, "avg_line_length": 21.16176470588235, "alnum_prop": 0.6483669214732453, "repo_name": "goodwinnk/intellij-community", "id": "ef71aa22114ad47cfd99aecce6dbbf99a249f9a2", ...
from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.tools.safe_eval import safe_eval as eval import openerp.addons.decimal_precision as dp from openerp.tools.float_utils import float_round from openerp.exceptions import UserError class product_product(osv.osv): _inherit = "produc...
{ "content_hash": "8c1e2a90d6a8ace79fbe40a98e8e8261", "timestamp": "", "source": "github", "line_count": 586, "max_line_length": 226, "avg_line_length": 57.592150170648466, "alnum_prop": 0.5892915345639871, "repo_name": "vileopratama/vitech", "id": "1f8d034f6c6b4f12424f4fa61107eca5084e0d7a", "size":...
"""Test error messages for 'getaddressinfo' and 'validateaddress' RPC commands.""" from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) BECH32_VALID = 'bcrt1qtmp74ayg7p24uslctssvjm06q5phz4yrxucgnv' BECH32_INVALID_SIZE = 'bcr...
{ "content_hash": "cd6b3d73ae76668da9f9cfdb6f41ab23", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 124, "avg_line_length": 33.932432432432435, "alnum_prop": 0.6933492632417364, "repo_name": "pstratem/bitcoin", "id": "469d6bdb05e221ee8f27ed6ebf6811a7448563a3", "size": "27...
import argparse import sys import Tools import subprocess import tempfile import pdb import os def Call(command, logfile=None): print "calling " + command if (logfile is not None): if (isinstance(logfile, str)): outFile = open(logfile, 'w') elif (isinstance(logfile, file)): ...
{ "content_hash": "35075f4cb91b66434456d4abe8dbe388", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 225, "avg_line_length": 43.601694915254235, "alnum_prop": 0.6913508260447035, "repo_name": "EichlerLab/pacbio_variant_caller", "id": "51019f29b9803dbf9cfea3db7fcdbdc8dc1f469...
import sys import unittest from libcloud.test import MockHttp from libcloud.utils.py3 import httplib from libcloud.compute.base import Node, NodeAuthPassword from libcloud.test.secrets import BLUEBOX_PARAMS from libcloud.compute.types import NodeState from libcloud.test.file_fixtures import ComputeFileFixtures from li...
{ "content_hash": "b279be555f3686592bb89fbe4a1f56b8", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 98, "avg_line_length": 37.49038461538461, "alnum_prop": 0.6596563221338805, "repo_name": "apache/libcloud", "id": "02805b8845afd3fac11ab19d655b26d88d261b1d", "size": "4680...
""" Base Flask App for Poo Mailer """ from flask import Flask, session, render_template, redirect, url_for, request import json import os import sys parent_path = os.path.dirname(os.path.realpath(__file__))+'/../' sys.path.append(parent_path) from data import countries import settings from helpers import login_requir...
{ "content_hash": "dfa635640f9bd861bdab547d1bc6994a", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 111, "avg_line_length": 30.28048780487805, "alnum_prop": 0.6749899315344342, "repo_name": "albertyw/poo-mailer", "id": "1c8f1fc21b9d1fff2b277a7d7ab275bdf6b82b54", "size": "...
import pprint import logging import datetime from selenium import webdriver import hubcheck.conf # block websites that make linkcheck slow # these are usually blocked by the workspace firewall # mozillalabs comes from using a nightly version of firefox browser # many of the others are from login authentication site...
{ "content_hash": "89c50e7e724a26ce9b90b27b357dc1a4", "timestamp": "", "source": "github", "line_count": 385, "max_line_length": 93, "avg_line_length": 45.163636363636364, "alnum_prop": 0.4137336093857833, "repo_name": "codedsk/hubcheck", "id": "300d26a47173ec68c9cbc913d71ba1fd8d873df4", "size": "17...
"""Add required extra spec Revision ID: 59eb64046740 Revises: 162a3e673105 Create Date: 2015-01-29 15:33:25.348140 """ # revision identifiers, used by Alembic. revision = '59eb64046740' down_revision = '4ee2cf4be19a' from alembic import op from oslo_utils import timeutils import sqlalchemy as sa from sqlalchemy.sql...
{ "content_hash": "fd909aa6c099f6856af8882ad9359817", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 79, "avg_line_length": 30.66176470588235, "alnum_prop": 0.5717026378896882, "repo_name": "bswartz/manila", "id": "073f933c106dcc97a9f80dde51d86c7cb4baf9a3", "size": "2660",...
import json import requests class OneID: def __init__(self, api_id = None, api_key=None, server_flag=""): """server_flag :param api_id: Your OneID API ID credentials (from https://keychain.oneid.com/register) :param api_key: Your OneID API Key credentials (from https://keychain.oneid.com/r...
{ "content_hash": "444a6d0eaf0e6564a278d335df8f86ef", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 137, "avg_line_length": 37.75, "alnum_prop": 0.5891674550614948, "repo_name": "OneID/oneid-python-sdk", "id": "d7a04e0fa7080fe9c54833ad32e34635c57a1eab", "size": "4300", ...
import os, sys, platform, glob, subprocess, types, re DEFAULT_API_LEVEL = 10 android_api_levels = { 3: 'android-1.5', 4: 'android-1.6', 5: 'android-2.0', 6: 'android-2.0.1', 7: 'android-2.1', 8: 'android-2.2', 9: 'android-2.3', 10: 'android-2.3.3', 11: 'android-3.0' } class Device: def __init__(self, name,...
{ "content_hash": "f4ed4434b4eab5e9bc58ed4dc51e56ee", "timestamp": "", "source": "github", "line_count": 407, "max_line_length": 120, "avg_line_length": 31.167076167076168, "alnum_prop": 0.682538431217974, "repo_name": "pinnamur/titanium_mobile", "id": "89265c0424c53273f74454421f049cc8f4052b2e", "si...
"""API for Google Nest Device Access bound to Home Assistant OAuth.""" from __future__ import annotations import datetime import logging from typing import cast from aiohttp import ClientSession from google.oauth2.credentials import Credentials from google_nest_sdm.auth import AbstractAuth from google_nest_sdm.googl...
{ "content_hash": "bbde45e08813ae15e83380ecdff4f220", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 96, "avg_line_length": 35.81818181818182, "alnum_prop": 0.6796954314720812, "repo_name": "jawilson/home-assistant", "id": "3934b0b3cf16b285f052ff0b5d27411412eb450c", "size...
import core import helpers import printers import settings
{ "content_hash": "b8822e1f956fb78f7437a890f520412f", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 15, "avg_line_length": 14.75, "alnum_prop": 0.864406779661017, "repo_name": "martinlatrille/Aito", "id": "2cd00dbd0aeccc705296607ac0d6faeb3ca31b78", "size": "84", "binary"...
import copy import os import unittest import mock from feaas import storage from feaas.managers import cloudstack class CloudStackManagerTestCase(unittest.TestCase): def set_api_envs(self, url="http://cloudstackapi", api_key="key", secret_key="secret"): os.environ["CLOUDSTACK_API_U...
{ "content_hash": "11230cc8a94f8890c09927b524f6ce7c", "timestamp": "", "source": "github", "line_count": 389, "max_line_length": 93, "avg_line_length": 51.113110539845756, "alnum_prop": 0.6087612533319922, "repo_name": "tsuru/varnishapi", "id": "384357854c9f6a57ccc025691cd3d09ad0d601c5", "size": "20...
from page_sets.login_helpers import facebook_login from telemetry.page import page as page_module class MobileFacebookPage(page_module.Page): def __init__(self, url, page_set, shared_page_state_class, name='facebook'): super(MobileFacebookPage, self).__init__( url=url, page_set=page_set, name=name, ...
{ "content_hash": "91ecdda7a83920a821ca62230b14cb0f", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 78, "avg_line_length": 44.4, "alnum_prop": 0.7012012012012012, "repo_name": "danakj/chromium", "id": "0dc1438e6d2be813acd798508cc62877f3dac02e", "size": "829", "binary": ...
"""Memoize the data produced by slow operations into Google storage. Caches computations described in terms of command lines and inputs directories or files, which yield a set of output file. """ import collections import hashlib import logging import os import platform import shutil import subprocess import sys sys...
{ "content_hash": "45f778ad380a2fa00560c114ae74d9a4", "timestamp": "", "source": "github", "line_count": 433, "max_line_length": 80, "avg_line_length": 36.94688221709007, "alnum_prop": 0.654769346168271, "repo_name": "mxOBS/deb-pkg_trusty_chromium-browser", "id": "a3538e5a53b746e4e756c2b394414e748a149...
from collections import defaultdict from operator import itemgetter from flask import flash, jsonify, redirect, request, session from sqlalchemy import func, inspect from sqlalchemy.orm import joinedload, lazyload from werkzeug.exceptions import BadRequest, Forbidden, NotFound from indico.core.db import db from indic...
{ "content_hash": "2124571d29db876b674a99d07931101f", "timestamp": "", "source": "github", "line_count": 354, "max_line_length": 118, "avg_line_length": 45.706214689265536, "alnum_prop": 0.6164400494437577, "repo_name": "ThiefMaster/indico", "id": "24e93a5c20559cda16a0117bd86d6f8429878e38", "size": ...
import logging import sys from kombu.tests.utils import redirect_stdouts from celery import beat from celery import platforms from celery.app import app_or_default from celery.bin import celerybeat as celerybeat_bin from celery.apps import beat as beatapp from celery.utils.compat import defaultdict from celery.tests...
{ "content_hash": "10b4deed404d8c52d2192ca972707c36", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 76, "avg_line_length": 26.054455445544555, "alnum_prop": 0.5971879156374691, "repo_name": "frac/celery", "id": "447fb92c0b015d43c047325cb8e6b84975338afc", "size": "5263", ...
class datastore_problem_desc: def __init__(self, datastores): self.datastores = datastores def generate_problem(self): problem = {} problem["subject"] = "vsphere datastores" problem["options"] = self.__get_options() problem["columns"] = self.__get_columns() ...
{ "content_hash": "9454613ba2313230c25c7abc1d168ea2", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 76, "avg_line_length": 34.25454545454546, "alnum_prop": 0.3535031847133758, "repo_name": "rickyaeztor/watson-virtual-infra-mgt-system", "id": "6b158cccc1f44a4739a998deb6f4946...
import os import random import unittest import numpy as np from pkg_resources import resource_filename from .. import pybgen from .truths import truths __all__ = ["reader_tests"] class ReaderTests(unittest.TestCase): def setUp(self): # Getting the truth for this file self.truths = truths["dos...
{ "content_hash": "962c4812f09dab888937e32b80fac062", "timestamp": "", "source": "github", "line_count": 419, "max_line_length": 78, "avg_line_length": 33.08114558472554, "alnum_prop": 0.6037082461582859, "repo_name": "lemieuxl/pybgen", "id": "252c91e64030684c7472f120e57f4189050f8f44", "size": "1503...
""" SUR and 3SLS estimation """ __author__= "Luc Anselin lanselin@gmail.com, \ Pedro V. Amaral pedrovma@gmail.com" import numpy as np import numpy.linalg as la import scipy.stats as stats import summary_output as SUMMARY import user_output as USER from sur_utils import sur_dict2mat,sur_ma...
{ "content_hash": "b340f095c054f49f703cb1aa9ddc0622", "timestamp": "", "source": "github", "line_count": 697, "max_line_length": 146, "avg_line_length": 44.766140602582496, "alnum_prop": 0.5412473559387219, "repo_name": "schmidtc/pysal", "id": "c881adbf8cca4598762ca1e733df804c12eef106", "size": "312...
from django.db import migrations, models import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ("core", "0001_initial"), ] operations = [ migrations.AddField( model_name="submitformpage", name="body", field=wagtail.core.fi...
{ "content_hash": "9a2bffe4a7ea5fb336108678dd45352b", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 88, "avg_line_length": 30.528301886792452, "alnum_prop": 0.5327564894932015, "repo_name": "springload/madewithwagtail", "id": "8a6c6c742c1d8c5899aac30a181edf7f0541c5a4", "s...
from gaiatest import GaiaTestCase class TestGallery(GaiaTestCase): _gallery_items_locator = ('css selector', 'li.thumbnail') _current_image_locator = ('css selector', '#frame2 > img') _photos_toolbar_locator = ('id', 'fullscreen-toolbar') def setUp(self): GaiaTestCase.setUp(self) # ...
{ "content_hash": "a316cd2368a9cb924e6ae26c1f03f0ca", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 103, "avg_line_length": 36.93023255813954, "alnum_prop": 0.654911838790932, "repo_name": "wilebeast/FireFox-OS", "id": "51852df8a5149e2964cd590a7f2421af2f7d8790", "size": "...
import unittest import numpy import six.moves.cPickle as pickle import chainer from chainer import cuda from chainer import gradient_check from chainer import initializers from chainer.links.connection import convolution_nd from chainer import testing from chainer.testing import attr from chainer.testing import condi...
{ "content_hash": "bb9030546a162aa7899a9c1a37b72199", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 79, "avg_line_length": 31.510204081632654, "alnum_prop": 0.6090241796200345, "repo_name": "kashif/chainer", "id": "59eabd3e683744ccdd2d860c89e157a19ed7c580", "size": "4632...
import optparse import os import subprocess import sys ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) def run_command_with_code(cmd, redirect_output=True, check_exit_code=True): """Runs a command in an out-of-process she...
{ "content_hash": "c88853cf723a69b471014e58e8ef9e09", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 79, "avg_line_length": 26.06578947368421, "alnum_prop": 0.6491670873296315, "repo_name": "ofirgut007/Bezeqint01", "id": "ab0ff578d868397c5ad618df6d3ffd1d59cfe2dd", "size": ...
"""optik.option Defines the Option class and some standard value-checking functions. """ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" # Original Optik revision this is based on: __Optik_revision__ = "option.py,v 1.19.2.1 2002/07/23 01:51:14 gward Exp" # Copyright (c) 2001 Gregory P. Ward. All rig...
{ "content_hash": "05a5974457362e109774fb826c371c6a", "timestamp": "", "source": "github", "line_count": 388, "max_line_length": 84, "avg_line_length": 37.38917525773196, "alnum_prop": 0.5301578548287034, "repo_name": "datalogics/scons", "id": "7493205d4d6ea35043db9637fea36620c7d41254", "size": "145...
from __future__ import print_function from __future__ import with_statement import time import rpyc import threading from threading import Thread from thread import allocate_lock import unittest # # # # # # Testing X number of sim connections. # # # # # class ThreadWithReturnValue(Thread): def __init__(self, ...
{ "content_hash": "3d2b4d397517cd023f52081a87fa2f7f", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 125, "avg_line_length": 30.433333333333334, "alnum_prop": 0.5457283680175247, "repo_name": "ctgriffiths/twister", "id": "12926435333dd803e52338313415e7c011d46f76", "size":...
""" =========================== Orthogonal Matching Pursuit =========================== Using orthogonal matching pursuit for recovering a sparse signal from a noisy measurement encoded with a dictionary """ import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import OrthogonalMatchingPursuit...
{ "content_hash": "f50558cb84dfa1449ecfd5af8d65e421", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 84, "avg_line_length": 25.246753246753247, "alnum_prop": 0.7052469135802469, "repo_name": "betatim/scikit-learn", "id": "b0c8b5d093eee57f493c8358c75d32ec83f684ed", "size": ...
""" Copyright 2015 SYSTRAN Software, Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
{ "content_hash": "8490ce5386e3a35c1951d9c6ecaebcc7", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 95, "avg_line_length": 27.76923076923077, "alnum_prop": 0.5678670360110804, "repo_name": "SYSTRAN/geographic-api-python-client", "id": "967294317ff3cbd5c7d81d32851e3d24ec26cd...
from datetime import date from holidays.constants import JAN, MAY, SEP, AUG, OCT, DEC from holidays.holiday_base import HolidayBase from dateutil.easter import easter, EASTER_ORTHODOX from dateutil.relativedelta import relativedelta as rd from holidays.utils import islamic_to_gre class NorthMacedonia(HolidayBase): ...
{ "content_hash": "b24655198e88be04bc56bfc53d1e85a9", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 72, "avg_line_length": 31.977272727272727, "alnum_prop": 0.6361051883439943, "repo_name": "ryanss/holidays.py", "id": "180faf0ddc5b54bfbd1de0cbfcae64e639e81753", "size": "1...
import unittest import p4lib from mock23 import Mock from test_utils import change_stdout, test_options, test_raw_result HAVE_OUTPUT = "depot-file#4 - client-file" class HaveTestCase(unittest.TestCase): def setUp(self): p4lib._run = Mock(spec='p4lib._run', return_value=("", "", 0)) def test_global(...
{ "content_hash": "4dd5f24683b0a01df310b678c4fcce06", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 78, "avg_line_length": 28.303030303030305, "alnum_prop": 0.5770877944325482, "repo_name": "Mokona/python-p4lib", "id": "c28c81c0c0aa5282ebe662eac527bdea2d5f628d", "size": "...
import urllib, json, sys, os.path, argparse import hashlib import time import re # //==== EDIT THIS ====\\ log_file = open('log.txt', 'r+') username = 'dronenerds' sleep_time = 120 download_img = False console_log = True download_img1 = True path_name = 'images/' # //==== EDIT THIS ====\\ def find_new_images(imag...
{ "content_hash": "2e1b336c38add34583d6cf7b431f57da", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 131, "avg_line_length": 29.092105263157894, "alnum_prop": 0.670737222976029, "repo_name": "HaydnAnderson/image-downloader", "id": "8b7bb131cca60a24ecaa3f90c8f9f30255c23be8", ...
''' worker to be used instead of the script included by the rqworker module this script is similar but uses the app's config file ''' import sys import redis from rq import Queue, Worker, Connection from application import app redis_config = app.config['REDIS_CONFIG'] worker_conn = redis.Redis(host=redis_config['host'...
{ "content_hash": "07a7421a44ac08262d2f593b0f69c704", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 78, "avg_line_length": 24.14814814814815, "alnum_prop": 0.6503067484662577, "repo_name": "aquaya/pipeline", "id": "3d1564e0cafcf23be03acd91e5ad07703a2bd367", "size": "674",...
import mimetypes import os import shutil import sys import tempfile import uuid from datetime import datetime, timedelta from collections import namedtuple import pygit2 from celery import current_task from django_statsd.clients import statsd from django.conf import settings from django.db import connections from d...
{ "content_hash": "6b609a9826a22c5fe551d5a5388822fb", "timestamp": "", "source": "github", "line_count": 801, "max_line_length": 109, "avg_line_length": 37.54057428214732, "alnum_prop": 0.5767542401064184, "repo_name": "mozilla/addons-server", "id": "f1791bfa03f7ed6e6e8011ed2ba21676538d4454", "size"...
""" Created on Wed Dec 16 20:23:01 2020 @author: Salomé """ # Standard library imports import numpy as np # Mosqito functions import from mosqito.sq_metrics.tonality.tone_to_noise_ecma._critical_band import _critical_band def _find_highest_tone(freqs, spec_db, index, nb_tones, ind): """ Method to find the ...
{ "content_hash": "33cfa930cd101567befc227264728f78", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 88, "avg_line_length": 28.584415584415584, "alnum_prop": 0.615174920490686, "repo_name": "Eomys/MoSQITo", "id": "6802e004ac13f68aaa87bac98abbaa662648320e", "size": "2226", ...
"""This module contains the classes that represent Telegram InputVenueMessageContent.""" from typing import Any from telegram import InputMessageContent class InputVenueMessageContent(InputMessageContent): """Represents the content of a venue message to be sent as the result of an inline query. Objects of ...
{ "content_hash": "931578d780f6811f97216fc1bf536ee9", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 99, "avg_line_length": 37.76190476190476, "alnum_prop": 0.6226355611601513, "repo_name": "tzpBingo/github-trending", "id": "c13107d5bb22830e15a61a1a00722b30435b92e1", "size...
""" .. _tut-overview: Overview of MEG/EEG analysis with MNE-Python ============================================ This tutorial covers the basic EEG/MEG pipeline for event-related analysis: loading data, epoching, averaging, plotting, and estimating cortical activity from sensor data. It introduces the core MNE-Python ...
{ "content_hash": "33e474d089f4706026132e732531fb77", "timestamp": "", "source": "github", "line_count": 371, "max_line_length": 79, "avg_line_length": 49.61185983827493, "alnum_prop": 0.671846137129197, "repo_name": "mne-tools/mne-tools.github.io", "id": "adeba5d304078d817f60d1ac82858b04557ff5fa", ...
from __future__ import print_function import optparse def Concatenate(filenames): """Concatenate files. Args: files: Array of file names. The last name is the target; all earlier ones are sources. Returns: True, if the operation was successful. """ if len(filenames) < 2: print("An ...
{ "content_hash": "730ba73184912c5633b243f1c6e6d1d8", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 77, "avg_line_length": 24.475, "alnum_prop": 0.6384065372829418, "repo_name": "Simran-B/arangodb", "id": "a5dbe45cccd7f134143ea63c820e480f0b2cc11a", "size": "2965", "bina...
__authors__ = ['Andrew Taylor'] import random import time import pygame # Python comes with some color conversion methods. import colorsys # For Math things, what else import math from VisualisationPlugin import VisualisationPlugin import logging # Video available here: # http://www.youtube.com/watch?v=ySJlUu2926A&...
{ "content_hash": "a6e51b6355db492bc89fdec782a4f149", "timestamp": "", "source": "github", "line_count": 266, "max_line_length": 124, "avg_line_length": 35.6015037593985, "alnum_prop": 0.528194297782471, "repo_name": "fraz3alpha/led-disco-dancefloor", "id": "f12e44203eb2e713339b623fbc6d8a91240c6a47", ...
"""Custom neural network layers. Low-level primitives such as custom convolution with custom initialization. This file was copied from this source: google3/learning/brain/research/red_team/semi_supervised/libml/layers.py """ import numpy as np from skai.semi_supervised.dataloader import prepare_ssl_data import tensorf...
{ "content_hash": "52cc1ec02dcef508da01ca61b8d8d00f", "timestamp": "", "source": "github", "line_count": 253, "max_line_length": 98, "avg_line_length": 33.85375494071146, "alnum_prop": 0.615061295971979, "repo_name": "google-research/skai", "id": "d3a631b9ab6056e8fbc927f91703cef3f996347a", "size": "...
import os import math import json import csv import pandas as pd import numpy as np import urllib.request class LocalGovermentDirectoryStatesDataLoader: def __init__(self, lgd_csv, wikidata_csv, clean_csv): self.lgd_csv = lgd_csv self.wikidata_csv = wikidata_csv self.clean_csv = clean_csv...
{ "content_hash": "f094a3e4d26f50cd2fa4b220e4855dfc", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 80, "avg_line_length": 39.492063492063494, "alnum_prop": 0.5902331189710611, "repo_name": "datacommonsorg/data", "id": "62973c718295e1c372c907d83a1af7c5c47948c1", "size": ...
import os import logging import threading import traceback import contextlib import collections from functools import wraps import synapse.common as s_common import synapse.lib.task as s_task import synapse.lib.queue as s_queue from synapse.eventbus import EventBus logger = logging.getLogger(__name__) def current...
{ "content_hash": "796f4d81c67639d8f76acb238caeaa97", "timestamp": "", "source": "github", "line_count": 557, "max_line_length": 86, "avg_line_length": 25.06104129263914, "alnum_prop": 0.5422308188265635, "repo_name": "vivisect/synapse", "id": "ab49d04b738ea8bf3176b99b6c7617d942656713", "size": "139...
""" Module containing functions for approximating the roots of functions. """ from sympy import diff, var, symbols import numpy as np from collections import namedtuple def newtonraph(f, x0, tol=1.0e-9, n=1000): r""" Implementaion of the Newton-Raphson method for approximating a root with ...
{ "content_hash": "8f296c539b4d63efa7ef3e9a6a15021b", "timestamp": "", "source": "github", "line_count": 359, "max_line_length": 97, "avg_line_length": 32.31197771587744, "alnum_prop": 0.5979310344827586, "repo_name": "aschleg/mathpy", "id": "6692d9f942236b12f7543afec7ba1fafea920132", "size": "11617...
import numpy as np import theano import theano.tensor as T import lasagne from neuralnet import train from custom_updates import * from SVRGOptimizer import SVRGOptimizer from StreamingSVRGOptimizer import StreamingSVRGOptimizer from operator import itemgetter MLPBN= True def classifier_network(input_var, n_input...
{ "content_hash": "c260bb99e562982c3accf84e9256c622", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 150, "avg_line_length": 44.075630252100844, "alnum_prop": 0.5982840800762631, "repo_name": "myt00seven/svrg", "id": "17c8d4746c023027bc792c3ec10b8ae2c8aa0fab", "size": "52...
''' This script produces a custom Gource log file that can be passed to Gource for it to display family history information. Currently it supports ancestors only. Choose a focus person and pass this person's name along with the Gramps .gramps file path to the script via command line arguments. $ python gramps2gource....
{ "content_hash": "eb537eae597a2750b397308834f073ac", "timestamp": "", "source": "github", "line_count": 361, "max_line_length": 116, "avg_line_length": 39.62049861495845, "alnum_prop": 0.5352723204922044, "repo_name": "claws/gramps2gource", "id": "f0d4aa68cc66626f277c712290884d18a7bbeca2", "size": ...
from js9 import j def install(job): from zeroos.orchestrator.sal.Container import Container from zeroos.orchestrator.configuration import get_jwt_token import time service = job.service job.context['token'] = get_jwt_token(service.aysrepo) container_service = service.aysrepo.serviceGet(role=...
{ "content_hash": "a417b7198a51bbffced4a39c2ed0100f", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 107, "avg_line_length": 30.585365853658537, "alnum_prop": 0.6770334928229665, "repo_name": "zero-os/0-orchestrator", "id": "b7610a56c8e57c4e5fc6a7d5383ecda444a77bd0", "size...
"""(disabled by default) support for testing pytest and pytest plugins.""" from __future__ import absolute_import, division, print_function import codecs import gc import os import platform import re import subprocess import six import sys import time import traceback from fnmatch import fnmatch from weakref import W...
{ "content_hash": "387498839105f8ce5465128bbf9866d1", "timestamp": "", "source": "github", "line_count": 1381, "max_line_length": 93, "avg_line_length": 33.84359160028964, "alnum_prop": 0.583807608370063, "repo_name": "ddboline/pytest", "id": "8782a30ba733bacd1f712ed3256fdeffcbd829ac", "size": "4673...
"""SCons.Tool.packaging.msi The msi packager. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # 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 # with...
{ "content_hash": "e0abfb87594361569983ceecbee94029", "timestamp": "", "source": "github", "line_count": 527, "max_line_length": 114, "avg_line_length": 38.34535104364326, "alnum_prop": 0.6368764845605701, "repo_name": "unix1986/scons", "id": "9611af4710bb51cd19bd04ef2000cf647303219c", "size": "2020...
import urllib from buildbot.changes import svnpoller from twisted.internet import defer from twisted.python import log from common import chromium_utils from master.try_job_base import text_to_dict from master.try_job_repo import TryJobRepoBase class SVNPoller(svnpoller.SVNPoller): """A hook in svnpoller.SVNPoll...
{ "content_hash": "dd9b07c12ebf624f9b7b62dae2d8097b", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 74, "avg_line_length": 32.61842105263158, "alnum_prop": 0.6494554255748286, "repo_name": "eunchong/build", "id": "567a5e5438d817d640648710efee3a807937882b", "size": "2646",...
""" Simple pong game to test how ecore and evas work together. """ from os.path import abspath, join as join_path from functools import partial from collections import defaultdict from random import uniform as randf, seed from ecore.evas import SoftwareX11 from ecore import main_loop_begin, animator...
{ "content_hash": "53a983143d9c5ff2620cf5be3e3d3933", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 79, "avg_line_length": 27.895261845386532, "alnum_prop": 0.6357053459681745, "repo_name": "robotlolita/pong", "id": "a43f8730704b64c5f0870f14939e22c4aaafffd5", "size": "12...
import logging from common.gps import apply_timezone_offset def partition_gps(entities): """Partition Photo entities by GPS lat/lon and datetime. Arguments: entities: sequence of Photo entities Returns complete_images: sequence of Photos containing both GPS lat/lon and datetime incomplet...
{ "content_hash": "a567e277210c56a4e7af8c7f42689c49", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 158, "avg_line_length": 45.276595744680854, "alnum_prop": 0.6912593984962406, "repo_name": "google/eclipse2017", "id": "b795df591331787a112d622819d5467f8e7936e3", "size": "...
import datetime import functools import hashlib import os import time import uuid import mock from oslo_concurrency import processutils as putils from oslo_config import cfg from oslo_utils import timeutils import paramiko import six from six.moves import range import cinder from cinder import exception from cinder i...
{ "content_hash": "9266846a4b29a3416d83d9bb865cd6a7", "timestamp": "", "source": "github", "line_count": 1684, "max_line_length": 79, "avg_line_length": 39.13479809976247, "alnum_prop": 0.5548609319757826, "repo_name": "petrutlucian94/cinder", "id": "7d985f817ffad06764f7149e5809bfdfca119b1f", "size"...
"File (a.k.a document) pages; uploaded files." import logging import os.path import tornado.web import orderportal from orderportal import constants from orderportal import saver from orderportal import settings from orderportal import utils from orderportal.requesthandler import RequestHandler class FileSaver(sav...
{ "content_hash": "a63fc093489958a582c1d2379ec52c69", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 83, "avg_line_length": 30.91304347826087, "alnum_prop": 0.5738396624472574, "repo_name": "pekrau/OrderPortal", "id": "1471bdc9d0b64951d69792708599b6ccf862d347", "size": "5...
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergeo.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly...
{ "content_hash": "63e51412a51ddcbfd0e3e77836020558", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 66, "avg_line_length": 29.11764705882353, "alnum_prop": 0.5676767676767677, "repo_name": "plotly/python-api", "id": "7439cbadc267f126bbd2ccc9512f0050060e747f", "size": "495...
import ast import json import uuid from collections import OrderedDict from django.db import models, IntegrityError from django.db.models.signals import post_save from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django.core.files.storage import FileSystemStorage fro...
{ "content_hash": "bc7b7ee23f69a6df927c3bc910bf996e", "timestamp": "", "source": "github", "line_count": 780, "max_line_length": 114, "avg_line_length": 44.47179487179487, "alnum_prop": 0.5970364391143912, "repo_name": "creighton/ADL_LRS", "id": "beeb5c0ea8cfe5ff11e683db2dff08f75299a10e", "size": "3...
from JumpScale import j from JumpScale.baselib.atyourservice81.Service import Service import capnp import msgpack from JumpScale.baselib.atyourservice81 import model_capnp as ModelCapnp class Actor(): def __init__(self, aysrepo, template=None, model=None, name=None): """ init from a template or f...
{ "content_hash": "1a8146f98165249d63b884500b7278a9", "timestamp": "", "source": "github", "line_count": 403, "max_line_length": 137, "avg_line_length": 38.36724565756824, "alnum_prop": 0.5746992627085759, "repo_name": "Jumpscale/jumpscale_core8", "id": "d320e2c5f327c20cc034e2e8d4a16a5b27616b31", "s...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0054_auto_20170705_1603'), ] operations = [ migrations.AlterField( model_name='machine', name='os_family', field=models.CharField(choices=[(b'D...
{ "content_hash": "95ea0df6b764940338aa1774003c3672", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 115, "avg_line_length": 29.41176470588235, "alnum_prop": 0.576, "repo_name": "salopensource/sal", "id": "3e4dc548e288385371ae9c5898e61c2976b62cb4", "size": "549", "binary...
def get_model_desc(model): """ Generates a small description of a Keras model. Suitable for generating footer descriptions for charts. :param model: :return: """ desc = [] conf = model.get_config() for layer in (conf["layers"] if "layers" in conf else conf): if "layer" in layer...
{ "content_hash": "490f20395a2ffb82910e143faa64d4f7", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 115, "avg_line_length": 32.15686274509804, "alnum_prop": 0.4378048780487805, "repo_name": "cbaziotis/keras-utilities", "id": "e8f9ce235cd7d947a5e2d0878581eecbd85e7782", "si...
"""Open Vswitch Mac address module""" import logging from compass.hdsdiscovery import utils from compass.hdsdiscovery import base CLASS_NAME = "Mac" class Mac(base.BasePlugin): """Open Vswitch MAC address module""" def __init__(self, host, credential): self.host = host self.credential = cre...
{ "content_hash": "98b5fca19361f24202aa7e1cf4bb316f", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 76, "avg_line_length": 30.676470588235293, "alnum_prop": 0.5191754554170661, "repo_name": "huawei-cloud/compass-core", "id": "ef143e6144d9d10bf33593dc3cfbb30db9821989", "si...
import numpy as np from common.realtime import sec_since_boot, DT_MDL from common.numpy_fast import interp from system.swaglog import cloudlog from selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import LateralMpc from selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import N as LAT_MPC_N from selfdrive.controls.lib.drive...
{ "content_hash": "06e40bfecb006e121fae182af80a41ff", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 129, "avg_line_length": 41.015037593984964, "alnum_prop": 0.6731439046746105, "repo_name": "commaai/openpilot", "id": "932ad49535370d6ec8e443790221bbdac59d1dc0", "size": "...
import json import types import pytest from indy.did import create_and_store_my_did from indy.ledger import build_nym_request from plenum.common.constants import NYM, STEWARD, ROLE, VERKEY from plenum.common.exceptions import UnauthorizedClientRequest, RequestNackedException, CouldNotAuthenticate from plenum.common.t...
{ "content_hash": "865fdb7857a9f15dfdfe63d24658c9d2", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 120, "avg_line_length": 46.60919540229885, "alnum_prop": 0.6626387176325524, "repo_name": "evernym/zeno", "id": "5e4ac88ce6fd61e5ccd745359c5ac72133b54914", "size": "4055", ...
"""Test AsyncIOMotorCursor.""" import asyncio import sys import traceback import unittest import warnings from functools import partial from unittest import SkipTest import bson from pymongo import CursorType from pymongo.errors import InvalidOperation, ExecutionTimeout from pymongo.errors import OperationFailure fr...
{ "content_hash": "091ffbe3cc3d68dd21ddc5e63e410157", "timestamp": "", "source": "github", "line_count": 619, "max_line_length": 80, "avg_line_length": 35.26332794830372, "alnum_prop": 0.5875939160711013, "repo_name": "wujuguang/motor", "id": "de1c5862c7c991b5f7eec3c2f61822b8838a2fa5", "size": "2240...
import json import os import sys from unittest import mock import unittest import datetime import dateutil import dateutil.parser from azure.cli.testsdk.scenario_tests import AllowLargeResponse from azure.cli.testsdk.scenario_tests.const import MOCKED_TENANT_ID from azure.cli.testsdk import ScenarioTest, MSGraphNameRep...
{ "content_hash": "d16692d5a927161b06777c35d51e7c15", "timestamp": "", "source": "github", "line_count": 966, "max_line_length": 153, "avg_line_length": 49.15734989648033, "alnum_prop": 0.5988923051004507, "repo_name": "yugangw-msft/azure-cli", "id": "96b59cb9a5cfa2d295cb689ec956a83565e908a1", "size...
""" Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class TransactionsResponse(object): ...
{ "content_hash": "797122d68f953b3e6318fc94cdbeda71", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 80, "avg_line_length": 27.69402985074627, "alnum_prop": 0.5451360819186203, "repo_name": "ltowarek/budget-supervisor", "id": "830acf1d8a24d12da79229d0fb66e8a5b8d5cca4", "s...
from google.cloud import datacatalog_v1 async def sample_create_taxonomy(): # Create a client client = datacatalog_v1.PolicyTagManagerAsyncClient() # Initialize request argument(s) request = datacatalog_v1.CreateTaxonomyRequest( parent="parent_value", ) # Make the request respons...
{ "content_hash": "8a600bc12230a699fc34dc03e7c6a57c", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 70, "avg_line_length": 25.736842105263158, "alnum_prop": 0.7280163599182005, "repo_name": "googleapis/python-datacatalog", "id": "654a4340fc57e4c37bcb7c6b67a622bdce2d3a26", ...