text
stringlengths
4
1.02M
meta
dict
""" A collection of distutils extensions adding things like automatic 2to3 translation, a test runner, and working around broken stdlib extensions CFLAG passing in distutils. Specifically, this module is only meant to be imported in setup.py scripts. """ import copy import errno import inspect import io import math i...
{ "content_hash": "be58438f0da6c09e271beb8ae4cd0d5f", "timestamp": "", "source": "github", "line_count": 1047, "max_line_length": 105, "avg_line_length": 35.08309455587393, "alnum_prop": 0.5874441903517369, "repo_name": "radhermit/pychroot", "id": "977728317fd0cd5431d54b7ce7048598c52f20c4", "size": ...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('assets', '0012_auto_20170105_0651'), ] operations = [ migrations.AddField( model_name='component', name='install_instruction...
{ "content_hash": "215b4545566dc71abf36a0c261e34410", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 58, "avg_line_length": 25, "alnum_prop": 0.5860869565217391, "repo_name": "portnov/assethub", "id": "8518366ac6a9df4f49825d33939059c9d22bd825", "size": "648", "binary": f...
import unittest import troposphere.rds as rds class TestRDS(unittest.TestCase): def test_it_allows_an_rds_instance_created_from_a_snapshot(self): rds_instance = rds.DBInstance( 'SomeTitle', AllocatedStorage=1, DBInstanceClass='db.m1.small', Engine='MySQL', ...
{ "content_hash": "829ca6a471f76fef8083b12837abf5ad", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 79, "avg_line_length": 34.17, "alnum_prop": 0.5797483172373427, "repo_name": "DualSpark/troposphere", "id": "a7e63e96bf5eb2eb8b7f22a65d428cd02ece2d28", "size": "3417", "...
""" PlotgroupPanels for displaying ProjectionSheet plotgroups. """ import ImageTk ### JCALERT! Try not to have to use chain and delete this import. from itertools import chain from Tkinter import Canvas from numpy import sometrue import param import topo from topo.base.cf import CFProjection from topo.base.projecti...
{ "content_hash": "1781f3534f789705fdc43ca25626d213", "timestamp": "", "source": "github", "line_count": 345, "max_line_length": 123, "avg_line_length": 35.4231884057971, "alnum_prop": 0.6036330905817855, "repo_name": "Tasignotas/topographica_mirror", "id": "776b74de6ee47ecc11917aa9f5fd56d238708e3d", ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('place', '0009_auto_20141208_0426'), ('place', '0010_place_google_rating'), ] operations = [ ]
{ "content_hash": "db803f7c829c9efa5cc63355b713d246", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 46, "avg_line_length": 19.285714285714285, "alnum_prop": 0.6333333333333333, "repo_name": "pizzapanther/Localvore", "id": "737027c36ffc197ca74f4462d2aaadbc115b70e1", "size"...
"""empty message Revision ID: 3df3378fa9b0 Revises: 45f66908a95b Create Date: 2015-04-10 16:04:32.131733 """ # revision identifiers, used by Alembic. revision = '3df3378fa9b0' down_revision = '45f66908a95b' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ...
{ "content_hash": "4c408a9ce66a25bd9db2f09f368e3af1", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 99, "avg_line_length": 25.884615384615383, "alnum_prop": 0.7057949479940565, "repo_name": "justinwp/croplands", "id": "f68f9aa43393c231cc7378856264d986cabf3c23", "size": "6...
from django.conf import settings from django.contrib.sites.models import Site from djblets.siteconfig.models import SiteConfiguration from reviewboard import get_version_string from reviewboard.admin.siteconfig import settings_map, defaults def init_siteconfig(app, created_models, verbosity, **kwargs): """ ...
{ "content_hash": "a7f840834616992378531925f2b8c177", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 80, "avg_line_length": 38.762962962962966, "alnum_prop": 0.6239250907701127, "repo_name": "asutherland/opc-reviewboard", "id": "40e2553e5db51a2a7f5c9209716bf452c934b947", ...
import six import shlex from . import base class Dmenu(base.RunCommand): """ Python wrapper for dmenu http://tools.suckless.org/dmenu/ """ defaults = [ ("dmenu_font", None, "override the default 'font' and 'fontsize' options for dmenu"), # NOTE: Do not use a list as a default valu...
{ "content_hash": "78a3fc1a222a810d574abe1dd984aa3d", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 104, "avg_line_length": 37.87261146496815, "alnum_prop": 0.5893037336024218, "repo_name": "cortesi/qtile", "id": "167b7e0d188c79f2a82f34fb3cab47186f096b58", "size": "7038"...
import json import pytest from telegram import (InlineQueryResultCachedMpeg4Gif, InlineKeyboardButton, InputTextMessageContent, InlineKeyboardMarkup, InlineQueryResultCachedVoice) @pytest.fixture(scope='class') def inline_query_result_cached_mpeg4_gif(): return InlineQueryResultC...
{ "content_hash": "62238a3423d6b02efa1048241fc97299", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 123, "avg_line_length": 50.08860759493671, "alnum_prop": 0.639373262572656, "repo_name": "rogerscristo/BotFWD", "id": "ff66807772485678c994559ed713d694e330a78e", "size": "4...
import sys from EPPs.common import StepEPP from pyclarity_lims.entities import Protocol class AssignNextStepKAPAqPCR(StepEPP): """ This script assigns the next step for samples based on the QC flag of the input artifact and the step UDF standard curve result. """ _use_load_config = False # preve...
{ "content_hash": "7d3fb460575f35b8c8624d086a9d151c", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 120, "avg_line_length": 46.13725490196079, "alnum_prop": 0.589035274118147, "repo_name": "EdinburghGenomics/clarity_scripts", "id": "3fc8f2611f482565a3b26d41b33da09a78ae0af8"...
from system.core.controller import * from random import randint from time import strftime class Login_Reg(Controller): def __init__(self, action): super(Login_Reg, self).__init__(action) self.load_model('Login_Reg') self.db = self._app.db def index(self): return self.load_view('...
{ "content_hash": "7e74291bef926a973ca9ce60b6b6acd3", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 71, "avg_line_length": 31.339622641509433, "alnum_prop": 0.5611077664057796, "repo_name": "authman/Python201609", "id": "87414dcb7857560332b39348d9b4658cbb9aa4eb", "size": ...
from __future__ import annotations import unittest from unittest import mock import pytest import telegram import airflow from airflow.models import Connection from airflow.providers.telegram.hooks.telegram import TelegramHook from airflow.utils import db TELEGRAM_TOKEN = "dummy token" class TestTelegramHook(unit...
{ "content_hash": "b0addaa329c4b62c27c86f802768463d", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 97, "avg_line_length": 40.31073446327684, "alnum_prop": 0.6267694463910302, "repo_name": "nathanielvarona/airflow", "id": "a915f6d3285ee4a22352abd34d859b8fdf52d522", "size...
import collections import copy import json import os import pipes import re import subprocess import sys import bb_utils sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from pylib import constants CHROMIUM_COVERAGE_BUCKET = 'chromium-code-coverage' _BotConfig = collections.namedtuple( 'BotConfig...
{ "content_hash": "fdf37349ca0af342bf80d942fc205e43", "timestamp": "", "source": "github", "line_count": 279, "max_line_length": 79, "avg_line_length": 35.086021505376344, "alnum_prop": 0.6426601287159056, "repo_name": "mogoweb/chromium-crosswalk", "id": "dbe453a8f03c03cd809fe8dcf1861e1f11a648c0", "...
""" pyiters """ from copy import copy from itertools import dropwhile __all__ = [ "ndropwhile", "iproduct", "callfor", ] def ndropwhile(predicate, iterable): return dropwhile(lambda x: not predicate(x), iterable) def _iproduct(*iterables): if len(iterables) == 1: for i in copy(iter...
{ "content_hash": "e832caec32fe19aaab6dc55dcef7f728", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 65, "avg_line_length": 20.105263157894736, "alnum_prop": 0.5785340314136126, "repo_name": "odd-even/pyiters", "id": "2c4123e664ae2a70667d5647b5c022c8988c3026", "size": "788...
from facette.utils import * import json GROUP_ENTRY_ORIGIN = "origin" GROUP_ENTRY_PATTERN = "pattern" class GroupEntry: def __init__(self, js=""): self.entry = {} self.origin = facette_to_json(GROUP_ENTRY_ORIGIN, js, self.entry) self.pattern = facette_to_json(GROUP_ENTRY_PATTERN, js, se...
{ "content_hash": "8e5e551d82c814e072a37d298c46b60d", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 75, "avg_line_length": 30.142857142857142, "alnum_prop": 0.6350710900473934, "repo_name": "OpenTouch/python-facette", "id": "6f9dca666f12eef11400581157c6e9ed398d43ad", "siz...
import accounts import praw import sys import datetime import random username = accounts.amumu_bot_user password = accounts.amumu_bot_pass subreddits = 'redditdebuggingspace' r = praw.Reddit('Amumu Bot by /u/Xwerve and /u/liquidized') def initialize(): r.login(username, password) initialize() comment_ids = [] post_...
{ "content_hash": "6f11d2f3d2000457e10407faedd9e8e4", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 268, "avg_line_length": 44.970588235294116, "alnum_prop": 0.6654676258992805, "repo_name": "taemintkim/Amumu_bot", "id": "3ea30a68945c8f4321d2d6fbbb27cdec0699e0ba", "size":...
import os import sys import logging from optparse import OptionParser sys.path.append(os.sep.join( os.path.dirname(os.path.abspath(__file__)).split(os.sep)[:-1])) import libcloud_rest.log from libcloud_rest.log import get_logger from libcloud_rest.constants import VALID_LOG_LEVELS DEBUG = False def start_serve...
{ "content_hash": "11143f7566c1e90c61ac03473c8ae004", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 76, "avg_line_length": 32.23170731707317, "alnum_prop": 0.6250472947408248, "repo_name": "islamgulov/libcloud.rest", "id": "77a153f4de550a2d57df2f83b401df46d9893e13", "size...
class PublicKeyPinsAnalyzer: def __init__(self): pass def analyze(self, parse_results, headers, content): results = parse_results["Public-Key-Pins"] parts = [] if results["status"] == "PUBLIC_KEY_PINS_NONE": parts.append({ "type" : "warning", "message" : "Public-Key-Pins is not specified. If an a...
{ "content_hash": "35686b2c88a9f5a76b0840b45081df50", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 223, "avg_line_length": 39.22727272727273, "alnum_prop": 0.6726535341830823, "repo_name": "HoLyVieR/http-security-headers", "id": "77551bdb7bf08919fc39d3d3100d4b85a611295c", ...
''' Bubble ====== .. versionadded:: 1.1.0 .. image:: images/bubble.jpg :align: right The Bubble widget is a form of menu or a small popup where the menu options are stacked either vertically or horizontally. The :class:`Bubble` contains an arrow pointing in the direction you choose. Simple example ------------...
{ "content_hash": "faec101943d3f2821daed434ff5f7ee4", "timestamp": "", "source": "github", "line_count": 366, "max_line_length": 79, "avg_line_length": 34.10382513661202, "alnum_prop": 0.573946482935427, "repo_name": "Davideddu/kivy-forkedtouch", "id": "edfdfc6e3444bed6e31e0f14b7eb3f1d778cc047", "si...
from ems.xtype.base import NumberType, StringType, BoolType, UnitType, DictType from ems.xtype.base import SequenceType nameType = StringType() nameType.minLength=1 nameType.maxLength=12 ageType = UnitType('Jahre', int) ageType.minValue = 0 ageType.maxValue = 140 ageType.value2UnitSpace = 1 weightType = UnitType('k...
{ "content_hash": "bd7514f47c0a79606a72b9424507ea2b", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 110, "avg_line_length": 33.16326530612245, "alnum_prop": 0.7193846153846154, "repo_name": "mtils/ems", "id": "27141a7f9d0d350d2caae14de61f3e8f05ed84ec", "size": "1626", "...
from six.moves.urllib.parse import quote import os import time import functools import inspect import itertools import operator from copy import deepcopy from sys import exc_info from swift import gettext_ as _ from eventlet import sleep from eventlet.timeout import Timeout import six from swift.common.wsgi import m...
{ "content_hash": "86d7e5443459deed2b8b5e40e0023901", "timestamp": "", "source": "github", "line_count": 1886, "max_line_length": 79, "avg_line_length": 41.23488865323436, "alnum_prop": 0.5653023698388818, "repo_name": "hurricanerix/swift", "id": "be98bc15ddcb2036d1f9560ff69cb4086e99fc14", "size": "...
from __future__ import print_function from os import environ from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner class Component(ApplicationSession): """ An application component that publishes an ...
{ "content_hash": "cd52109ae457a8cc624abf02c1f5f10a", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 71, "avg_line_length": 28.939393939393938, "alnum_prop": 0.6534031413612565, "repo_name": "tomwire/AutobahnPython", "id": "875ce4e4782e0fdcde4abd93385c3b1576a1939f", "size"...
""" A connection to a hypervisor through libvirt. Supports KVM, LXC, QEMU, UML, XEN and Parallels. """ import collections import contextlib import errno import functools import glob import mmap import operator import os import random import shutil import sys import tempfile import time import uuid import eventlet f...
{ "content_hash": "f6c5979897ab5f16e66b786badc0317f", "timestamp": "", "source": "github", "line_count": 6701, "max_line_length": 79, "avg_line_length": 44.15460379047903, "alnum_prop": 0.5408138434500473, "repo_name": "dawnpower/nova", "id": "4e94b6033d745987a8ad27999dc7365a23c961f0", "size": "2968...
import RPi.GPIO as GPIO import time class DistanceDetector(object): """docstring for DistanceDetector""" def __init__(self, trig, echo, flag): super(DistanceDetector, self).__init__() self.TRIG = trig self.ECHO = echo self.start = 0 self.stop = 0 self.distance ...
{ "content_hash": "f25d3e24d68b4eb119009404740ee0f3", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 68, "avg_line_length": 27.386363636363637, "alnum_prop": 0.49377593360995853, "repo_name": "ArmsZhou/Raspberry-Pi-Python-scripts", "id": "c7ceddd8896e98d179ab385f4d2792e0d59f...
from django.conf.urls import include, url from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'mysite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^accounts/login/$', 'django.contrib.auth...
{ "content_hash": "771b3c12630770c451bfae5e41b0cf82", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 87, "avg_line_length": 32.785714285714285, "alnum_prop": 0.6405228758169934, "repo_name": "maciek263/django2", "id": "e829b74607efcd4b371a0ccc90a8a71f0567d5f8", "size": "45...
from lino.api import dd, rt, _ def objects(): ExcerptType = rt.models.excerpts.ExcerptType kw = dict( template="default.weasy.html", primary=True, certifying=True, build_method='weasy2pdf', **dd.str2kw('name', _("VAT declaration"))) yield ExcerptType.update_for_model(rt.mod...
{ "content_hash": "75f6e91dafdd1955b45d8f9f73d54e9e", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 74, "avg_line_length": 31.818181818181817, "alnum_prop": 0.6485714285714286, "repo_name": "lino-framework/xl", "id": "606606ed98dc36afdd482b0e8889bd56e979e4a9", "size": "40...
from keras.models import Sequential from keras.layers.core import Dense, Dropout, Flatten from keras.layers.convolutional import Convolution3D, MaxPooling3D, ZeroPadding3D,Conv3D from keras.optimizers import SGD ''' dim_ordering issue: - 'th'-style dim_ordering: [batch, channels, depth, height, width] - 'tf'-style dim_...
{ "content_hash": "8dd8cb9cf9242d62f6d7f0034de6a502", "timestamp": "", "source": "github", "line_count": 269, "max_line_length": 99, "avg_line_length": 45.6542750929368, "alnum_prop": 0.5702304372608094, "repo_name": "bbcdli/xuexi", "id": "adc0b4b28305ef0ee804f523f9e4c50887f22000", "size": "12301", ...
"""Tests for sonnet.python.modules.util.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import os import tempfile # Dependency imports from absl.testing import parameterized import numpy as np import sonnet as snt import sonnet.python.m...
{ "content_hash": "701f8fa384d43cfb543662c8e635bf49", "timestamp": "", "source": "github", "line_count": 789, "max_line_length": 80, "avg_line_length": 38.26869455006337, "alnum_prop": 0.6092932370669669, "repo_name": "rakshit-agrawal/sonnet", "id": "d6b19a781b7f597bb9beca805f4969c883c3c2be", "size"...
print('Adrienne')
{ "content_hash": "77fb6c38cd3fbff864ba9e2c4e2579a6", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 17, "avg_line_length": 17, "alnum_prop": 0.7647058823529411, "repo_name": "anm4vp/cs3240-labdemo", "id": "c176b769f3f289a1e8493debdff372b2036fe519", "size": "17", "binary"...
import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "pinax.testimonials", "pinax.testimonials.tests" ], MIDDLEWARE_CLASSES=[], ...
{ "content_hash": "b2b53afc137f69b6d19fcebc9bc5c65d", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 55, "avg_line_length": 19.617021276595743, "alnum_prop": 0.5824295010845987, "repo_name": "pinax/pinax-testimonials", "id": "bf8a220e96bf1fbde432a3b7a63eb9dbfc522ae6", "siz...
import re import sys def parse_line(line,regex): ''' Each line looks like: /plates/9/81 Dataset {22/Inf, 916} ''' match = regex.match(line.strip()) if match: return [int(duder) for duder in match.groups()] else: return "barf" firstfile = open(sys.argv[1],'r') secondfile = o...
{ "content_hash": "0820d440b9a5fd5c0388750afa5474dd", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 110, "avg_line_length": 31.761194029850746, "alnum_prop": 0.5916353383458647, "repo_name": "lzamparo/SdA_reduce", "id": "f849a95456bf538fbc90af96d52128de2f53e184", "size": ...
from django.core.mail import get_connection from django.core.mail.message import EmailMultiAlternatives def fix_garbled_mail(): """ 8bit seems to cause buggy emails in Hebrew. revert back to base64""" # In django 1.5, this prevents BASE64: from django.core.mail import message # let's undo it: fro...
{ "content_hash": "0676e3fe128b43012ca88d39a5717005", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 77, "avg_line_length": 38.44444444444444, "alnum_prop": 0.6589595375722543, "repo_name": "hasadna/OpenCommunity", "id": "3b042007027990e533214f402a5d0155c899bb6b", "size": ...
from AccessControl import ClassSecurityInfo from DateTime import DateTime from Products.ATContentTypes.content import schemata from Products.ATExtensions.ateapi import RecordsField from Products.Archetypes import atapi from Products.Archetypes.public import * from Products.Archetypes.references import HoldingReference ...
{ "content_hash": "0b80f95592114bef140064c0b3e10c16", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 113, "avg_line_length": 35.41904761904762, "alnum_prop": 0.6351169669265931, "repo_name": "hocinebendou/bika.gsoc", "id": "d54c1489c4081beb92192ecaeaa868c16b87768d", "size...
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): super(ColorValidator, self).__init__( plotly_name...
{ "content_hash": "734cae63b596aed1388acc379178d087", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 66, "avg_line_length": 28.9375, "alnum_prop": 0.5853131749460043, "repo_name": "plotly/plotly.py", "id": "5eed83b481038958347ce3bf1b50921ae8839e90", "size": "463", "binar...
import thread from Classes.ConfigParser import ConfigParser # Import functions # In the future we should house these in a file of there own # We can dynamically load plugins from the directory # we wouldn't need to import and add everything by hand. from Plugins.plugin import Plugin from slideShow import SlideShowPl...
{ "content_hash": "461be5d26ec0c510130cf36132218397", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 81, "avg_line_length": 30.63013698630137, "alnum_prop": 0.6547406082289803, "repo_name": "crew/dds-client", "id": "9e3493ec054b986416b9222fc30585b86bbf98be", "size": "2272"...
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("SGDRegressor" , "california_housing" , "hive")
{ "content_hash": "73a2f56b14ce20f9c05d1c8b11526d0b", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 66, "avg_line_length": 34, "alnum_prop": 0.7720588235294118, "repo_name": "antoinecarme/sklearn2sql_heroku", "id": "66cf4142feebfd94d15f4bef996a8187701fc67f", "size": "136",...
import sys import os import datetime import mygeotab import sphinx_rtd_theme # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys....
{ "content_hash": "543b8e91d1da6c1f3446fb32cb93e589", "timestamp": "", "source": "github", "line_count": 250, "max_line_length": 82, "avg_line_length": 32.176, "alnum_prop": 0.7059920437593237, "repo_name": "Geotab/mygeotab-python", "id": "8bb6ab0c60cf4f533f0ad7b53f0dc0decc59e36d", "size": "8476", ...
from django.conf.urls import patterns, url from web_apps.task import views urlpatterns = patterns( '', url(r'^(?P<cluster>.+)/$', views.index, name='index'), url(r'^$', views.index, name='index'), )
{ "content_hash": "41b73deb7bb9ef49c4912d7d4bbabd78", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 58, "avg_line_length": 26.5, "alnum_prop": 0.6320754716981132, "repo_name": "fabrickit/fabkit", "id": "cfbf66f8077e573cca1fa4f89ee2f1d0f1ea500f", "size": "212", "binary": ...
import os import re import shutil import sys import tempfile from quickrelease.command import LoggedShellCommand from quickrelease.deliverable import FindDeliverables, GetDeliverable, GetAllDeliverables from quickrelease.exception import ReleaseFrameworkError from quickrelease.step import Step from quickrelease.utils ...
{ "content_hash": "af1c2549fb1ccd2bcb5da2c6a0fb2510", "timestamp": "", "source": "github", "line_count": 350, "max_line_length": 89, "avg_line_length": 33.92, "alnum_prop": 0.5940026954177897, "repo_name": "preed/quickrelease", "id": "97ee29e46fc2dccfe53ee6614588504b2961e1c7", "size": "11873", "bi...
from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.db import models from event import Event from notificationtemplateconfig import NotificationTemplateConfig class PublicFeedItem(models.Model): event = models.ForeignKey(Event) template_config ...
{ "content_hash": "b4ff11f70336a646a51caa4baa942352", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 85, "avg_line_length": 35.37931034482759, "alnum_prop": 0.7017543859649122, "repo_name": "suselrd/django-notifications", "id": "47f0153f37175a9b8e9aaa136fc8c1d3b05543cd", "...
import copy from rl_coach.agents.ddpg_agent import DDPGAgentParameters from rl_coach.base_parameters import VisualizationParameters from rl_coach.core_types import TrainingSteps, EnvironmentEpisodes, EnvironmentSteps from rl_coach.environments.carla_environment import CarlaEnvironmentParameters, CameraTypes, CarlaInpu...
{ "content_hash": "0430208f5721198de987763709bef618", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 109, "avg_line_length": 50.907407407407405, "alnum_prop": 0.766460531102219, "repo_name": "NervanaSystems/coach", "id": "d1da7a7d0d3b908a16787076ae1e2188a4e0b00a", "size": ...
"""Class for managing the motor state.""" import logging from constants import \ LEFT_MOTOR, RIGHT_MOTOR,\ MOTOR_DIRECTION_FORWARD, MOTOR_DIRECTION_BACKWARD logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.getLevelName('INFO')) class MotorController: """Object to manage ...
{ "content_hash": "cc1a8dc23f8afa07b1b80ce11532ea6f", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 74, "avg_line_length": 34.64150943396226, "alnum_prop": 0.5887799564270153, "repo_name": "aninternetof/rover-code", "id": "0505eaea006b0afa3c79fec2bc7bb348e8f9bcf4", "size"...
import helper greeting("develop test")
{ "content_hash": "ba89ad2f1b8f43e8dcf2384c980168fa", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 24, "avg_line_length": 13.333333333333334, "alnum_prop": 0.775, "repo_name": "mbe9a/cs3240-labdemo", "id": "79cfbd50f9a2b1efe31bb61606220bd853156b2b", "size": "40", "binar...
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 = 1064314 de...
{ "content_hash": "e3c3278c678fd6f2b494db27fc45363c", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 90, "avg_line_length": 31.21359223300971, "alnum_prop": 0.6024883359253499, "repo_name": "chromium/chromium", "id": "6e134000b8e32e11d9d1ad3f47d346af5ea97e18", "size": "33...
import os import pytest import flask_restful_swagger from flask_restful_swagger.swagger import StaticFiles try: from unittest.mock import patch except ImportError: from mock import patch test_fixtures_renders = [ ["index.html", None, None], ["o2c.html", None, None], ["swagger-ui.js", None, None...
{ "content_hash": "a5e0840c05a3f530652cca6f3deabf97", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 77, "avg_line_length": 28.895833333333332, "alnum_prop": 0.6887767363614515, "repo_name": "rantav/flask-restful-swagger", "id": "b188ccae79c408e707b596e4a98292c9d560e7d7", ...
import discord import cabbagerc as rc from discord.ext import commands from util.FlagFramework import FlagFramework from util.Logger import Logger from sql.cabbagebase import CabbageBase from datetime import datetime class StarThresholdError: ''' Thrown when a caller attempts to set the starboard threshold (the ...
{ "content_hash": "0cafc4e8b36473eb9bf22655109cede8", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 206, "avg_line_length": 31.65740740740741, "alnum_prop": 0.6937701082187774, "repo_name": "alexandershuping/cabbage-bot", "id": "f3634b2633568878fa4953d0871a976d70c6ce06", ...
from django.http import Http404 from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from TCA.administration.models import Father from TCA.administration.utils import get_user_type from .models import Stream @login_required def stream(request, grade_id): ...
{ "content_hash": "368d2800eab714066bd9b3f5afc0b193", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 73, "avg_line_length": 36.47727272727273, "alnum_prop": 0.6560747663551402, "repo_name": "JosmanPS/tsebaoth-christian-academy", "id": "b4647ce5665ab806415712051fc775290427c53...
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 'MenuPluginSettings.template' db.add_column('cmsplugin_menupluginsettings', 'template', self.gf('django.db.mo...
{ "content_hash": "0e81a6b521e36315637f1a1b47966522", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 202, "avg_line_length": 78.33720930232558, "alnum_prop": 0.5723615852753451, "repo_name": "airtonix/cmsplugin-embedded-menu", "id": "6417e7dc74cb804ad04d581ce480b709d5a0ac87"...
""" Implements distribution file storage. """ from os import makedirs, remove, walk from os.path import basename, exists, isdir, join from magic import from_buffer from cheddar.model.versions import is_pre_release class DistributionStorage(object): """ File system storage with release/pre-release partitioni...
{ "content_hash": "59973c83606427b710878bb372463e71", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 93, "avg_line_length": 30.21276595744681, "alnum_prop": 0.5753521126760563, "repo_name": "jessemyers/cheddar", "id": "6584f00428df1ea78537d74f67534e1934e17b6a", "size": "28...
"""SIP EC config_db event class.""" import datetime class Event: """Event class.""" def __init__(self, event_id: str, event_type: str, event_data: dict = None, event_origin: str = None, event_timestamp: datetime.datetime = N...
{ "content_hash": "648d7c3e01293490c9e912154f00ec05", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 78, "avg_line_length": 30.126050420168067, "alnum_prop": 0.5364016736401673, "repo_name": "SKA-ScienceDataProcessor/integration-prototype", "id": "df97fda71f24d8975af5c38ea1...
"""Hypergeometric and Meijer G-functions""" from sympy.core import S, I, pi, oo, ilcm, Mod from sympy.core.function import Function, Derivative, ArgumentIndexError from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.functions import (sqrt, exp, log, sin, cos, asin, atan, sinh, co...
{ "content_hash": "d11f38decf0e78eaff64b6ab3ef17d10", "timestamp": "", "source": "github", "line_count": 1014, "max_line_length": 84, "avg_line_length": 32.3698224852071, "alnum_prop": 0.526673369283734, "repo_name": "amitjamadagni/sympy", "id": "9bab7d8deb52c11b72a79a61a5962c3bb0cf1954", "size": "3...
""" OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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.a...
{ "content_hash": "6408edc596dacf23fe33d9f71fb96d15", "timestamp": "", "source": "github", "line_count": 258, "max_line_length": 315, "avg_line_length": 35.251937984496124, "alnum_prop": 0.634524463991204, "repo_name": "detiber/lib_openshift", "id": "2862a6f860e2c72501b4a6b01bfd6ef79fb207eb", "size"...
from PyQt5 import Qt from ..shared_resources import UNIQUE_QGRAPHICSITEM_TYPE from .simple_point_picker import SimplePointPicker class SimplePolyLinePointPicker(SimplePointPicker): QGRAPHICSITEM_TYPE = UNIQUE_QGRAPHICSITEM_TYPE() def __init__(self, general_view, parent_item, points=None): self.line_it...
{ "content_hash": "3d9a7a37a1631fa7a96bd56b1cdbde28", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 116, "avg_line_length": 44.66197183098591, "alnum_prop": 0.6039104383475244, "repo_name": "erikhvatum/RisWidget", "id": "4326e219c39da27b4e4a6897374e608737dabb25", "size": ...
import copy import optparse import re from pylint import utils # pylint: disable=unused-argument def _csv_validator(_, name, value): return utils._check_csv(value) # pylint: disable=unused-argument def _regexp_validator(_, name, value): if hasattr(value, "pattern"): return value return re.compi...
{ "content_hash": "0e80fe4d79d7a90ded5f436f81694500", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 86, "avg_line_length": 32.797687861271676, "alnum_prop": 0.6129714487134297, "repo_name": "ruchee/vimrc", "id": "5994333ec62e0743f8d7d31b5a58e87a18a7fe0e", "size": "5823",...
from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import import json import pickle class FileExistsError(Exception): pass def load_pickle(fp): """Returns python object from pickle at path fp""" with open(fp, 'rb')...
{ "content_hash": "bde8acaf5a16998532b477db55df9c42", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 70, "avg_line_length": 27.29824561403509, "alnum_prop": 0.6323907455012854, "repo_name": "Prooffreader/pyprooff", "id": "f83384d74032c7ed116fe8324401061c3902f1d4", "size": ...
import pytest import pytest_trio.plugin # noqa import trio from pyee import TrioEventEmitter class PyeeTestError(Exception): pass @pytest.mark.trio async def test_trio_emit(): """Test that the trio event emitter can handle wrapping coroutines """ async with TrioEventEmitter() as ee: ...
{ "content_hash": "dd5b603d794af22b97427f3c40b9338e", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 80, "avg_line_length": 21.954545454545453, "alnum_prop": 0.5722567287784679, "repo_name": "jfhbrook/pyee", "id": "387784917102d793d93b964d695956b211aaa4e7", "size": "2440"...
descr = """A set of Python modules for functional MRI...""" import sys import os from setuptools import setup, find_packages def load_version(): """Executes nistats/version.py in a globals dictionary and return it. Note: importing nistats is not an option because there may be dependencies like nibabel ...
{ "content_hash": "baa5749a57bc284a3ba564a398a123fd", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 73, "avg_line_length": 36.39080459770115, "alnum_prop": 0.6064434617814277, "repo_name": "MartinPerez/nistats", "id": "2dac9f524a53e5dbe7325052170072955a98e598", "size": "3...
from __future__ import absolute_import from mathpy.combinatorics import binomial from mathpy.distributions import continuous, discrete from mathpy.linalgebra import lu, matrix, norm, qr from mathpy.numerical import differentiation, integration, polynomial, roots from mathpy.numtheory import constants, divisibili...
{ "content_hash": "1f8c646a3faca49129ddc28ebc62101b", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 109, "avg_line_length": 51.63636363636363, "alnum_prop": 0.8133802816901409, "repo_name": "aschleg/mathpy", "id": "64079d02c09672062b1c760bbd55e79af32cfc20", "size": "568",...
from django.apps import AppConfig class MetricsConfig(AppConfig): name = 'apps.metrics'
{ "content_hash": "613c0e40a41308507979c57fd85fef38", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 33, "avg_line_length": 18.8, "alnum_prop": 0.7553191489361702, "repo_name": "klashxx/PyConES2017", "id": "6c8c2153885da998988623f35b6b449da664edcf", "size": "94", "binary"...
"""Test OAuth functionality.""" # # (C) Pywikibot team, 2015 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' import os from pywikibot.login import OauthLoginManager from tests.aspects import ( unittest, require_modules, T...
{ "content_hash": "cfed54181df572f24eca662fefb81ac7", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 78, "avg_line_length": 30.727272727272727, "alnum_prop": 0.643491124260355, "repo_name": "icyflame/batman", "id": "a0bf0e01a410d584fcd548f7173d7e5bfed498f3", "size": "2729"...
"""The purpose of this module is to take a weather data point (such as air pressure or wind direction) and normalize/rescale it to a scalar value [0.0, 1.0] and a distribution. """ import math def normalize(data_type, series, scalar, absolute): """Normalize nature data. data_type: string describing the d...
{ "content_hash": "a9e456c1d5d0e9c3a5c4f6e4a21e2f5d", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 71, "avg_line_length": 30.296296296296298, "alnum_prop": 0.5580684596577017, "repo_name": "bjornedstrom/funkcast", "id": "6f4382f3cd3405b5ed8c0c656bdfcff1b675d775", "size":...
import pytest from fixture.application import Application fixture = None @pytest.fixture def app(request): global fixture if fixture is None: fixture = Application() else: if not fixture.is_valid(): fixture = Application() fixture.session.ensure_login(username="admin", pas...
{ "content_hash": "a46af7e9a5036dc69ad7dc9d64674f2a", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 69, "avg_line_length": 22.08, "alnum_prop": 0.6721014492753623, "repo_name": "denis-nuzhdin/test_py", "id": "3cd78d68890708a301fb6b70ad51a1b23021892f", "size": "552", "bi...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_cache.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
{ "content_hash": "3e74946a76a08707b992424cd54f97b8", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 74, "avg_line_length": 25.666666666666668, "alnum_prop": 0.70995670995671, "repo_name": "suselrd/django-social-graph", "id": "93ae0ec495f1ea43887bfdc5819081e8b82615ce", "siz...
from django.db import models from django_comments.models import Comment from django_comments.managers import CommentManager from django.conf import settings from django.utils.translation import ugettext_lazy as _ PATH_SEPARATOR = getattr(settings, 'COMMENT_PATH_SEPARATOR', '/') PATH_DIGITS = getattr(settings, 'COMMENT...
{ "content_hash": "512da445a3d5ace112faa2dfaac63810", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 158, "avg_line_length": 41.275862068965516, "alnum_prop": 0.6716791979949874, "repo_name": "vlevit/vlevit.org", "id": "bcbe6e6560f5b19a1d7393cdf4ccc048674fc210", "size": "2...
""" defines logger classes and few convinience methods, not related to the declarations tree """ import os import sys import logging import tempfile from fs_utils import files_walker from fs_utils import directories_walker def _create_logger_( name ): """implementation details""" logger = logging.getLogger(na...
{ "content_hash": "919326b94ba960c33bce67401b0b9406", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 91, "avg_line_length": 33.5364238410596, "alnum_prop": 0.6273696682464455, "repo_name": "eile/ITK", "id": "cb51ec1c2581954ccc47b9bccf13f14d5ccc387f", "size": "5257", "bi...
import pytest import hail as hl from ..helpers import resource @pytest.fixture(scope='session') def mt(): return hl.read_matrix_table(resource('sample.vcf-20-partitions.mt')) @pytest.fixture(scope='session') def ht(mt): return mt.rows() @pytest.fixture(scope='session', params=[hl.locus, hl.Locus]) def pr...
{ "content_hash": "dfbe0e52c51ee6581ef40089787fb98c", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 77, "avg_line_length": 22.958333333333332, "alnum_prop": 0.705989110707804, "repo_name": "hail-is/hail", "id": "a57420c1e84c72b28b1f3aba668c70eb77f1dd03", "size": "551", ...
import openmoves from commands import AddUser from model import db, User, Move, MoveEdit from flask import json import pytest import html5lib import re import os from datetime import timedelta, datetime from gpx_import import GPX_IMPORT_OPTION_PAUSE_DETECTION, GPX_IMPORT_OPTION_PAUSE_DETECTION_THRESHOLD, GPX_DEVICE_NAM...
{ "content_hash": "39c97e0ec9b9a12113aee5b3c9b21c40", "timestamp": "", "source": "github", "line_count": 726, "max_line_length": 152, "avg_line_length": 45.24242424242424, "alnum_prop": 0.6119466601717104, "repo_name": "mourningsun75/openmoves", "id": "e87ad725c5db3a3c343598b39dc0c504313c3879", "siz...
""" Scripts to manage categories. Syntax: python category.py action [-option] where action can be one of these: * add - mass-add a category to a list of pages * remove - remove category tag from all pages in a category * move - move all pages in a category to another category * tidy ...
{ "content_hash": "e8e89db57448ae81a9c34615f790844b", "timestamp": "", "source": "github", "line_count": 960, "max_line_length": 159, "avg_line_length": 42.030208333333334, "alnum_prop": 0.564400604723785, "repo_name": "pywikibot/core-migration-example", "id": "be2ea117bcab68888ed99ea4fc65797f7ebc3996...
from module.duplicates import search_duplicates from pprint import pprint import argparse import os def r_dir(prospective_dir): if not os.path.isdir(prospective_dir): raise Exception("readable_dir:{0} is not a valid path".format(prospective_dir)) if not os.access(prospective_dir, os.R_OK): rai...
{ "content_hash": "872c9b8cba6e5ad43f3ed70529441f0d", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 116, "avg_line_length": 36.15384615384615, "alnum_prop": 0.7244680851063829, "repo_name": "aiskov/storekeeper", "id": "b8b85b0cfb68b9de79770db2e067ed7105f2765a", "size": "9...
def test_stub(): pass
{ "content_hash": "dce710a2107b0f59f6398892f350d473", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 16, "avg_line_length": 13, "alnum_prop": 0.5769230769230769, "repo_name": "avanov/Presentations", "id": "7e3cbdd1a5c8d0a48158dbf576f11fffbefd9a7e", "size": "26", "binary":...
from __future__ import absolute_import, print_function import os, yaml def pytest_addoption(parser): sibis = parser.getgroup('sibis', description='SIBIS specific test options', after='usage') sibis.addoption("--config-file", action="store", default=os.path.expanduser("~/.sibis-general-config.yml"), ...
{ "content_hash": "267c62baab8ad0d281af9a1307b23041", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 117, "avg_line_length": 45.21052631578947, "alnum_prop": 0.6915017462165308, "repo_name": "sibis-platform/sibis", "id": "c8d6ec3a5ddf7956858eb2e8ae8f3dfa5952d95b", "size": ...
""" Defines an explorer that does a general inspection of wbem servers to determine information like namespace, etc. """ from __future__ import print_function, absolute_import import traceback import time from collections import namedtuple from urlparse import urlparse import threading from pywbem import WBE...
{ "content_hash": "3e9b8f27f02c85be7b44bfd76a5aac52", "timestamp": "", "source": "github", "line_count": 376, "max_line_length": 78, "avg_line_length": 39.545212765957444, "alnum_prop": 0.5307014594121999, "repo_name": "KSchopmeyer/smipyping", "id": "8b6926ea1642a6ddff8689468bbbe85a794a75d4", "size"...
"""Test for object db""" import tempfile import os from gitdb.test.lib import TestBase from gitdb.util import ( to_hex_sha, to_bin_sha, NULL_HEX_SHA, LockedFD ) class TestUtils(TestBase): def test_basics(self): assert to_hex_sha(NULL_HEX_SHA) == NULL_HEX_SHA assert len(to_bin_sha...
{ "content_hash": "9cf1d81899133ab1c89310727b16d949", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 85, "avg_line_length": 31.12, "alnum_prop": 0.5600899742930592, "repo_name": "analurandis/Tur", "id": "1dee544614ab2064844999eb5f909bbc7d90525a", "size": "3322", "binary...
from xml.dom import minidom from xml.parsers.expat import ExpatError class XmlEditor(object): def __init__(self, xmlstring=""): self.string = xmlstring try: self.tree = minidom.parseString(xmlstring) except ExpatError as e: raise ValueError(e) def to_string(self...
{ "content_hash": "9d278506144ff1384fe20e4a732d82d9", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 54, "avg_line_length": 26.846153846153847, "alnum_prop": 0.6332378223495702, "repo_name": "heltonbiker/MapComplete", "id": "c9549ce7017fc3a4cfc3d3cc24b52e369e54f8e4", "size...
from __future__ import print_function, division from sympy.core import S, Add, Expr, Basic, Mul from sympy.assumptions import Q, ask def refine(expr, assumptions=True): """ Simplify an expression using assumptions. Gives the form of expr that would be obtained if symbols in it were replaced by explic...
{ "content_hash": "d810c971a8813aa271be402319e36e27", "timestamp": "", "source": "github", "line_count": 348, "max_line_length": 78, "avg_line_length": 30.235632183908045, "alnum_prop": 0.5379205474244441, "repo_name": "kaushik94/sympy", "id": "efc753ee4d240565254858bf04b5db35f64c9fec", "size": "105...
class BuildableReference(object): def __init__(self, entry_item): self.contents = entry_item; self.BuildableIdentifier = self.contents.get('BuildableIdentifier', None) self.BlueprintIdentifier = self.contents.get('BlueprintIdentifier', None) self.BuildableName = self.contents.ge...
{ "content_hash": "196a135deeed646894a51c8e4f2716f5", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 82, "avg_line_length": 55.44444444444444, "alnum_prop": 0.7034068136272545, "repo_name": "samdmarshall/pyxcscheme", "id": "41eee857f75abe6de742d3a0f8237472c76fe6ad", "size":...
"""Example usage of terminaltables using colorclass. Just prints sample text and exits. """ from __future__ import print_function from colorclass import Color, Windows from terminaltables import SingleTable Windows.enable(auto_colors=True, reset_atexit=True) # Does nothing if not on Windows. table_data = [ ...
{ "content_hash": "6a1d19e655efe8cf07b33f81cdc757eb", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 100, "avg_line_length": 27.615384615384617, "alnum_prop": 0.6894150417827298, "repo_name": "rtulke/terminaltables", "id": "9a82d20be5a6e11b217b126e5cffb86ed90bf009", "size"...
import sys import readline # Our buggy program def remove_html_markup(s): tag = False quote = False out = "" for c in s: if c == '<' and not quote: tag = True elif c == '>' and not quote: tag = False elif c == '"' or c == "'" and tag: quo...
{ "content_hash": "7617b8d83e79a9bd911d30bb52db173a", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 81, "avg_line_length": 25.135922330097088, "alnum_prop": 0.5658555426805717, "repo_name": "Quexint/Assignment-Driven-Learning", "id": "6ed8d5e56c121fec5081d320a05a59182887fc...
import pytest from countries_plus.models import Country from countries_plus.utils import GeonamesParseError, parse_geonames_data, update_geonames_data @pytest.mark.django_db class TestParseGeonamesData: @pytest.fixture def valid_data(self): return [ r"#ISO ISO3 ISO-Numeric fips Country C...
{ "content_hash": "c35e8ed0c35853479a3c6e97b0eb0936", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 226, "avg_line_length": 44.45205479452055, "alnum_prop": 0.6816640986132512, "repo_name": "cordery/django-countries-plus", "id": "8c718b8335055313c5662933542fe78743680996", ...
from msrest.serialization import Model class UpdateMetadataDTO(Model): """PATCH Body schema to represent list of Metadata to be updated. :param delete: List of Metadata associated with answer to be deleted :type delete: list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] :param ...
{ "content_hash": "dbc7d5e4ae3ed4af31d3f12400d0583a", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 73, "avg_line_length": 35.08695652173913, "alnum_prop": 0.6530359355638166, "repo_name": "Azure/azure-sdk-for-python", "id": "de526f59d55f9849670e1c517f52744612fab20a", "si...
import sys if sys.version_info < (3,): try: from builtins import (bytes, dict, int, list, object, range, str, ascii, chr, hex, input, next, oct, open, pow, round, super, filter, map, zip) from future.builtins.disabled import (apply, c...
{ "content_hash": "364816d6d629dade639f2bf73b9ea91e", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 77, "avg_line_length": 33.16279069767442, "alnum_prop": 0.5904628330995793, "repo_name": "tonyshardlow/reg_sde", "id": "8c16192454be5c461d48f330ed030037565dbe3f", "size": "...
from django.db import models from members.models import Person, Payment # Go Cardless model class Mandate(models.Model): mandate_id = models.CharField(max_length=50) customer_id = models.CharField(max_length=50) event_id = models.CharField(max_length=50) active = models.BooleanField(default=False) ...
{ "content_hash": "cd573da6892ca05e5d62bc2cfb6faba0", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 75, "avg_line_length": 31.233333333333334, "alnum_prop": 0.7129135538954109, "repo_name": "ianastewart/cwltc-admin", "id": "85695bde678ff78836bab341a87517521a21d6be", "size...
from shadow4.syned.shape import Conic from shadow4.beamline.optical_elements.mirrors.s4_mirror import S4MirrorElement, S4Mirror, ElementCoordinates from shadow4.optical_surfaces.s4_conic import S4Conic from shadow4.beamline.s4_optical_element import S4ConicOpticalElement class S4ConicMirror(S4Mirror, S4ConicOpticalEl...
{ "content_hash": "7d559bce748c6b1aef8aa69609c2c23b", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 109, "avg_line_length": 51.476190476190474, "alnum_prop": 0.6387604070305273, "repo_name": "srio/minishadow", "id": "e1310d4a758efacd33800d2af0869d4055dca075", "size": "216...
"""PowerTransform bijector.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_util from tensorflow.python.ops import check_ops from tensorflow.python.ops import cont...
{ "content_hash": "81c692bc9392731e9708ab096df5ffb7", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 78, "avg_line_length": 34.30701754385965, "alnum_prop": 0.6343646126310406, "repo_name": "hfp/tensorflow-xsmm", "id": "81b0792525f5f6e2335a7e0b7c0e3b8129224811", "size": "...
from PyQt5.QtCore import pyqtSignal, Qt, QTimer from PyQt5.QtWidgets import QProgressDialog from . import performer class Progress(QProgressDialog, performer.ThreadedJobPerformer): finished = pyqtSignal(['QString']) def __init__(self, parent): flags = Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt....
{ "content_hash": "0c3e93150a6a9f04bd857979efe2d0c5", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 85, "avg_line_length": 33.11363636363637, "alnum_prop": 0.6135895676046671, "repo_name": "hsoft/hscommon", "id": "70901385070157a6a9fee5e277e2ff2e92aca774", "size": "1787",...
"""package github branch Revision ID: 025e06b85efc Revises: f0b00081fda9 Create Date: 2017-12-01 20:37:28.967575 """ from alembic import op import sqlalchemy as sa from docassemble.webapp.database import dbtableprefix # revision identifiers, used by Alembic. revision = '025e06b85efc' down_revision = 'f0b00081fda9' b...
{ "content_hash": "288ee5f6876000ff0997d6b0cd47d383", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 84, "avg_line_length": 22.416666666666668, "alnum_prop": 0.7509293680297398, "repo_name": "jhpyle/docassemble", "id": "58c18a82cf70f05a6a7c6452b07b1ba218297259", "size": "5...
import sys from cx_Freeze import setup, Executable build_exe_options = {"packages": ["numbers", "OpenGL"], "excludes": ["sfml"], "include_msvcr": "true"} base = None if sys.platform == "win32": base = "Win32GUI" setup(name="pymazing", version="0.1.0", options = {"build_exe": build_exe_op...
{ "content_hash": "53af00d38e014d0edff5f3bec1fb10c2", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 102, "avg_line_length": 30.625, "alnum_prop": 0.6469387755102041, "repo_name": "mikoro/pymazing", "id": "aab806d6a7f713cdce4e3099a347d91b756762f1", "size": "490", "binary...
import collections import itertools import operator from six import iteritems from .common import * from .datastructures import OrderedDict, Context from .exceptions import * from .types.compound import ModelType from .undefined import Undefined from .util import listify try: basestring #PY2 except NameError: ...
{ "content_hash": "b25f3fd59f2d7339330cda5a34f7c9bf", "timestamp": "", "source": "github", "line_count": 684, "max_line_length": 100, "avg_line_length": 30.637426900584796, "alnum_prop": 0.6097060507730483, "repo_name": "mlyundin/schematics", "id": "9840c31ce253239e5a5557706aacbe4eb80c5586", "size":...
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
{ "content_hash": "fd4ce7b0d90c7cbb727a5430c827d903", "timestamp": "", "source": "github", "line_count": 451, "max_line_length": 97, "avg_line_length": 34.368070953436806, "alnum_prop": 0.6360645161290323, "repo_name": "zguangyu/tornado", "id": "28e74e7dc0e3be3563b5868f34bcdc294be45b50", "size": "15...
import os import re import subprocess import sys import unittest import sysconfig from test.test_support import run_unittest, findfile try: gdb_version, _ = subprocess.Popen(["gdb", "--version"], stdout=subprocess.PIPE).communicate() except OSError: # This is what "no gdb...
{ "content_hash": "8d8841edd55be17780a1a799cef37bb7", "timestamp": "", "source": "github", "line_count": 694, "max_line_length": 127, "avg_line_length": 40.46974063400577, "alnum_prop": 0.5400199387595244, "repo_name": "xxd3vin/spp-sdk", "id": "e033dcf1fd93d1d288187e3e4d4294f2ef31bca1", "size": "282...
import binascii import datetime import json import os import shutil import tempfile import time import urllib import unittest import requests import rsa from rsa import key from testfixtures import Replacer from nexus import token_utils class TestTokenUtils(unittest.TestCase): def setUp(self): self.re...
{ "content_hash": "866cebc140ca585a97ca855c016c6587", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 90, "avg_line_length": 37.03488372093023, "alnum_prop": 0.6383045525902669, "repo_name": "kbase/auth_service", "id": "4901f376295e87c9695bc677ffdee532cb3cf24f", "size": "31...
class Solution(object): def flatten(self, root): """ :type root: TreeNode :rtype: void Do not return anything, modify root in-place instead. """ if root == None: return self.flatten(root.left) self.flatten(root.right) leftTail = root.left ...
{ "content_hash": "8fac08657ebf199286c0a15262f0383e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 30.61111111111111, "alnum_prop": 0.5263157894736842, "repo_name": "hawkphantomnet/leetcode", "id": "7996228ecb07d097ddaacebeb40bc1aa9bb25ce6", "size"...
from cumulusci.tasks.salesforce import BaseSalesforceApiTask class ConfigureCAD(BaseSalesforceApiTask): def _run_task(self): self.sf.CurrencyType.create({ 'IsoCode': 'CAD', 'IsCorporate': False, 'IsActive': True, 'DecimalPlaces': 2, 'ConversionRa...
{ "content_hash": "24b10bbf47383ed990d79642a3f1bd77", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 60, "avg_line_length": 28.416666666666668, "alnum_prop": 0.5835777126099707, "repo_name": "Zosoled/Cumulus", "id": "aa42d8c037438ab183ad7acbdb14d777c675dc17", "size": "341"...
name = 'hdcycles' version = '0.15.0' authors = [ 'benjamin.skinner', ] requires = [ 'cycles-1.13.0-ta.1.14.7', ] variants = [ ['platform-windows', 'arch-x64', 'os-windows-10', 'usd-20.05-ta.1.2'], ['platform-windows', 'arch-x64', 'os-windows-10', 'usd-20.11'], ['platform-windows', 'arch-x64', 'o...
{ "content_hash": "66c2282f7f12c5975b50db6612f8caf8", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 101, "avg_line_length": 31.29230769230769, "alnum_prop": 0.6696165191740413, "repo_name": "tangent-opensource/hdBlackbird", "id": "ac5c9c60e5026b30ad51a385714a0aebe49373fd", ...
"""Example workflow using all the methods in the Productstatuses service.""" from __future__ import absolute_import from __future__ import print_function import json import sys from shopping.content import common def print_productstatus(status): """Prints a representation of the given product status.""" print(...
{ "content_hash": "95e6af6b682a3d4dd5ef51d849bb3a1e", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 77, "avg_line_length": 27.575342465753426, "alnum_prop": 0.7069051167411823, "repo_name": "googleads/googleads-shopping-samples", "id": "dbbd77dba72ac9c9ad680ab02161bad8a7e8c...
from pprint import pprint from fo2.connections import db_cursor_so from base.forms.forms2 import Forms2 from base.views import O2BaseGetPostView from lotes.queries.analise.produzir_grade_empenho import mount_produzir_grade_empenho __all__ = ['ProduzirGradeEmpenho'] class ProduzirGradeEmpenho(O2BaseGetPostView): ...
{ "content_hash": "c99845d7eeabe28d4bac0a3db383efc4", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 85, "avg_line_length": 34.11538461538461, "alnum_prop": 0.7023675310033822, "repo_name": "anselmobd/fo2", "id": "9a77b57142f80fcd74086b83c562849caf1f92a0", "size": "887", ...
from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from pythonweb.services.userservice import UserService class UserController(APIView): def get(self, request, userid, format=None): user = self.get_user(userid) return Response(us...
{ "content_hash": "6b9dab0e8ea90d02bc0d3ab5050ab79f", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 68, "avg_line_length": 29.875, "alnum_prop": 0.7364016736401674, "repo_name": "trwalker/python_poc", "id": "a7b766764adc06ae1369a324d3fe68732eda840f", "size": "478", "bin...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tvshow', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='episode', name='siteRating', ), ]
{ "content_hash": "cb5e24f912ab0f60a8c5b24d46a66536", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 39, "avg_line_length": 18.41176470588235, "alnum_prop": 0.5814696485623003, "repo_name": "guptachetan1997/Episodes", "id": "df8e171d735b20508922ffcf983c2b0e5e022bac", "size...
from google.cloud.devtools import cloudbuild_v1 async def sample_cancel_build(): # Create a client client = cloudbuild_v1.CloudBuildAsyncClient() # Initialize request argument(s) request = cloudbuild_v1.CancelBuildRequest( project_id="project_id_value", id="id_value", ) # Mak...
{ "content_hash": "3ea8044234d27f4476338b96b2b2a4da", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 60, "avg_line_length": 25.05, "alnum_prop": 0.7005988023952096, "repo_name": "googleapis/python-cloudbuild", "id": "cae2c312aa9630dfbdc715e49d76863103872ca8", "size": "1881...
""" Created on 1 Oct 2016 @author: Bruno Beloff ([email protected]) DESCRIPTION The pt1000_calib utility is used to determine and save the voltage offset for each Pt1000 sensor. The utility operates by measuring the temperature using a Sensirion SHT sensor, measuring the voltage output of the Pt1000...
{ "content_hash": "3d1f8edb513ee671c0ebb18cf3abc4a0", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 118, "avg_line_length": 27.218309859154928, "alnum_prop": 0.5151358344113842, "repo_name": "south-coast-science/scs_mfr", "id": "f827a9772c86de3042f9c59e8668a8f02e3dd566", ...