text
stringlengths
4
1.02M
meta
dict
from sentry.conf.server import * import os.path CONF_ROOT = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(CONF_ROOT, 'sentry.db'), 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', }...
{ "content_hash": "1bbdc686757a649a20b2f8f56f4dd4e8", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 85, "avg_line_length": 22.544, "alnum_prop": 0.6117814052519518, "repo_name": "kemchos/docker-sentry", "id": "33662a5195a65ad2181969c3b157dc4882152f5a", "size": "2942", ...
"""Keras timeseries dataset utilities.""" # pylint: disable=g-classes-have-attributes from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.data.ops import dataset_ops from tensorflow.python.ops import array_ops from tens...
{ "content_hash": "8a2d9ed4abd2960835e9e5a1c5f0b2c0", "timestamp": "", "source": "github", "line_count": 193, "max_line_length": 94, "avg_line_length": 42.18652849740933, "alnum_prop": 0.6736674035863425, "repo_name": "aam-at/tensorflow", "id": "64e2d06554d0d4c14b9f378537fc54a2c4df591a", "size": "88...
from pyface.window import *
{ "content_hash": "42251d472000f56208fd5d868b9729ef", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 27, "avg_line_length": 28, "alnum_prop": 0.7857142857142857, "repo_name": "enthought/etsproxy", "id": "a663ebf6a917c820f1cf9328d3965e7ce96d9da1", "size": "43", "binary": f...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0171_userprofile_dense_mode'), ] operations = [ migrations.AlterField( model_name='customprofilefield', name='field_type', field=models.Positiv...
{ "content_hash": "22b959677921b8800bfb69a34e4edf47", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 162, "avg_line_length": 29.25, "alnum_prop": 0.5769230769230769, "repo_name": "brainwane/zulip", "id": "aab971821e9bcec3bb33a70012cd7b8b5f5208bc", "size": "519", "binary"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20150309_0042'), ] operations = [ migrations.RemoveField( model_name='user', name='slug', ), ]...
{ "content_hash": "80a65ee08a426e7722948443e4d2fc31", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 44, "avg_line_length": 18.88235294117647, "alnum_prop": 0.5794392523364486, "repo_name": "CristhGunners/Photon", "id": "50435bf98d16f99182472401190a0ad9277bdd4e", "size": "...
"""Helper classes for tensor shape inference.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.framework import tensor_shape_pb2 from tensorflow.python.framework import dtypes from tensorflow.python.util import compat from tensorflow.p...
{ "content_hash": "c48a6d3fb1b7d76c8f55c12ae7806137", "timestamp": "", "source": "github", "line_count": 981, "max_line_length": 82, "avg_line_length": 30.902140672782874, "alnum_prop": 0.6344054098631041, "repo_name": "xodus7/tensorflow", "id": "3c2a736fb98915af3048a593ad1908b8afb879b3", "size": "3...
import unittest from fixofx.ofx import Response from fixofx.test.ofx_test_utils import get_checking_stmt class DocumentTests(unittest.TestCase): def setUp(self): self.checking = get_checking_stmt() def test_statement_as_xml(self): response = Response(self.checking) self.assertEqu...
{ "content_hash": "68a8caf360b80e17377d3b1eb0760dfc", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 71, "avg_line_length": 24.88235294117647, "alnum_prop": 0.6572104018912529, "repo_name": "henriquebastos/fixofx", "id": "5eef987704495595b90d459a529022509e5d3276", "size": ...
"""Utilties for V2 control flow.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python.eager import function from tensorflow.python.framewor...
{ "content_hash": "df4d1bd4e297cf67cb582825a0efd2f8", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 80, "avg_line_length": 32.936, "alnum_prop": 0.7243138207432597, "repo_name": "jbedorf/tensorflow", "id": "cd37419906b1dc46f851cad35b83e93500261cf7", "size": "4807", "bi...
"""The tests for the device tracker component.""" from datetime import datetime, timedelta import json import logging import os from unittest.mock import Mock, call from asynctest import patch import pytest from homeassistant.components import zone import homeassistant.components.device_tracker as device_tracker from...
{ "content_hash": "b100f1d73e9079a64ea92c336e46671f", "timestamp": "", "source": "github", "line_count": 682, "max_line_length": 88, "avg_line_length": 33.74486803519061, "alnum_prop": 0.6429564612844355, "repo_name": "joopert/home-assistant", "id": "e839a88536eeb9f09e54416c2c883a8dd5d3a179", "size"...
from gevent import monkey monkey.patch_all() import sys reload(sys) sys.setdefaultencoding("utf-8") from worker import OceanWorker if __name__ == "__main__": env = None if len(sys.argv) > 1: for arg in sys.argv[1:]: if arg == '--production': env = 'production' ...
{ "content_hash": "50c77df028aff779fa07103dffce0c42", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 41, "avg_line_length": 19.11111111111111, "alnum_prop": 0.562015503875969, "repo_name": "ddinsight/dd-streamworks", "id": "76ceaafb8b1b437825bd27ec50a99cdeaf7f3e48", "size"...
"""Functionality for manipulating FHIRPath expressions.""" import copy import dataclasses import decimal from typing import Any, List, Optional, Set, cast from google.cloud import bigquery from google.protobuf import message from google.fhir.core.proto import fhirpath_replacement_list_pb2 from google.fhir.core impor...
{ "content_hash": "b1b22842083b1399ade001b759527d1b", "timestamp": "", "source": "github", "line_count": 830, "max_line_length": 80, "avg_line_length": 40.310843373493974, "alnum_prop": 0.668300555920856, "repo_name": "google/fhir-py", "id": "6158c8dc40a6adc9fcd0c0ea45fadc26ff1c883d", "size": "34035...
from examples import email e = email.Emailer() email.Emailer.MakeAnnouncement("[email protected]") e.Bonjour()
{ "content_hash": "26842b2ab03522d7cf96862a4345682c", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 52, "avg_line_length": 22.6, "alnum_prop": 0.7787610619469026, "repo_name": "pombredanne/pytype", "id": "49004e23c1665a2ba1e9191f9483e2d3989888b6", "size": "774", "binary"...
"""Ce fichier contient l'éditeur EdtChambres, détaillé plus bas.""" from primaires.interpreteur.editeur import Editeur from primaires.interpreteur.editeur.env_objet import EnveloppeObjet from secondaires.auberge.editeurs.aubedit.edt_chambre import EdtChambre from primaires.format.fonctions import supprimer_accents cl...
{ "content_hash": "46e053a52180bb08ec8954c3916cc494", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 78, "avg_line_length": 35.99082568807339, "alnum_prop": 0.549324496558756, "repo_name": "stormi/tsunami", "id": "74143692d7c5b6e470626a14c3478b000f5ad467", "size": "5512",...
import base64 import datetime import json import re from azurelinuxagent.common.utils import timeutil from azurelinuxagent.common.utils.textutil import parse_doc, find, findall from tests.protocol.HttpRequestPredicates import HttpRequestPredicates from tests.tools import load_bin_data, load_data, MagicMock, Mock from ...
{ "content_hash": "4fd2a357a391702f683f63c3967f8a6e", "timestamp": "", "source": "github", "line_count": 444, "max_line_length": 169, "avg_line_length": 43.914414414414416, "alnum_prop": 0.6397579238896297, "repo_name": "Azure/WALinuxAgent", "id": "7ec311af46d23b0038ff27f9b288c9c2c96fac8e", "size": ...
from twisted.plugin import IPlugin from txircd.module_interface import Command, ICommand, IModuleData, ModuleData from txircd.user import RemoteUser from txircd.utils import ModeType, now, timestamp from zope.interface import implements from datetime import datetime class ServerUID(ModuleData, Command): implements(IP...
{ "content_hash": "978266ce6cb2da398036831d421b86d9", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 269, "avg_line_length": 40.144, "alnum_prop": 0.7227979274611399, "repo_name": "ElementalAlchemist/txircd", "id": "3062f41c7a261e7738ed3ef9f5f02dad18853f0b", "size": "5018...
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 field 'Feed.errors_since_good' db.add_column('feeds', 'errors_since_good', self.gf('django.db.models....
{ "content_hash": "fb66fc27b34e88cd8348a681dd651db8", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 151, "avg_line_length": 77.15116279069767, "alnum_prop": 0.557648831951771, "repo_name": "slava-sh/NewsBlur", "id": "fd8e326dae5b829e35a11db6ac862f610f866040", "size": "665...
""" Various kinds of layout components. """ from __future__ import absolute_import import logging logger = logging.getLogger(__name__) from ..core import validation from ..core.validation.warnings import EMPTY_LAYOUT, BOTH_CHILD_AND_ROOT from ..core.properties import abstract, Bool, Int, Instance, List from ..embed ...
{ "content_hash": "c6bedb1ab2caa4c4a7e8d549c654790b", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 97, "avg_line_length": 29.58823529411765, "alnum_prop": 0.6497680583167661, "repo_name": "quasiben/bokeh", "id": "0df6ef27aca61c2625f8deb2d08c55922b139e2d", "size": "3018"...
_GENERATED_ON = '2013-06-19' _MYSQL_VERSION = (5, 7, 1) # Start MySQL Error messages CR_UNKNOWN_ERROR = u"Unknown MySQL error" CR_SOCKET_CREATE_ERROR = u"Can't create UNIX socket (%s)" CR_CONNECTION_ERROR = u"Can't connect to local MySQL server through socket '%-.100s' (%s)" CR_CONN_HOST_ERROR = u"Can't connect to MyS...
{ "content_hash": "2a51837abebfcd24f61e5999885256b6", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 200, "avg_line_length": 70.88235294117646, "alnum_prop": 0.7479253112033195, "repo_name": "avatarnewyork/daily_harvest", "id": "b81dc5c4578c94488b4548b57ea3d8a5331f9dd8", "...
from __future__ import print_function from decimal import Decimal import pytest import solution as f to_unicode = f._compat.to_unicode def _clean(form, value, **kwargs): return value def test_validation_error(): v = f.ValidationError(u'olé') assert v.message == u'olé' v = f.ValidationError() ...
{ "content_hash": "23faaca1595fa85e3d62237ca672cc6e", "timestamp": "", "source": "github", "line_count": 447, "max_line_length": 102, "avg_line_length": 29.651006711409394, "alnum_prop": 0.594537498113777, "repo_name": "jpscaletti/solution", "id": "9652fd3f387376d9f4ad744d008c660909b5d408", "size": ...
from mfr.core import FileHandler, get_file_extension from .render import render_pdf EXTENSIONS = ['.pdf'] class Handler(FileHandler): """FileHandler for Portable Document Format files.""" renderers = { 'html': render_pdf, } exporters = {} def detect(self, fp): return get_file_e...
{ "content_hash": "4f67b75cdad064a850d41f37342db72d", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 57, "avg_line_length": 20.705882352941178, "alnum_prop": 0.6590909090909091, "repo_name": "mfraezz/modular-file-renderer", "id": "3492bf7c556a2670ed363c146d121b670372e95f", ...
"""Tests for the notebook kernel and session manager.""" from subprocess import PIPE import time from unittest import TestCase from traitlets.config.loader import Config from ..localinterfaces import localhost from jupyter_client import KernelManager from jupyter_client.multikernelmanager import MultiKernelManager fr...
{ "content_hash": "ac4ed1a43aa66216c1784865757b7e5a", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 64, "avg_line_length": 31.811764705882354, "alnum_prop": 0.6198224852071006, "repo_name": "nitin-cherian/LifeLongLearning", "id": "2ca2ea4519b14e18911dec7734d1294557e9e3f7", ...
"""Unit tests for the spatial_weights.SpatiallyVaryingWeightsFromMask plugin.""" import unittest from datetime import datetime import numpy as np from iris.coords import AuxCoord from iris.cube import CubeList from iris.tests import IrisTest from iris.util import squeeze from improver.blending.spatial_weights im...
{ "content_hash": "ffd5d761a95727104f30c1b1cb987083", "timestamp": "", "source": "github", "line_count": 349, "max_line_length": 86, "avg_line_length": 43.81948424068768, "alnum_prop": 0.5972013339436344, "repo_name": "fionaRust/improver", "id": "40ba7e32122057dac38fae2963160c544d01cfc8", "size": "1...
''' Remove unneeded imaging products when only creating the dirty images. ''' import os from tasks import rmtables def remove_products(name): ''' For the dirty image, we don't need to keep the: * residual * flux * model If the image does not exist (i.e., no PSF due to flagging), remove all...
{ "content_hash": "f030f347066af454d465b66141114e14", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 75, "avg_line_length": 20.142857142857142, "alnum_prop": 0.601063829787234, "repo_name": "e-koch/VLA_Lband", "id": "2099739875048cb2c22b94d9ddcc958f8b2f2c2c", "size": "565"...
""" MIT License Copyright (c) 2016 by Sinan Ugur Umu (SUU), University of Canterbury, Computational Biology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without ...
{ "content_hash": "84d001c41dfc7168c9641221bc432494", "timestamp": "", "source": "github", "line_count": 288, "max_line_length": 235, "avg_line_length": 47.739583333333336, "alnum_prop": 0.5993890464761074, "repo_name": "UCanCompBio/RNA_Interactions_Benchmark", "id": "77ad8e750e62d1432ce1d3691b45d06c3...
""" The Connection class negotiates and manages the connection state. """ import logging # pylint: disable=import-error try: from urllib import parse as urlparse except ImportError: import urlparse try: import ssl except ImportError: ssl = None import threading import time from pamqp import specifica...
{ "content_hash": "195f0dc377cb0fe84215ed04e51fd305", "timestamp": "", "source": "github", "line_count": 642, "max_line_length": 79, "avg_line_length": 34.598130841121495, "alnum_prop": 0.5934629929767693, "repo_name": "gmr/rabbitpy", "id": "c4f399de6908cd735cb5112dac4518816dff8529", "size": "22212"...
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from sentry.models import Environment, GroupRelease, Release from sentry.testutils import TestCase class GetOrCreateTest(TestCase): def test_simple(self): project = self.create_project() group...
{ "content_hash": "94d63c4629d17027bd61ba18661ae885", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 81, "avg_line_length": 33.62068965517241, "alnum_prop": 0.6189743589743589, "repo_name": "zenefits/sentry", "id": "96a21f0dfa7dd522bc492696c8c258a078015218", "size": "1950"...
import argparse import functools import json import math import os import sys import urllib.request # MIN_VERSION is the earliest working version of the updater for self-update # testing. If a backwards-incompatible change to the updater is made, it may be # necessary to increase the version. MIN_VERSION = 962507 def...
{ "content_hash": "c7f1548e56a99fc83937f0b6e69b4903", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 80, "avg_line_length": 31.18095238095238, "alnum_prop": 0.6062919975565058, "repo_name": "scheib/chromium", "id": "9ae41d441812d111ed1248774b1a1771f5378167", "size": "3460...
"""Run Config.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function class TaskType(object): MASTER = 'master' PS = 'ps' WORKER = 'worker' class RunConfig(object): """This class specifies the configurations for an `Estimator` run.""" @property ...
{ "content_hash": "6d325c2a8d52a1d3ab4681a2d6158587", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 71, "avg_line_length": 15.690140845070422, "alnum_prop": 0.6642728904847397, "repo_name": "yaroslavvb/tensorflow", "id": "3439cd8657f0284a1760751a4f1c2781bde3be31", "size":...
from pebl import config # # Module Parameteres # _pcontrollertype = config.StringParameter( 'taskcontroller.type', 'The task controller to use.', default = 'serial.SerialController' ) #TODO:test def fromconfig(): tctype = config.get('taskcontroller.type') tcmodule,tcclass = tctype.split('.') ...
{ "content_hash": "998c79a919afc274c47b3d59c27226de", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 93, "avg_line_length": 20.304347826086957, "alnum_prop": 0.683083511777302, "repo_name": "Alwnikrotikz/pebl-project", "id": "fcc5a501f14a0f47729b47e34f3c2fd96c9e6eac", "siz...
""" MoinMoin - Hitcount Statistics This macro creates a hitcount chart from the data in "event.log". TODO: refactor to use a class, this code is ugly. A lot of code here is duplicated in stats.useragents. Maybe both can use same base class, maybe some parts are useful to other code. ...
{ "content_hash": "32ba521a43e08856332733d1a3886e95", "timestamp": "", "source": "github", "line_count": 258, "max_line_length": 94, "avg_line_length": 30.802325581395348, "alnum_prop": 0.5710330942494023, "repo_name": "RealTimeWeb/wikisite", "id": "bb27fb0075687332bfdeb26cea133baca2ae5977", "size":...
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": "c43461aee26b61e63b90f4956b8fc904", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 158, "avg_line_length": 29.5, "alnum_prop": 0.7173779865223606, "repo_name": "mahabs/nitro", "id": "0127db10ebf7a9b18901e49147e94676b6ee3380", "size": "5511", "binary": ...
"""Test namedtuple attributes. Regression test for: https://bitbucket.org/logilab/pylint/issue/93/pylint-crashes-on-namedtuple-attribute """ from __future__ import absolute_import, print_function __revision__ = None from collections import namedtuple Thing = namedtuple('Thing', ()) Fantastic = namedtuple('Fantastic...
{ "content_hash": "bc9911c36a514790b902ea7f2775782a", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 84, "avg_line_length": 25.869565217391305, "alnum_prop": 0.680672268907563, "repo_name": "willemneal/Docky", "id": "7283db2072d2669f0020471d6cfa13077ef627e0", "size": "595"...
""" This file is a basic script that will determine if a ball would score if it were to be catapulted immediately. We are using the led strips around the target to find it. Flowchart: -Get and flip image -Count pixels within hsv range -Average their y-coordinates -print shit ...
{ "content_hash": "ea53c84c5453628bcd0395b0757cd4c6", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 185, "avg_line_length": 39.53968253968254, "alnum_prop": 0.6732236049779206, "repo_name": "FRC2914/aerial-assist", "id": "d773690b5e0b237056b989aff123109d7376541b", "size":...
from django.conf import settings NORMALISE_TO_UPPER = getattr(settings, 'ADB_NORMALISE_TO_UPPER', True)
{ "content_hash": "5f46f636aa82781a1e07a0d77327e975", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 70, "avg_line_length": 34.666666666666664, "alnum_prop": 0.7884615384615384, "repo_name": "7wonders/django-addresses", "id": "c18f6f271e6a6f5dcd564dbd5b00bcd17672a06d", "siz...
from __future__ import unicode_literals, division import os import threading import numpy as np from model.base.document import Document from model.config import BATCH_SIZE, SAMPLE_LENGTH from model.utils import get_answers_for_doc def get_data_for_model(train_dir, labels, test_dir=None, nn_model=None, ...
{ "content_hash": "c55c862cb0f66fbacd2c2fbc37e16abd", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 102, "avg_line_length": 35.15555555555556, "alnum_prop": 0.6310577328276443, "repo_name": "HeadCow/ARPS", "id": "7714143ad68c3e2ccb919095b3aa92774a2110f8", "size": "4769",...
import networkx as nx import matplotlib.pyplot as plt from nltk.corpus import wordnet as wn def traverse(graph, start, node): graph.depth[node.name] = node.shortest_path_distance(start) for child in node.hyponyms(): graph.add_edge(node.name, child.name) traverse(graph, start, child) def hypo...
{ "content_hash": "4f5223c6e84647e9b223dca444e823d8", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 63, "avg_line_length": 21.86111111111111, "alnum_prop": 0.6099110546378653, "repo_name": "luoshao23/ML_algorithm", "id": "58cb8d943c1057ba4f557218f8839728c544b76b", "size":...
"""Models for permissions.""" from typing import TYPE_CHECKING import attr if TYPE_CHECKING: # pylint: disable=unused-import from homeassistant.helpers import entity_registry as ent_reg # noqa: F401 from homeassistant.helpers import device_registry as dev_reg # noqa: F401 @attr.s(slots=True) class Per...
{ "content_hash": "895ae0e5e00ba17dd14e448f2812f391", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 78, "avg_line_length": 29.705882352941178, "alnum_prop": 0.7267326732673267, "repo_name": "pschmitt/home-assistant", "id": "435d5f2e9823d5cc60dc90a93817a8fa507b2427", "size...
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ import copy import functools import inspect import warnings from collection...
{ "content_hash": "a284c48925b60ff7d7b4bb9add158815", "timestamp": "", "source": "github", "line_count": 351, "max_line_length": 108, "avg_line_length": 35.82905982905983, "alnum_prop": 0.6285782442748091, "repo_name": "googleinterns/django", "id": "f7c6d74e728a3f6e6b34c917099ac288f5aff540", "size":...
import os APP_PATH = os.path.join(*os.path.split(os.path.dirname(os.path.realpath(__file__)))[:-1]) import sys if APP_PATH not in sys.path: sys.path.append(APP_PATH) import PowerShell import MyTrack import Phonebook import Log LOGGER = Log.MyLog(name=__name__) def ce500(instructor, trainees): instrc = "".jo...
{ "content_hash": "690d80449db3d932c8dd014f7f23d39f", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 124, "avg_line_length": 29.352272727272727, "alnum_prop": 0.6035617499032133, "repo_name": "jabez007/Training_Helpyr", "id": "eae700a39b20814986dfef2fb88f3d73013ca878", "si...
"""product and picture Revision ID: 164e05aa3e84 Revises: 2e4fb5b3a97 Create Date: 2015-01-16 11:54:09.927322 """ # revision identifiers, used by Alembic. revision = '164e05aa3e84' down_revision = '2e4fb5b3a97' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembi...
{ "content_hash": "5ef34b269f4d92c60f4f38b44732c449", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 64, "avg_line_length": 32.5, "alnum_prop": 0.6603076923076923, "repo_name": "zknight/booster", "id": "567df672983acd48b0a60e5a63c5921c54cc663a", "size": "1625", "binary":...
from __future__ import absolute_import, unicode_literals import socket import tempfile from datetime import datetime, timedelta import pytest from case import ANY, ContextMock, MagicMock, Mock, patch from kombu import Queue from celery import Task, group, uuid from celery.app.task import _reprtask from celery.except...
{ "content_hash": "86db084160d1efc0dd13bd6eb41dbc34", "timestamp": "", "source": "github", "line_count": 854, "max_line_length": 79, "avg_line_length": 35.040983606557376, "alnum_prop": 0.5365079365079365, "repo_name": "cloudera/hue", "id": "8136ca472f93750561462527a15ee5f496fd0e70", "size": "29925"...
import xerox from jsonapp.utils.cli_util import cli_print, do_copy_to_clipboard from jsonapp.utils.print_util import print_with_separators_and_space from jsonapp.utils.result_util import result_failure, result_success from jsonapp.utils.string_util import String script_output = 'script' user_output = 'user' class J...
{ "content_hash": "40e8d12ebb2bb232d66d62020a29bf98", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 113, "avg_line_length": 28.49019607843137, "alnum_prop": 0.6496902959394356, "repo_name": "eyalev/jsonapp", "id": "2e5ccf37812fc919c64610cd0b3ff53b878d3c01", "size": "1478"...
import os import json from common import * from subprocess import Popen from collections import namedtuple from tempfile import NamedTemporaryFile connection = namedtuple("connection", "host host_port remote remote_port protocol timestamp, pid") def ipconnections(target, **kwargs): """Ret...
{ "content_hash": "4ec5039d9185e07d011129dd29a68f9d", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 85, "avg_line_length": 31.147540983606557, "alnum_prop": 0.6321052631578947, "repo_name": "rodionovd/cuckoo-osx-analyzer", "id": "f63f3c49307710b0197dbc882ed2025279535d1e", ...
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 field 'UltrasoundScanning.saved_ultrasound_image' db.add_column(u'patient_ultrasoundscanning', 'saved_ultrasound_image', ...
{ "content_hash": "13a5c8043516213cfc5bef6cad331c85", "timestamp": "", "source": "github", "line_count": 346, "max_line_length": 187, "avg_line_length": 83.5635838150289, "alnum_prop": 0.5674264171825822, "repo_name": "aazhbd/medical_info01", "id": "7ffe776c5f5956e16072b0d54cf6c3b21cf2e9ba", "size":...
""" Copyright 2013 Jérémie BOUTOILLE This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope t...
{ "content_hash": "3168612dfc3157e056097396fdd2b05c", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 150, "avg_line_length": 42.09803921568628, "alnum_prop": 0.6613879832324173, "repo_name": "S2R2/viper", "id": "8a06e6ca41cf207a121fcb51378d398105fd6029", "size": "2168", ...
""" ==================================================== Chebyshev Series (:mod:`numpy.polynomial.chebyshev`) ==================================================== This module provides a number of objects (mostly functions) useful for dealing with Chebyshev series, including a `Chebyshev` class that encapsulates the us...
{ "content_hash": "86319d7a6e9c20750b49eda520c7346d", "timestamp": "", "source": "github", "line_count": 2064, "max_line_length": 86, "avg_line_length": 29.93217054263566, "alnum_prop": 0.6012787309809, "repo_name": "WarrenWeckesser/numpy", "id": "1329ba07d9ea5e24153156c401c5cc1a31db3b41", "size": "...
import requests import json class WebInterface: ''' Similar to REST API web application, but to cover the coverage. ''' def __init__(self): self.url = 'http://127.0.0.1:8080/tsdb/' def insert_ts(self, pk, ts): """ Insert a timeseries into the database by sending a req...
{ "content_hash": "c1c183ae6756036b04a6e4174e464aa8", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 125, "avg_line_length": 31.67283950617284, "alnum_prop": 0.5648021828103683, "repo_name": "cs207-project/TimeSeries", "id": "fe6a941323f55d3a560789fa4778e1a229f628d3", "si...
from __future__ import print_function # see LICENSES directory for copyright and license import os import sys import logging import httplib2 import apiclient.discovery as gapi import gflags import oauth2client.file as auth_file import oauth2client.client as oauth import oauth2client.tools as tools OOB_CALLBACK_URN = ...
{ "content_hash": "79c39fe877eac19092b8232dc411a208", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 79, "avg_line_length": 28.896, "alnum_prop": 0.6697120708748616, "repo_name": "BigDataforYou/movie_recommendation_workshop_1", "id": "b20b7c8ff1b04ae5f32e25a0c23f2cd48fe93e3...
"""models URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
{ "content_hash": "976e6f56dc2afc81a82cde3ca21d2098", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 115, "avg_line_length": 41.442622950819676, "alnum_prop": 0.6807753164556962, "repo_name": "Charleo85/SIS-Rebuild", "id": "a3edea74c96d941111d17f8eed8f84eee214dd5c", "size"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Beacon', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=...
{ "content_hash": "21e76bd062a1805a415170a9093b7b85", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 114, "avg_line_length": 35.1, "alnum_prop": 0.5220797720797721, "repo_name": "SmartcitySantiagoChile/onlineGPS", "id": "f41e7d59b5b2c437ea1866327f2daaa13577efd8", "size": "...
"""Provides the worker thread needed for processing streams.""" from fractions import Fraction import io import logging from .const import AUDIO_SAMPLE_RATE from .core import Segment, StreamBuffer _LOGGER = logging.getLogger(__name__) def generate_audio_frame(): """Generate a blank audio frame.""" from av i...
{ "content_hash": "ac4462f268af342e5acf27f6804d422a", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 81, "avg_line_length": 39.047904191616766, "alnum_prop": 0.5907069467873025, "repo_name": "fbradyirl/home-assistant", "id": "e87221304a381cafcfa23172023513601cc50221", "si...
import argparse from django.core.management.base import AppCommand from django_seed import Seed from django_seed.exceptions import SeederCommandError from toposort import toposort_flatten from collections import defaultdict class Command(AppCommand): help = 'Seed your Django database with fake data.' def add...
{ "content_hash": "45204fd0f9890ef7606516b7506e294e", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 109, "avg_line_length": 38.62, "alnum_prop": 0.5657690315898498, "repo_name": "Brobin/django-seed", "id": "7f2fd2c5167ec30ea8c54ef3ea6663cf068e6951", "size": "3862", "bi...
default_app_config = 'peps.apps.PepsAppConfig'
{ "content_hash": "45c339e5cd9250f832f1ca46077fec88", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 46, "avg_line_length": 47, "alnum_prop": 0.7872340425531915, "repo_name": "proevo/pythondotorg", "id": "c71df192599e8bf265507cbdd7af2fbbe6847875", "size": "47", "binary": ...
import sys import lasagne.layers.pool as __cloned from .base import bayes as __bayes __module = sys.modules[__name__] del sys __all__ = [] for obj_name in __cloned.__all__: try: setattr(__module, obj_name, __bayes(getattr(__cloned, obj_name))) __all__ += [obj_name] except TypeError: pass...
{ "content_hash": "ea6e2cff0a5f78a6d2da8ef88cc7c1db", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 73, "avg_line_length": 29.846153846153847, "alnum_prop": 0.6005154639175257, "repo_name": "ferrine/gelato", "id": "8038663aa86d636e72d7378a79e489716f5ce0a0", "size": "388",...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0006_batchfile_name'), ] operations = [ migrations.CreateModel( name='ModuleBatchFile'...
{ "content_hash": "71c3a578f24451fa6de904e227c69d5b", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 125, "avg_line_length": 33.19444444444444, "alnum_prop": 0.596652719665272, "repo_name": "aginzberg/crowdsource-platform", "id": "4af09d3ca990c8d6eadf428e753adf7e98702de8", ...
""" mbed SDK Copyright (c) 2014-2016 ARM Limited 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": "98d3195ae55f47bf526ecec32ce49a37", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 77, "avg_line_length": 33.0375, "alnum_prop": 0.6178584941354521, "repo_name": "andreaslarssonublox/mbed", "id": "9e2419945290621812d5e0d35cff086880d197ee", "size": "2643",...
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 'Category' db.create_table('aw_category', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_k...
{ "content_hash": "32f112efdf9bc3595c9bc5f23b341168", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 166, "avg_line_length": 50.48837209302326, "alnum_prop": 0.5914325195762321, "repo_name": "vinilios/feincms-1", "id": "5c6a4ad2e54e36f02104d934d93345959f3cecd6", "size": "2...
from django.conf import settings from django.http import HttpResponse from django.utils import translation from django.utils.translation import (ugettext_lazy as _, pgettext, check_for_language) from django.views.decorators.cache import never_cache from django.views.decorators.csrf...
{ "content_hash": "49add39799bf29376c46d7d174395ceb", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 94, "avg_line_length": 40.08433734939759, "alnum_prop": 0.5873159002103998, "repo_name": "percipient/django-two-factor-auth", "id": "57f67b92370d47ad51f023b2eb813af3421ef82f"...
from django.utils.encoding import smart_str from haystack import models from lazymodel import LazyModel class SearchResult(models.SearchResult): """Extended SearchResult class for general purposes.""" def __getattr__(self, attr): """ The __getattr__ method of Haystack's SearchResult is too ...
{ "content_hash": "a427126285fd2ef9b20f080e94eae2c0", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 73, "avg_line_length": 23.655172413793103, "alnum_prop": 0.6100583090379009, "repo_name": "apnarm/django-apn-search", "id": "122b29492e64801399c962fa8eedcee13155d43f", "siz...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.jvm.subsystems.zinc_language_mixin import ZincLanguageMixin from pants.build_graph.address import Address from pants.option.custom_types import targ...
{ "content_hash": "15cda9531f19717e9e1e6fcf2bf203a2", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 95, "avg_line_length": 43.88, "alnum_prop": 0.7000911577028259, "repo_name": "gmalmquist/pants", "id": "259c55eec687fe044cc426840de4952c7a427c8a", "size": "2341", "binary...
"""Goldstone unit test utilities.""" # Copyright 2015 Solinea, Inc. # # 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 a...
{ "content_hash": "7e0eb9c1fd7fb735d531f58ddc79df4d", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 79, "avg_line_length": 35.92118226600985, "alnum_prop": 0.6570213933077345, "repo_name": "slashk/goldstone-server", "id": "4b4c7319e6ddc13263f633d6120c42dee4591387", "size...
from __future__ import print_function from setuptools import setup, find_packages, Extension import os from distutils.errors import DistutilsSetupError from distutils import log from distutils.dep_util import newer_group from distutils.core import Command import pkg_resources import platform import sys needs_pytest =...
{ "content_hash": "c8bbab54fac4c5c750552ca3f277cf95", "timestamp": "", "source": "github", "line_count": 221, "max_line_length": 80, "avg_line_length": 35.470588235294116, "alnum_prop": 0.5813241484883276, "repo_name": "anthrotype/compreffor", "id": "2d3a6b37fb6cc728bcbd1548fafe179a8d026806", "size"...
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/base/shared_base_tower.iff" result.attribute_template_id = -1 result.stfName("building_name","base_tower") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "c7790440be6e43f572f024d564040b86", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 63, "avg_line_length": 22.923076923076923, "alnum_prop": 0.6912751677852349, "repo_name": "obi-two/Rebelion", "id": "ac79fd9d0f030f42b0cc894f115ad37898c710e5", "size": "443...
""" Author: WFJ Version: 0.1.0 FileName: setting_views.py CreateTime: 2017-04-20 23:19 """ from flask import render_template from . import manage_blueprint as manage @manage.route('/global-setting') def global_setting(): return render_template('manage/global_setting.html')
{ "content_hash": "952ebe953e70773ba24e02e437fc7b34", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 56, "avg_line_length": 25.25, "alnum_prop": 0.6864686468646864, "repo_name": "DreamWFJ/Everyeye", "id": "d52b2a67b14d0875ff4c67af1fa08342ae6d028b", "size": "350", "binary...
from django.conf.urls import include, url from rest_framework.renderers import ( CoreJSONRenderer, DocumentationRenderer, SchemaJSRenderer ) from rest_framework.schemas import get_schema_view def get_docs_view(title=None, description=None, schema_url=None, public=True): renderer_classes = [DocumentationRende...
{ "content_hash": "62f8d627aa7a8c1ddc4b1e587ae8b8cf", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 82, "avg_line_length": 27.72, "alnum_prop": 0.6594516594516594, "repo_name": "raajitr/django_hangman", "id": "3a56b7cb1deac4ec5cb11a58b347c9dc47319890", "size": "1386", "...
from datetime import datetime from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.cache import cache from cms.admin import forms from cms.admin.forms import (PageUserForm, PagePermissionInlineAdminForm, ViewRestrictionInlineAdminFor...
{ "content_hash": "d1e3da3344b008f17b6f16fae88b1bbd", "timestamp": "", "source": "github", "line_count": 281, "max_line_length": 107, "avg_line_length": 40.612099644128115, "alnum_prop": 0.578776726253067, "repo_name": "vxsx/django-cms", "id": "fbf944d40b0e060c9e7ccbcee8669795b5aa29b6", "size": "114...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('game', '0005_auto_20161104_1713'), ] operations = [ migrations.AlterField( model_name='playergamescore', name='starters', ...
{ "content_hash": "70c3065bd33171dabb3e33a52c25a44e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 148, "avg_line_length": 26.88888888888889, "alnum_prop": 0.5764462809917356, "repo_name": "vollov/ocbl.ca", "id": "6bec7ee7210e11e3360d61d1c67354a808adb748", "size": "555",...
import abc from pymatgen.core.periodic_table import get_el_sp from monty.json import MSONable from pymatgen.analysis.structure_matcher import StructureMatcher,\ ElementComparator from pymatgen.symmetry.analyzer import SpacegroupAnalyzer from collections import defaultdict """ This module defines filters for Tran...
{ "content_hash": "02532e70b89e75a77daaff4c050adbb6", "timestamp": "", "source": "github", "line_count": 291, "max_line_length": 85, "avg_line_length": 38.580756013745706, "alnum_prop": 0.5966865591876725, "repo_name": "dongsenfo/pymatgen", "id": "94e98899f561b0f47b11862a0418e8b80087b68e", "size": "...
from msrest.serialization import Model class KeyVaultAndSecretReference(Model): """Key Vault Secret Url and vault id of the encryption key . All required parameters must be populated in order to send to Azure. :param source_vault: Required. Resource id of the KeyVault containing the key or secret ...
{ "content_hash": "d2f55fe0ac6bed48c91132bc2c5f3f7b", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 77, "avg_line_length": 34.48275862068966, "alnum_prop": 0.643, "repo_name": "lmazuel/azure-sdk-for-python", "id": "d342cfb37a14224f8011ffcf507a1aba5bd29e4e", "size": "1474"...
"""Test the Z-Wave JS binary sensor platform.""" from zwave_js_server.event import Event from zwave_js_server.model.node import Node from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASS_MOTION, DEVICE_CLASS_TAMPER, ) from homeassistant.const import ( DEVICE_CLASS_BATTERY...
{ "content_hash": "d734e8ae602eb5bcc3c1b6fee0a8e1b3", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 90, "avg_line_length": 31.22596153846154, "alnum_prop": 0.6334103156274057, "repo_name": "jawilson/home-assistant", "id": "d5aab6cd0f9935bae80ec1adb6ffdcbdea1ebcc1", "size...
import sys import fileinput import csv filename = raw_input("What file to convert?: ") copy = open("tanh_convert-" + filename, "wb") writer = csv.writer(copy, delimiter=',', quotechar='', quoting=csv.QUOTE_NONE) with open(filename, "rU") as f: reader = csv.reader(f, delimiter=',', quotechar='', quoting=csv.QUOTE_...
{ "content_hash": "e53d382e6ced18c7d6fafa0d714b3984", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 79, "avg_line_length": 29.428571428571427, "alnum_prop": 0.5857605177993528, "repo_name": "adam-nnl/AFootball", "id": "d2c545e83f8e19c445a860b3cedc07c8381500aa", "size": "6...
import os import os.path import subprocess from asp.avro_inter.py_avro_inter import * import sys class ScalaFunction: def __init__(self, classname, source_dir): self.classname = classname self.source_dir = source_dir def find_close(self,str): index = ...
{ "content_hash": "6cb6e09464453b6ab632d9628e3b99ba", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 103, "avg_line_length": 31.801526717557252, "alnum_prop": 0.5516082573211714, "repo_name": "pbirsinger/aspNew", "id": "6eb082dc62bdf0f36d4a6f4e64c73388916bc9e9", "size": "...
import itertools __all__ = ['Normal', 'Comment', 'Constant', 'Identifier', 'Statement', 'Define', 'Type', 'Special', 'Underlined', 'Error', 'Attention', 'Header', 'Regular', 'Italic', 'Bold', 'Underline', 'depth', 'fg', 'bg', 'Theme'] class _Face(tuple): def __init__(self, *_): ...
{ "content_hash": "0c7322902b1292adde7ce4042924e280", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 78, "avg_line_length": 26.410810810810812, "alnum_prop": 0.5794105607859189, "repo_name": "dholm/FlowUI", "id": "05eb54b4d5e9f85652f5497ed4406fd565550c4d", "size": "6476",...
import unittest from unittest import mock from knack.util import CLIError class TestNetworkUnitTests(unittest.TestCase): def test_network_get_nic_ip_config(self): from azure.cli.command_modules.network.custom import _get_nic_ip_config # 1 - Test that if ip_configurations property is null, erro...
{ "content_hash": "bdfb479a10c458dc2c5f354bf1afcd1a", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 92, "avg_line_length": 37.23684210526316, "alnum_prop": 0.6240282685512367, "repo_name": "yugangw-msft/azure-cli", "id": "c48603c6ece9d6a65fce535df077c09feade1346", "size":...
from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from tekton import router from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from book_app import facade from routes.books import admin @login_not_required @no_c...
{ "content_hash": "47a13673c434e108e3c87854e7b2ad65", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 76, "avg_line_length": 32.89473684210526, "alnum_prop": 0.7568, "repo_name": "marcosxddh/aula_script", "id": "31e4ab9bb9c714d3dba7ac06b3086b7709b67326", "size": "649", "b...
"""Tests for `tf.data.experimental.parallel_interleave()`.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import math import threading import time import numpy as np from six.moves import zip_longest from tensorflow.python.data.experim...
{ "content_hash": "d2144e7a3def939bbf9e1e1e325d8acd", "timestamp": "", "source": "github", "line_count": 734, "max_line_length": 80, "avg_line_length": 38.42234332425068, "alnum_prop": 0.6264803914615985, "repo_name": "theflofly/tensorflow", "id": "9d535316619db395853e83e3c1b2a740965b9f7d", "size": ...
"""Dependencies vendoring helpers.""" import os.path import site import sys PYTHON_VERSION = 'python%d.%d' % (sys.version_info[0], sys.version_info[1]) def add(path, index=1): """Insert site dir or virtualenv at a given index in sys.path. Args: path: relative path to a site dir or virtualenv. index: s...
{ "content_hash": "31818c55d0c08bab60b38c8f65deb8e0", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 75, "avg_line_length": 23.885714285714286, "alnum_prop": 0.6602870813397129, "repo_name": "Serag8/Bachelor", "id": "58a23f67bff123105ddbc49b50f67d2d7a56c54e", "size": "1437...
"""Contains classes for SymmetricDelete.""" from sparknlp.common import * from sparknlp.common.annotator_type import AnnotatorType class SymmetricDeleteApproach(AnnotatorApproach): """Trains a Symmetric Delete spelling correction algorithm. Retrieves tokens and utilizes distance metrics to compute possible d...
{ "content_hash": "4d38d82fef59cb4da2d778b15072dc06", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 118, "avg_line_length": 36.879858657243815, "alnum_prop": 0.5873335249592795, "repo_name": "JohnSnowLabs/spark-nlp", "id": "8ec2d74081188fe5b24217065943e04491ad0253", "siz...
import env import mongoengine from openrunlog import models def rebuild_indexes(): collection_user = models.User._get_collection() collection_run = models.Run._get_collection() collection_user.update({}, {"$unset": {"_types": 1}}, multi=True) collection_run.update({}, {"$unset": {"_types": 1}}, mult...
{ "content_hash": "c028aeb21ddc7c2b4f9fa52359159382", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 71, "avg_line_length": 26.44, "alnum_prop": 0.6016137165910237, "repo_name": "JsonChiu/openrunlog", "id": "4cf502460f4c6349153ec2f0668671ba4d67908f", "size": "1983", "bin...
import datetime import random import time from oslo_config import cfg from oslo_log import log as logging from oslo_service import loopingcall from oslo_utils import timeutils import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy.orm import exc from neutron.common import constants from neutron.common imp...
{ "content_hash": "5462ca667c7e0e3c22b70b3dac71c0c1", "timestamp": "", "source": "github", "line_count": 460, "max_line_length": 79, "avg_line_length": 45.89565217391304, "alnum_prop": 0.5714759378552482, "repo_name": "chitr/neutron", "id": "924cdb41699ba5f846ec3330b369640ab0cdc317", "size": "21753"...
""" License: BSD (c) 2009-2013 ::: www.CodeResort.com - BV Network AS ([email protected]) """ import unittest import xmlrpclib import os import shutil import datetime import time from tracrpc.xml_rpc import to_xmlrpc_datetime from tracrpc.tests import rpc_testenv, TracRpcTestCase class RpcTicketTestCase(Trac...
{ "content_hash": "9997c35fa05e9c22d60171c164e23bc6", "timestamp": "", "source": "github", "line_count": 403, "max_line_length": 101, "avg_line_length": 46.20099255583126, "alnum_prop": 0.5822009774961061, "repo_name": "hexenxp14/tracxmlrpc", "id": "60b4d64d0b777ee1f465c098ae3b4bd2faf915ba", "size":...
import stringmanipulation import filemanagement import sys extensions = ['.h','.cc','.c','.cpp'] ignore_these = ['my_ignore_header.h'] if((len(sys.argv) != 2) and (len(sys.argv) != 3)): print 'parameters are: directory [--commit]' quit() directory = sys.argv[1]; if(not filemanagement.pathexist(directory)): ...
{ "content_hash": "a92802a19d48b72cf84a4f0576bdf9ef", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 111, "avg_line_length": 32.422360248447205, "alnum_prop": 0.6346743295019157, "repo_name": "stoiczek/WebRTC", "id": "01c8a8b4e184e2132185d032d25c55174fe3f639", "size": "52...
import operator from numpy.testing import assert_raises import numpy as np import pytest from .. import ones, asarray, reshape, result_type, all, equal from .._array_object import Array from .._dtypes import ( _all_dtypes, _boolean_dtypes, _floating_dtypes, _integer_dtypes, _integer_or_boolean_dty...
{ "content_hash": "ba604455bca8a2a724694602b0fa024e", "timestamp": "", "source": "github", "line_count": 375, "max_line_length": 132, "avg_line_length": 42.056, "alnum_prop": 0.5429585948893538, "repo_name": "endolith/numpy", "id": "f6efacefaee130f3bfeed144809a485c3b88a309", "size": "15771", "bina...
"""Provide variant calling with VarScan from TGI at Wash U. http://varscan.sourceforge.net/ """ import os import sys from bcbio import broad, utils from bcbio.distributed.transaction import file_transaction, tx_tmpdir from bcbio.pipeline import config_utils from bcbio.provenance import do from bcbio.variation import...
{ "content_hash": "a72515a79d014c921f7429c02c2521c4", "timestamp": "", "source": "github", "line_count": 328, "max_line_length": 111, "avg_line_length": 43.823170731707314, "alnum_prop": 0.531932656184778, "repo_name": "biocyberman/bcbio-nextgen", "id": "b3e2510b3bb91ebb47e0f00bc060648f47b2b045", "s...
"""This module contains classes that represent Telegram errors. .. versionchanged:: 20.0 Replaced ``Unauthorized`` by :class:`Forbidden`. """ __all__ = ( "BadRequest", "ChatMigrated", "Conflict", "Forbidden", "InvalidToken", "NetworkError", "PassportDecryptionError", "RetryAfter", ...
{ "content_hash": "f52c68a78e5727f7936d5e9bbbaabd0e", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 93, "avg_line_length": 25.692682926829267, "alnum_prop": 0.596544522498576, "repo_name": "tzpBingo/github-trending", "id": "7e92bfaa90a09b54dbf1f03ccd1a0b629429743d", "siz...
import json import re import csv import time import sys import argparse class CFNDevice(object): def __init__(self, atlaskey, name, devicetype, facility, street, city, state, country, accountid, receivedat, eventlogid, message, osversion, osservicepack, hotfixname, KB, hotfixstatus ,installdate, r...
{ "content_hash": "ca10a0587e8a5af54cc5aabee11d74cb", "timestamp": "", "source": "github", "line_count": 234, "max_line_length": 236, "avg_line_length": 39.70940170940171, "alnum_prop": 0.5130219543693499, "repo_name": "abuenavista/PythonStuff", "id": "126b51b4cc646657cfc08f94461a7e75833a51d2", "siz...
import pandas as pd import numpy as np import scipy.stats as scs from skimage.io import imread import os __author__ = 'mahieke' def align(data): """ Return the data aligned with its mean values. Args: data (pandas.core.frame.DataFrame): Dataset which should be aligned Returns: ...
{ "content_hash": "66051dc9f1e355a62424c4aa61828b11", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 97, "avg_line_length": 25.539877300613497, "alnum_prop": 0.5935623348546721, "repo_name": "mahieke/maschinelles_lernen", "id": "93f601ba4b13e3db3d58f10ef8858f3c5beb6e11", ...
from __future__ import unicode_literals _RAW_SALES_TABLE = 'raw_sales' _AGGREGATED_SALES_TABLE = 'aggregated_sales'
{ "content_hash": "6a015369eef5bdb9513c927a878bb525", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 44, "avg_line_length": 23.6, "alnum_prop": 0.7372881355932204, "repo_name": "alphagov/performanceplatform-collector", "id": "ec52877cdcb75f5fbe09cb07461b89a1ac254de9", "size...
import pytest import meshio from . import helpers @pytest.mark.parametrize( "mesh", [ helpers.empty_mesh, helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh, helpers.tet_mesh, helpers.hex_mesh, helpers.add_cell_data( helpers.tri_mes...
{ "content_hash": "106e6320d683efb9787e2fea3c485a05", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 88, "avg_line_length": 24.8, "alnum_prop": 0.5741935483870968, "repo_name": "nschloe/meshio", "id": "679cfaa78b965fd53a09aa551b02016c6b524d98", "size": "620", "binary": f...
import webapp2 class MainHandler(webapp2.RequestHandler): def get(self): self.response.write('Hello world!') app = webapp2.WSGIApplication([ ('/', MainHandler) ], debug=True)
{ "content_hash": "ecbd5affa69f47732bf1efdccb2ff683", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 43, "avg_line_length": 21.444444444444443, "alnum_prop": 0.6839378238341969, "repo_name": "luisibanez/cssi-appengine-introduction-01", "id": "df1ecf61c9a9f2eb260da9c2a00052e55...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: azure_rm_manageddisk_facts version_added: "2.4" short_desc...
{ "content_hash": "17711a98b37171d4775debfb9532d1b1", "timestamp": "", "source": "github", "line_count": 232, "max_line_length": 145, "avg_line_length": 28.857758620689655, "alnum_prop": 0.5717699775952203, "repo_name": "SergeyCherepanov/ansible", "id": "3c329a705821f5c2bec69c8250d3218d6b54a67d", "s...
from django.contrib.auth.base_user import BaseUserManager from django.utils import timezone class AccountManager(BaseUserManager): def _create_user(self, email, password, is_staff, is_superuser, **extra_fields): """ Creates and saves a User with the given email and password. """ n...
{ "content_hash": "7a9c9b7c513f1c2570e0459de2d1dbf5", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 86, "avg_line_length": 38.148148148148145, "alnum_prop": 0.6456310679611651, "repo_name": "uda/djaccount", "id": "2c9d445f62657f6cc4814d092651e63526c97b03", "size": "1030",...
"""Generators for custom listops tasks.""" import csv import random from absl import app from absl import flags import numpy as np import tensorflow.compat.v1 as tf flags.DEFINE_string( 'task', default='basic', help='Name of task to create.') flags.DEFINE_integer( 'num_train_samples', default=96000, ...
{ "content_hash": "7129e8c51e0adfdce6a375b0e144160b", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 79, "avg_line_length": 26.57777777777778, "alnum_prop": 0.6295986622073578, "repo_name": "google-research/long-range-arena", "id": "bfcc53d7b545c79ac1e6866d1206e5187ea0c2b8"...
def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # Note that ``?`` and ``*`` match ...
{ "content_hash": "482aa0f2ecdb47a91705a8b210a7a773", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 71, "avg_line_length": 41.52873563218391, "alnum_prop": 0.6639911430943815, "repo_name": "greensnark/appenginedatastoretest", "id": "9cc2504607e4871685397001d4c6219578cf8d6d"...
import logging from flask import Blueprint, request, abort from .tasks import load_fdp_task from .config import get_connection_string, _set_connection_string FDPLoaderBlueprint = Blueprint('FDPLoader', __name__) @FDPLoaderBlueprint.route('/') def load(): package = request.args.get('package') callback = requ...
{ "content_hash": "0f266ce59f3219eb44f51ce58154c32d", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 85, "avg_line_length": 31, "alnum_prop": 0.704516129032258, "repo_name": "openspending/babbage.fiscal-data-package", "id": "8b396bee03e117f36822584e43295320209dd1a4", "size...
from System.Threading import * def condition(switchTime): switchCount = 1 #loop forever while switchCount > 0: hc.SwitchEAndWait() print "Switch count "+str(switchCount) System.Threading.Thread.Sleep(1000 * switchTime) switchCount = switchCount + 1 def run_script(): print "Use condition(switchTime)"
{ "content_hash": "7547652003ed430f15aaec220be9f4c3", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 50, "avg_line_length": 19.9375, "alnum_prop": 0.7366771159874608, "repo_name": "ColdMatter/EDMSuite", "id": "feb7171e06d51547f60b3ba8c16dde464f1085d1", "size": "319", "bi...
""" @author: Adam Reinhold Von Fisher - https://www.linkedin.com/in/adamrvfisher/ """ #This is part of a kth fold optimization tool #Import modules from DefRSIPredictor import DefRSIPredictor import numpy as np import pandas as pd from YahooGrabber import YahooGrabber #Read in data Aggregate = pd.re...
{ "content_hash": "dbc86fb2752dcea042ff72f19a711e5b", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 80, "avg_line_length": 29.536231884057973, "alnum_prop": 0.654072620215898, "repo_name": "adamrvfisher/TechnicalAnalysisLibrary", "id": "11b576339ee019da027aabe268c8d763e0541...
""" Example Airflow DAG for DataprocSubmitJobOperator with hive job. """ import os from datetime import datetime from airflow import models from airflow.providers.google.cloud.operators.dataproc import ( DataprocCreateClusterOperator, DataprocDeleteClusterOperator, DataprocSubmitJobOperator, ) from airflo...
{ "content_hash": "30be90e6bc45ca0b7c39fdacd373fcaf", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 88, "avg_line_length": 29.329896907216494, "alnum_prop": 0.6734622144112478, "repo_name": "Acehaidrey/incubator-airflow", "id": "bf8f3178a7be94aafc65ecdb2a9f6cc203eac8d0", ...
from oslo_log import log as logging from trove.common.i18n import _ from trove.common import instance as ds_instance from trove.common.notification import EndNotification from trove.guestagent import backup from trove.guestagent.datastore.experimental.db2 import service from trove.guestagent.datastore import manager f...
{ "content_hash": "1c550b1b5e0a83cbe00e3524c6b29c13", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 77, "avg_line_length": 37.85, "alnum_prop": 0.6393659180977543, "repo_name": "mmasaki/trove", "id": "792cd90beec8c53fb0e3313106c4eb0c297cdb07", "size": "5134", "binary":...
"""Test reproduce state for Fan.""" from homeassistant.core import State from tests.common import async_mock_service async def test_reproducing_states(hass, caplog): """Test reproducing Fan states.""" hass.states.async_set("fan.entity_off", "off", {}) hass.states.async_set("fan.entity_on", "on", {}) ...
{ "content_hash": "951205d7e91affd269c033f97528c9a1", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 87, "avg_line_length": 37.73033707865169, "alnum_prop": 0.6063132817153067, "repo_name": "joopert/home-assistant", "id": "0dcd38580b8c780a3eba4db5f15ffdd51a73a43a", "size":...