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\n\"\"\"Use proper type and FK for booked_for_id\n\nRevision ID: 3b997c7a4f0c\nRevises: 2b4b4bce2165\nCreate Date: 2015-05-06 14:04:14.590496\n\"\"\"\n\nimport sqlalchemy as sa\nfrom alembic import op\n\n\n# revision identifiers, used by Alem...
python
edit
1
1
mit
8006e448aae885c9eb9255dec01bb11cb5c19f5c
ThiefMaster/indico,ThiefMaster/indico,ThiefMaster/indico,indico/indico,mvidalgarcia/indico,OmeGak/indico,DirkHoffmann/indico,mic4ael/indico,mvidalgarcia/indico,DirkHoffmann/indico,DirkHoffmann/indico,OmeGak/indico,OmeGak/indico,indico/indico,mic4ael/indico,pferreir/indico,mvidalgarcia/indico,DirkHoffmann/indico,pferrei...
migrations/versions/201505061404_3b997c7a4f0c_use_proper_type_and_fk_for_booked_for_id.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom .models import Message\nfrom .serializers import MessageSerializer\nfrom .permissions import IsOwnerOrReadOnly\nfrom rest_framework import generics, permissions\nfrom rest_framework.permissions impo...
python
edit
6
2
mit
b2803c40b2fcee7ab466c83fc95bb693a28576d0
DjangoBeer/message-board,DjangoBeer/message-board,fmarco/message-board,DjangoBeer/message-board,fmarco/message-board,fmarco/message-board
messageboard/views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib\n\n\ndef test_get_default_config(self):\n ext = Extension()\n\n config = ext.get_default_config()\n\n ass...
python
edit
null
null
apache-2.0
5cdec883de7d3fcb265776b36ba3490b88fba91b
mopidy/cookiecutter-mopidy-ext
{{cookiecutter.repo_name}}/tests/test_extension.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado.web import RequestHandler\nimport bugsnag\n\nclass BugsnagRequestHandler(RequestHandler):\n def _handle_request_exception(self, e):\n bugsnag.notify(e)\n tornado.web.RequestHandler._handle_request_exception(sel...
python
edit
1
1
mit
a3c90b08ad30ead05368bbdfe6f477ab4e5b8409
overplumbum/bugsnag-python,bugsnag/bugsnag-python,overplumbum/bugsnag-python,bugsnag/bugsnag-python
bugsnag/tornado/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\nimport datetime\nimport settings\n# Django\nfrom django import template\nfrom django.template import resolve_variable, NodeList\nfrom django.template.defaultfilters import stringfilter\nfrom django.contr...
python
edit
11
3
bsd-3-clause
f10d6e658f63cc5ce25a22a11dd532818317f11d
mfitzp/django-golifescience
apps/tagmeta/templatetags/tagmeta_tags.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom firecares.firestation.models import FireDepartment\n\n\nclass Command(BaseCommand):\n \"\"\"\n This command is used to export data that department heat maps visualize.\n \"\...
python
edit
1
2
mit
9a9ab21b66991171fc7b6288d9c734dc05d82a3d
FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,meilinger/firecares,HunterConnelly/firecares,meilinger/firecares,FireCARES/firecares,FireCARES/firecares,HunterConnelly/firecares,HunterConnelly/firecares,HunterConnelly/firecares,meilinger/firecares,meilinger/firecares
firecares/firestation/management/commands/export-building-fires.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test wsgi.\"\"\"\n\nimport threading\n\nimport pytest\nimport portend\n\nfrom cheroot import wsgi\n\n\n@pytest.fixture\ndef simple_wsgi_server():\n \"\"\"Fucking simple wsgi server fixture (duh).\"\"\"\n port = portend.find_avai...
python
edit
1
1
bsd-3-clause
aa50aa09416512003f95eefa83a805d4bb2bc96a
cherrypy/cheroot
cheroot/test/test_wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import ImageSet, Image\n\n\nclass ImageInline(admin.TabularInline):\n model = Image\n fields = [\"image\", \"preview\"]\n readonly_fields = [\"preview\"]\n\n def preview(self, obj...
python
edit
1
1
mit
7f345e78f6825c676282114029a6c230dd063bfe
arthur-wsw/pinax-images,pinax/pinax-images
pinax/images/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nEntry point for lambda\n\"\"\"\nfrom _ebcf_alexa import interaction_model, incoming_types, speechlet\nimport logging\n\nLOG = logging.getLogger()\nLOG.setLevel(logging.DEBUG)\nALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c3...
python
edit
3
2
mit
d3c39f67c49bade795ec02c9b3140f88606d9bf9
dmotles/ebcf-alexa
ebcf_alexa.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport unittest\nimport doctest\nimport sys\nfrom optparse import OptionParser\n\n# Import this now to avoid it throwing errors.\nimport pytz\n\nif __name__ == '__main__':\n suite = unittest.TestSuite()\n\n from fir...
python
edit
4
0
bsd-3-clause
5a2fcbbc12c1876ff01ad3a4a14ad2077ffedf5c
rescrv/firmant
runtests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2\nimport ConfigParser\nimport sys\nimport os\n\nfrom lala import Bot\n\ndef main():\n \"\"\"Main method\"\"\"\n config = ConfigParser.SafeConfigParser()\n configfile = os.path.join(os.getenv(\"XDG_CONFIG_HOME\"),\...
python
edit
1
5
mit
8a681285d8d6cf4aeecb484a9bc5f8cba82d2f58
mineo/lala,mineo/lala
run-lala.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nimport sys\nfrom chainer.functions import caffe\nimport cPickle as pickle\n\nimport_model = \"bvlc_googlenet.caffemodel\"\n\nprint('Loading Caffe model file %s...' % import_model...
python
edit
1
0
mit
ac3edaab39a32d4108ec04746358f833d3dee7ca
karaage0703/deeplearning-learning
convert_caffe_to_chainer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.db import models\n\n\nclass PublishedPageManager(models.Manager):\n\n return qs.filter(publish_date__lte=datetime.now())\n def get_queryset(self):\n qs = super(PublishedPageManag...
python
edit
1
1
bsd-3-clause
d488c1e021c3ce4335223a407cbd82182fd83708
pyconau2017/symposion,pydata/symposion,faulteh/symposion,pyohio/symposion,euroscipy/symposion,pinax/symposion,euroscipy/symposion,pyconau2017/symposion,toulibre/symposion,miurahr/symposion,faulteh/symposion,miurahr/symposion,pydata/symposion,pinax/symposion,pyohio/symposion,toulibre/symposion
symposion/cms/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom accounts.models import (\n RcLdapUser,\n User\n)\nimport pam\n\n\n\nclass PamBackend():\n def authenticate(self, request, username=None, password=None):\n rc_user = RcLdapUser.objects.g...
python
edit
1
3
mit
fcd15442281428c6c3edcf88ecf65dd162246070
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
rcamp/lib/pam_backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# inbuild python imports\n\n# inbuilt django imports\nfrom django.test import LiveServerTestCase\n\n# third party imports\n\n# inter-app imports\n\n# local imports\nimport mixins\nfrom mixins import SimpleTestCase\n\n\nclass MongoTestCase(m...
python
edit
1
0
mit
2636e549c969431664637907c1ac8502746e476e
hspandher/django-test-addons
test_addons/test_cases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n#\n# Copyright © 2015 The Spyder Development Team\n# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)\n#\n# Licensed under the terms of the MIT License\n\n\"\"\"\nApplication entry point.\n\"\"\"\n\n# Standard l...
python
edit
1
1
mit
8e7cabd8e3bb9e3e01f49823692c5609665cd4ad
spyder-ide/conda-manager,spyder-ide/conda-manager
conda_manager/app/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\n\nfrom bs4 import BeautifulSoup\n\n\nclass Enru:\n def __init__(self, parser):\n self.parser = parser\n\n def run(self, word, show_examples):\n # TODO: throw error if there's no word\n\n url = self....
python
edit
1
1
mit
29dbdd805eb401da5a46ff26d759f249650bedeb
everyonesdesign/enru,everyonesdesign/enru-python,everyonesdesign/enru-python,everyonesdesign/enru
src/enru.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport click\n\n\ndef test_basic_functionality(runner):\n @click.command()\n def cli():\n \"\"\"First paragraph.\n\n This is a very long second\n paragraph and not correctly\n wrapp...
python
edit
1
1
bsd-3-clause
4336a5d3eaf5500a6f3041b30c7887361dea5737
her0e1c1/click,MakerDAO/click,Akasurde/click,scalp42/click,khwilson/click,polinom/click,amjith/click,hellodk/click,jvrsantacruz/click,naoyat/click,lucius-feng/click,dastergon/click,TomRegan/click,hackebrot/click,cbandera/click,oss6/click,GeoffColburn/click,willingc/click,pallets/click,pgkelley4/click,glorizen/click,mit...
tests/test_formatting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\nfrom nose.tools import assert_equal, assert_true\nfrom ...helpers import BaseApplicationTest\n\n\nclass TestApplication(BaseApplicationTest):\n def setup(self):\n super(TestApplication, self).setup()\n\n def test_s...
python
edit
3
1
mit
9ea29573841307ffe24b597dd8d1e0b783f81a2a
alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalm...
tests/app/views/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport sh\nfrom path import path\n\nfrom tests.utils.testdriver import TestDriver\nfrom tests.utils import files\nfrom tests.utils.tempdirs import dirs\n\n\nclass Driver(TestDriver):\n SPEED_BUMP = 1\n\n def __init__(self...
python
edit
1
2
mit
cb2dec164b18dc671dabdafe221bfd6aac4fc01e
onitu/onitu,onitu/onitu,onitu/onitu
onitu/drivers/local_storage/tests/driver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport logging.handlers\n\n\n# ######### Set up logging ##########\n# log.basicConfig(format=\"%(asctime)s - %(levelname)s: %(message)s\", level=log.DEBUG)\nlogger = logging.getLogger('bb_log')\nlogger.setLevel(logging.DEBUG...
python
edit
1
0
mit
f9c178e641fa27b6c0c2bf32a969c52ba17042bf
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/bb_logging.py
rejected_duplicate
Near-duplicate of sample 5047
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom rororo import GET, static\n\n\n# Debug settings\nDEBUG = True\n\n# Explorer settings\nROOT_DIR = os.path.expanduser('~')\nSHOW_HIDDEN_ITEMS = True\n\n# List of available routes\nROUTES = ('',\n GET('/{path:path}', 'view...
python
edit
1
0
bsd-3-clause
a9e9705e6963569cb0c88135ce539320aef77ed6
playpauseandstop/rororo,playpauseandstop/rororo
examples/explorer/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\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.apache.or...
python
edit
1
1
apache-2.0
c22c7a63c85b52c4e05ac0fe6a9f05960705872b
techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse,robhudson/warehouse,techtonik/warehouse,mattrobenolt/warehouse,mattrobenolt/warehouse
tests/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Look into the ASOS database and figure out the start time of various \n# sites for a given network.\n\nimport sys\nsys.path.insert(0, '../lib')\nimport db, network\nasos = db.connect('asos')\nmesosite = db.connect('mesosite')\n\nnet = sys...
python
edit
5
0
mit
219f67e3e15c548b81211b0baff475621f66a7fa
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/dbutil/compute_asos_sts.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, os, sys\nfrom custom_test_case import CustomTestCase\n\nPROJECT_ROOT = os.path.dirname(__file__)\nsys.path.append(os.path.join(PROJECT_ROOT, \"..\"))\n\nfrom CodeConverter import CodeConverter\n\nclass TestReplaceAll(unitte...
python
edit
1
1
mit
84c4aa73e6792dad6853866c66c756073df71f27
kyamaguchi/SublimeObjC2RubyMotion,kyamaguchi/SublimeObjC2RubyMotion
tests/test_replace_all.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom csv import reader\nfrom sys import stdin\n\nfrom xmlrpc.client import ServerProxy\nfrom ssl import create_default_context, Purpose\n\n\n# Script to add user account notes to account_configurations.csv\n\nhost...
python
edit
1
0
mit
37740e4b965a59fc1508b897d791900017daae42
PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples
PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tastypie.resources import ModelResource\n\nfrom models import Station\n\n\nclass StationResource(ModelResource):\n class Meta:\n allowed_methods = ['get']\n queryset = Station.objects.all()\n resource_name = 'st...
python
edit
1
1
bsd-3-clause
a47b5506476f9d0e4dbb2eb24cd22da61f42eb65
flebel/django-bixi
bixi/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef factorial(n):\n res = 1\n for i in range(2, n+1):\n res *= i\n return res\n\ndef binomial(n,k):\n if k > n:\n return 0\n if n-k < k:\n k = n-k\n res = 1\n for i in range(1,k+1):\n res =...
python
edit
1
4
bsd-3-clause
6c999c654e1fffe067592067bd4314cff011cda5
PermutaTriangle/Permuta
permuta/math/counting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom selenium import webdriver\nfrom selenium.webdriver.remote.switch_to import SwitchTo\nfrom selenium.webdriver.remote.mobile import Mobile\nfrom selenium.webdriver.remote.errorhandler import ErrorHandler\nfrom selenium.webdriver.remote.r...
python
edit
2
4
mit
5fc0854f54f2946c2b38a8b3c03a553c8a838aed
cardforcoin/shale,mhluongo/shale,mhluongo/shale,cardforcoin/shale
shale/webdriver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nimport os\nimport setup_util\nimport time\n\ndef start(args):\n setup_util.replace_text(\"revel/src/benchmark/conf/app.conf\", \"tcp\\(.*:3306\\)\", \"tcp(\" + args.database_host + \":3306)\")\n subprocess.c...
python
edit
4
4
bsd-3-clause
023568228dc2ffcf772edb4d5335c0c755a7e37c
raziel057/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,fabianmurariu/Framework...
revel/setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport gzip\nimport StringIO\nfrom flask import request\n\n\nclass Gzip(object):\n def __init__(self, app, compress_level=6):\n self.app = app\n self.compress_level = compress_level\n self.app.after_request(self.afte...
python
edit
1
5
mit
999ff373d40dd98f3ffccb2478ac6d464e3332e3
libwilliam/flask-compress,libwilliam/flask-compress,saymedia/flask-compress,libwilliam/flask-compress,saymedia/flask-compress,wichitacode/flask-compress,wichitacode/flask-compress
flask_gzip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport gtk, gobject\nimport numpy as N\n\nclass CameraImage(gtk.Image):\n \n __gproperties__ = {\n 'data' : (gobject.TYPE_PYOBJECT,\n 'Image data',\n 'NumPy ndarray containing the data',\n gobje...
python
edit
3
4
mit
c878a67815ef47abdb0bf4203a23ac0ece4feda6
ptomato/Beams
src/CameraImage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom Chandra.Time import DateTime\nimport plot_aimpoint\n\n# Get 99th percential absolute pointing radius\n\nplot_aimpoint.opt = plot_aimpoint.get_opt()\nasols = plot_aimpoint.get_asol()\n# Last six months of data\nasols...
python
edit
1
0
bsd-2-clause
1cfd8618931da76fc83745a45206df08f058c453
sot/aimpoint_mon,sot/aimpoint_mon
pog_absolute_pointing.py
rejected_duplicate
Near-duplicate of sample 7260
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom topics.models import Issue, StoryPointer, Stream, Topic\n\nadmin.site.register(Topic)\nadmin.site.register(Issue)\nadmin.site.register(Stream)\nadmin.site.register(StoryPointer)\n\n```\n\nApply this ...
python
edit
1
0
mit
ecd0c00766304f1e5b12e6067a846033a4ee36d5
texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84
txlege84/topics/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wagtail.core import blocks\nfrom wagtail.core.blocks import RichTextBlock\nfrom wagtail.core.fields import StreamField\nfrom wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList\n\nfrom falmer.content.blocks...
python
edit
1
0
mit
4a65dacb992ef48dbbaf9ca168f0b4e5567abe90
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/content/models/selection_grid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\nfrom boto.swf.layer1 import Layer1\n\nAWS_CREDENTIALS = {\n 'aws_access_key_id': None,\n 'aws_secret_access_key': None\n}\n\n\ndef set_aws_credentials(aws_access_key_id, aws_secret_access_key):\n \"\"\"Set...
python
edit
5
2
mit
d76cbdd768964a2583cf28ab9efaf46964c815ae
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
swf/core.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\n\ndef setup(root_dir):\n import confu.git\n repo = confu.git.clone(\"https://github.com/google/benchmark.git\", root_dir)\n\n from os import path\n recipes_dir = path.dirname(path.abspath(__file__))\n\n ...
python
edit
3
2
mit
89d13cdf811d7ab499303380b549fbc4c9877076
Maratyszcza/confu,Maratyszcza/confu
confu/recipes/googlebenchmark.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# inspired from:\n# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/\n# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py\n\n__title__ = 'spacy'\n__version__ = '2.0.0a0'\n__summary__ = ...
python
edit
1
0
mit
045574a936df26798962f230568de33458495c09
aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/sp...
spacy/about.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Address review feedback: set hypothesis settings depending on env. Default to dev." }, { "role": "assistant", "content": "import os\nfrom hypothesis import settings, Verbosity\n\nsettings.register_profile(\"ci\", settings(max_exa...
python
new_file
1
0
apache-2.0
837f25cd2606da70130b21109e0c03d6055622cd
ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol
dvol_python/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom grum import app, db\nfrom grum.models import User\nfrom flask import render_template, request\n\n\n@app.route(\"/\")\ndef main():\n # # Login verification code\n # username = request.form('username')\n # password = request.for...
python
edit
1
3
mit
4f1bbe6435f2c899915ab72d990a649d4e494553
Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web
grum/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom .models import Category, Link\n\nclass CategoryModelTests(TestCase):\n\n def test_category_sort(self):\n Category(title='Test 2', slug='test2').save()\n Category(title='Test 1', slug...
python
edit
1
1
mit
abb1d2db9052391c78fb09952b58a5331046aae5
michaelmior/pylinks,michaelmior/pylinks,michaelmior/pylinks
pylinks/links/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom accelerator.tests.factories import (\n JudgingFormFactory,\n JudgingFormElementFactory,\n JudgingRoundFactory,\n)\nfrom accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION\n\nclass JudgingRoundContext:\n def...
python
edit
1
3
mit
54a1f1774517faf377ae43f1bad4a4f5c0b0c562
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/tests/contexts/judging_round_context.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.contrib import admin\n\nfrom knowledge.models import Question, Response, Category\nfrom portalpractices.models import Company, Author\n\n\nclass CategoryAdmin(admin.ModelAdmin):\n list_display = [f.name for f in Category._m...
python
edit
1
0
isc
dfeccf96499584d6b19c0734e6041e0d4b5947a1
CantemoInternal/django-knowledge,CantemoInternal/django-knowledge,CantemoInternal/django-knowledge
knowledge/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport github\n\nclass TestGithub(unittest.TestCase):\n\n def setUp(self):\n\n pass\n\n\n def test_user(self):\n\n u = github.user()\n u1 = github.user()\n\n self.assertTrue(u)\n # m...
python
edit
1
1
mit
4e3773d96a47b88529a01fa4c4a0f25bf1b77b1c
jonmorehouse/vimhub
lib/github_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.shop.storefront.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom ....database import db\nfrom ....util.ins...
python
edit
1
1
bsd-3-clause
40c9c762ce65e0e231a14745cdc274be6c927a74
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/services/shop/storefront/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom app_data import AppDataField\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.encoding import python_2_unicode_compatible\n\n\n@python_2_unicode_compatib...
python
edit
1
2
bsd-3-clause
a8bbe98f07e00cc6a9e9d076c6ed39c5d3136658
aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config
aldryn_apphooks_config/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom rest_framework.authtoken.models import Token\n\n\nclass UserTest(TestCase):\n def setUp(self):\n ...
python
edit
1
1
bsd-3-clause
2f280e34762ad4910ff9e5041c2bf24f8283368c
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
src-backend/registration/tests/test_user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass TestInfo(object):\n \"\"\"Read test information from JSON data.\"\"\"\n PATH_API = 'api'\n\n PATH_API_URL = 'url'\n PATH_API_PARAMS = 'params'\n PATH_API_TIMEOUT = 'timeout'\n\n PATH_TESTS = 'tests'\n\n DEFAULT_TI...
python
edit
1
1
mit
76282391f35725ee42ac0671a9a77b68e1f34081
ridibooks/lightweight-rest-tester,ridibooks/lightweight-rest-tester
rest_tester/test_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\ndef retrieve_json(url):\n r = requests.get(url)\n r.raise_for_status()\n return r.json()\n\n```\n\nApply this change: Add a default timeout parameter to retrieve_json" }, { "role": "assistant", "conte...
python
edit
1
1
bsd-3-clause
15efe5ecd3f17ec05f3dc9054cd823812c4b3743
tebriel/dd-agent,jyogi/purvar-agent,pmav99/praktoras,gphat/dd-agent,manolama/dd-agent,pmav99/praktoras,gphat/dd-agent,Wattpad/dd-agent,brettlangdon/dd-agent,cberry777/dd-agent,pmav99/praktoras,brettlangdon/dd-agent,tebriel/dd-agent,tebriel/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,manolama/dd-agen...
utils/http.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage,\n HeartBeatPublisher)\n\n__all__ = [\"HeartBeatMessage\", \"HeartBeatPublisher\"]\n\n```\n\nApply this change: Add mo...
python
edit
1
0
bsd-3-clause
fecb9624379057a98aeaf2bb5cf42d7e526bbf0a
vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,TouK/vumi
vumi/blinkenlights/heartbeat/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom seleniumbase import BaseCase\n\n\nclass MyTestSuite(BaseCase):\n\n def test_1(self):\n self.open(\"http://xkcd.com/1663/\")\n for p in xrange(4):\n self.click('a[rel=\"next\"]')\n self.find_text(\"Alg...
python
edit
2
2
mit
09506e7ae8dbc1ad06b35c075e15946dd2c6092b
possoumous/Watchers,mdmintz/SeleniumBase,possoumous/Watchers,seleniumbase/SeleniumBase,mdmintz/seleniumspot,ktp420/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,ktp420/SeleniumBase,ktp420/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/Sele...
examples/my_test_suite.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Submit\nfrom django import forms\n\nfrom .models import Scrap\n\n\nclass ScrapForm(forms.ModelForm):\n\n class Meta:\n model = Scrap\n fields = ['r...
python
edit
1
1
mit
5aca109f486786266164f4ac7a10e4d76f0730e4
tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app
scrappyr/scraps/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\nimport numpy as np\n\nfrom vispy.visuals.line.arrow import ARROW_TYPES\nfrom vispy.scene im...
python
edit
4
2
bsd-3-clause
fe89b50d87c37c83170de74e5f88f59d88ba2c89
michaelaye/vispy,ghisvail/vispy,QuLogic/vispy,jdreaver/vispy,Eric89GXL/vispy,srinathv/vispy,dchilds7/Deysha-Star-Formation,jay3sh/vispy,sbtlaarzc/vispy,jay3sh/vispy,julienr/vispy,sbtlaarzc/vispy,michaelaye/vispy,jay3sh/vispy,bollu/vispy,drufat/vispy,RebeccaWPerry/vispy,julienr/vispy,Eric89GXL/vispy,bollu/vispy,jdreaver...
vispy/visuals/tests/test_arrows.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n# abstract models with common fields to be\n# used as mix-ins\n\nclass Named(models.Model):\n '''Abstract model with a 'name' field; by default, name is used as\n the string display.'''\n name = mode...
python
edit
1
6
apache-2.0
62a6b78b62631c0b1de7d0497250aa3d0310d47d
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
winthrop/common/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContains generic helper funcitons to aid in parsing.\n\"\"\"\n\nimport itertools\n\n\ndef take_while(predicate, items):\n return list(itertools.takewhile(predicate, items))\n\n\ndef drop_while(predicate, items):\n return list(...
python
edit
1
3
mit
fbf2a59d9cf25c3d3a041afa839d0d44f6f385a5
CovenantEyes/py_win_unc,nithinphilips/py_win_unc
win_unc/internal/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom leaflet.admin import LeafletGeoAdmin\nfrom django.contrib import admin\nfrom import_export import resources\nfrom import_export.admin import ImportExportModelAdmin\n\n# Register your models here.\nfrom .models import Author, Book, Book...
python
edit
1
0
mit
a75ca43b3035f3f391b39393802ea46d440b22c5
edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage
bookvoyage-backend/core/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nfrom atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco\nfrom fase import Fase\nfrom placa_grafica_tkinter import rodar_fase\n\nif __name__=='__main__':\n f...
python
edit
1
0
mit
fbe4761d2d679a983d2625c4969dab53500634b7
guoliveer/pythonbirds,deniscampos/pythonbirds,renzon/pythonbirds-fatec,giovaneliberato/python_birds_fp,pythonprobr/pythonbirds,jvitorlb/pythonbirds,evertongoncalves/pythonbirds,renzon/python-birds-t5,Cleitoon1/pythonbirds,gomesfelipe/pythonbirds,igorlimasan/pythonbirds
fases/rodar_fase_exemplo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.views.generic import ListView, UpdateView\n\nfrom .forms import ProfileForm\nfrom .models import UserProfile\n\n\nclass ProfilesList(ListView):\n context_object_name = \"profiles\"...
python
edit
1
1
mit
a8b0a1f20264506beec9ffc1299b82277a339556
chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org
chipy_org/apps/profiles/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nDeclaration of classes needed for bot working:\nAdapter class, Plugin class\n\n@author: Lises team\n@contact: <EMAIL>\n@license: The MIT license\n\nCopyright (C) 2015\n\"\"\"\n\nfrom time import sleep\n\n\...
python
edit
1
3
mit
a0df14a38bcc4f71cf073298e078160488b143ca
lises/sheldon
sheldon/basic_classes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom pygments.lexer import RegexLexer, include\nfrom pygments.token import *\n\nclass HackAsmLexer(RegexLexer):\n name = 'Hack Assembler'\n aliases = ['hack_asm']\n filenames = ['*.asm']\n\n identifier = r'[a-zA-Z$._?...
python
edit
17
0
mit
07ccbc36fd5148db2efc5f676fd13d4b24aa004f
cprieto/pygments_hack_asm
hackasmlexer/hacklexer.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ndef _is_requirement(line):\n \"\"\"Returns whether the line is a valid package requirement.\"\"\"\n line = line.strip()\n return line and not (line.startswith(\"-r\") or line.startsw...
python
edit
1
3
bsd-3-clause
3e1f8a567e9d7fa7bb7ac5acf8fe336b88faeeaa
rapidpro/flows
expressions/python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2014, Matt Layman\n\nimport textile\n\nfrom handroll import logger\nfrom handroll.composers import GenericHTMLComposer\n\n\nclass TextileComposer(GenericHTMLComposer):\n \"\"\"Compose HTML from Textile files (``.textile``...
python
edit
1
2
bsd-2-clause
6b07710ae8c7681f58060c15c74bf5bd3dda4f3b
handroll/handroll
handroll/composers/txt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom dataset import DatasetItem\n\nclass DatasetSpider(CrawlSpider):\n\n name =...
python
edit
1
1
mit
20224987f7c1ac34b13587a6dc7c1241e0466663
MaxLikelihood/CODE
dataset/dataset/spiders/dataset_spider.py
rejected_duplicate
Near-duplicate of sample 2461
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport subprocess\nimport time\nimport socket\n\ndef main():\n if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']):\n return 0\n\n subprocess.Popen('/home/meru/bmistree/n...
python
edit
3
2
bsd-3-clause
776814f7c5ef5b54167adbe3cce29b8e8381fd69
sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata
scripts/cluster/craq/start_craq_server.py
accepted
null
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\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast...
python
edit
1
0
bsd-3-clause
ff89cb8216168beb9c79028080fbccbe91c13000
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.chromium.infra/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass GrowingGraph:\n def __init__(self, neighbors_table, start_nodes):\n self.neighbors_table = neighbors_table\n self.outer_nodes = set(start_nodes)\n self.inner_nodes = set()\n\n def growing(self):\n for...
python
edit
1
4
mit
8f6a19bade1a0591f3feba4521fdf42c157c179d
shadow3x3x3/renew-skyline-path-query
skyline_path/algorithms/growing_graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport importlib\nimport logging\nimport os\n\nlogger = logging.getLogger(__name__)\n\ndescription = \"An automated grading tool for programming assignments.\"\n\nsubcommands = {\n \"init\": \"grader.init\",\n \"new\"...
python
edit
1
2
mit
e3804c302df761a4ebf7f2c7ed3e3c0bc8d079e7
redkyn/grader,grade-it/grader,redkyn/grader
grader/grader/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 Cisco Systems, 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...
python
edit
1
0
apache-2.0
40af3e546a9024f7bb7786828d22534f8dff103a
openstack/neutron-fwaas,openstack/neutron-fwaas
neutron_fwaas/common/fwaas_constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nHarvester for the DataCite MDS for the SHARE project\n\nExample API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc\n'''\nfrom __future__ import unicode_literals\n\nfrom scrapi.base import OAIHarvester\nfrom sc...
python
edit
1
3
apache-2.0
6bef0dc50470bc71c15e0fb7c86f03e69c416e67
CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,ostwald/scrapi,erinspace/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,erinspace/scrapi,alexgarciac/scrapi,felliott/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi
scrapi/harvesters/datacite.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nimport collections\nimport random\n\nimport sys\n\n\ndef reconstruct(f_in, f_out):\n sentence_starts = []\n\n contexts = {}\n\n for line in f_in:\n parts = line.split()\n wor...
python
edit
1
8
apache-2.0
18332cdac7c7dcb2ef64e3a9ad17b8b229387af8
psmit/kaldi-recipes,phsmit/kaldi-recipes,psmit/kaldi-recipes,psmit/kaldi-recipes,phsmit/kaldi-recipes
spraakbanken/s5/spr_local/reconstruct_corpus.py
rejected_duplicate
Near-duplicate of sample 10841
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tsserver import db\nfrom tsserver.dtutils import datetime_to_str\n\n\nclass Telemetry(db.Model):\n \"\"\"\n All the data that is going to be obtained in regular time intervals\n (every second or so).\n \"\"\"\n\n timesta...
python
edit
1
1
mit
5055e01bb7ea340ef96204a360002907c43fac91
m4tx/techswarm-server
tsserver/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.urlresolvers import reverse\nfrom django.views.generic import TemplateView\nfrom django.utils.translation import ugettext as _\nfrom django.contrib.syndication.views ...
python
edit
4
1
apache-2.0
9f42cd231375475d27c6fe298ec862065c34f8ca
armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections
armstrong/core/arm_sections/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport time\nimport asyncio\nimport logging\n\ndef pg_lsn_to_int(pos):\n # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html\n # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html\n...
python
edit
3
2
mit
5b6f4f51eb761b87881d99148e7dae013af09eb6
jinty/zgres,jinty/zgres
zgres/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef k_to_c(temp):\n\treturn temp - 273.15\n\ndef f_to_k(temp):\n\treturn ((temp - 32) * (5 / 9)) + 273.15\n\n```\n\nApply this change: Write a function covert far to cesis" }, { "role": "assistant", "content": "def k_to_c(temp):...
python
edit
1
1
mit
29c5391078aaa9e3c18356a18ca1c5d6f3bf82e9
xykang/2015-05-12-BUSM-git,xykang/2015-05-12-BUSM-git
src/temp_functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Main initialisation for extension.\"\"\"\n\nVERSION = (0, 4, 1)\n__version__ = '.'.join(map(str, VERSION))\n\n\ntry:\n from geokey.extensions.base import register\n\n register(\n 'geokey_dataimports',\n 'Data Impor...
python
edit
1
0
mit
1301f5c5d5b9087ec32e3cf78f93ab9a4e708426
ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports
geokey_dataimports/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom core import hacks\n\nclass TestHacks(TestCase):\n fixtures = ['eric.json', 'test_data.json']\n\n def setUp(self):\n hacks.patch_meta_path()\n\n def tearDown(self):\n hacks.unpatc...
python
edit
1
1
mit
f284a1487551850c23d251a1d501e88025261369
atsuyim/readthedocs.org,Tazer/readthedocs.org,espdev/readthedocs.org,VishvajitP/readthedocs.org,kdkeyser/readthedocs.org,nyergler/pythonslides,kenshinthebattosai/readthedocs.org,clarkperkins/readthedocs.org,VishvajitP/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,mrshoki/readthedocs.org,asampat3090/readthed...
readthedocs/rtd_tests/tests/test_hacks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Helper functions for determining file paths for uploads.\"\"\"\n\nfrom os.path import join\nfrom datetime import datetime\nfrom pytz import timezone\n\n# This is duplicated here to avoid circular dependency with settings file\nTIME_ZO...
python
edit
1
1
mit
475d39b9af464649dbab27349180b286f0042fa8
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/utils/get_upload_filepath.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chainer.training.triggers import interval_trigger # NOQA\nfrom chainer.training.triggers import minmax_value_trigger # NOQA\n\n\n# import class and function\nfrom chainer.training.triggers.interval_trigger import IntervalTrigger # N...
python
edit
1
0
mit
dddf89e519e40ce118509dcb5823ad932fea88f8
niboshi/chainer,wkentaro/chainer,ktnyt/chainer,keisuke-umezawa/chainer,jnishi/chainer,hvy/chainer,chainer/chainer,niboshi/chainer,wkentaro/chainer,hvy/chainer,okuta/chainer,anaruse/chainer,keisuke-umezawa/chainer,tkerola/chainer,keisuke-umezawa/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,keisuke-umezawa/chaine...
chainer/training/triggers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom poliastro.twobody.mean_elements import get_mean_elements\n\ndef test_get_mean_elements_raises_error_if_invalid_body():\n body = \"Sun\"\n\n with pytest.raises(ValueError) as excinfo:\n get_mean_elements(body...
python
edit
1
1
mit
34fe6e4f499385cc437a720db0f54db0f0ba07d2
poliastro/poliastro
tests/tests_twobody/test_mean_elements.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test running `bokeh` with no subcommand" }, { "role": "assistant", "content": "import pytest\n\nfrom bokeh.command.bootstrap import main\n\ndef test_no_subcommand(capsys):\n with pytest.raises(SystemExit):\n main([\"bok...
python
new_file
1
1
bsd-3-clause
02420b89671cf7a90c357efe24997d3142353a18
dennisobrien/bokeh,clairetang6/bokeh,azjps/bokeh,KasperPRasmussen/bokeh,msarahan/bokeh,draperjames/bokeh,stonebig/bokeh,phobson/bokeh,dennisobrien/bokeh,ptitjano/bokeh,draperjames/bokeh,KasperPRasmussen/bokeh,ptitjano/bokeh,Karel-van-de-Plassche/bokeh,percyfal/bokeh,Karel-van-de-Plassche/bokeh,schoolie/bokeh,percyfal/b...
bokeh/command/tests/test_bootstrap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2017-07-26 20:29\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom oauth2_provider.models import Application\n\n\nclass Migration(migrations.Migration...
python
edit
1
1
bsd-3-clause
d128b13e9c05516dcba587c684ef2f54884d6bb6
hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2
api/migrations/0001_create_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n# from django.conf import settings\n\n# Create your models here.\n\n\nclass ImagerProfile(models.Model):\n\n profile_picture = models.ImageField()\n # user = models.OneToOneField(settings.AUTH_USER_MODEL)...
python
edit
1
0
mit
5dacf6d2e2e74b783e39641674fc0f8e718618b3
nbeck90/django-imager,nbeck90/django-imager
imager/ImagerProfile/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import path\n\nimport linkedin_scraper\n\n\nclass BaseParser:\n @staticmethod\n def get_data_dir():\n return path.abspath(path.join(linkedin_scraper.__file__,\n '../..', 'data'))\n\n @stati...
python
edit
3
2
mit
60d6f3ea5495503584220c60353df833304aff53
nihn/linkedin-scraper,nihn/linkedin-scraper
linkedin_scraper/parsers/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The MIT License\n#\n# Copyright (c) 2008 Bob Farrell\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software ...
python
edit
1
1
mit
6469a486847823d36a8e804755c6165d0f2fd670
5monkeys/bpython
bpython/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.db import models\n\n\nclass ModelCaching(models.Model):\n pass\n\n```\n\nApply this change: Create MetaCaching, ModelBase for core cache" }, { "role": "assistant", "...
python
edit
3
1
mit
1f03af4a3ceda754dc0196c49f295fc683bd6e5a
YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps
opps/core/cache/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\nfrom corehq.sql_db.operations import RawSQLMigration\n\n\ndef get_view_migrations():\n sql_views = [\n 'awc_location_months.sql',\n 'agg_awc...
python
edit
1
2
bsd-3-clause
464fc1e9a905df25b12975422d5b48cf8286306c
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/icds_reports/utils/migrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cutplanner\nimport unittest\n\nclass TestPlanner(unittest.TestCase):\n\n def setUp(self):\n sizes = [50, 80, 120]\n needed = [10, 25, 75]\n loss = 0.25\n self.planner = cutplanner.Planner(sizes, needed,...
python
edit
1
1
mit
8b6d10e8339510bbc745a3167fd1d5a60422b370
alanc10n/py-cutplanner
tests/test_planner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.4 on 2017-08-24 02:39\n\nfrom django.db import migrations\nfrom django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor\nfrom django.db.migrations.state import StateApps\...
python
edit
4
3
apache-2.0
88245d2cd66c75e1096eec53882a2750826f03be
hackerkid/zulip,dhcrzf/zulip,tommyip/zulip,jackrzhang/zulip,kou/zulip,brockwhittaker/zulip,hackerkid/zulip,brainwane/zulip,andersk/zulip,mahim97/zulip,brainwane/zulip,punchagan/zulip,rht/zulip,timabbott/zulip,mahim97/zulip,punchagan/zulip,synicalsyntax/zulip,brainwane/zulip,synicalsyntax/zulip,brockwhittaker/zulip,rht/...
zerver/migrations/0108_fix_default_string_id.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\"\"\"\nCore Tinman imports\n\"\"\"\n__author__ = 'Gavin M. Roy'\n__email__ = '<<EMAIL>>'\n__since__ = '2011-03-14'\n__version__ = \"0.2.5\n\n__all__ = ['tinman.application',\n 'tinman.cache',\n 't...
python
edit
7
1
bsd-3-clause
7e97ddd43b8b388091e62f29d8a31875d8637d71
lucius-feng/tinman,gmr/tinman,lucius-feng/tinman,gmr/tinman,lucius-feng/tinman
tinman/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom nflpool.data.dbsession import DbSessionFactory\nfrom nflpool.data.activeplayers import ActiveNFLPlayers\nimport nflpool.data.secret as secret\nfrom requests.auth import HTTPBasicAuth\nfrom nflpool.data.seasoninfo impor...
python
edit
1
3
mit
2dda63a9a71764c5f4b5e6d15372dd2eb296ef4b
prcutler/nflpool,prcutler/nflpool
nflpool/services/activeplayers_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n...
python
edit
1
1
mit
4c50bcf29dc397405b21322c6115a00c1df56559
indico/indico,ThiefMaster/indico,ThiefMaster/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,indico/indico,DirkHoffmann/indico,DirkHoffmann/indico,OmeGak/indico,mvidalgarcia/indico,indico/indico,OmeGak/indico,pferreir/indico,mic4ael/indico,mic4ael/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,OmeGak/...
indico/modules/events/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ngithub3\n=======\n\nSee http://github3py.rtfd.org/ for documentation.\n\n:copyright: (c) 2012 by Ian Cordasco\n:license: Modified BSD, see LICENSE for more details\n\n\"\"\"\n\n__title__ = 'github3'\n__author__ = 'Ian Cordasco'\n__l...
python
edit
31
0
bsd-3-clause
7a1056e7c929b07220fdefb45e282104ee192836
wbrefvem/github3.py,itsmemattchung/github3.py,christophelec/github3.py,sigmavirus24/github3.py,icio/github3.py,h4ck3rm1k3/github3.py,krxsky/github3.py,jim-minter/github3.py,ueg1990/github3.py,agamdua/github3.py,degustaf/github3.py,balloob/github3.py
github3/__init__.py
rejected_lint
Too many lint violations: 31
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 <<EMAIL>>\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# http://www.apache.o...
python
edit
1
2
apache-2.0
1b68bd3c5cb81f06ccc4dcf69baeafca1104ed37
thenakliman/nirikshak,thenakliman/nirikshak
nirikshak/workers/files/ini.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.ext import db\n\nclass Recipe(db.Model):\n title = db.StringProperty(required=True)\n text = db.TextProperty()\n ingredients = db.TextProperty()\n tags = db.StringListProperty()\n photo = db.BlobProperty...
python
edit
1
1
bsd-3-clause
689980daec94683557113163d0b7384c33904bbf
stefanv/aandete,stefanv/aandete
app/aandete/model/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file...
python
edit
1
0
apache-2.0
0942ee64b3d84d5ea818a204c16b80d4120e54f2
Plexxi/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2
st2common/st2common/transport/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport molequeue\n\nclient = molequeue.Client()\nclient.connect_to_server('MoleQueue')\n\njob_request = molequeue.JobRequest()\njob_request.queue = 'salix'\njob_request.program = 'sleep (testing)'\n\nclient.submit_job_request(job_request)\n...
python
edit
1
1
bsd-3-clause
a047fe167a598adfccc70268a01829b8bcdb11e1
OpenChemistry/molequeue,OpenChemistry/molequeue,OpenChemistry/molequeue
python/test/clienttest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport graphene\n\nclass Person(graphene.Interface):\n name = graphene.String()\n age = graphene.ID()\n\nclass Patron(Person):\n id = graphene.ID()\n\nclass Query(graphene.ObjectType):\n\n patron = graphene.Field(Patron)\n\n ...
python
edit
2
1
mit
932e3d8b00768b1b3c103d3d44f714db5bb3a3e6
Globegitter/graphene,graphql-python/graphene,Globegitter/graphene,sjhewitt/graphene,graphql-python/graphene,sjhewitt/graphene
examples/field_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom pysuru.base import BaseAPI, ObjectMixin\n\n\ndef test_baseapi_headers_should_return_authorization_header():\n api = BaseAPI(None, 'TOKEN')\n assert {'Authorization': 'bearer TOKEN'} == api.headers\n\n\ndef test_b...
python
edit
1
1
mit
81b9a8179ef4db9857b4d133769c92c7b1972ee6
rcmachado/pysuru
pysuru/tests/test_base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport pyaavso\n\n\nclass VisualFormatWriter(object):\n \"\"\"\n A class responsible for writing observation data in AAVSO\n `Visual File Format`_.\n\n The API here mimics the ``csv`` m...
python
edit
1
1
mit
61ebf3fd3a80dc5573cb65c4250ede591d161b9e
zsiciarz/pyaavso
pyaavso/formats/visual.py
rejected_duplicate
Near-duplicate of sample 4661
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport subprocess\nimport time\n\ndef main():\n\tsubprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True)\n\tsubprocess.Popen('/home/meru/bmistre...
python
edit
2
1
bsd-3-clause
454e8203295c7f51e1d660adcaf3d282ded5652f
sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata
scripts/cluster/craq/start_craq_router.py
accepted
null
true