messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django import forms\n\n# Create your forms here.\n\nclass UserForm(forms.ModelForm):\n password = forms.CharField(widget=forms.PasswordInput)\n\n class Meta:\n model = User\n ... | python | edit | 1 | 2 | mit | 1d63f615ac58cc8c548cdd8e359694355e5b1843 | huangsam/chowist,huangsam/chowist,huangsam/chowist | portal/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import Http404\nfrom django_statsd.clients import statsd\n\n\nclass GraphiteMiddleware(object):\n def process_response(self, request, response):\n statsd.incr(\"response.%s\" % response.status_code)\n retur... | python | edit | 1 | 1 | mit | e2919039a20a255232fefe3b78e173587710baf0 | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/core/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n\n# 1. Redist... | python | edit | 6 | 0 | bsd-2-clause | 2f56f7dccbc3c9fc416200160bd8616a5e4ab954 | cnheitman/barf-project,chubbymaggie/barf-project,programa-stic/barf-project,programa-stic/barf-project,cnheitman/barf-project,chubbymaggie/barf-project,chubbymaggie/barf-project,cnheitman/barf-project | barf/barf/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .model import Model\nfrom ...api import layerize\nfrom .affine import Affine\n\nimport cytoolz as toolz\n\n\ndef Residual(layer):\n def residual_fwd(X, drop=0.):\n y, bp_y = layer.begin_update(X, drop=drop)\n output = ... | python | edit | 5 | 4 | mit | 6b880f3c783e6a278906b8da2aabea29bb106252 | spacy-io/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,explosion/thinc | thinc/neural/_classes/resnet.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom tornado.testing import AsyncHTTPTestCase, LogTrapTestCase\nfrom tornado.web import Application, RequestHandler\nimport os\nimport pycurl\nimport re\nimport unittest\nimport urllib\n\nclass HelloWorldRequestHand... | python | edit | 5 | 1 | apache-2.0 | bb8d2fa458dd565b88db4e2185062f641864e990 | bywbilly/tornado,AlphaStaxLLC/tornado,felixonmars/tornado,jarrahwu/tornado,BencoLee/tornado,MjAbuz/tornado,shaohung001/tornado,sunjeammy/tornado,zhuochenKIDD/tornado,VShangxiao/tornado,LTD-Beget/tornado,Snamint/tornado,304471720/tornado,Callwoola/tornado,shashankbassi92/tornado,InverseLina/tornado,Batterfii/tornado,cyr... | tornado/test/httpserver_test.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Representation of a Myria relation key.\n\nMyria relations are identified by a tuple of user, program, relation_name.\"\"\"\n\nclass RelationKey(object):\n def __init__(self, user='public', program='adhoc', relation=None):\n ... | python | edit | 1 | 2 | bsd-3-clause | 364d83c8add1fdde679aa2823ae94ad7f264cb48 | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco | raco/relation_key.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Improve repository owner information\n\nRevision ID: 30c0aec2ca06\nRevises: 4fdf1059c4ba\nCreate Date: 2012-09-02 14:45:05.241933\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '30c0aec2ca06'\ndown_revision = '4fdf105... | python | edit | 1 | 1 | isc | 7df1ed120281c82d166fa1c2218def4c84b48a3d | alfredhq/alfred-db | alfred_db/migrations/versions/30c0aec2ca06_improve_repository_o.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.application import internet\nfrom twisted.application.service import Service\nfrom twisted.internet import reactor\n\nfrom autobahn.websocket import connectWS\n\n\nclass ControlService(Service):\n pass\n\n\nclass PlayerServi... | python | edit | 3 | 2 | bsd-2-clause | 00aa59468c4dbfde282891f1396e29bd3f28fb62 | davidblewett/gunny,davidblewett/gunny | gunny/reveille/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n# First, try loading libscrypt\n_done = False\ntry:\n from pylibscrypt import *\nexcept ImportError:\n pass\nelse:\n _done = True\n\n# If that didn't work, get the inlined Python version\nif not _done:\n try:\n from pyp... | python | edit | 5 | 0 | isc | 39cc30f2f6c74d3a506c5d1a46cf0ccc6377b80f | jvarho/pylibscrypt,jvarho/pylibscrypt | pylibscrypt/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.7\n\nimport sys\n\ndel __builtins__.__dict__['__import__']\ndel __builtins__.__dict__['reload']\n\nflag = \"eval_is_fun\"\n\nclass UnbufferedStream(object):\n def __init__(self, stream):\n self.stream = stream\n... | python | edit | 5 | 3 | mit | 9c650cb3fb37e8c96ef9642af553ce77a28a1587 | james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF | problem-static/Intro-Eval_50/admin/eval.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2014 - StackStorm, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Lice... | python | edit | 1 | 0 | apache-2.0 | eb7ff9cec9360af0b5c18915164a54d4755e657b | openstack/mistral-dashboard,openstack/mistral-dashboard,openstack/mistral-dashboard | mistraldashboard/dashboards/mistral/executions/tables.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom refugeedata import models, forms\n\n\nclass NumberAdmin(admin.ModelAdmin):\n\n list_display = (\"number\", \"short_id\", \"active\")\n\n\nclass BatchAdmin(admin.ModelAdmin):\n\n list_display = ... | python | edit | 1 | 3 | mit | 557cf0bc733c49e973a12bd14fb596af6a7fb5ff | ukch/refugeedata,ukch/refugeedata,ukch/refugeedata,ukch/refugeedata | refugeedata/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbiobox - A command line interface for running biobox Docker containers\n\nUsage:\n biobox <command> <biobox_type> <image> [<args>...]\n\nOptions:\n -h, --help Show this screen.\n -v, --version Show version.\n\nCommands... | python | edit | 1 | 1 | mit | a4fa3b9866ac9712f029c7cabe64121f80875207 | bioboxes/command-line-interface,pbelmann/command-line-interface,michaelbarton/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface,pbelmann/command-line-interface | biobox_cli/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport os.path\nimport sys\nimport fnmatch\nimport glob\n\nfrom nimp.utilities.logging import *\nfrom nimp.utilities.system import *\n\n#-----------------------------------------------------------------... | python | edit | 10 | 8 | mit | a6804dd0baefbbd9681edc2f0ba0ec13e84f5cc3 | dontnod/nimp | nimp/utilities/paths.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Protocol, Topic, Institution\n\n\nclass ProtocolAdmin(admin.ModelAdmin):\n list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'instit... | python | edit | 1 | 0 | mit | 65c22394fad7929a7de1e78be7569a2895915dc9 | Hackfmi/Diaphanum,Hackfmi/Diaphanum | protocols/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.views.generic import TemplateView\nfrom . import views\n\nurlpatterns = patterns('',\n url(r'^$', views.ContactView.as_view(), name=\"form\"),\n url(r'^success$', TemplateView.as... | python | edit | 1 | 0 | bsd-3-clause | 70f5a3fd7e28c574912a0318eba83f11789c2c7b | watchdogpolska/prezydent.siecobywatelska.pl,watchdogpolska/prezydent.siecobywatelska.pl,watchdogpolska/prezydent.siecobywatelska.pl | ankieta/contact/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport smbus\n\n\nclass TemperatureSensor:\n temp_history = []\n last_temp = 0\n\n def __init__(self, address):\n self.bus = smbus.SMBus(1)\n self.address = address\n\n def get_temp(self):\n MSB = self.bus.r... | python | edit | 1 | 1 | mit | 594cd5d490786bbbdcf877d8c155530c36acd2c1 | IAPark/PITherm | src/services/TemperatureMonitor/src/temperature.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport markdown\nfrom django import template\nfrom django.utils.safestring import mark_safe\nfrom djblets.markdown import markdown_unescape\n\n\nregister = template.Library()\n\n\n@register.filter\... | python | edit | 1 | 2 | mit | 22326bdd9265d8ae97055cbcc1f64939dd6bfcda | reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard | reviewboard/notifications/templatetags/markdown_email.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom django.core.exceptions import ValidationError\n\n\ndefault_validator = lambda x: x != '' # FIXME: Do we need this?\n\ndef validate_list(value, validator=default_validator, separator=',',\n strip_whitespace=T... | python | edit | 1 | 7 | bsd-3-clause | e787e4981441198e2b015b1b4f4971fbc112c78b | akeym/cyder,murrown/cyder,murrown/cyder,murrown/cyder,zeeman/cyder,drkitty/cyder,drkitty/cyder,murrown/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,OSU-Net/cyder,OSU-Net/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder | cyder/base/eav/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numpy.testing import assert_almost_equal\n\nfrom statsmodels.datasets import statecrime, get_rdataset\nfrom statsmodels.regression.linear_model import OLS\nfrom statsmodels.stats.outliers_influence import reset_ramsey\nfrom statsmodels... | python | edit | 1 | 1 | bsd-3-clause | 72d33ea47458cace13dac920ce2a82e55f83caba | bashtage/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,bashtage/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,basht... | statsmodels/stats/tests/test_outliers_influence.py | rejected_duplicate | Near-duplicate of sample 16727 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ntest_itunes.py\n\nCopyright © 2015 Alex Danoff. All Rights Reserved.\n2015-08-02\n\nThis file tests the functionality provided by the itunes module.\n\"\"\"\n\nimport unittest\n\nfrom itunes.itunes import parse_value\n\nclass ITunes... | python | edit | 1 | 1 | mit | c820e3ed4d78b975a6bdff54a2ecae26354ae10e | adanoff/iTunesTUI | tests/test_itunes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nstate_tests.py\n\"\"\"\n\nimport os\n\nfrom os.path import splitext\nfrom minicps.state import SQLiteState\n\n\ndef test_SQLiteState():\n\n # TODO: change to /tmp when install SQLitesutdio in ubuntu\n PATH = \"temp/state_test_... | python | edit | 1 | 1 | mit | da3c8b01512466e8b0c71a239378b8643d5384ef | remmihsorp/minicps,scy-phy/minicps,remmihsorp/minicps,scy-phy/minicps | tests/state_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\" util.py\n\nUtility functions/constants across seam\n\"\"\"\n__author__ = 'Scott Burns <<EMAIL>>'\n__copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved'\n\nimport... | python | edit | 2 | 2 | mit | 295fc64b8fac9852e92356f61ff4698e011c798e | VUIIS/seam,VUIIS/seam | seam/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport logging\nimport time\n\nfrom .message import Message\nfrom .utils import name_that_thing\n\nlogger = logging.getLogger('django.channels')\n\n\nclass Worker(object):\n \"\"\"\n A \"work... | python | edit | 1 | 5 | bsd-3-clause | d18c715f8f0d86d58fcec4df8710f0370ff87308 | Krukov/channels,Coread/channels,Krukov/channels,raiderrobert/channels,Coread/channels,andrewgodwin/django-channels,andrewgodwin/channels,linuxlewis/channels,django/channels,raphael-boucher/channels | channels/worker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Basic test of dynamic code generation\nimport unittest\nimport os, glob\n\nimport stdio\nfrom ctypes import POINTER, c_int\n\nclass DynModTest(unittest.TestCase):\n def tearDown(self):\n for fnm in glob.glob(stdio._gen_basename ... | python | edit | 5 | 1 | mit | c0cecdc7e754090f25f48637de88d2d07a3ef58f | sugarmanz/ctypeslib | ctypeslib/test/test_dynmodule.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mock import MagicMock\nimport pyaem\nimport unittest\n\nclass TestPyAemException(unittest.TestCase):\n\n\n def test_init(self):\n\n exception = pyaem.PyAemException(123, 'somemessage')\n self.assertEqual(exception.code, 123)\n ... | python | edit | 1 | 1 | mit | 5972644fe7d0267849440d8e60509baba6e013a3 | Sensis/pyaem,wildone/pyaem | test/test_exception.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nimport numpy as np\nfrom click.testing import CliRunner\nfrom fastimgproto.scripts.simulate_data import cli as sim_cli\n\n\ndef test_simulate_data():\n runner = CliRunner()\n with runner.isolated_filesystem():\n ... | python | edit | 3 | 2 | apache-2.0 | 23e3197f15d13445defe6ec7cfb4f08484089068 | SKA-ScienceDataProcessor/FastImaging-Python,SKA-ScienceDataProcessor/FastImaging-Python | tests/test_scripts/test_simulate_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.backends import ModelBackend\nfrom django.contrib.auth.models import User\n\n\nclass ExceptionBackend(ModelBackend):\n \"\"\"Raise an exception on authentication for testing purposes.\"\"\"\n def authenticate(... | python | edit | 1 | 3 | bsd-3-clause | d69b137bd19e0363173b120ff4f68becc6be7b3c | orbitvu/django-mama-cas,harlov/django-mama-cas,forcityplatform/django-mama-cas,jbittel/django-mama-cas,orbitvu/django-mama-cas,forcityplatform/django-mama-cas,jbittel/django-mama-cas,harlov/django-mama-cas | mama_cas/tests/backends.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\n\nfrom village import _luabject\n\n\nclass TestDirect(unittest.TestCase):\n\n def test_new(self):\n state = _luabject.new()\n # PyCObject i... | python | edit | 1 | 1 | mit | 72dea9616a84cefd8424f965060552c84cfd241d | markpasc/luabject,markpasc/luabject | tests/test_luabject.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright 2014 Infoxchange Australia\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http... | python | edit | 1 | 6 | apache-2.0 | dfea77df6e6ba27bada1c80da6efab392507736b | infoxchange/docker-forklift,infoxchange/docker-forklift | forklift/services/satellite.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#-*- coding: UTF-8 -*-\n\nfrom functools import partial\n\nfrom django.conf import settings\nfrom plim import preprocessor as plim_preprocessor\nfrom mako.template import Template as MakoTemplate\nfrom mako.lookup imp... | python | edit | 2 | 2 | mit | 9f20f232a9507f0002adc682a87bb792f6fbdd4e | imom0/django-plim | django_plim/template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom subprocess import check_call, CalledProcessError\nfrom tempfile import NamedTemporaryFile\n\nfrom dpms import DPMS\nfrom mss import mss\nfrom PIL import Image, ImageFilter\n\nGAUSSIAN_BLUR_RADIUS = 5\nSCREEN_TI... | python | edit | 1 | 0 | mit | c53824a3427235c814cfe35c5c85fd5e1e312b40 | m45t3r/dotfiles,m45t3r/dotfiles,m45t3r/dotfiles | i3/.config/i3/scripts/lock_screen/lock_screen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2011 OpenStack Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# ... | python | edit | 1 | 1 | apache-2.0 | 8b0e39eec8a82fd3f5a424ec75678426b2bf523e | alex8866/cinder,alex8866/cinder | cinder/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Beam, Bead to main module"
},
{
"role": "assistant",
"content": "from otz.Timestream import CalibrationTimestream, CapturedTimestream\nfrom otz.Calibration import Calibration\nfrom otz.Beam import Beam, Bead\n"
}
] | python | new_file | 7 | 0 | unlicense | 55c72a5297244ba51fba5ebc5b71efc3001e0dd4 | ghallsimpsons/optical_tweezers | otz/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom django.http import HttpResponse\nfrom django.utils import simplejson as json\nfrom django.shortcuts import get_obj... | python | edit | 1 | 3 | mit | cd75c139910e8968e5262d0f0f5289119b258f21 | pinax/phileo,jacobwegner/phileo,rizumu/pinax-likes,rizumu/pinax-likes,jacobwegner/phileo,pinax/pinax-likes,pinax/phileo | phileo/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Check Taskid status.\"\"\"\nimport logging\n\nimport requests\nfrom tryagain import retries\n\nfrom ..exceptions import SpinnakerTaskError\n\nHEADERS = {'Content-Type': 'application/json', 'Accept': '*/*'}\nGATE_URL = \"http://gate-ap... | python | edit | 1 | 4 | apache-2.0 | 2867ea119a846e1eb61c64a206058dc0d28d090b | gogoair/foremast,gogoair/foremast | src/foremast/utils/check_task.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport serial\nimport time\nimport binascii\nimport struct\n\ndef establishConnection():\n # Define Constants\n SERIAL_DEVICE = \"/dev/ttyACM0\"\n\n # Establish Connection\n ser = serial.Serial(SERIAL_DEVICE, 9600)\n time.sleep(2)\n p... | python | edit | 4 | 7 | mit | 9c6739830ea8ccfbe697bc691de001a42f01f9c6 | zacharylawrence/ENEE408I-Team-9,zacharylawrence/ENEE408I-Team-9,zacharylawrence/ENEE408I-Team-9 | serial_protocol/test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\n\nclass EmptyCheck(object):\n def __call__(self, value):\n if len(value.strip()) == 0:\n raise ValidationError(\"Value cannot be empty\")\n\n```\n\nApply this change: ... | python | edit | 1 | 2 | mit | 10db5e8b893a84e765162535f64e1ede81d48b47 | vishalsodani/django-empty-check-validator | empty_check.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\nimport tensorflow as tf\n\n\n\nFLAGS = tf.app.flags.FLAGS\n\ntf.app.flags.DEFINE_string(\"batch-size\", 64, \"\")\ntf.app.flags.DEFINE_float(\"dropout-prob\", 0, \"\")\ntf.app.flags.DEFINE_string(\"word-file\", None, \"\")... | python | edit | 2 | 2 | unlicense | 939998db349c364aa0f5ba4705d4feb2da7104d5 | raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten | nn/flags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function\n\nimport logging\n\nfrom . import bolt, config, follow, search, spout, twitter_api\nfrom .search import SearchManager\nfrom .twitter_api import Twitter\nfrom .version import VERSION, _... | python | edit | 1 | 0 | apache-2.0 | ecde3e00de3782024f0dfbab7f2d7912ab62342b | Parsely/birding,Parsely/birding | src/birding/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreate a visual representation of the various DAGs defined\n'''\n\nimport sys\nimport requests\nimport networkx as nx\nimport matplotlib.pyplot as plt\n\n\nif __name__ == '__main__':\n g = nx.DiGraph()\n labels = {\n 'edge... | python | edit | 1 | 0 | mit | 34812fe2deec64229efd4119640f3c2ddf0ed415 | jacksontj/dnms,jacksontj/dnms | visualize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# author: Milan Kubik\n\nNOT_IMPLEMENTED_MSG = \"You need to override this method in a subclass\"\n\n\nclass IDMBackendException(Exception):\n pass\n\n\nclass VMsNotCreatedError(IDMBackendException):\n pass\n\nclass IDMBackendMissingN... | python | edit | 1 | 2 | mit | 057510c78f80c3592c562006413049ab1292d0a3 | apophys/ipaqe-provision-hosts | ipaqe_provision_hosts/backend/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom go.router.view_definition import RouterViewDefinitionBase, EditRouterView\n\n\nclass KeywordForm(forms.Form):\n keyword = forms.CharField()\n target_endpoint = forms.CharField()\n\n\nclass BaseKeywordF... | python | edit | 1 | 4 | bsd-3-clause | 072bc480cbc489cd89d03405026f152934893b7e | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/routers/keyword/view_definition.py | rejected_duplicate | Near-duplicate of sample 21545 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom apps.bluebottle_utils.serializers import SorlImageField, SlugHyperlinkedIdentityField\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers\nfrom .models import Reaction\nfrom rest_framework.fields import... | python | edit | 4 | 0 | bsd-3-clause | 1e574befc82b7df53fe62b9c5089772172f99178 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | apps/reactions/serializers.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import redirect\n\nfrom approver.workflows import project_crud\nfrom approver.decorators import login_required\nimport approver.utils as utils\nfrom django.core.urlresolvers import reverse\n\n@login_required\ndef simil... | python | edit | 3 | 6 | apache-2.0 | 8a43cf58791a665a4fc23bc5d0911af61f7e1fb6 | DevMattM/qipr_approver,DevMattM/qipr_approver,ctsit/qipr_approver,ctsit/qipr_approver,ctsit/qipr_approver,DevMattM/qipr_approver,DevMattM/qipr_approver,PFWhite/qipr_approver,DevMattM/qipr_approver,PFWhite/qipr_approver,ctsit/qipr_approver,PFWhite/qipr_approver,ctsit/qipr_approver,PFWhite/qipr_approver,PFWhite/qipr_appr... | qipr_approver/approver/views/similar_projects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom promgen.models import Project, Service\n\nlogger = logging.getLogger(__name__)\n\n\nclass SenderBase(object):\n def send(self, data):\n sent = 0\n for alert in data['alerts']:\n if 'project... | python | edit | 1 | 8 | mit | 1c0644d5629008c98f8402b95b797beea1a50bc5 | kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen | promgen/sender/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Functions for converting and comparing colors.\"\"\"\n\nimport colorsys\nimport math\nimport operator\n\n\ndef hls_to_rgb(hue, lightness, saturation):\n \"\"\"Convert HLS (hue, ligh... | python | edit | 1 | 2 | bsd-3-clause | d1edcb2f59d96168e94ec748633221a2d5f95b99 | MisanthropicBit/colorise | colorise/color_tools.py | rejected_duplicate | Near-duplicate of sample 557 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncore\nimport socket\nfrom logging import error, info, warning\n\nfrom client import Client\n\nclass Server(asyncore.dispatcher):\n\n def __init__(self, port, host=\"localhost\"):\n asyncore.dispatcher.__init__(self)\n ... | python | edit | 6 | 2 | mit | e174a898595664ff291cbf8ccda0f1c404a73575 | zwarren/morse-car-controller,zwarren/morse-car-controller | control/server.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import viewsets\nfrom rest_framework_gis.pagination import GeoJsonPagination\nfrom rest_framework_gis.serializers import GeoFeatureModelSerializer, GeometrySerializerMethodField\n\nfrom parkings.models import ParkingArea... | python | edit | 1 | 1 | mit | 91720739af3c7b35e331949cdd64a98023e23799 | tuomas777/parkkihubi | parkings/api/public/parking_area.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport rethinkdb as r\nimport optparse\n\n\nif __name__ == \"__main__\":\n parser = optparse.OptionParser()\n parser.add_option(\"-p\", \"--port\", dest=\"port\",\n help=\"rethinkdb port\"... | python | edit | 2 | 0 | mit | ed4c80aa8e9ee628876c3cc96907ca407ee4ff5d | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/scripts/ddirdenorm.py | rejected_duplicate | Near-duplicate of sample 13023 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ngithub-setup-irc-notifications - Configure all repositories in an organization\nwith irc notifications\n\"\"\"\n\nimport argparse\nimport getpass\nimport sys\n\nimport github3\n\n\ndef main():\n parser = argparse.ArgumentParser()... | python | edit | 1 | 5 | mit | d52034eddeb510acc367c87c88e4277994157338 | kragniz/github-setup-irc-notifications | githubsetupircnotifications.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport os\nfrom flask import Flask, render_template, request, redirect, url_for, send_from_directory\nfrom werkzeug import secure_filename\n\nUPLOAD_FOLDER = '/app/input'\nALLOWED_EXTENSIONS = set(['tx... | python | edit | 4 | 4 | mit | 40f1c31098bd09e98d50727d08becf0d55ca8409 | ehhop/ehhapp-formulary,ehhop/ehhapp-formulary,ehhop/ehhapp-formulary | __init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scanresults import ScanResults\nimport sys\n\nsr = ScanResults()\nsr.add_files(*sys.argv[1:])\n\nsr.train()\nout = sr.sentences()\nif out is not None:\n print(out)\n\n```\n\nApply this change: Enable command-line args for configurat... | python | edit | 3 | 0 | bsd-3-clause | 30bd8b9b4d18579cdf9b723f82f35987c1ad9176 | darrenpmeyer/scanresults,darrenpmeyer/scanresults | __main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport token\nimport lexer as l\nimport parser as p\nimport evaluator as e\nimport context as c\n\ndef main(ctx):\n string = input(\">> \")\n string = string.replace(\"\\\\n\", \"\\n\") + \";\"\n \... | python | edit | 3 | 2 | mit | e8d99b27864d32ad149ffc276dfa78bfdff22c56 | Zac-Garby/pluto-lang | __main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Layout widgets\n\"\"\"\n\nfrom . import Widget\n\n\nclass Layout(Widget):\n \"\"\" Abstract class for widgets that organize their child widgets.\n \n Panel widgets are layouts that do not take the natural size of their\n ... | python | edit | 1 | 0 | bsd-2-clause | d792201bc311a15e5df48259008331b771c59aca | jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx,JohnLunzer/flexx,jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx | flexx/ui/layouts/_layout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pandas\nimport numpy\nimport matplotlib.pyplot as plt\n\n\ndef univariate_stats():\n num_examples = 1000\n z = pandas.Series(numpy.random.randn(num_examples))\n\n # Minimum\n print(z.min())\n # Maximum\n print(z.max... | python | edit | 1 | 1 | mit | 15307ebe2c19c1a3983b0894152ba81fdde34619 | charanpald/tyre-hug | exp/descriptivestats.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n###\n# Copyright (c) 2007, Max Kanat-Alexander\n# All rights reserved.\n#\n#\n###\n\n\"\"\"\nInteract with Bugzilla installations.\n\"\"\"\n\nimport supybot\nimport supybot.world as world\n\n# Use this for the version of this plugin. You m... | python | edit | 8 | 0 | bsd-3-clause | abea9151ce3f97033038102b4b01e84b66b8b670 | aleb/supybot-bugzilla | __init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python3\n\nimport requests\n\npeople = requests.get('https://api.wurstmineberg.de/v2/people.json').json()\nstatus = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()\n\nprint(len(status[... | python | edit | 1 | 0 | mit | 3999e9812a766066dcccf6a4d07174144cb9f72d | wurstmineberg/bitbar-server-status | wurstmineberg.45s.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Biicode Arch Linux package settings.\n# \n# Check PKGBUILD_template docs for those settings and \n# what they mean.\n#\n\ndef settings():\n\treturn { \"version\": \"2.6.1\",\n\t\t\t \"release_number\": \"1\",\n\t\t\t \"arch_deps\": [\"... | python | edit | 1 | 1 | bsd-2-clause | 9e2f9b040d0dde3237daca1c483c8b2bf0170663 | bowlofstew/packages,biicode/packages,biicode/packages,bowlofstew/packages | archlinux/archpack_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add `Post`, `Tag` models to Admin"
},
{
"role": "assistant",
"content": "from django.contrib import admin\n\nfrom .models import Post, Tag\n\nadmin.site.register(Post)\nadmin.site.register(Tag)\n"
}
] | python | new_file | 1 | 0 | mit | c691c256682bec5f9a242ab71ab42d296bbf88a9 | avinassh/nightreads,avinassh/nightreads | nightreads/posts/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Red Hat, Inc\n# All Rights .Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Lice... | python | edit | 2 | 0 | apache-2.0 | f81c36d4fe31815ed6692b573ad660067151d215 | openstack/python-zaqarclient | zaqarclient/_i18n.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cProfile\n\nfrom pqhelper import capture\n\n\ndef main():\n cProfile.run('test_solution(catapult)')\n\n\ndef test_solution(board_string):\n print capture.capture(board_string)\n\nskeleton = '''\n..*..*..\n.gm..mg.\n.ms..sm.\n.r... | python | edit | 2 | 1 | mit | 417ab5241c852cdcd072143bc2444f20f2117623 | kobejohn/PQHelper | tests/execution_profiles/capture_profile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import Extension\nfrom os.path import join\n\nfrom astropy import setup_helpers\n\n\ndef get_extensions(build_type='release'):\n VO_DIR = 'astropy/io/vo/src'\n\n return [Extension(\n \"astropy.io.vo.tablewri... | python | edit | 1 | 1 | bsd-3-clause | ecd33e00eb5eb8ff58358e01a6d618262e8381a6 | larrybradley/astropy,MSeifert04/astropy,tbabej/astropy,dhomeier/astropy,tbabej/astropy,StuartLittlefair/astropy,mhvk/astropy,astropy/astropy,lpsinger/astropy,DougBurke/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,dhomeier/astropy,joergdietrich/astropy,MSeifert04/astropy,stargaser/astropy,pllim/astropy,Stu... | astropy/io/vo/setup_package.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom optparse import make_option\nimport sys\nfrom django.core.management.base import BaseCommand\nfrom education.models import Concept\n\nclass Command(BaseCommand):\n args = \"\"\n help = \"Update concept total_question counts (post... | python | edit | 4 | 2 | bsd-3-clause | c81eb510c72511c1f692f02f7bb63ef4caa51d27 | mfitzp/smrtr,mfitzp/smrtr | apps/concept/management/commands/update_concept_totals.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom dataitem import DataItem\n\nclass DataFile(DataItem):\n def __init__(self, name, access, owner):\n super(DataFile, self).__init__(name, access, owner, \"datafile\")\n self.checksum = \"\"\n self.size = 0\n ... | python | edit | 1 | 1 | mit | 72a5d74496d8cfd3d2216ac9b5f5ef2d4b054ed0 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/loader/model/datafile.py | rejected_duplicate | Near-duplicate of sample 21532 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponseForbidden\nfrom django.contrib.auth.models import AnonymousUser\nfrom api.models import AuthAPIKey\n\nclass APIKeyAuthentication(object):\n\n def is_authenticated(self, request):\n\n params = {}... | python | edit | 1 | 6 | bsd-3-clause | fb2cfe4759fb98de644932af17a247428b2cc0f5 | nikdoof/test-auth | api/auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.contrib.admin.views.decorators import staff_member_required\n\nfrom derrida.books.views import (\n PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,\n InstanceListView\n)\n\... | python | edit | 1 | 0 | apache-2.0 | 8188008cf1bd41c1cbe0452ff635dd0319dfecd9 | Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django | derrida/books/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom experiment_config_lib import ControllerConfig\nfrom sts.topology import MeshTopology\nfrom sts.control_flow import Fuzzer\nfrom sts.input_traces.input_logger import InputLogger\nfrom sts.invariant_checker import InvariantChecker\nfrom ... | python | edit | 3 | 0 | apache-2.0 | 1b2f0be67a8372a652b786c8b183cd5edf1807cd | jmiserez/sts,jmiserez/sts,ucb-sts/sts,ucb-sts/sts | config/fuzz_pox_mesh.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom src.markdown.makrdown import jinja_aware_markdown\n\nPREFERRED_URL_SCHEME = 'http'\nSERVER_NAME = 'localhost:5000'\nFLATPAGES_EXTENSION = '.md'\nFLATPAGES_HTML_RENDERER = jinja_aware_markdown\nFREEZER_IGNORE_404_NOT_FOUND = True\nFLATP... | python | edit | 1 | 0 | apache-2.0 | eaa17491581cbb52242fbe543dd09929f537a8bc | meilalina/kotlin-web-site,meilalina/kotlin-web-site,hltj/kotlin-web-site-cn,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-site,JetBrains/kotlin-web-site,hltj/kotlin-web-site-cn,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-site,JetBrains/kotlin-web-site,meilalina/kotlin-web-site,JetBrains/kotlin-web-site,meilalina/kotlin... | mysettings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.http import StreamingHttpResponse\nfrom django.utils.encoding import force_text\n\nfrom .models import modelserialiser_factory\nfrom .simplecsv import CSV\n\n\nclass ExportCsv(object):\n def __init__(self, serialiser=None, ... | python | edit | 1 | 3 | bsd-3-clause | ee3b712611ed531843134ef4ce94cb45c726c127 | limbera/django-nap,MarkusH/django-nap | nap/extras/actions.py | rejected_duplicate | Near-duplicate of sample 13118 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAdd very large RV errors for stars with no known RVs.\nConvert to cartesian.\n\"\"\"\n\nimport numpy as np\nimport sys\nsys.path.insert(0, '..')\nfrom chronostar import tabletool\nfrom astropy.table import Table\n\ndatafile = Table.... | python | edit | 1 | 0 | mit | 81833470d1eb831e27e9e34712b983efbc38a735 | mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar | solar_neighbourhood/prepare_data_add_kinematics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSpecific checks.\n\"\"\"\nfrom discord.ext.commands import CheckFailure\n\n\ndef is_owner(ctx):\n if not ctx.bot.owner_id == ctx.message.author.id:\n raise CheckFailure(message=\"You are not the owner.\")\n return True\... | python | edit | 1 | 5 | mit | c90dbc5007b5627b264493c2d16af79cff9c2af0 | MJB47/Jokusoramame,MJB47/Jokusoramame,MJB47/Jokusoramame | joku/checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport yaml\n\nfrom test.framework.functional.base_functional_test_case import BaseFunctionalTestCase\nfrom test.functional.job_configs import BASIC_JOB\n\n\nclass TestMasterEndpoints(BaseFunctionalTestCase):\n\n def _start_ma... | python | edit | 1 | 1 | apache-2.0 | abb00ac993154071776488b5dcaef32cc2982f4c | josephharrington/ClusterRunner,box/ClusterRunner,josephharrington/ClusterRunner,nickzuber/ClusterRunner,Medium/ClusterRunner,nickzuber/ClusterRunner,box/ClusterRunner,Medium/ClusterRunner | test/functional/master/test_endpoints.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom .webhooks import WebHook\nfrom werkzeug.exceptions import BadRequest, NotImplemented\n\nEVENTS = {\n 'Push Hook': 'push',\n 'Tag Push Hook': 'tag_... | python | edit | 3 | 8 | apache-2.0 | 644fbef7030f0685be7dd056606ab23daaefdc72 | pipex/gitbot,pipex/gitbot,pipex/gitbot | app/gitlab.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom paste import deploy\n\nfrom keystone import config\nfrom keystone.common import logging\n\nLOG = logging.getLogger(__name__)\nCONF = config.CONF\nconfig_files = ['/etc/keystone.conf']\nCONF(config_files=config_files)\n\nco... | python | edit | 1 | 0 | apache-2.0 | 19c0e8d856049677bc7de2bc293a87a0aac306f8 | ging/keystone,cloudbau/keystone,cloudbau/keystone,JioCloud/keystone,townbull/keystone-dtrust,roopali8/keystone,maestro-hybrid-cloud/keystone,townbull/keystone-dtrust,rickerc/keystone_audit,rickerc/keystone_audit,jumpstarter-io/keystone,cloudbau/keystone,jamielennox/keystone,cbrucks/Federated_Keystone,jumpstarter-io/key... | httpd/keystone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext as _\n\nfrom post.models import Post\nfrom jmbo.generic.views import GenericObjectDetail, GenericObjectList\nfrom jmbo.view_modifiers import Default... | python | edit | 1 | 1 | bsd-3-clause | 671ca30892e3ebeb0a9140f95690853b4b92dc02 | praekelt/jmbo-post,praekelt/jmbo-post | post/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf8\n\n# 31.220.16.242\n# 216.58.222.46\n\n\nimport socket\nimport time\nimport webbrowser\n\ndef checkdns():\n print time.ctime()\n retorno = True\n try:\n ip = socket.gethostbyname('google.com')\n... | python | edit | 4 | 3 | mit | 63eaf0faf56a70fadbd37f0acac6f5e61c7b19eb | felipebhz/checkdns | checkdns.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom .models import GithubProject, GithubOrganization\n\nlog = logging.getLogger(__name__)\n\ndef make_github_project(user, org, privacy, repo_json):\n if (repo_json['private'] is True and privacy == 'private' or \n ... | python | edit | 1 | 8 | mit | fedb3768539259568555d5a62d503c7995f4b9a2 | istresearch/readthedocs.org,CedarLogic/readthedocs.org,KamranMackey/readthedocs.org,SteveViss/readthedocs.org,stevepiercy/readthedocs.org,soulshake/readthedocs.org,kenshinthebattosai/readthedocs.org,takluyver/readthedocs.org,cgourlay/readthedocs.org,soulshake/readthedocs.org,attakei/readthedocs-oauth,hach-que/readthedo... | readthedocs/oauth/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\nfrom rest_framework import filters, viewsets\nfrom teryt_tree.rest_framework_ext.viewsets import custom_area_filter\n\nfrom .models import Institution, Tag\nfrom .serializers import InstitutionSerializer, TagSerialize... | python | edit | 1 | 1 | mit | e4e10ee0ae5a18cfec0e15b7b85986b7f4fc4f9d | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | feder/institutions/viewsets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab\n\nimport os, sys\nimport sqlite3\nimport urllib.request\n\nerr = False\nfor version in range (7, 14):\n fname = 'tables_v1.sql' if version <... | python | edit | 1 | 0 | mit | ab78bf2c47a8bec5c1d0c5a7951dba1c98f5c28e | moneymanagerex/general-reports,moneymanagerex/general-reports | check_gm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport click\nimport os\nimport codecs\nimport json\n\nfrom xtas.tasks._frog import parse_frog, frog_to_saf\n\n\n@click.command()\n@click.argument('input_files', nargs=-1, type=click.Path(exists=True))\n@click.argumen... | python | edit | 1 | 4 | apache-2.0 | 175bbd2f181d067712d38beeca9df4063654103a | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | nlppln/frog_to_saf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom django.conf import settings\n\n\ndef validate_grader_is_current_retina_user(grader, context):\n \"\"\"\n This method checks if the passed grader equals the request.user that is passed in th... | python | edit | 1 | 6 | apache-2.0 | aaba085cd2e97c8c23e6724da3313d42d12798f0 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | app/grandchallenge/annotations/validators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom env_setup import setup_django\nsetup_django()\nfrom env_setup import setup\nsetup()\n\nfrom webapp2 import RequestHandler, Route, WSGIApplication\n\nfrom agar.env import on_production_server\nfrom agar.config i... | python | edit | 1 | 1 | mit | 7e4b66fe3df07afa431201de7a5a76d2eeb949a1 | xuru/substrate,xuru/substrate,xuru/substrate | app/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nStarts a Blaze server for tests.\n\n$ start_test_server.py /path/to/catalog_config.yaml <portnumber>\n\"\"\"\nimport sys, os\nimport blaze\nfrom blaze.io.server.app import app\n\nblaze.catalog.load_config(sys.argv[1])\napp.run(port=... | python | edit | 1 | 2 | bsd-3-clause | b6208c1f9b6f0afca1dff40a66d2c915594b1946 | caseyclements/blaze,dwillmer/blaze,jcrist/blaze,mrocklin/blaze,cowlicks/blaze,ContinuumIO/blaze,jcrist/blaze,xlhtc007/blaze,FrancescAlted/blaze,aterrel/blaze,nkhuyu/blaze,AbhiAgarwal/blaze,markflorisson/blaze-core,nkhuyu/blaze,FrancescAlted/blaze,ChinaQuants/blaze,markflorisson/blaze-core,alexmojaki/blaze,alexmojaki/bl... | blaze/io/server/tests/start_simple_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright 2012 University of Southern California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\... | python | edit | 1 | 0 | apache-2.0 | d64460c8bbbe045dcdf9f737562a31d84044acce | informatics-isi-edu/microscopy,informatics-isi-edu/microscopy,informatics-isi-edu/microscopy,informatics-isi-edu/microscopy | rest/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n\n\"\"\"\nRegister filter so it is available for use in the `extends` template tag\n(The `extends` tag must come first in a template, so regular `load` is not\nan option).\n\"\"\"\n\nfrom __future__ import absolute_i... | python | edit | 1 | 0 | bsd-3-clause | 10d0b7c452c8d9d5893cfe612e0beaa738f61628 | nigma/django-easy-pjax,nigma/django-easy-pjax,nigma/django-easy-pjax | easy_pjax/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport StringIO\nimport unittest\n\nfrom csvkit import CSVKitReader\nfrom csvkit.utilities.stack import CSVStack\n\nclass TestCSVStack(unittest.TestCase):\n def test_explicit_grouping(self):\n ... | python | edit | 3 | 1 | mit | 7ba77209687ae1bb1344cc09e3539f7e21bfe599 | unpingco/csvkit,snuggles08/csvkit,doganmeh/csvkit,aequitas/csvkit,themiurgo/csvkit,bradparks/csvkit__query_join_filter_CSV_cli,matterker/csvkit,archaeogeek/csvkit,metasoarous/csvkit,jpalvarezf/csvkit,kyeoh/csvkit,nriyer/csvkit,gepuro/csvkit,bmispelon/csvkit,KarrieK/csvkit,Tabea-K/csvkit,moradology/csvkit,tlevine/csvkit... | tests/test_utilities/test_csvstack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim: set fileencodings=utf-8\n\n__docformat__ = \"reStructuredText\"\n\nimport json\nimport datetime\n\nfrom django.template.base import Library\nfrom django.utils.safestring import mark_safe\n\nregister = Library... | python | edit | 5 | 4 | apache-2.0 | 95bde4f783a4d11627d8bc64e24b383e945bdf01 | crate/crate-web,jomolinare/crate-web,crate/crate-web,crate/crate-web,jomolinare/crate-web,jomolinare/crate-web | src/web/tags.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This tests the very basic talk stuff, to ensure some levels of sanity\n\n\ndef test_add_talk():\n \"\"\"Create a user and add a talk to it\"\"\"\n from django.contrib.auth.models import User\n from wafer.talks.models import Talks\n\... | python | edit | 3 | 1 | isc | 4f3d1e90ec4af618ada415f53ddd9eec42bafb38 | CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer | wafer/talks/tests/test_wafer_basic_talks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import User\nfrom rest_framework import serializers\n\nclass UserSerializer(serializers.ModelSerializer):\n password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)\n\n class M... | python | edit | 1 | 2 | mit | ac6ce056e6b05531d81c550ae3e1e1d688ece4a0 | codertx/lightil | jwt_auth/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport platform\n\ndef is_tingbot():\n \"\"\"return True if running as a tingbot. We can update this function to be more smart in future\"\"\"\n return platform.machine().startswith('armv71')\n\nif platform.system() == 'Darwin':\n ... | python | edit | 5 | 1 | bsd-2-clause | aa5259efac8f7fbe8e2afd263198feaaa45fc4c3 | furbrain/tingbot-python | tingbot/platform_specific/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.neighbors import KNeighborsRegressor\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.pipeline import Pipeline\nimport numpy as np\nimport json\nimpo... | python | edit | 5 | 7 | mit | 16c1ae09e0288036aae87eb4337c24b23b1e6638 | timvandermeij/sentiment-analysis,timvandermeij/sentiment-analysis | classify.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls.defaults import patterns, include\n\nimport goog.urls\nfrom goog import utils\n\nclass GoogDevelopmentMiddleware(object):\n\n def devmode_enabled(self, request):\n \"\"\"Retu... | python | edit | 1 | 3 | bsd-3-clause | f3da1fab9af2279182a09922aae00fcee73a92ee | andialbrecht/django-goog | goog/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef ibm_rng(x1, a, c, m):\n x = x1\n while True:\n x = (a * x + c) % m\n yield x / (m-1)\n\n\ndef main():\n rng = ibm_rng(1, 65539, 0, 2**31)\n\n while True:\n x = next(rng)\n print(x)\n\n\nif __name_... | python | edit | 1 | 2 | mit | 61cf4e2feb3d8920179e28719822c7fb34ea6550 | JelteF/statistics | 3/ibm_rng.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom werkzeug.middleware.proxy_fix import ProxyFix\n\n\nclass CustomProxyFix(object):\n def __init__(self, app, forwarded_proto):\n self.app = ProxyFix(app)\n self.forwarded_proto = forwarded_proto\n\n def __call__(self,... | python | edit | 1 | 1 | mit | db3cee63baf64d00b2d2ac4fcf726f287b6d7af2 | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | app/proxy_fix.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nOrderedDict variants of the default base classes.\n\nThese classes are especially useful for doctests and unit tests.\n\n\"\"\"\ntry:\n # Python 2.7+\n from collections import OrderedDict\nexcept ImportError:\n # Oython 2.6... | python | edit | 1 | 0 | bsd-3-clause | 0782ba56218e825dea5b76cbf030a522932bcfd6 | nathania/networkx,dhimmel/networkx,RMKD/networkx,sharifulgeo/networkx,chrisnatali/networkx,goulu/networkx,farhaanbukhsh/networkx,jni/networkx,jakevdp/networkx,ionanrozenfeld/networkx,debsankha/networkx,nathania/networkx,tmilicic/networkx,kernc/networkx,ltiao/networkx,michaelpacer/networkx,bzero/networkx,dhimmel/network... | networkx/classes/ordered.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom argparse import ArgumentParser\nfrom matplotlib import pyplot as plt\nfrom graph import Greengraph\n\n\ndef process():\n parser = ArgumentParser(\n description=\"Produce graph quantifying the amount of green land between two ... | python | edit | 3 | 3 | mit | 6f0740fbd94acc2398f0628552a6329c2a90a348 | MikeVasmer/GreenGraphCoursework | greengraph/command.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, request, session\nfrom flask.ext.babel import Babel\nfrom babel.core import negotiate_locale\n\nfrom welt2000.__about__ import (\n __title__, __summary__, __uri__, __version__, __author__, __email__,\n __licen... | python | edit | 9 | 3 | mit | 4a6060f476aebac163dbac8f9822539596379c0a | Turbo87/welt2000,Turbo87/welt2000 | welt2000/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport bottle\nfrom bottle import route, run\nfrom web import web\nimport config\n\napp = application = bottle.Bottle()\napp.merge(web.app)\n\nconfig.arguments['--verbose'] = True\n\nif __name__ == '__main__':\n\tapp.run(host='0.0.0.0', por... | python | edit | 1 | 0 | mit | 34c0c6c73a65da3120aa52600254afc909e9a3bc | gotling/PyTach,gotling/PyTach,gotling/PyTach | pytach/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .fhrp import *\nfrom .ip import *\nfrom .services import *\nfrom .vlans import *\nfrom .vrfs import *\n\n__all__ = (\n 'ASN',\n 'Aggregate',\n 'IPAddress',\n 'IPRange',\n 'FHRPGroup',\n 'FHRPGroupAssignment',\n 'Pr... | python | edit | 21 | 0 | apache-2.0 | 5526f8e3dca2f84fce34df5a134bada8479a2f69 | digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox | netbox/ipam/models/__init__.py | rejected_lint | Too many lint violations: 21 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.