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# -*- coding: utf-8 -*-\n\nfrom haystack import indexes\n\nfrom .models import Post\n\n\nclass PostIndex(indexes.SearchIndex, indexes.Indexable):\n text = indexes.CharField(document=True, use_template=True)\n\n def get_model(self):\n ...
python
edit
1
1
bsd-2-clause
a003a7b0d52365c5f5976c7382bc1daf2f5960ac
blancltd/glitter-news
glitter_news/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name = \"cmsplugin-filer\",\n version = \"0.9.4pbs3\",\n url = 'http://g...
python
edit
1
1
bsd-3-clause
6e1d9bcfaf74b7d41b22147b9ba5e861543f6c90
pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport os.path\nimport urllib\nimport zipfile\n\nurllib.urlretrieve(\n 'http://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip',\n 'trainDevTestTrees_PTB.zip')\nzf = zipfile.ZipFile('trainDevTest...
python
edit
1
0
mit
421ce72069c269be3207fbc32022c3f4471654ba
keisuke-umezawa/chainer,cemoody/chainer,woodshop/complex-chainer,ikasumi/chainer,kiyukuta/chainer,cupy/cupy,anaruse/chainer,delta2323/chainer,t-abe/chainer,t-abe/chainer,hvy/chainer,wkentaro/chainer,ronekko/chainer,wkentaro/chainer,kuwa32/chainer,1986ks/chainer,hidenori-t/chainer,benob/chainer,cupy/cupy,chainer/chainer...
examples/sentiment/download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\nfrom setuptools import setup\n\nthis_dir = os.path.abspath(os.path.dirname(__file__))\n\nVERSIONFILE = os.path.join(this_dir, \"textx\", \"__init__.py\")\nVERSION = None...
python
edit
1
0
mit
b577abd12524979ab3cd76c39242713ff78ea011
igordejanovic/textX,igordejanovic/textX,igordejanovic/textX
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n\nclass Expr(object):\n def __init__(self, name, regex):\n self.name = name\n self.regex = regex\n\n def on_match(self, string):\n return [self.name, string]\n\n def callback(self, _, string):\n ...
python
edit
1
2
mit
0eaff91695eefcf289e31d8ca93d19ab5bbd392d
eugene-eeo/katana
katana/expr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"R markdown notebook format for Jupyter\n\nUse this module to read or write Jupyter notebooks as Rmd documents (methods 'read', 'reads', 'write', 'writes')\n\nUse the 'pre_save_hook' method (see its documentation) to automatically dump...
python
edit
12
0
mit
d05c68b110e4adf5f411816196cf1f457e51951e
mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext
nbrmd/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_, assert_almost_equal\nfrom wordfreq import tokenize, word_frequency\n\n\ndef test_tokens():\n eq_(tokenize('おはようございます', 'ja'),\n ['おはよう', 'ござい', 'ます'])\n\n\ndef test_combination():\n ohayou_freq = wor...
python
edit
1
1
mit
ee6df56514c2d592a527719b60abf42028e07420
LuminosoInsight/wordfreq
tests/test_japanese.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom discord import Message\nfrom typing import re as typing_re\nfrom MoMMI.commands import command\nfrom MoMMI.master import master\nfrom MoMMI.server import MChannel\n\n@command(\"reload\", \"reload\", roles=[\"owner\"])\nasync def reload...
python
edit
1
3
mit
b624552af638652147ca8b5e49ca109a4723dca1
PJB3005/MoMMI,PJB3005/MoMMI,PJB3005/MoMMI
MoMMI/Modules/development.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 Red Hat, 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.ap...
python
edit
1
1
apache-2.0
3d71a09837d73e2a976f1911ed072225ffc2f841
openstack/python-zaqarclient
marconiclient/auth/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Author: Dominik Gresch <<EMAIL>>\n\nimport os\n\nimport pytest\nimport tempfile\nfrom click.testing import CliRunner\n\nimport tbmodels\nfrom tbmodels._cli import cli\nfrom parameters im...
python
edit
3
1
apache-2.0
5b3d26b6c9256f869d3bc08dfa00bf9b8de58f85
Z2PackDev/TBmodels,Z2PackDev/TBmodels
tests/test_cli_parse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, Integer, String, func\nfrom app import db\n\nclass CnesBed(db.Model):\n __tablename__ = 'cnes_bed'\n year = Column(Integer, primary_key=True)\n region = Column(String(1), primary_key=T...
python
edit
1
1
mit
1704e66caa06524d9b595c312d3a5f5d93683261
DataViva/dataviva-api,daniel1409/dataviva-api
app/models/cnes_bed.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"microauth URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app i...
python
edit
1
0
mit
f4c99f4a1b3e49e0768af1b4b6444ee33bef49ac
microserv/microauth,microserv/microauth,microserv/microauth
microauth/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013-2014 Molly White\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software\n# and associated documentation files (the \"Software\"), to deal in the Software without\n# restricti...
python
edit
1
1
mit
09ef3ba394faf9edc941e30e5c3f86bffa96d645
quanticle/GorillaBot,molly/GorillaBot,quanticle/GorillaBot,molly/GorillaBot
plugins/eightball.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Main initialisation for extension.\"\"\"\n\nVERSION = (0, 2, 2)\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
2
0
mit
4bd0637ad181c5ded8c6e5fa9ae79ab607b70aeb
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\nimport unittest\nimport aiozmq\n\n\nclass ZmqTransportTests(unittest.TestCase):\n\n def test_interface(self):\n tr = aiozmq.ZmqTransport()\n self.assertRaises(NotImplementedError, tr.write, [b'data'])\n self.assertRa...
python
edit
1
1
bsd-2-clause
2f9a4029e909f71539f3b7326b867e27386c3378
MetaMemoryT/aiozmq,claws/aiozmq,asteven/aiozmq,aio-libs/aiozmq
tests/interface_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.internet import reactor, protocol\n\nfrom hubbot.moduleinterface import ModuleInterface\n\n\nclass Echo(protocol.Protocol):\n \"\"\"This is just about the simplest possible protocol\"\"\"\n\n def dataReceived(self, data):...
python
edit
1
1
mit
7016b7bb026e0fe557ca06efa81dace9999e526d
HubbeKing/Hubbot_Twisted
hubbot/Modules/Healthcheck.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom cupy import testing\n\n\n@testing.gpu\nclass TestPacking(unittest.TestCase):\n\n _multiprocess_can_split_ = True\n\n```\n\nApply this change: Add tests for packbits and unpackbits" }, { "role": "assistant"...
python
edit
1
1
mit
add508b780d16fd2da2fd0639304935b762c001f
okuta/chainer,niboshi/chainer,ktnyt/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,ysekky/chainer,pfnet/chainer,wkentaro/chainer,keisuke-umezawa/chainer,ktnyt/chainer,chainer/chainer,hvy/chainer,jnishi/chainer,anaruse/chainer,wkentaro/chainer,keisuke-umezawa/chainer,ronekko/chainer,niboshi/chainer,chainer/chainer...
tests/cupy_tests/binary_tests/test_packing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nis\n\nverbose = 0\nif __name__ == '__main__':\n verbose = 1\n\nmaps = nis.maps()\ntry:\n for nismap in maps:\n\tif verbose:\n\t print nismap\n\tmapping = nis.cat(nismap)\n\tfor k, v in mapping.items():\n\t if verbose:\n\...
python
edit
17
0
mit
79978bd00fc4834b01f7473cc5b7b8407abec51c
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_nis.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport store_fixture\nimport groundstation.store\n\n\nclass TestGitStore(store_fixture.StoreTestCase):\n storeClass = groundstation.store.git_store.GitStore\n\n```\n\nApply this change: Add testcase for database initialization" }, { ...
python
edit
1
2
mit
1b75fe13249eba8d951735ad422dc512b1e28caf
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_all_stores.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport numpy as np\n\nimport pylearn2\nfrom pylearn2.datasets.dense_design_matrix import DenseDesignMatrix\nfrom pylearn2.termination_criteria import EpochCounter\nfrom pylearn2.utils.serial import load_train_file\n\ndef test_m...
python
edit
1
1
bsd-3-clause
ae78bd758c690e28abaae2c07e8a3890e76044e0
KennethPierce/pylearnk,KennethPierce/pylearnk,Refefer/pylearn2,JesseLivezey/plankton,goodfeli/pylearn2,theoryno3/pylearn2,alexjc/pylearn2,pkainz/pylearn2,fulmicoton/pylearn2,alexjc/pylearn2,alexjc/pylearn2,kastnerkyle/pylearn2,ddboline/pylearn2,se4u/pylearn2,hantek/pylearn2,jeremyfix/pylearn2,nouiz/pylearn2,abergeron/p...
pylearn2/scripts/papers/maxout/tests/test_mnist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nclass InvalidParamsError(template.TemplateSyntaxError):\n ''' Custom exception class to distinguish usual TemplateSyntaxErrors \n and validation errors for templatetags introduced by ``validate_param...
python
edit
1
4
mit
5cac0d8b336cb8efe7d819d47abf46ccadea7b29
kmike/django-generic-images,kmike/django-generic-images,kmike/django-generic-images
generic_utils/templatetags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\next2lang = {\n '.cpp': 'c++',\n '.c': 'c',\n}\n\n```\n\nApply this change: Support more C++ extensions by default" }, { "role": "assistant", "content": "ext2lang = {\n '.c' : 'c',\n '.cpp': 'c++',\n '.cc' : 'c++'...
python
edit
1
0
bsd-3-clause
a0ac251bec891a6c511ea1c0b11faa6525b81545
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
bfg9000/languages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dariah_static_data.models import VCC\nfrom dariah_static_data.management.commands._private_helper import Command as SuperCommand\n\n\nclass Command(SuperCommand):\n filename = 'tadirah_vcc.csv'\n fieldnames = ['uri', 'name', 'des...
python
edit
1
0
apache-2.0
33f2075396ded90e3cf17033985f29d262965500
DANS-KNAW/dariah-contribute,DANS-KNAW/dariah-contribute
dariah_static_data/management/commands/import_tadirah_vcc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, redirect\nimport psycopg2\nimport os\nimport urlparse\n\napp = Flask(__name__)\n\n\n# def connectDB(wrapped):\n# def inner(*args, **kwargs):\n# api_token = os.environ[\"API_TOKEN\"]\n# ...
python
edit
4
1
mit
7c38eae5a07e07789713baf5ab3aaea772e76422
AlexMathew/csipy-home
routes.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport awesometime\n\ndef compo_times_formatter(compo):\n compo.compo_time = awesometime.format_single(compo.compo_start)\n compo.adding_time = awesometime.format_single(compo.adding_end)\n compo.editing_...
python
edit
1
1
mit
fa14c040e6483087f5b2c78bc1a7aeee9ad2274a
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/kompomaatti/misc/time_formatting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport echonest\nfrom artists.models import Artist\nfrom echonest.models import SimilarResponse\nfrom users.models import User\nfrom .models import (GeneralArtist, UserSimilarity, Similarity,\n update_similarities)\n\n\n...
python
edit
1
4
bsd-3-clause
b24083b0991157a1e0d8a533fc1cac3aa2e4523c
FreeMusicNinja/api.freemusic.ninja
similarities/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom bluebottle.organizations.models import Organization\nfrom bluebottle.utils.serializers import URLField\n\n\nclass OrganizationSerializer(serializers.ModelSerializer):\n class Meta:\n ...
python
edit
1
0
bsd-3-clause
02140561a29a2b7fe50f7bf2402da566e60be641
jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle
bluebottle/organizations/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport unittest\n\nfrom StringIO import StringIO\n\nclass TestArgParsing(unittest.TestCase):\n\n def setUp(self):\n unittest.TestCase.setUp(self)\n from script import parseargs\n\n self.parseargs = pa...
python
edit
1
1
isc
015d536e591d5af7e93f299e84504fe8a17f76b3
whilp/python-script,whilp/python-script
tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2018 Forschungszentrum Juelich GmbH\n# Author: Yann Leprince <<EMAIL>>\n#\n# This software is made available under the MIT licence, see LICENCE.txt.\n\n\"\"\"Conversion of images to the Neuroglancer pre-computed format.\n\n....
python
edit
1
0
mit
40624e155ff3ec9012942744b5c09d91164d5756
HumanBrainProject/neuroglancer-scripts
src/neuroglancer_scripts/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom base import BaseMatcher\n\n\nclass VolunteerMatcher(BaseMatcher):\n dev_text = \"volunteer someone\"\n all_text = \"volunteer a dev\"\n dev_candidates = ['Steve', 'Arthur', 'Honza', 'Fernando', 'Nick']\n all_...
python
edit
1
3
bsd-2-clause
6bb9a4ed50ad879c56cdeae0dedb49bba6780780
honza/nigel
matchers/volunteer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add method to handle files args from cli" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport os\nimport glob\nimport pathlib2 as pathlib\n\n\ndef handle_files_args(paths_args):\n \"\"\"\n Handle files arg...
python
new_file
1
3
mit
d2a040618a1e816b97f60aa66f5b4c9ab4a3e6b9
jrsmith3/refmanage
refmanage/fs_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\n\nurlpatterns = patterns(\n '',\n url(r'^admin/', include(admin.site.urls)),\n url(r'^accounts/', include('django.contrib.auth.urls')),\n u...
python
edit
1
0
mit
b6dcb4029d3bf4b402a6874c942c9e4a105f2a62
abarto/tracker_project,abarto/tracker_project,abarto/tracker_project,vivek8943/tracker_project,vivek8943/tracker_project,vivek8943/tracker_project
tracker_project/tracker_project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n# Work around mbcs bug in distutils.\n# http://bugs.python.org/issue10945\nimport codecs\ntry:\n codecs.lookup('mbcs')\nexcept LookupError:\n ascii = codecs.lookup('ascii')\n func = la...
python
edit
1
0
mit
57d6bcee40fe2df5ce6c21d93c26f34d7fdad672
Empiria/matador
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n## \\package custom.combo\n\n# MIT licensing\n# See: LICENSE.txt\n\n\nimport wx\nfrom wx.combo import OwnerDrawnComboBox\n\n\nclass ComboBox(OwnerDrawnComboBox):\n def __init__(self, parent, win_id, value=wx.Em...
python
edit
1
2
mit
d0a907872749f1bb54d6e8e160ea170059289623
AntumDeluge/desktop_recorder,AntumDeluge/desktop_recorder
source/custom/combo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nimport restless\n\n\nsetup(\n name='restless',\n version=restless.VERSION,\n description='A lightweight REST miniframework for Python.',\n author='D...
python
edit
1
0
bsd-3-clause
a1154d3c9788a6cbaeac4245d916f65dbd9adf12
toastdriven/restless
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom .models import Department, Province, District\n\n\nclass DepartmentForm(forms.Form):\n department = forms.ModelChoiceField(\n queryset=Department.objects\n )\n\n\nclass ProvinceForm(DepartmentForm...
python
edit
1
3
mit
778cb1a9f9fbb7e260d9a17f07d412d4fa12930a
snahor/django-ubigeo
ubigeo/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\nfrom website import carts\nimport urllib2\nimport json\n\n\ndef load():\n carts.remove_all()\n host = 'http://data.cityofnewyork.us/resource/xfyi-uyt5.json'\n\n for i in range(0, 7000, 1000):\n query...
python
edit
2
6
bsd-3-clause
6b59d17aa06741f40bb99dde6c10950de3a142e6
stuycs-softdev-fall-2013/proj3-7-cartwheels,stuycs-softdev-fall-2013/proj3-7-cartwheels
utils/load.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom apscheduler.schedulers.blocking import BlockingScheduler\nimport logging\nimport subprocess\n\nlogging.basicConfig()\nscheduler = BlockingScheduler()\n\n\n@scheduler.scheduled_job('interval', minu...
python
edit
1
1
mit
2560ca287e81cbefb6037e5688bfa4ef74d85149
oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/dmm-eikaiwa-fft,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/dmm-eikaiwa-fft
clock.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mock import patch\n\nfrom django.test.testcases import TestCase\n\nfrom device_notifications import settings\n\nfrom device_notifications.models import AbstractBaseDevice\nfrom device_notifications.models import InvalidDeviceType\n\n\n...
python
edit
1
1
bsd-3-clause
de1c2842d7f07025f23e9b12efc7dd52e4d0efbf
roverdotcom/django-device-notifications
device_notifications/tests/model_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. import email\n\n\ndef sync_daily_email_blasts(blast):\n for l in blast.recipients_lists.all():\n l.send(blast)\n\n\ndef sync_recipients_list(recipients_list, blast):\n for r in recipients_list.recipientss.all():\n ...
python
edit
1
2
apache-2.0
4b98e89e306aa04c4b3c1df254209f59f61d4f2a
texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast
tt_dailyemailblast/send_backends/sync.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nfrom setuptools import setup\n\nextra = {}\nif sys.version_info >= (3, 0):\n extra[\"use_2to3\"] = True\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)...
python
edit
1
1
bsd-2-clause
b692e57988b279c8d2c4f88bf3995bc7b8bde355
mwilliamson/whack
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom opencivicdata.models.people_orgs import Person\n\nfrom django.contrib.auth.models import User\n\n\nclass Preferences(models.Model):\n user = mod...
python
edit
1
0
mit
72796a97a24c512cf43fd9559d6e6b47d2f72e72
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport six\nimport json\n\nfrom django.utils.html import format_html, mark_safe\nfrom django.core.urlresolvers import reverse\nfrom django.utils.encoding import python_2_unicode_compatible\n\nCHARTS = {}\n\nclass ChartMeta(type):\n def _...
python
edit
3
2
mit
39e038373b0691f14605a5aec3f917b5cee40091
danpalmer/django-google-charts,danpalmer/django-google-charts
django_google_charts/charts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.contrib.staticfiles.storage import staticfiles_storage\n\nfrom ..creations import RATING_DESCRIPTIONS\n\nregister = template.Library()\n\n@register.inclusion_tag('creations/rating.html')\ndef creatio...
python
edit
1
1
mit
5f14b7217f81b6d7653f94065d1a3305204cf83b
dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard
ddcz/templatetags/creations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Model-like encapsulation of big dict structure (like JSON data).\"\"\"\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='barrel',\n version='0.1.3',\n description='python interface to reaktor API',\n long_de...
python
edit
1
0
bsd-2-clause
9a0adb5fc4d07aa4ec4d725e1ddc9b651e622fce
storecast/barrel
setup.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.translation import ugettext_lazy as _\nfrom django.contrib.auth.models import User\n\nfrom locations.models import District\n\nclass Coordinator(mode...
python
edit
1
6
mit
46ee9dad4030c8628d951abb84a667c7398dd834
mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign
src/coordinators/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager'\nEXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1}\nITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline']\nSPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddl...
python
edit
2
0
bsd-3-clause
565861256c9cf0f41217df13c4244315b4ebd74d
verylasttry/portia,amikey/portia,pombredanne/portia,chennqqi/portia,NoisyText/portia,NoisyText/portia,hmilywb/portia,flip111/portia,NoisyText/portia,nju520/portia,asa1253/portia,NicoloPernigo/portia,amikey/portia,CENDARI/portia,naveenvprakash/portia,PrasannaVenkadesh/portia,CENDARI/portia,lodow/portia-proxy,nju520/port...
slybot/slybot/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport sys\n\nPY3 = sys.version_info[0] == 3\nPY2 = sys.version_info[0] == 2\n\nif PY3:\n import builtins\n from queue import Queue, Empty\n from itertools import ...
python
edit
14
7
bsd-3-clause
956d68b6e29b1e319d043945393db3825b5167d1
blaze/dask,blaze/dask,mrocklin/dask,gameduell/dask,wiso/dask,mraspaud/dask,PhE/dask,cowlicks/dask,wiso/dask,dask/dask,PhE/dask,ContinuumIO/dask,jakirkham/dask,mraspaud/dask,jakirkham/dask,pombredanne/dask,jayhetee/dask,jayhetee/dask,ssanderson/dask,dask/dask,mikegraham/dask,clarkfitzg/dask,jcrist/dask,pombredanne/dask,...
dask/compatibility.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unit test some basic response rendering functionality.\n\nThese tests use the unittest.mock mechanism to provide a simple Assistant\ninstance for the _Response initialization.\n\"\"\"\nfrom unittest.mock import patch\n\nfrom flask imp...
python
edit
5
1
apache-2.0
d8c15667e76ce6d0dfa96a16312e75b83c63479b
treethought/flask-assistant
tests/test_response.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ndescription = 'RDFLib SPARQLStore and SPARQLUpdateStore implementation for VIVO.'\n\nsetup(\n name = 'vivo-rdflib-sparqlstore',\n version = '0.0.1',\n url = 'https://github.com/lawlesst/rdflib-vivo-s...
python
edit
1
0
mit
da32f549ef882680484a20084d5cfa5f7106f5e7
lawlesst/vivo-rdflib-sparqlstore
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis script generates all the relevant figures from the experiment.\n\n\"\"\"\n\nfrom Modules.processing import *\nfrom Modules.plotting import *\n\nset_sns()\nsave = True\nsavetype = \".eps\"\nshow = True\n...
python
edit
15
2
mit
d7d1e2937c9f09189aad713db1f5ee5d2d6a64bd
UNH-CORE/RM2-tow-tank
run.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef workflow_extractor_config(tasks):\n extractor_config = {}\n for task_key, task in tasks.items():\n if task['type'] == 'drawing':\n tools_config = {}\n for tdx, tool in enumerate(task['tools']):\n ...
python
edit
3
9
apache-2.0
5dc9f2f376b5ac918c1872e1270a782a9ef45ac9
CKrawczyk/python-reducers-for-caesar
panoptes_aggregation/extractors/workflow_extractor_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom pysnap import Snapchat\nimport secrets\n\ns = Snapchat()\ns.login(secrets.USERNAME, secrets.PASSWORD)\n\nfriends_to_add = [friend['name'] for friend in s.get_updates()['added_friends'] if friend['type'] == 1]\n...
python
edit
null
null
mit
9a51358871f04e2a5552621b6ac2c9dbe1ee8345
jollex/SnapchatBot
main.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015-2016 Masayuki Yamamoto\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# ht...
python
edit
1
1
apache-2.0
37da0285ac6b08994700952e04278e1049577745
ma8ma/yanico
yanico/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='clize',\n version='3.0a2',\n description='Command-line argument parsing for Python, without the effort',\n license='MIT',\n url='https://github.com/epsy/...
python
edit
1
0
mit
699cd767551744adf3fcff4862ed754496782526
epsy/clize
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\nfrom allauth.socialaccount.providers.oauth2.views import (\n OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView\n)\nfrom .provider import HelsinkiOIDCProvider\n\n\nclass HelsinkiOIDCOAuth2Adapter(OAuth2Adapter):\n p...
python
edit
1
1
bsd-2-clause
16d6dd0ba2b5218d211c25e3e197d65fe163b09a
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
helusers/providers/helsinki_oidc/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Factories for the silver app.\"\"\"\n# import factory\n\n# from .. import models\n\n```\n\nApply this change: Add factory for the Provider model" }, { "role": "assistant", "content": "import factory\n\nfrom silver.models i...
python
edit
1
0
apache-2.0
4a650922ee97b9cb54b203cab9709d511487d9ff
PressLabs/silver,PressLabs/silver,PressLabs/silver
silver/tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Python 3.6\n\nclass Expr:\n pass\n\n\nclass App(Expr):\n def __init__(self, fname, args=()):\n self.fname = fname\n self.args = args\n\n def __str__(self):\n return '{0}({1})'.format(self.fname, ','.join(map(st...
python
edit
1
1
unlicense
580974cedceecea71e32f0cba1daf4dccb7e4736
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
2018/unif/unifier.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aprslib\nimport logging\n\nimport nmea\n\nclass AprsIS:\n\n\tlogger = None\n\n\tdef __init__(self, callsign, password):\n\t\tself.logger = logging.getLogger(__name__)\n\t\tself.aprs_connection = aprslib.IS(callsign, password)\n\t\tse...
python
edit
null
null
mit
5a7b13e26e94d03bc92600d9c24b3b2e8bc4321c
elielsardanons/dstar_sniffer,elielsardanons/dstar_sniffer
dstar_lib/aprsis.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(name='q', version='2.3', py_modules=['q'],\n description='Quick-and-dirty debugging output for tired programmers',\n author='Ka-Ping Yee', author_email='<EMAIL>',\n license='Apache Lice...
python
edit
1
0
apache-2.0
c9f8b832761525c2f04a71515b743be87f2e4a58
zestyping/q
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nfrom libmproxy import utils, script\nfrom libmproxy.proxy import config\nimport tservers\n\ndef test_load_scripts():\n example_dir = utils.Data(\"libmproxy\").path(\"../examples\")\n scripts = glob.glob(\"%s/*.py\" % exam...
python
edit
4
7
mit
de3f84934d86e48bf89822828df3eb9c3bd8e1e1
ryoqun/mitmproxy,ryoqun/mitmproxy,xaxa89/mitmproxy,guiquanz/mitmproxy,ccccccccccc/mitmproxy,ADemonisis/mitmproxy,jpic/mitmproxy,pombredanne/mitmproxy,noikiy/mitmproxy,xaxa89/mitmproxy,fimad/mitmproxy,onlywade/mitmproxy,dxq-git/mitmproxy,inscriptionweb/mitmproxy,sethp-jive/mitmproxy,ParthGanatra/mitmproxy,cortesi/mitmpr...
test/test_examples.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route('/')\ndef hello_world():\n return 'Hello World'\n\nif __name__ == '__main__':\n app.run(debug=True, host='0.0.0.0')\n\n```\n\nApply this change: Set up basic webhook for Mes...
python
edit
1
6
mit
63cb8dc1449f6cab87bd7910276d0e06dfd0b228
jabagawee/playing-with-kubernetes
rasdoor/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom llvmlite import ir\n\nfrom numba.core.datamodel.registry import register_default\nfrom numba.core.extending import register_model, models\nfrom numba.core import types\nfrom numba.cuda.types import Dim3, GridGroup, CUDADispatcher\n\n\n...
python
edit
1
4
bsd-2-clause
6689858b2364a668b362a5f00d4c86e57141dc37
cpcloud/numba,numba/numba,numba/numba,seibert/numba,cpcloud/numba,cpcloud/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,IntelLabs/numba,numba/numba,IntelLabs/numba,cpcloud/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,seibert/numba,IntelLabs/numba,numba/numba
numba/cuda/models.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 twitter_rss\nimport time\nimport subprocess\nimport config\n\n# Launch web server\np = subprocess.Popen(['/usr/bin/python2', config.INSTALL_DIR + 'server.py'])\n\n# Update the feeds\n...
python
edit
4
0
mit
80737e5de2ca3f0f039c9d4fbbf3df4ac8b59193
Astalaseven/twitter-rss,Astalaseven/twitter-rss
run.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport pytest\nfrom cisco_olt_http import operations\nfrom cisco_olt_http.client import Client\n\n\n@pytest.fixture\ndef data_dir():\n return os.path.abspath(\n os.path.join(os.path.dirname(__file__), 'data'))\n\n\nde...
python
edit
1
1
mit
f859964c3d8d193da92fb521f4a696a28ef9452a
beezz/cisco-olt-http-client,Vnet-as/cisco-olt-http-client
cisco_olt_http/tests/test_operations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nwith open('README.md') as readme_file:\n readme = readme_file.read()\n\nwith open(...
python
edit
1
0
isc
5d9c602a07e329f135c8e1f4c0acc0cba0efd148
marcoslhc/xyvio,marcoslhc/xyvio,marcoslhc/xyvio
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Dave Kludt\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.o...
python
edit
1
0
apache-2.0
27f47ef27654dfa9c68bb90d3b8fae2e3a281396
rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork
pitchfork/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport logging\n\nfrom version import __version__\n\nlogger = logging.getLogger(__name__)\nlogger.debug('Loading %s ver %s' % (__name__, __version__))\n\n\n# Actions represents the available textual items that can be passed to main\n# to ...
python
edit
1
4
mit
a3004d2de9c15b9d7efebb98ea6533a1a6e07062
fancystats/nhlstats
nhlstats/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom nodes import Node\n\nclass FloorDiv(Node):\n char = \"f\"\n args = 2\n results = 1\n \n @Node.test_func([3,2], [1])\n @Node.test_func([6,-3], [-2])\n def func(self, a:Node.number,b:Node.num...
python
edit
1
5
mit
54e5ee0cb6df1f47a1a6edd114c65ad62fd0c517
muddyfish/PYKE,muddyfish/PYKE
node/floor_divide.py
rejected_duplicate
Near-duplicate of sample 3622
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\n\nsetup(\n name=\"htmlgen\",\n version=\"2.0.0\",\n description=\"HTML 5 Generator\",\n long_description=open(\"README.md\").read(),\n long_description_content_type=\"t...
python
edit
1
0
mit
41570584ec50017d86e319be132420b81feed671
srittau/python-htmlgen
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.core.urlresolvers import reverse\n\nfrom sentry.testutils import TestCase, PermissionTestCase\n\n\nclass OrganizationStatsPermissionTest(PermissionTestCase):\n def setUp(self):\n ...
python
edit
4
1
bsd-3-clause
60173acbecf1239872411b2ca0dd9eb75b543843
looker/sentry,alexm92/sentry,gg7/sentry,zenefits/sentry,vperron/sentry,ifduyue/sentry,imankulov/sentry,JamesMura/sentry,daevaorn/sentry,mitsuhiko/sentry,JackDanger/sentry,ewdurbin/sentry,BuildingLink/sentry,daevaorn/sentry,kevinlondon/sentry,songyi199111/sentry,TedaLIEz/sentry,kevinlondon/sentry,wujuguang/sentry,mitsuh...
tests/sentry/web/frontend/test_organization_stats.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socket\nimport logger\nfrom groundstation.broadcast_socket import BroadcastSocket\n\nimport logger\nlog = logger.getLogger(__name__)\n\nclass BroadcastAnnouncer(BroadcastSocket):\n def __init__(self, port):\n super(Broadcas...
python
edit
4
2
mit
e2be9eb27d6fc7cfa424cbf908347796ab595526
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
groundstation/broadcast_announcer.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# File: space_age.py\n# Purpose: Write a program that, given an age in seconds, calculates\n# how old someone is in terms of a given planet's solar years.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Date:...
python
edit
1
1
mit
6820de9ccdb7cc7263142108881cf98aab85adb1
amalshehu/exercism-python
space-age/space_age.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nViews for the rdap_explorer project, query app.\n\"\"\"\n\nimport ipwhois\n\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render\nfrom django.urls import reverse\nfrom django.views.decorators.cache impo...
python
edit
1
3
mit
74577faa2468a0b944cef3c88c9b8a82a4881ff1
cdubz/rdap-explorer,cdubz/rdap-explorer
query/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.core import urlresolvers\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom wagtail.wagtailcore import hooks\nfrom wagtail.wagtailadmin.menu import MenuItem\n\nfrom wagtai...
python
edit
1
1
bsd-3-clause
e12432b0c97d1ddebf16df821fe6c77bb8b6a66b
mixxorz/wagtail,wagtail/wagtail,KimGlazebrook/wagtail-experiment,gasman/wagtail,mayapurmedia/wagtail,kaedroho/wagtail,jnns/wagtail,serzans/wagtail,hanpama/wagtail,iho/wagtail,marctc/wagtail,kurtw/wagtail,nilnvoid/wagtail,nrsimha/wagtail,gasman/wagtail,jorge-marques/wagtail,Toshakins/wagtail,rsalmaso/wagtail,takeflight/...
wagtail/wagtailsites/wagtail_hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fickle import API\n\nfrom fickle.classifier import GenericSVMClassifier\nbackend = GenericSVMClassifier()\n\napp = API(__name__, backend)\n\nif __name__ == '__main__':\n host = '0.0.0.0'\n port = int(os.environ.get('PORT', 5000))...
python
edit
1
0
mit
70167a8cb73673e1e904fbeb8a50b3de9d4fc1ae
norbert/fickle
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__doc__ = \"\"\"\nManipulate audio with an simple and easy high level interface.\n\nSee the README file for details, usage info, and a list of gotchas.\n\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name='pydub',\n version='0.16....
python
edit
1
0
mit
e00ebeaa185ed2fc50c68eddd282194d8633a89c
jiaaro/pydub
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom functools import wraps\n\nfrom flask import request, current_app\n\nfrom utils.decorators.signature import sign\n\ndef require(resource_namespace, permissions, resource_id=None):\n def decorator(f):\n @wraps(f)\n ...
python
edit
1
7
apache-2.0
67b86cb3ddfb7c9e95ebed071ba167472276cc29
PressLabs/lithium
utils/decorators/require.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport sys\n\nversion = '0.1.2b2'\n\nrequires = [\n 'eduid-common[webapp]>=0.2.1b7',\n 'Flask==0.10.1',\n]\n\n\ntest_requires = [\n 'WebTest==2.0.18',\n 'mock...
python
edit
3
0
bsd-3-clause
3b590e0a9719a9cbec6b75a591fa92f5178cdc4e
SUNET/eduid-webapp,SUNET/eduid-webapp,SUNET/eduid-webapp
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nfrom fullcalendar.models import Occurrence\n\nregister = template.Library()\n\n@register.inclusion_tag('events/agenda_tag.html')\ndef show_agenda(*args, **kwargs):\n qs = Occurrence.objects.upcoming()\n\n ...
python
edit
1
4
mit
564d2eedf6e2b62152869c60bf1f3ba18287d8c0
jonge-democraten/mezzanine-fullcalendar
fullcalendar/templatetags/fullcalendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport inspect\n\nfrom .random import random\nfrom .circular import circular\nfrom .force_directed import fruchterman_reingold\n\n\n_layout_map = {\n 'random': random,\n 'circular': circular,\n 'force_directed': fruchterman_reingol...
python
edit
1
3
bsd-3-clause
1de53534c48d1eecc7fea5d2040977afd97dacb2
ghisvail/vispy,drufat/vispy,drufat/vispy,Eric89GXL/vispy,ghisvail/vispy,michaelaye/vispy,Eric89GXL/vispy,drufat/vispy,michaelaye/vispy,ghisvail/vispy,Eric89GXL/vispy,michaelaye/vispy
vispy/visuals/graphs/layouts/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport types\n\nimport cedexis.radar.cli\n\nclass TestCommandLineInterface(unittest.TestCase):\n\n def test_main(self):\n self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType))\n\n```\n\nApply thi...
python
edit
3
1
mit
132b148ca8701ee867b7a08432a3595a213ce470
cedexis/cedexis.radar
cedexis/radar/tests/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport zirc\nimport ssl\nimport socket\nimport utils\nimport commands\n\n\ndebug = False\n\nclass Bot(zirc.Client):\n def __init__(self):\n self.connection = zirc.Socket(family=socket.AF_INET6,\n ...
python
edit
4
2
mit
2477bc7e4cb39c8fc34efec75143f42b6fee7dda
wolfy1339/Python-IRC-Bot
bot.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\n\nwith open('README.rst', 'rb') as readme:\n readme_text = readme.read().decode('utf-8')\n\nsetup(\n name='django-bootstrap-pagination'...
python
edit
1
0
mit
3339b9e865adf7a2fcfc27d3c9390724ca82086d
jmcclell/django-bootstrap-pagination,jmcclell/django-bootstrap-pagination
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pymysql\n\nclass MySQL():\n\n def __init__(self, host, user, password, port):\n self._host = host\n self._user = user\n self._password = password\n self._conn = pymysql.connect(host=host, port=port,\n ...
python
edit
1
2
mit
597f586d2cf42f31a0179efc7ac8441f33b3d637
ImShady/Tubey
lib/mysql.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom corehq.preindex import ExtraPreindexPlugin\nfrom django.conf import settings\n\nExtraPreindexPlugin.register('domain', __file__, (\n settings.NEW_USERS_GROUPS_DB, settings.NEW_FIXTURES_DB, 'meta'))\n\n```\n\nApply this change: Add t...
python
edit
1
0
bsd-3-clause
6fe5a416ed229e7ec8efab9d6b3dac43f16515b6
dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/domain/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\n# Utility function to read the README file, used for the long desc.\ndef read(fn):\n return open(os.path.join(os.path.dir...
python
edit
1
1
mit
1423085230a010b5a96ce9eaf63abeb9e5af58a4
paulfanelli/planet_alignment
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Module imports\nimport logging\nimport os\n\nimport vitables\n\n_defaults = dict(\n AUTHOR = \"Keith F Prussing\",\n AUTHOR_EMAIL = \"<EMAIL>\",\n LICENSE = \"MIT\",\n PLUGIN_CLASS = \"VtImageViewer\"...
python
edit
3
2
mit
50367a2d73c395a85bb7dae058f9435be6ad7c36
kprussing/vtimshow
vtimshow/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n=====================\nCollectionViewer demo\n=====================\n\nDemo of CollectionViewer for viewing collections of images. This demo uses\nsuccessively darker versions of the same image to fake an image collection.\n\nYou ca...
python
edit
3
0
bsd-3-clause
8a75cc4626bd38faeec102aea894d4e7ac08646c
almarklein/scikit-image,juliusbierk/scikit-image,paalge/scikit-image,Hiyorimi/scikit-image,chriscrosscutler/scikit-image,oew1v07/scikit-image,bennlich/scikit-image,paalge/scikit-image,warmspringwinds/scikit-image,chriscrosscutler/scikit-image,bennlich/scikit-image,warmspringwinds/scikit-image,rjeli/scikit-image,vighnes...
viewer_examples/viewers/collection_viewer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import isdir\n\nimport pytest\nfrom filesystem_tree import FilesystemTree\n\n\n@pytest.yield_fixture\ndef fs():\n fs = FilesystemTree()\n yield fs\n fs.remove()\n\n\ndef test_it_can_be_instantiated():\n assert Files...
python
edit
1
1
mit
3b83b8715e03b9096f9ae5611019fec4e52ca937
gratipay/filesystem_tree.py,gratipay/filesystem_tree.py
tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Top-level package for judicious.\"\"\"\n\n__author__ = \"\"\"Jordan W. Suchow\"\"\"\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\nfrom judicious import (\n BASE_URL,\n register,\n)\n\n__all__ = (\n ...
python
edit
1
0
mit
d6e87778c82eecc07b73a91d50cc2d9034a4428c
suchow/judicious,suchow/judicious,suchow/judicious
judicious/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#%%\nfrom pathlib import Path\nfrom string import digits\n\n\n#%%\ndirectory = Path(\"./docs/tutorial/src\")\noutput_directory = Path(\"./docs/tutorial/out\")\noutput_directory.mkdir(exist_ok=True)\nfiles = sorted([Path(f) for f in director...
python
edit
3
0
mit
2b64dc699e222a011d5946fd53a2bda4df77d0fe
tiangolo/fastapi,tiangolo/fastapi,tiangolo/fastapi
scripts/rename_tutorial_src_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom database.database_access import get_dao\nfrom gtfslib.model import Route\nfrom gtfsplugins import decret_2015_1610\nfrom database.database_access import get_dao\n\ndef get_routes(agency_id):\n\tdao = get_dao(...
python
edit
1
2
mit
9343dbfa0d822cdf2f00deab8b18cf4d2e809063
LoveXanome/urbanbus-rest,LoveXanome/urbanbus-rest
services/display_routes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom changes.api.serializer import Serializer, register\nfrom changes.models import Source\n\n\n@register(Source)\nclass SourceSerializer(Serializer):\n def serialize(self, instance, attrs):\n if instance.patch_id:\n pa...
python
edit
1
2
apache-2.0
1fce6a621ad4fe149988147478e15c7415295a7b
dropbox/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,wfxiang08/changes
changes/api/serializer/models/source.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name = \"django-waitinglist\",\n version = \"1.0b8\",\n author = \"Brian Rosner\",\n author_email = \"<EMAIL>\",\n description = \"a Django waiting list app for runnin...
python
edit
1
0
mit
7b5794132f3f1e93c9dda3bb332a6594fb369018
pinax/django-waitinglist,pinax/django-waitinglist
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n#\n# Copyright 2013 Google Inc. 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 th...
python
edit
1
0
apache-2.0
89b9bb45b17d457f6cf158330dfde6fe00e78cf4
leandrotoledo/oppia,rackstar17/oppia,zgchizi/oppia-uc,nagyistoce/oppia,kennho/oppia,MAKOSCAFEE/oppia,raju249/oppia,hazmatzo/oppia,Atlas-Sailed-Co/oppia,Atlas-Sailed-Co/oppia,mit0110/oppia,brylie/oppia,nagyistoce/oppia,BenHenning/oppia,dippatel1994/oppia,VictoriaRoux/oppia,CMDann/oppia,kennho/oppia,cleophasmashiri/oppia...
core/storage/statistics/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport select\n\nimport groundstation.fs_watcher as fs_watcher\nfrom groundstation.peer_socket import PeerSocket\n\nfrom integration_fixture import StationIntegrationFixture, \\\n TestListener, \\\n...
python
edit
1
1
mit
6bfb23294c2cc445479f4c8098b8e62647cf01bd
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_notification_integration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nfrom azurectl.version import __VERSION__\n\nconfig = {\n 'description': 'Manage Azure PubCloud Service',\n 'author': 'PubCloud Develo...
python
edit
1
0
apache-2.0
6ea8a4b07139460e89c6208cf08e195e9b8483ba
SUSE/azurectl,SUSE/azurectl,SUSE/azurectl
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nimport time\n\nimport requests\nimport lxml.html\n\n\ntop10k = {}\nfor page_index in range(1, 201):\n print('Requesting page {}'.format(page_index))\n url = 'https://osu.ppy.sh/p/pp/'\n payload = {\n 'm': 0, # o...
python
edit
1
0
mit
316533b3d0864c3cf3dba7ae7a3a83e30a02f33a
Cyanogenoid/osu-modspecific-rank
scrape-10k.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom argparse import ArgumentParser\nfrom matplotlib import pyplot as plt\nfrom graph import Greengraph\n\ndef process():\n parser = ArgumentParser(\n description=\"Produce graph of green land between two locations\")\n parser....
python
edit
1
3
mit
242b3bfe70d90044d2496cbc8109cd703b3bccab
MikeVasmer/GreenGraphCoursework
greengraph/command.py
accepted
null
true