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 import admin\nfrom django.forms import model_to_dict\nfrom django.utils.timezone import now\n\nfrom main.models import Lan, Event\n\n\nclass EventInline(admin.TabularInline):\n model = Event\n show_change_link = Tr...
python
edit
1
2
mit
16cd3b501755c6d45b39b46ca8179cc0dc015125
bomjacob/htxaarhuslan,bomjacob/htxaarhuslan,bomjacob/htxaarhuslan
main/admin/lan.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom django.contrib import admin\nimport logging\n\n\nLOG = logging.getLogger(__name__)\n\n\nclass LogConfigurationAdmin(admin.ModelAdmin):\n\n list_filte...
python
edit
1
0
bsd-3-clause
2ef0ccfbf337d0ef1870c5a1191b2bcdcffd1f9e
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/backup/admin/log_configuration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom doubles import allow, teardown\n\n\nclass User(object):\n def __init__(self, name):\n self.name = name\n\n def get_name(self):\n return self.name\n\n\nclass TestPartialDouble(object):\n def test_stubs_real_object...
python
edit
1
1
mit
2917e089734ace4fd212ef9a16e8adf71d671312
uber/doubles
test/partial_double_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys\nfrom glob import glob\nimport GlobalVars\n\ndef LoadFunction(path, loadAs=''):\n loadType = 'l'\n name = path\n src = __import__('Functions.' + name, globals(), locals(), [])\n if loadAs != '':\n name = lo...
python
edit
4
6
mit
378b5679f9ca3b814eb0a2a89e9f8045ae4bc4c1
HubbeKing/Hubbot_Twisted
FunctionHandler.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = '5.0.0'\n\nsetup(\n name=\"alerta-azure-monitor\",\n version=version,\n description='Alerta webhook for Azure Monitor',\n url='https://github.com/alerta/alerta-contrib',\n...
python
edit
1
0
mit
12cca87c2c84db562361ee230dfc033c31f7e0d4
alerta/alerta-contrib,alerta/alerta-contrib,alerta/alerta-contrib
webhooks/azuremonitor/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport os\nimport sys\n\n# Add the third_party/ dir to our search ...
python
edit
1
0
bsd-3-clause
446923b12942f351f2f40d035f0c1e6f9dcb8813
coreos/chromite,bpsinc-native/src_third_party_chromite,bpsinc-native/src_third_party_chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,chadversary/chromiumos.chromite,coreos/chromite,zhang0137/chromite,coreos/chromite,zhang0137/chromite,chadversary/chromiumos.chromite
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractUser\n\n\nclass User(AbstractUser):\n faculty_number = models.CharField(max_length=8)\n\n def __unicode__(self):\n return unicode(self.username)\n\n ...
python
edit
2
1
mit
47d69320261a3126637229c9deaf02ba425998af
Hackfmi/Diaphanum,Hackfmi/Diaphanum
members/models.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\n# Import flask and template operators\nfrom flask import Flask, request, render_template\n\n# Define the WSGI application object\napp = Flask(__name__)\n\n# ...
python
edit
5
1
apache-2.0
b261eb0b2180ebc07ace6c1abad4ec68d6c17840
pipex/gitbot,pipex/gitbot,pipex/gitbot
app/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# ------------------------------------------------------------------------\n# coding=utf-8\n# ------------------------------------------------------------------------\n#\n# Created by Martin J. Laubach on 08.01.10.\n#\n# ------------------...
python
edit
6
7
bsd-3-clause
efb7191428756f8ef0b85475d00297e2594eca4c
joshuajonah/feincms,feincms/feincms,matthiask/django-content-editor,matthiask/django-content-editor,hgrimelid/feincms,michaelkuty/feincms,nickburlett/feincms,hgrimelid/feincms,mjl/feincms,matthiask/django-content-editor,joshuajonah/feincms,mjl/feincms,joshuajonah/feincms,michaelkuty/feincms,nickburlett/feincms,nickburl...
feincms/content/comments/models.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nsize(800, 800)\nimport time\ncolormode(RGB)\n\nspeed(60)\n\ndef setup():\n # ovallist is the list of ovals we created by moving the mouse.\n global ovallist\n stroke(0)\n strokewidth(1)\n ovallist = []\n\nclass Blob:\n def...
python
edit
21
6
mit
f497259869ba0f920d8a7eaac45bd320566c4808
karstenw/nodebox-pyobjc,karstenw/nodebox-pyobjc
examples/Interactivity/circlepainter.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport optparse\nimport sys\nfrom os import path\nfrom os.path import expanduser\nimport unittest\nimport argparse\n\n# Simple stand-alone test runner\n# - Runs independently of appengine runner\n# - So we need to f...
python
edit
2
2
apache-2.0
b37eb87e73f049b87dcd0bf3cd3ff9be1ffaff4b
hschema/schemaorg,schemaorg/schemaorg,pwz3n0/schemaorg,gkellogg/schemaorg,vholland/schemaorg,URXtech/schemaorg,schemaorg/schemaorg,cesarmarinhorj/schemaorg,sdo-sport/schemaorg,hschema/schemaorg,tfrancart/schemaorg,ya7lelkom/schemaorg,ynh/schemaorg,sdo-sport/schemaorg,twamarc/schemaorg,haonature/schemaorg,schemaorg/sche...
scripts/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery import shared_task\nfrom django.db.models import F\n\nfrom grandchallenge.serving.models import Download\n\n\n@shared_task\ndef create_download(*_, **kwargs):\n try:\n d = Download.objects.get(**kwargs)\n d.coun...
python
edit
1
2
apache-2.0
1a61ba3655e575cbf4d20190182654cb677bce9c
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/grandchallenge/serving/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 The Forseti Security Authors. All rights reserved.\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 ...
python
edit
1
0
apache-2.0
f86c43e7f1d59aa2b6b8bf636c736cb36da877f9
forseti-security/forseti-security,forseti-security/forseti-security,forseti-security/forseti-security,forseti-security/forseti-security
google/cloud/forseti/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\nimport datetime\n\nfrom trovebox import Trovebox\n\ndef main():\n try:\n client = Trovebox()\n client.configure(api_version=2)\n\n except IOError, e:\n print\n print '!! Could not init...
python
edit
10
7
mit
8c10f7a3112ecece857ee9c3d20076377f7196a0
nip3o/trovebox-uploader
upload.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nprompt_toolkit\n==============\n\nAuthor: Jonathan Slenders\n\nDescription: prompt_toolkit is a Library for building powerful interactive\n command lines in Python. It can be a replacement for GNU\n readline...
python
edit
6
0
bsd-3-clause
094b16a8088c8e7f8012465984c53e87e6e61eac
jonathanslenders/python-prompt-toolkit
prompt_toolkit/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Heap(object):\n \"\"\"Implements a heap data structure in Python.\n\n The underlying data structure used to hold the data is a list.\n \"\"\"\n\n _heap = []\n\n def __init__(self, initial=None):\n ...
python
edit
1
4
mit
474d7c95e5fec4a8638f1eb4ff7225f01d116308
DasAllFolks/PyAlgo
heap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\nimport types\n\nfrom sfa.storage.model import *\nfrom sfa.storage.alchemy import *\nfrom sfa.trust.gid import create_uuid\nfrom sfa.trust.hierarchy import Hierarchy\nfrom sfa.util.xrn import ...
python
edit
2
6
mit
531974ce5d621b903608aa226110277f77918167
yippeecw/sfa,onelab-eu/sfa,onelab-eu/sfa,yippeecw/sfa,onelab-eu/sfa,yippeecw/sfa
tools/reset_gids.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import standard_library\nstandard_library.install_aliases()\nimport unittes...
python
edit
1
4
mit
d348c4f7c60b599e713eeeda7ed6806c5b1baae0
toslunar/chainerrl,toslunar/chainerrl
tests/explorers_tests/test_additive_ou.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom app import create_app, db\nfrom app.utils import get_or_create, is_safe_url\nfrom app.models import User\n\n\nclass TestUtils(unittest.TestCase):\n def setUp(self):\n self.app = create_app(\"testing\")\n ...
python
edit
1
1
mit
13da665f07be45f5c5b9308d0219250b368810d5
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import *\nfrom exercises import ex12\n\ndef test_histogram():\n '''\n Test our histogram output is correct\n '''\n\n test_histogram = ex12.histogram([1, 2, 3])\n print(test_histogram)\n assert_equal(test_hi...
python
edit
4
1
mit
1d1a64c8a98d98a243307dd58ec3874f0369ce8f
gravyboat/python-exercises
tests/ex12_tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nfrom utils import read_input\nfrom constants import EURISTIC_FACTOR\n\nfrom collections import Counter\nimport sys\n\n\ndef choose_nodes(nodes, neighbours_iterable):\n neighbours_count = len(neighbours_iterable...
python
edit
1
5
mit
1a069e7a8565dcd72b362d6b4c0cc3b1b981e5a6
AldurD392/SubgraphExplorer,AldurD392/SubgraphExplorer,AldurD392/SubgraphExplorer
Streamer/iterMapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom . import models\n\n\nclass Category(serializers.ModelSerializer):\n class Meta:\n model = models.Category\n\n\nclass Task(serializers.ModelSerializer):\n class Meta:\n model =...
python
edit
1
0
mit
b13c8b5cd0dde5d329a14b99c672307567992434
arnlaugsson/workshop_drf,xordoquy/workshop_drf_djangoconeu2015,pombredanne/workshop_drf_djangoconeu2015
workshop_drf/todo/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\" Smoke testing the cm module\n\"\"\"\nfrom nose import SkipTest\n\ntry:\n import matplotlib as mp\n # Make reall...
python
edit
1
2
bsd-3-clause
23e984fe24428241b873b93a4ca541b69d3345d2
alexis-roche/nipy,nipy/nipy-labs,arokem/nipy,arokem/nipy,alexis-roche/nipy,alexis-roche/nireg,alexis-roche/register,alexis-roche/niseg,alexis-roche/nipy,bthirion/nipy,alexis-roche/nipy,bthirion/nipy,alexis-roche/register,arokem/nipy,nipy/nireg,nipy/nireg,bthirion/nipy,alexis-roche/nireg,alexis-roche/niseg,arokem/nipy,a...
nipy/labs/viz_tools/test/test_cm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom thefuck.rules.git_remote_seturl_add import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.mark.parametrize('command', [\n Command(script='git remote set-url origin url', stderr=\"fatal: No such r...
python
edit
1
1
mit
37161832aab8ecb611f9a80e1b58fc57866cdc14
Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,nvbn/thefuck,nvbn/thefuck,scorphus/thefuck,scorphus/thefuck,SimenB/thefuck,Clpsplug/thefuck,mlk/thefuck
tests/rules/test_git_remote_seturl_add.py
rejected_duplicate
Near-duplicate of sample 5159
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cmdparse\nimport commands\nimport logging\nimport optparse\nimport sys\n\nparser = cmdparse.CommandParser()\nparser.add_option(\"-b\", \"--brain\", type=\"string\", default=\"cobe.brain\",\n help=\"Specify an alterna...
python
edit
1
4
mit
0049a5b12b60e0bbd104c7d88d36d432f51a3d37
meska/cobe,DarkMio/cobe,LeMagnesium/cobe,meska/cobe,wodim/cobe-ng,LeMagnesium/cobe,wodim/cobe-ng,pteichman/cobe,tiagochiavericosta/cobe,DarkMio/cobe,tiagochiavericosta/cobe,pteichman/cobe
cobe/control.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_plus.test import TestCase\nfrom django_private_chat.views import *\nfrom django.test import RequestFactory\nfrom django.urls import reverse\nfrom django_private_chat.models import *\n\n\nclass TestDialogListView(TestCase):\n de...
python
edit
6
1
isc
7c646414121e68b69896b5f700f65a1963977f72
Bearle/django-private-chat,Bearle/django-private-chat,Bearle/django-private-chat
tests/test_views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\"\nA simple utility to import something by its string name.\n\nAuthors:\n\n* Brian Granger\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2011 The IP...
python
edit
1
3
bsd-3-clause
8ddfcf45b4da91a02e12ebff2304e7ecf8a04378
ipython/ipython,ipython/ipython
IPython/utils/importstring.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Periodic cleanup job for blog comments.\n# This will remove any abandoned comments that\n# may have been posted by bots and did not get\n# past the captcha.\n#\n# Use PYTHONPATH=<StackSmash dir to manage.py> ./db...
python
edit
3
1
bsd-2-clause
e697743b89f262a179881e2c58e2422a146248d0
Justasic/StackSmash,Justasic/StackSmash
db_cleanup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Enable PostGIS\n\nRevision ID: 4ef20b76cab1\nRevises: 55004b0f00d6\nCreate Date: 2015-02-11 20:49:42.303864\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '4ef20b76cab1'\ndown_revision = '55004b0f00d6'\n\nfrom alemb...
python
edit
3
1
mit
7baac2883aa6abc0f1f458882025ba1d0e9baab2
openchattanooga/cpd-zones-old,openchattanooga/cpd-zones-old
app/migrations/versions/4ef20b76cab1_.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Author(models.Model):\n name = models.TextField()\n\n def __str__(self):\n return self.name\n\n\nclass Paper(models.Model):\n url = models.TextField()\n title = models.TextField()\n...
python
edit
1
1
mit
39d370f314431e44e7eb978865be4f7696625eec
Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker
scraper/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom catsnap import Client, HASH_KEY\nfrom boto.dynamodb.batch import BatchList\nimport json\n\nMAX_ITEMS_TO_REQUEST = 99\n\ndef get_images(filenames):\n if not filenames:\n raise StopIte...
python
edit
1
8
mit
fb7b9618d5e54e8500efb0904913b4febf80222c
ErinCall/catsnap,ErinCall/catsnap,ErinCall/catsnap
catsnap/batch/image_batch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.decorators import list_route\nfrom rest_framework.pagination import LimitOffsetPagination\nfrom rest_framework.response import Response\n\n\nclass LargeResultsSetPagination(LimitOffsetPagination):\n default_limit = 10...
python
edit
1
8
bsd-3-clause
9c5c2f916f8f8fceb38848212d7c4d8883fd2aef
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/api/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom openerp import fields, models\n\n'''\nThis module create model of Course\n'''\n\n\nclass Course(models.Model):\n '''\n This class create model of Course\n '''\n _name = 'openacademy.course' # Mod...
python
edit
2
2
apache-2.0
fe42da2e9c642c7e4f8b480012e9455ffcb294a0
deivislaya/openacademy-project
openacademy/model/openacademy_course.py
rejected_duplicate
Near-duplicate of sample 1697
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom rest_framework.reverse import reverse\n\nfrom pages import fields, mixins, models\nfrom pages.utils import build_url\n\n\nclass PageSerializer(serializers.HyperlinkedModelSerializer):\n name =...
python
edit
1
1
bsd-2-clause
6e6aaac438a18220db20ad480a8a82af49c44caa
incuna/feincms-pages-api
pages/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .config import parse\nfrom .target import Target\nfrom .__version__ import __version__\n\nfrom argparse import ArgumentParser\n\nimport logging\nimport os\nimport sys\n\n\ndef main():\n setup_logging()\n\n parser = ArgumentParser...
python
edit
1
3
apache-2.0
9c3c5ede82b6672f23b5aec90cdbadb57ca8b92c
lstephen/construi
construi/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\nimport os\n\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nGOOGLE_ANALYTICS_ID = \"UA-53811587-1\"\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': os.environ...
python
edit
3
0
mit
f6f3c7a70ff2c47adc2525c0c5868debc7e78fdd
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
make_a_plea/settings/production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport yaml\n\nfrom subprocess import check_output, CalledProcessError\nfrom colors import red\nfrom jinja2 import Template\n\n\nclass Config():\n\n @staticmethod\n def load(config_file='brume.yml'):\n \"\"\"Return t...
python
edit
1
2
mit
b9dde5e9fc56feaea581cecca3f919f4e053044d
flou/brume,geronimo-iia/brume
brumecli/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCore tests. Test general environment.\n\"\"\"\n\nimport subprocess as sp\nfrom django.test import TestCase\nfrom django.test.client import Client\nfrom django.contrib.auth.models import User\nfrom django.conf import settings\n\n\nc...
python
edit
5
1
apache-2.0
a754323facdb05b18d19a1a0365ad12e8c25ed06
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
ocradmin/core/tests/test_core.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask\nimport logging\nfrom raven.contrib.flask import Sentry\n\n\nfrom themint.health import Health\n\n\napp = Flask(__name__)\n\napp.config.from_object(os.environ.get('SETTINGS'))\n\nif not app.debug:\n app...
python
edit
1
0
mit
505772740004ec8c73db49b7772e15d563a27b38
LandRegistry/mint-alpha,LandRegistry/mint-alpha
themint/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Display stock quotes on LCD\"\"\"\n\nimport ystockquote as y\nfrom lcd import lcd_string, tn\n\nsymbols = ['AAPL', 'MSFT', 'F', 'T', 'KO', 'GOOG', 'SYK', 'DIS', 'GM', 'GE',\n 'BAC', 'IBM', 'C', 'AMZN...
python
edit
1
7
mit
82c31412190e42f98ce65d5ad1a6a9b8faad2cb6
zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie
lcd_ticker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.core.exceptions import ValidationError\n\nfrom cyder.base.eav.constants import ATTRIBUTE_TYPES\nfrom cyder.base.eav.models import Attribute\n\n\ndef get_eav_form(eav_model, entity_model):\n class EAV...
python
edit
5
4
bsd-3-clause
dcd39f2955cd80e3888458954a58203ae74dab71
murrown/cyder,akeym/cyder,OSU-Net/cyder,drkitty/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,akeym/cyder,murrown/cyder,murrown/cyder,murrown/cyder,zeeman/cyder,zeeman/cyder,OSU-Net/cyder,OSU-Net/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder
cyder/base/eav/forms.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django import forms\n\nfrom news.forms import MaterialFileWidget\n\nfrom .models import Profile\n\n\nclass ProfileSearchForm(forms.Form):\n name = forms.CharField(max_length=200)\n\n\nclass ProfileFo...
python
edit
1
3
mit
b27a09e67d737310ec419eb76a39e667316184f0
hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website
userprofile/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"All SPARE-ICE related modules.\"\"\"\n\nfrom typhon.spareice.collocations import * # noqa\nfrom typhon.spareice.common import * # noqa\nfrom typhon.spareice.datasets import * # noqa\n\n__all__ = [s for s ...
python
edit
2
0
mit
b8a1e049024289a0665c5bff3ecdf60cf3e63825
atmtools/typhon,atmtools/typhon
typhon/spareice/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom whack.caching import DirectoryCacher, NoCachingStrategy\nimport whack.builder\n\ndef install(package, install_dir, caching, builder_uris, params):\n if caching.enabled:\n cacher = DirectoryCacher(os.path.expandus...
python
edit
1
3
bsd-2-clause
7e60f9d7962b3795983fdf5af0605319b1447098
mwilliamson/whack
whack/operations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.test import TestCase\n\nfrom modeltrans.manager import (split_translated_fieldname,\n transform_translatable_fields)\nfrom modelt...
python
edit
1
1
bsd-3-clause
b97842ecf1c8fa22b599353c1c7fe75fcf482702
zostera/django-modeltrans,zostera/django-modeltrans
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport MapGardening\nimport optparse\n\nusage = \"usage: %prog [options]\"\np = optparse.OptionParser(usage)\np.add_option('--place', '-p',\n default=\"all\"\n )\n\noptions, arguments = p.pa...
python
edit
2
0
mit
73caeecd963326f4789eb3dc484e59ffb475e12f
almccon/mapgardening,almccon/mapgardening,almccon/mapgardening,almccon/mapgardening
blankspot_stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os\nimport re\nimport commands\n\nsuccessRE = re.compile(\"Hello, GitHub!\")\n\ntestsPassed = 0\n\n# Add more tests here\ntests = [\n\t\t \"bin/hello_c\",\n\t\t \"bin/hello_cpp\",\n\t\t \"java -cp bin hello\",\n\...
python
edit
4
3
mit
881a57be20adb82eb7632bcd8282b0971c2793f7
luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github,luke-ho/hello-github
test/test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Replace star imports to fix mypy issue." }, { "role": "assistant", "content": "from .qsim_circuit import add_op_to_opstring, add_op_to_circuit, QSimCircuit\nfrom .qsim_simulator import QSimSimulatorState, QSimSimulatorTrialResult...
python
new_file
9
0
apache-2.0
a9d4fab047249fbf5db26385779902d0f7483057
quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim
qsimcirq/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n=================\nTemplate Matching\n=================\n\nIn this example, we use template matching to identify the occurrence of an\nimage patch (in this case, a sub-image centered on the camera man's head).\nSince there's only a ...
python
edit
1
0
bsd-3-clause
8dbf6f4c581430ae7393d1ed0c5f0b377ffebd7e
rjeli/scikit-image,Midafi/scikit-image,ofgulban/scikit-image,vighneshbirodkar/scikit-image,paalge/scikit-image,michaelpacer/scikit-image,chriscrosscutler/scikit-image,Hiyorimi/scikit-image,almarklein/scikit-image,paalge/scikit-image,emon10005/scikit-image,SamHames/scikit-image,emmanuelle/scikits.image,jwiggins/scikit-i...
doc/examples/plot_match_face_template.py
rejected_duplicate
Near-duplicate of sample 7536
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Android SDK version codes.\n\nhttp://developer.android.com/referenc...
python
edit
1
0
bsd-3-clause
f5592efd0cf780c6e97483a16820f98478be8e3d
sahiljain/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,benschmaus/catapult,sahiljain/catapult,sahiljain/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,benschmaus/catapult,benschmaus/catapult,sahiljain/catap...
devil/devil/android/sdk/version_codes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Experiment(object):\n def __init__(self, epochs=1):\n self.epochs = epochs\n\n def get_epochs(self):\n return self.epochs\n\n def train(self):\n raise NotImplementedError\n\n def test(self):\n r...
python
edit
1
1
apache-2.0
48ef416352870ae5c695ada006f1855d03d893df
sagelywizard/dlex
dlexperiment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''Unit test package for package \"tws\".'''\n\n__copyright__ = \"Copyright (c) 2008 Kevin J Bluck\"\n__version__ = \"$Id$\"\n\nimport socket\nfrom tws import EWrapper\n\n\ndef test_import():\n '''Verify successful import of top-level ...
python
edit
2
2
bsd-3-clause
9437b7fa2ef7f581968d6628561940dcb1e3f4ad
kbluck/pytws,kbluck/pytws
test_tws/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim: sw=4:ts=4:expandtab\n\n\"\"\"\nckanny\n~~~~~~\n\nMiscellaneous CKAN utility scripts\n\nExamples:\n literal blocks::\n\n python example_google.py\n\nAttributes:\n module_level_variable1 (int): Mod...
python
edit
1
1
mit
f8fe7041d209bb83e8483180824ffa73ceaa5f52
reubano/ckanny,reubano/ckanny
ckanny/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp\nfrom IPython.qt.console.rich_ipython_widget import RichIPythonWidget\nfrom IPython.qt.inprocess import QtInProcessKernelManager\nfrom IPython.lib import guisuppor...
python
edit
2
1
bsd-3-clause
899cf1aa2bc274602a7f9b2ef315ed67239f955a
ipython/ipython,ipython/ipython
examples/inprocess/embedded_qtconsole.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns\nfrom djproxy.views import HttpProxy\n\n\ndef generate_routes(config):\n routes = []\n for service_name, proxy_config in config.items():\n ProxyClass = type(\n 'ProxyClass',\n ...
python
edit
3
2
mit
70863101a882eee0811460cf9bf0f8442d9b0775
thomasw/djproxy
djproxy/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom board import Board\n\ndef test_constructor():\n board = Board(0,0)\n assert board.boardMatrix.size == 0\n assert board.columns == 0\n assert board.rows == 0\n\n board = Board(5,5)\n assert board.boardMatrix.size == 25...
python
edit
1
6
mit
ae324434fb00a46eae45d8218954950947bd636c
isaacarvestad/four-in-a-row
test_board_pytest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nbl_info = {\n 'name': \"Import: .EDM model files\",\n 'description': \"Importing of .EDM model files\",\n 'author': \"Nicholas Devenish\",\n 'version': (0,0,1),\n 'blender': (2, 78, 0),\n 'location': \"File > Import/Export > .EDM Fi...
python
edit
2
1
mit
05e8170326c5aa2be48eee5f90ab5a3919775e01
ndevenish/Blender_ioEDM,ndevenish/Blender_ioEDM
io_EDM/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\n# Standard Library\nimport sys\n\nif \"test\" in sys.argv:\n print(\"\\033[1;91mNo django tests.\\033[0m\")\n print(\"Try: \\033[1;33mpy.test\\033[0m\")\n sys.exit(0...
python
edit
1
0
mit
edb10e7ae1f428dade04a9976c3b3f985065d458
hTrap/junction,farhaanbukhsh/junction,ChillarAnand/junction,farhaanbukhsh/junction,akshayaurora/junction,NabeelValapra/junction,pythonindia/junction,shashisp/junction,hTrap/junction,ChillarAnand/junction,shashisp/junction,nava45/junction,NabeelValapra/junction,shashisp/junction,farhaanbukhsh/junction,akshayaurora/junct...
settings/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ListNode import *\n\n\nclass Solution():\n def addTwoNumbers(self, l1, l2):\n current_node = ListNode(None)\n head_node = current_node\n carry = 0\n p = l1\n q = l2\n\n while p or q or carry...
python
edit
6
6
mit
334b3e1bbda58439020131fe178db1e72cbf662a
xliiauo/leetcode,xiao0720/leetcode,xiao0720/leetcode,xliiauo/leetcode,xliiauo/leetcode
2/Solution.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCustom managers for working with CAL-ACCESS processed data models.\n\"\"\"\nfrom __future__ import unicode_literals\nimport os\nfrom django.db import models, connection\n\nclass Proces...
python
edit
1
2
mit
87c6a222c7e979c2e44ecf152158bfcbe3b61d2a
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013-2014 Mirantis Inc. 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 License...
python
edit
1
1
apache-2.0
84bb5fbef5c98bdee344ac9d9739f035bd9a8f7b
citrix-openstack-build/tooz,openstack/tooz,citrix-openstack-build/tooz,openstack/tooz
tooz/drivers/zake.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import User\n\n\n@admin.register(User)\nclass UserAdmin(admin.ModelAdmin):\n # list view\n list_display = (\n 'get_name',\n 'email',\n 'get_date_joined',\n '...
python
edit
1
1
bsd-2-clause
40493966b989e73a07f6a33bd9e9497ae9ad9f3f
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
user/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Pooling layer.\"\"\"\n\nfrom theano.tensor.signal import downsample\n\nfrom athenet.layers import Layer\n\n\nclass MaxPool(Layer):\n \"\"\"Max-pooling layer.\"\"\"\n def __init__(self, poolsize, stride=None):\n \"\"\"Crea...
python
edit
1
2
bsd-2-clause
bf53b5a1e6562162ba9c3f89568ebfeb0124249d
heurezjusz/Athenet,heurezjusz/Athena
athenet/layers/pool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# yvs.set_pref\n# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport json\nimport sys\nimport yvs.shared as shared\n\n\n# Parse pref set data from the given JSON string\ndef parse_pref_set_data(pref_set_data_str):\n\n pref_s...
python
edit
1
2
mit
c209115dfb385cc167457aa87808b21a554f63cf
caleb531/youversion-suggest,caleb531/youversion-suggest
yvs/set_pref.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.utils import timezone\nfrom django.dispatch import receiver\nfrom django.conf import settings\n\nfrom taggit.managers import TaggableManager\n\nimport requ...
python
edit
1
3
mit
8d53a7478a139770d9ffb241ec2985123c403845
tom-henderson/bookmarks,tom-henderson/bookmarks,tom-henderson/bookmarks
bookmarks/bookmarks/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\nfrom bitcoinmonitor.celeryconfig import app\nfrom channels import Group\n\n\napp.conf.beat_schedule = {\n 'add-every-30-seconds': {\n 'task': 'dashboard.tasks.get_bitcoin_price',\n 'schedule'...
python
edit
3
1
mit
f56ed1c14b87e4d28e8e853cf64d91cf756576d1
alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor
dashboard/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nfrom . import views\n\nurlpatterns = [\n url(r'^', views.ViewView.as_view(), name='profile_own_view'),\n url(r'^edit/', views.EditView.as_view(), name='pro...
python
edit
4
0
mit
178373851bcb66487b89224f19e3c3dc887a8f95
DeWaster/Tviserrys,DeWaster/Tviserrys
user_profile/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom http_client import HttpClient\n \nfrom models.message import ReceivedMessage\n\nclass Bot():\n \"\"\"\n @brief Facebook messenger bot\n \"\"\"\n\n def __init__(self, token):\n self.api_token = token\n self.cli...
python
edit
3
3
mit
01b15e2df498706a342009e300c77168032c7824
ben-cunningham/python-messenger-bot,ben-cunningham/pybot
fbmsgbot/bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom basic import *\n# this generates a lot of non-exception generating errors\n# all the more incentive to fix these tests up sooner!\n# TODO - fix\nfrom views import *\n\n```\n\nApply this change: Disable graphing unit tests until we fix ...
python
edit
2
0
bsd-3-clause
b9e2418e90ba61905aacf37d254e2718124aba77
SEL-Columbia/commcare-hq,gmimano/commcaretest,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedso...
apps/graphing/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\nscope = \"Private Program\"\ndescription = \"\"\"\n User with authorization to peform administrative tasks such as associat...
python
edit
1
0
apache-2.0
7faeebea3186443055cd8dd5e02137339c048ac9
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core
src/ggrc_basic_permissions/roles/ProgramOwner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Licensed to Cloudera, Inc. under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. Cloudera, Inc. license...
python
edit
4
1
apache-2.0
abe9be5cc9789b7b1c091f08b23655f903d71fb2
xiangel/hue,xiangel/hue,GitHublong/hue,kawamon/hue,kawamon/hue,rahul67/hue,cloudera/hue,lumig242/Hue-Integration-with-CDAP,dulems/hue,xq262144/hue,sanjeevtripurari/hue,epssy/hue,rahul67/hue,pwong-mapr/private-hue,x303597316/hue,ahmed-mahran/hue,epssy/hue,ChenJunor/hue,sanjeevtripurari/hue,abhishek-ch/hue,epssy/hue,xian...
apps/impala/src/impala/tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom models import Story, Page, StoryPage\nfrom django.contrib import admin\n\nadmin.site.register(Story)\nadmin.site.register(Page)\nadmin.site.register(StoryPage)\n\n```\n\nApply this change: Add a StoryAdmin to hide owner.\n\nAlso has co...
python
edit
1
0
bsd-3-clause
ce95fbb56d7b331c0d1f55f6f6f8fc32b1e0f135
MAPC/masshealth,MAPC/masshealth
datastories/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013-2014 DataStax, 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 License at\n#\n# http://www.apa...
python
edit
1
0
apache-2.0
4cfa123da2ccf416e2cb7e4bd9bc0c189a06081b
jregovic/python-driver,thobbs/python-driver,mobify/python-driver,stef1927/python-driver,stef1927/python-driver,coldeasy/python-driver,thelastpickle/python-driver,beobal/python-driver,bbirand/python-driver,HackerEarth/cassandra-python-driver,yi719/python-driver,HackerEarth/cassandra-python-driver,thelastpickle/python-dr...
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport numpy as np\nfrom .. import Column, Row, Table\n\n\nclass TestRow():\n\n def setup_method(self, method):\n self.a = Column('a', [1, 2, 3])\n self.b = Column('b', [4, 5, 6])\n\n def test_subclass(sel...
python
edit
1
1
bsd-3-clause
5841590444d202e6fb1fe8d7d937807ff9805677
bsipocz/astropy,lpsinger/astropy,MSeifert04/astropy,larrybradley/astropy,bsipocz/astropy,astropy/astropy,kelle/astropy,DougBurke/astropy,stargaser/astropy,dhomeier/astropy,lpsinger/astropy,pllim/astropy,dhomeier/astropy,DougBurke/astropy,lpsinger/astropy,astropy/astropy,tbabej/astropy,joergdietrich/astropy,funbaker/ast...
astropy/table/tests/test_row.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\nimport logging\n\nlogger = logging.getLogger(__name__)\n\nHERE = os.path.dirname(os.path.realpath(__file__))\n\ngroups = json.load(\n open(\n os.path.join(HERE, 'defaults.json')\n )\n)\nfp = None\ntry:\n...
python
edit
1
1
apache-2.0
c0f37084b587e142aaadfa2c803d40bb9c4e55fe
kch8qx/osf.io,wearpants/osf.io,pattisdr/osf.io,cwisecarver/osf.io,billyhunt/osf.io,crcresearch/osf.io,baylee-d/osf.io,mfraezz/osf.io,DanielSBrown/osf.io,cwisecarver/osf.io,TomHeatwole/osf.io,sloria/osf.io,cwisecarver/osf.io,brianjgeiger/osf.io,samanehsan/osf.io,asanfilippo7/osf.io,felliott/osf.io,jnayak1/osf.io,brandon...
website/project/metadata/authorizers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The client of DDuplicated tool.\nfrom os import path as opath, getcwd\nfrom pprint import pprint\nfrom sys import argv\nfrom dduplicated import commands\n\ndef get_paths(params):\n\tpaths = []\n\tfor param in params:\n\t\tpath = opath.joi...
python
edit
1
7
mit
b4d9fb47e040b199f88cffb4a0b761c443f390b4
messiasthi/dduplicated-cli
dduplicated/cli.py
rejected_duplicate
Near-duplicate of sample 16752
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The client of DDuplicated tool.\nfrom os import path as opath, getcwd\nfrom pprint import pprint\nfrom sys import argv\n\nfrom dduplicated import commands\n\ndef get_paths(params):\n\tpaths = []\n\tfor param in params:\n\t\tpath = opath.j...
python
edit
1
7
mit
dbd92c4fd50f81ee23387636fddff827da8fb7f3
messiasthi/dduplicated-cli
dduplicated/cli.py
rejected_duplicate
Near-duplicate of sample 16752
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport base64\nfrom flask import request, Response\nfrom oauthlib.common import to_unicode, bytes_type\n\n\ndef extract_params():\n \"\"\"Extract request params.\"\"\"\n uri = request.url\n http_method = request....
python
edit
1
3
bsd-3-clause
265f36fb7fac426d662fbdebf29e8aad01e257d2
tonyseek/flask-oauthlib,auerj/flask-oauthlib,icook/flask-oauthlib,RealGeeks/flask-oauthlib,Fleurer/flask-oauthlib,CoreyHyllested/flask-oauthlib,huxuan/flask-oauthlib,landler/flask-oauthlib,lepture/flask-oauthlib,lepture/flask-oauthlib,tonyseek/flask-oauthlib,CommonsCloud/CommonsCloud-FlaskOAuthlib,brightforme/flask-oau...
flask_oauthlib/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import layers\nfrom . import utils\nfrom . import nputils\nfrom . import tbutils\nfrom . import distributions\nfrom .utils import FileWriter\nfrom .tbutils import function\n\n```\n\nApply this change: Add nbutils import to base impor...
python
edit
10
0
mit
83c5cc34539f68360cbab585af9465e95f3ec592
RuiShu/tensorbayes
tensorbayes/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nInterface to Redis-storage.\n\n@author: Seva Zhidkov\n@contact: <EMAIL>\n@license: The MIT license\n\nCopyright (C) 2015\n\"\"\"\nfrom .utils import logger\n\n# We will catch all import exceptions in bot.p...
python
edit
1
2
mit
3fe8498b8599238fd18b8f96edff438e1f569f48
lises/sheldon
sheldon/storage.py
rejected_duplicate
Near-duplicate of sample 17416
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nBinary memcached test client.\n\nCopyright (c) 2007 Dustin Sallings <<EMAIL>>\n\"\"\"\n\nimport sys\nimport socket\nimport random\nimport struct\n\nfrom testServer import REQ_MAGIC_BYTE, PKT_FMT, MIN_RECV_PAC...
python
edit
5
0
mit
44e50483a4ba9a4c47ee092d8d807930340c4e8e
dustin/memcached-test
testClient.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# References:\n# http://docs.python.org/3.3/library/argparse.html?highlight=argparse#argparse\n# http://bip.weizmann.ac.il/course/python/PyMOTW/PyMOTW/docs/argparse/index.html\n\nimport argparse\n\ndef main():\n ...
python
edit
1
1
mit
e5812200c68a720345310e9a14ffa2a1a8f849e0
beepscore/argparse
arg-reader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef _dynamic_wrap(items, limit):\n scores, trace = [0], []\n for j in range(len(items)):\n best, psum, index = 0, limit, -1\n for i in reversed(range(j + 1)):\n psum -= items[i]\n score = scores[i] ...
python
edit
1
6
mit
7b108ec9392c70113a5f5bf04e104de1fe123815
fbergroth/autosort
autosort/wrapping.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport urlparse\nfrom flask import Flask, make_response\nfrom flask.ext.restful import Api\nfrom flask_peewee.db import Database\n\nimport redis\nfrom redash import settings, utils\n\n__version__ = '0.3.2'\n\napp = Flask(__name...
python
edit
3
2
bsd-2-clause
0a522863dce6e42bf66c66a56078c00901c64f52
denisov-vlad/redash,EverlyWell/redash,44px/redash,rockwotj/redash,M32Media/redash,guaguadev/redash,stefanseifert/redash,hudl/redash,easytaxibr/redash,denisov-vlad/redash,ninneko/redash,jmvasquez/redashtest,crowdworks/redash,easytaxibr/redash,getredash/redash,pubnative/redash,rockwotj/redash,crowdworks/redash,stefanseif...
redash/__init__.py
rejected_duplicate
Near-duplicate of sample 13408
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.db import models\nimport requests\n\nfrom Suchary.settings import GCM_API_KEY\n\n\nclass Device(models.Model):\n registration_id = models.TextField()\n android_id = models.TextField(unique=True)\n alias =...
python
edit
1
2
mit
a0db97549a64595cb30554ccb583f928f4ad430d
jchmura/suchary-django,jchmura/suchary-django,jchmura/suchary-django
api/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pandas as pd\nimport numpy.testing as npt\n\nfrom gypsy import DATA_DIR\nfrom gypsy.data_prep import prep_standtable\n\n\ndef test_prep_standtable():\n data_file_name = 'raw_standtable.csv'\n plot_data = pd.read_csv(...
python
edit
1
1
mit
c480ed20fd5b7c5d53b4f0112feed801cd99ef9c
tesera/pygypsy,tesera/pygypsy
tests/test_data_prep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import IntegrityError\nfrom django.test import TestCase\n\nfrom app.accounts.models import UserProfile\n\n\nclass UserProfileTest(TestCase):\n \"\"\"Test UserProfile model\"\"\"...
python
edit
1
1
mit
39c4d50b08f92a5d76ac5864e13a3427e7dfd86a
teamtaverna/core
app/accounts/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom django.shortcuts import render\nfrom apps.splash.models import SplashEvent, SplashYear\n\n\ndef index(request):\n # I'm really sorry ...\n splash_year = SplashYear.objects.get(start_date__gt=str(datetime.date.tod...
python
edit
3
4
mit
3c4f7906f98e6dfb9afe6993bee993ed05b969f3
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
apps/splash/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport inspect\n\n# Flask\nDEBUG = True\n\n# Amazon S3 Settings\nAWS_KEY = ''\nAWS_SECRET_KEY = ''\nAWS_BUCKET = 'www.vpr.net'\nAWS_DIRECTORY = 'sandbox/app/'\n\nSOUNDCLOUD_API = {\n\t\"client_id\": \"\",\n\t\"client_secret\": \"...
python
edit
1
0
apache-2.0
f1b1542b28b83f7adabbadc7e2932ed8b42aa8c3
vprnet/EOTS-iframe-widget,vprnet/EOTS-iframe-widget,vprnet/EOTS-iframe-widget
main/_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .cdefs import MIN_TX_SIZE, MAX_TXOUT_PUBKEY_SCRIPT\nfrom .mininode import CTransaction, FromHex, ToHex, CTxOut\nfrom .script import OP_RETURN, CScript\n\nimport random\nfrom binascii import hexlify, unhexlify\n\n# Pad outputs until it ...
python
edit
4
4
mit
e0797f6dbefea651420f474940963b470a0931fd
Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,cculianu/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,ftrader-bitcoinabc/bitcoin-abc,Bitcoin-ABC/bitcoin-abc...
test/functional/test_framework/txtools.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom ...tokens import Doc\nfrom ...vocab import Vocab\n\n\ndef test_issue600():\n doc = Doc(Vocab(tag_map={'NN': {'pos': 'NOUN'}}), words=['hello'])\n doc[0].tag_ = u'NN'\n\n```\n\nApply this c...
python
edit
3
1
mit
bdcecb3c96cef5b663b1ada22efa952b0882f1f0
Gregory-Howard/spaCy,spacy-io/spaCy,raphael0202/spaCy,explosion/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,banglakit/spaCy,banglakit/spaCy,raphael0202/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,oroszgy/spaCy.hu,recognai/sp...
spacy/tests/regression/test_issue600.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\n\n__version__ = '0.6.0'\n\nFRAMEWORK_NAME = 'RAPyDo'\n# PROJECT_YAML_SPECSDIR = 'specs'\nCOMPOSE_ENVIRONMENT_FILE = '.env'\nSUBMODULES_DIR = 'submodules'\nPLACEHOLDER = '#@$%-REPLACE-#@%$-ME-#@$%'\n\n#...
python
edit
1
0
mit
1f3183acbe50df32d76d1cc0cb71b4cd9afdaa79
rapydo/do
controller/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\n\n\nclass DataStore(object):\n def __init__(self, storagePath=\"desertbot_data.json\"):\n self.storagePath = storagePath\n self.data = None\n self.load()\n\n def load(self):\n if not...
python
edit
1
2
mit
f17310e0fcf5d7ea7ceab2b9243f106eb1222b69
DesertBot/DesertBot
desertbot/datastore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport unittest\n\nfrom tailorscad.arg_parser import parse_args\n\n\nclass TestArgParser(unittest.TestCase):\n\n def test_parse_args_none(self):\n\n args = []\n argv = []\n\n args = parse_args(argv)\n\n self...
python
edit
1
1
mit
ff13cc4b7ef29c4454abb41b8e9a525d12c9ff7d
savorywatt/tailorSCAD
tailorscad/tests/test_arg_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update the version to 1.4.0 for the latest release" }, { "role": "assistant", "content": "version_info = (1, 4, 0)\nversion = '.'.join(map(str, version_info))\n" } ]
python
new_file
1
0
apache-2.0
837df000bc86d6bd9c0101f13e3ef18d2873750b
andreleblanc-wf/furious,andreleblanc-wf/furious,Workiva/furious,mattsanders-wf/furious,mattsanders-wf/furious,beaulyddon-wf/furious,beaulyddon-wf/furious,Workiva/furious
furious/_pkg_meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport requests\n\nfrom scrapi import settings\nfrom scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS\nfrom scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS\n\n\ndef detect_co...
python
edit
1
3
apache-2.0
fb87194d6409149e71d6ee52c620fe04f8ca482f
felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,mehanig/scrapi,ostwald/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,felliott/scrapi,fabianvf/scrapi
scrapi/processing/osf/collision.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) Facebook, Inc. and its affiliates.\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# ...
python
edit
1
3
apache-2.0
4ef159ae6d45bc546f1c84b57416fc2b87eecc33
facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift
thrift/test/py/adapter_for_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom django.utils.timezone import utc\n\nimport factory\nfrom factory import fuzzy\n\nfrom remo.profiles.tests import UserFactory\nfrom remo.remozilla.models import Bug\nfrom remo.remozilla.tasks import COMPONENTS\n\n\nCHAN...
python
edit
1
4
bsd-3-clause
ccbd25f196453f4c7b61fa4e69d192d7b96595e2
tsmrachel/remo,johngian/remo,mozilla/remo,tsmrachel/remo,flamingspaz/remo,abdullah2891/remo,johngian/remo,chirilo/remo,akatsoulas/remo,flamingspaz/remo,Mte90/remo,mozilla/remo,tsmrachel/remo,Mte90/remo,johngian/remo,chirilo/remo,abdullah2891/remo,johngian/remo,akatsoulas/remo,mozilla/remo,abdullah2891/remo,abdullah2891...
remo/remozilla/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\nimport view_collection\n\nclass GitGutterEvents(sublime_plugin.EventListener):\n def on_new(self, view):\n view_collection.ViewCollection.add(view)\n\n def on_load(self, view):\n view_collectio...
python
edit
3
2
mit
8a9a2a860772ec71c517c4ae4dd93aa4ab2ea342
michaelhogg/GitGutter,akpersad/GitGutter,bradsokol/VcsGutter,biodamasceno/GitGutter,robfrawley/sublime-git-gutter,natecavanaugh/GitGutter,natecavanaugh/GitGutter,biodamasceno/GitGutter,michaelhogg/GitGutter,robfrawley/sublime-git-gutter,tushortz/GitGutter,akpersad/GitGutter,ariofrio/VcsGutter,tushortz/GitGutter,natecav...
git_gutter_events.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# OpenMV Unit Tests.\n#\nimport os, sensor, gc\n\nTEST_DIR = \"unittest\"\nTEMP_DIR = \"unittest/temp\"\nDATA_DIR = \"unittest/data\"\nSCRIPT_DIR = \"unittest/script\"\n\nif not (TEST_DIR in os.listdir(\"\")):\n raise Exception...
python
edit
5
2
mit
ef38b68aa288bb43bc33a860ac995836f892854e
kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv
usr/examples/99-Tests/unittests.py
rejected_lint
Too many lint violations: 5
true