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#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom django.core.management.base import BaseCommand\n\nfrom planet.management.commands import process_feed\nfrom planet.models import Feed\nfrom planet.signals import feeds_updated\n\n\nclas...
python
edit
2
2
bsd-3-clause
df131a8f482e712546555e0cb28a58edcf960bf2
matagus/django-planet,matagus/django-planet,jilljenn/django-planet,jilljenn/django-planet
apps/planet/management/commands/update_all_feeds.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom requests.exceptions import HTTPError\n\n\nclass BaseException(Exception):\n pass\n\n\nclass APIError(BaseException, HTTPError):\n \"\"\"\n The API responded with a non-200 status code.\n \"\"\"\n\n def __init__(self, htt...
python
edit
1
2
mit
1a7bf8c3fd5560a8f6cba88607facf8321a97818
rkhleics/police-api-client-python
police_api/exceptions.py
rejected_duplicate
Near-duplicate of sample 5935
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = u'DLR'\nSITENAME = u'RCE'\nSITEURL = ''\n\nPATH = 'content'\n\nTIMEZONE = 'Europe/Paris'\n\nDEFAULT_LANG = u'en'\n\nDEFAULT_DATE_FORMAT = ...
python
edit
1
0
cc0-1.0
caf6514b6af278583d9816b722fab9456d0ad9f1
DLR-SC/rce-website,DLR-SC/rce-website,DLR-SC/rce-website,DLR-SC/rce-website,DLR-SC/rce-website
pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on Apr 4, 2016\n\n@author: pab\n'''\nimport inspect\nimport numpy as np\n\n\ndef rosen(x):\n \"\"\"Rosenbrock function\n\n This is a non-convex function used as a performance test problem for\n optimization algorithms ...
python
edit
1
1
bsd-3-clause
b7a8711afdbd4eaf7dfbf4ae4daab9d340c192b3
pbrod/numdifftools,pbrod/numdifftools
numdifftools/testing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nimport core.views\n\nurlpatterns = [\n url(r'^u/(?P<slug>[\\w-]+)/$', core.views.run_fn, name=\"run_fn\"),\n]\n\n```\n\nApply this change: Handle period in url slugs" }, { "role": "assistant", ...
python
edit
1
0
mit
5101a6626f26ff62ea9e3159aad98bc19b680500
theju/urlscript
core/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\nimport sys\nfrom ubitflashtool.cli import main\nfrom ubitflashtool.gui import open_editor\n\n\nif __name__ == \"__main__\":\n if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] =...
python
edit
1
4
mit
f4d1cebe889e4c55bab104f9a2c993c8ed153d34
carlosperate/ubitflashtool
ubitflashtool/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!python3\nimport os, glob, sys\nimport nustack\nimport nustack.doc.gen as gen\n\nexportdir = sys.argv[1]\n\n# Get module names\npath = os.path.join(os.path.dirname(nustack.__file__), \"stdlib\")\nprint(\"Path to standard library:\", path)\...
python
edit
1
0
mit
6a0ab2b681b4a9ce9392687b6b7d9e1d14015147
BookOwl/nustack
nustack/doc/genall.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSTATUSES = {\n 200: \"200 OK\",\n 201: \"201 Created\",\n 202: \"202 Accepted\",\n 300: \"300 Multiple Choices\",\n 301: \"301 Moved Permanently\",\n 302: \"302 Found\",\n 304: \"304 Not Modi...
python
edit
1
0
mit
244a51de04410335309446bb9a051338ea6d2a6a
nullism/pycnic,nullism/pycnic
pycnic/data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport numpy as np\nimport sys\nimport scipy.io as sio\nimport os\nimport operator\n\nbase_dir = '/data/amnh/darwin/'\ncurves_fft_dir = base_dir + 'image_csvs_fft/'\n\nfft_norm_map = {}\n\ndef compute_fft_norm(curve_f...
python
edit
3
1
apache-2.0
0381f2b72f495e18240eb9affc382905303a5ad9
HackTheStacks/darwin-notes-image-processing,HackTheStacks/darwin-notes-image-processing
CurveAnalysis/fft_norm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom chainer.training import extension\n\n\ndef observe_value(key, target_func):\n \"\"\"Returns a trainer extension to continuously record a value.\n\n Args:\n key (str): Key of observation to record.\n t...
python
edit
1
1
mit
ce380319562eb94e252c74de7b6b1ac18a357466
ktnyt/chainer,hvy/chainer,aonotas/chainer,niboshi/chainer,okuta/chainer,chainer/chainer,anaruse/chainer,niboshi/chainer,ronekko/chainer,okuta/chainer,jnishi/chainer,wkentaro/chainer,cupy/cupy,chainer/chainer,okuta/chainer,wkentaro/chainer,jnishi/chainer,delta2323/chainer,rezoo/chainer,hvy/chainer,hvy/chainer,jnishi/cha...
chainer/training/extensions/value_observation.py
rejected_duplicate
Near-duplicate of sample 4376
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.http import HttpResponse\nfrom updateable import settings\n\n\nclass UpdateableMiddleware(object):\n\n def process_request(self, request):\n updateable = bool(request.GET.get(settings.UPDATEA...
python
edit
3
3
bsd-3-clause
a350fb8264c9691a1a1711e1c786fb967e6aaf0b
baldurthoremilsson/django-updateable,baldurthoremilsson/django-updateable
updateable/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\"\"\"counterid - Simple utility to discover perfmon counter paths\"\"\"\r\n# Compile to EXE using c:\\Python27\\scripts\\pyinstaller.exe -F counterid.py\r\n\r\n__author__ = '<EMAIL> (Scott Vintinner)'\r\nimport win...
python
edit
1
1
mit
4511fef9b2c6521197dc64963c58c1a77e3475b3
flakshack/pyPerfmon
counterid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport setuptools_scm\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'rst.linker',\n]\n\n# General information about the project.\nproject = 'skeleton'\ncopyright = '2016 Jason R. Coombs...
python
edit
1
0
mit
cc80be915b6912056990bf71324826e244432533
jaraco/jaraco.path,jaraco/zipp,jaraco/jaraco.functools,jaraco/jaraco.collections,jaraco/backports.functools_lru_cache,jaraco/portend,yougov/mettle,jazzband/inflect,jaraco/jaraco.context,yougov/mettle,jaraco/rwt,yougov/mettle,pytest-dev/pytest-runner,hugovk/inflect.py,jaraco/keyring,cherrypy/magicbus,yougov/mettle,pytho...
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\n# This module is how we import settings, and override settings with various\n# precedences.\n\n# First our base.py settings module is imported, with all of the\n# important defaults.\n#\n# Next our yaml file is opened, read,...
python
edit
1
0
apache-2.0
783ce62c7dd6b553c37c984113a0964fa1837e76
osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api
whats_fresh/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.contrib.auth.views import login\n\nfrom movies.urls import urlpatterns as movie_urls\n\nurlpatterns = [\n url(r'^', movie_urls, name='movies'),\n ...
python
edit
1
0
mit
2b6fcb362a6dbf875075af13787bba76928098c3
kinoreel/kinoreel-backend,kinoreel/kinoreel-backend
kinoreel_backend/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# TM1py Exceptions are defined here\n\n\nclass TM1pyException(Exception):\n \"\"\" The default exception for TM1py\n\n \"\"\"\n def __init__(self, response, status_code, reason, headers):\n self._r...
python
edit
1
1
mit
0c29ab9f906ca73605e3626c06dd14f573d5fa8f
OLAPLINE/TM1py
TM1py/Exceptions/Exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\n#from labsys.patients import Patient\n\nfrom django.db import models\n\nclass AdmissionNote(models.Model):\n id_gal = models.CharField(max_length=30)\n requester = models.CharField(\n max_length=255,\n ...
python
edit
3
1
mit
6f0d09ff5f81518daf30b00311ce4ac052e08c14
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
admission_notes/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport datetime\nimport csv\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.conf import settings\nfrom django.utils import timezone\nfrom radio.models import *\n\nclass Command(BaseCommand):\n ...
python
edit
11
6
mit
46a30fa8d52c1c36e110a8e028444b27e39c9b6d
ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player
radio/management/commands/export_talkgroups.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# http://www.openstreetmap.org/way/287494678\nz = 18\nx = 77193\ny = 98529\nwhile z >= 16:\n assert_has_feature(\n z, x, y, 'buildings',\n { 'kind': 'building',\n 'id': 287494678 })\n\n z -= 1\n x /= 2\n y...
python
edit
2
0
mit
85878d23d598b7d7622f8aa70ef82b7a627aed23
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/912-missing-building-part.py
rejected_duplicate
Near-duplicate of sample 7169
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom antZoo.ant import AntJobRunner\n\nant = AntJobRunner( None )\n\nant.start()\n\nclass Job:\n def __init__( self, source ):\n self.source = source\n\nj = Job( \"/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/cod...
python
edit
3
1
mit
4cfc0967cef576ab5d6ddd0fff7d648e77739727
streed/antZoo,streed/antZoo
test_scriptrunner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass AsyncApiCommunicator(object):\n def __init__(self, inner):\n self.inner = inner\n\n def call(self, *args, **kwargs):\n tag = self.inner.send(*args, **kwargs)\n return ResponsePromise(self.inner, tag)\n\nclas...
python
edit
1
2
mit
405cc83e1532f5277d180964907e964ded5f5da7
kramarz/RouterOS-api,pozytywnie/RouterOS-api,socialwifi/RouterOS-api
routeros_api/api_communicator/async_decorator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) SAS Institute 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://ww...
python
edit
2
3
apache-2.0
2a0c9cc447e1dffe2eb03c49c0c6801f4303a620
sassoftware/rbuild,sassoftware/rbuild
plugins/imagetypes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport yorm\nfrom yorm.types import List, Object\n\n\nlog = logging.getLogger(__name__)\n\n\n@yorm.attr(items=List.of_type(Object))\n@yorm.sync(\"data/images/cache.yml\")\nclass Cache:\n\n SIZE = 9\n\n def __init__(s...
python
edit
1
3
mit
4c7ea928782c976919a055379a921983c5bbf97a
DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen
memegen/routes/_cache.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom Adafruit_BMP085 import BMP085\nimport json\n\n#initialise sensor\nprint ('Initialising sensor...')\nbmp = BMP085(0x77, 3) # ULTRAHIRES Mode\n\nprint ('Reading sensor...')\ntemp = bmp.readTemperature()\npressure = bmp....
python
edit
1
0
mit
e01eb66aeb853261c80cb476e71f91a9569b1676
JTKBowers/kelvin
client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import utils\nfrom . import crimetype\n\nfrom .crimetype.tag import CrimeTags\nfrom .geoloc.tag import GeoCoder, get_lat_longs_from_geostrings\nfrom .utils.load_data import load_data\nfrom .utils.load_data import load_ner_data\nfrom ...
python
edit
10
0
mit
c7ccfd82298c2c8c90c230f846ca9319bcf40441
kbrose/article-tagging,kbrose/article-tagging,chicago-justice-project/article-tagging,chicago-justice-project/article-tagging
lib/tagnews/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom . import views\nfrom django.conf import settings\n\nurlpatterns=[\n\turl(r'^login/$', views.login, name='login'),\n\turl(r'^logout/$', views.logout, name='logout'),\n\turl(r'^users/$', views.users, nam...
python
edit
3
0
apache-2.0
fd11e57f736fff6ef23972dee642554c6e8f5495
kensonman/webframe,kensonman/webframe,kensonman/webframe
urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom pystray import Icon, Menu, MenuItem\nimport webview\n\nimport sys\nif sys.platform == 'darwin':\n # System tray icon needs to run in it's own process on Mac OS X\n from multiprocessing import Process as Thr...
python
edit
3
1
bsd-3-clause
1f8845f89aa936379fbea4d8707fbb4887c62696
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
examples/pystray_icon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cookielib\nimport os\nimport pickle\nimport urllib2\n\nclass Opener:\n user_agent = u\"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; \" + \\\n u\"en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11\"\n\n def __init__(sel...
python
edit
5
2
mit
0ed72241dc9f540615954f58995d96401d954a41
bschoenfeld/va-court-scraper,bschoenfeld/va-court-scraper
courtreader/opener.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\nimport unittest\n\nfrom cumulusci.core.config import ServiceConfig\nfrom cumulusci.core.config import TaskConfig\nfrom cumulusci.tasks.github import PullRequests\nfrom cumulusci.tests.util import create_project_config\n\n\n@moc...
python
edit
1
1
bsd-3-clause
90b9a1e6638fd638450b46c6b12439eeb8e40f90
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
cumulusci/tasks/github/tests/test_pull_request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('matlab', parent_package, top_path)\n config.add_data_dir('tests')\n ret...
python
edit
1
1
bsd-3-clause
37ddf8b41ee770a27c4eb59d27fc74fea60faaee
anielsen001/scipy,kleskjr/scipy,WarrenWeckesser/scipy,cpaulik/scipy,felipebetancur/scipy,dominicelse/scipy,Shaswat27/scipy,arokem/scipy,aarchiba/scipy,ilayn/scipy,fernand/scipy,piyush0609/scipy,surhudm/scipy,sauliusl/scipy,mtrbean/scipy,petebachant/scipy,Gillu13/scipy,argriffing/scipy,sonnyhu/scipy,jor-/scipy,arokem/sc...
scipy/io/matlab/setup.py
rejected_duplicate
Near-duplicate of sample 912
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"PyPI\n\"\"\"\nfrom invoke import run\n\n\ndef upload_to_pypi(\n dists: str = 'sdist bdist_wheel',\n username: str = None,\n password: str = None,\n skip_existing: bool = False\n):\n \"\"\"Creates the whe...
python
edit
1
2
mit
1cec2df8bcb7f877c813d6470d454244630b050a
relekang/python-semantic-release,relekang/python-semantic-release
semantic_release/pypi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom http import client as http_client\n\nfrom oscar.test.testcases import WebTestCase\nfrom oscar.apps.customer.notifications import services\nfrom oscar.test.factories import UserFactory\nfrom django.urls import reverse\n\nfrom oscar.apps...
python
edit
1
2
bsd-3-clause
f959e9213f27cee5ed5739655d4f85c7d0d442aa
solarissmoke/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,sasha0/django-oscar,solarissmoke/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,sasha0/django-oscar,django-oscar/django-oscar
tests/functional/customer/test_notification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Domestic-Workers\n# ================\nimport csv\n\n\ndef read_data(filename):\n \"\"\"\n Read specified csv file, and return it as a list of dicts.\n \"\"\"\n\n with open(filename, 'r') as f:\n return list(csv.DictRead...
python
edit
1
1
apache-2.0
256d16c1c31d75442e014554fc0e8ed1d3e96adf
shakermaker/Domestic-Workers,shakermaker/Domestic-Workers,Code4SA/Domestic-Workers,Code4SA/Domestic-Workers
get_value.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\nimport subprocess\n\n\nclass TestExecutor(threading.Thread):\n \"\"\"\n The general thread to perform the tests executions\n \"\"\"\n\n def __init__(self, run_id, test_name, queue):\n super().__init__()\...
python
edit
1
1
mit
a2b4b53635ab1188e95efd68f64104a469e7ff66
jfelipefilho/test-manager,jfelipefilho/test-manager,jfelipefilho/test-manager
scheduler/executor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom office365.runtime.http.http_method import HttpMethod\nfrom office365.runtime.queries.service_operation_query import ServiceOperationQuery\n\n\nclass DownloadFileQuery(ServiceOperationQuery):\n\n def __init__(self, web, file_url, fil...
python
edit
1
1
mit
ed0c44ad01a1b88b0e6109a629455ae44ff91011
vgrem/Office365-REST-Python-Client
office365/sharepoint/actions/download_file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8\n\"\"\"\nProvides template utilities.\n\"\"\"\n\nimport jinja2\n\nfrom . import markdown as md, plugins\n\n# TODO: Make this a setting\nTEMPLATE_DIR = 'templates'\n\n\n# TODO: Make this a setting\ndef locale_date(date)...
python
edit
1
2
mit
2ff6e50e0a4db641b026faa324c4cf0204e3a192
alexwlchan/hot-chocolate,alexwlchan/hot-chocolate
src/hotchocolate/templates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport gevent.monkey\ngevent.monkey.patch_all()\n\nimport logging\nhandler = logging.StreamHandler()\nlog_format = '{levelname}:etiquette.{module}.{funcName}: {message}'\nhandler.setFormatter(logging.Formatter(log_format, style='{'))\nloggi...
python
edit
1
0
bsd-3-clause
b00d93901a211a35bdb30e00da530dde823c4a2d
voussoir/etiquette,voussoir/etiquette,voussoir/etiquette
frontends/etiquette_flask/etiquette_flask_launch.py
rejected_duplicate
Near-duplicate of sample 18218
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pyblish.api\n\n\nclass ValidateMindbenderSingleAssembly(pyblish.api.InstancePlugin):\n \"\"\"Each asset must have a single top-level group\n\n The given instance is test-exported, along with construction\n history to test wh...
python
edit
1
3
mit
0887e200f31edd8d61e0dd1d3fefae7e828c9269
getavalon/core,MoonShineVFX/core,MoonShineVFX/core,mindbender-studio/core,mindbender-studio/core,getavalon/core
mindbender/maya/plugins/validate_single_assembly.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom dal import autocomplete\n\nfrom .models import Course, Options\n\nclass OptionsForm(forms.ModelForm):\n \"\"\"\n A form solely used for autocomp...
python
edit
1
1
mit
b5a71f2142c16b8523da483a6879578522cfd9bb
afriestad/WikiLinks,afriestad/WikiLinks,afriestad/WikiLinks
semesterpage/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# encoding: utf-8\n\n\n# Splits a word into multiple parts\ndef split_word(word):\n if len(word) < 2:\n raise Exception(\n \"You obviously need at least two letters to split a word\")\n split_...
python
edit
1
2
unlicense
327428de0267de773a850daa9d376891fe02308f
andyn/kapunaattori
splitword.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fields import FieldBase\n\nclass Model(object):\n\n class __metaclass__(type):\n def __init__(cls, name, bases, attrs):\n fields = {}\n for name, value in attrs.items():\n if isinstance(va...
python
edit
1
3
unlicense
92e96c010b54bf4c9e35d49de492cf9f061f345a
j4mie/micromodels
micromodels/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file)\n\ngit-svn-id: eda3d06fcef731589ace1b284159cead3416df9b@2214 af82e4...
python
new_file
4
0
bsd-3-clause
477faabee7fc674f8ce0c04663b9eff3943e83fa
moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dokipen/trac,moreati/trac-gitsvn,dafrito/trac-mirror,moreati/trac-gitsvn,exocad/exotrac
trac/versioncontrol/web_ui/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nplotly\n======\n\nThis module defines functionality that requires interaction between your\nlocal machine and Plotly. Almost all functionality used here will require a\nverifiable account (username/api-key pair) and a network connec...
python
edit
13
0
mit
7a0da88638c3d0fe0f9088c0d9008ff60503fe06
plotly/python-api,ee-in/python-api,plotly/plotly.py,plotly/plotly.py,ee-in/python-api,plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/python-api
plotly/plotly/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.utils import timezone\n\n# Create your models here.\n\nclass Post(models.Model):\n author = models.ForeignKey('auth.User')\n title = models.CharField...
python
edit
1
1
mit
15941639134d4360753607bd488d3c80d15ca825
ugaliguy/Django-Tutorial-Projects,ugaliguy/Django-Tutorial-Projects
second/blog/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3.5\n\nimport subprocess\n\n\nclass NvidiaCommandsLayerException(Exception):\n pass\n\n\nclass NvidiaCommandsLayer(object):\n @staticmethod\n def set_fan_percentage(\n value: int\n ) -> None:\n ...
python
edit
1
4
mit
5f688e5a99c2e4ec476f28306c2cca375934bba7
radu-nedelcu/nvidia-fan-controller,radu-nedelcu/nvidia-fan-controller
nvidia_commands_layer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom attribute_dict import AttributeDict\nfrom alias_dict import AliasDict\n\n\n__version__ = \"0.1.2\"\n\n\nclass Lexicon(AttributeDict, AliasDict):\n def __init__(self, *args, **kwargs):\n # Need to avoid combining AliasDict's i...
python
edit
1
3
bsd-2-clause
cdb8756ead6a61a3fbb3001050091506e16481e5
mindw/lexicon,bitprophet/lexicon
lexicon/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\n\nfrom .history import clone\nfrom . import config\n\n\ndef validate_remote(ctx, param, value):\n if value:\n try:\n remote, branch = value.split('/')\n return (remote, branch)\n except V...
python
edit
1
7
mit
4b379e82dd503afc04569a50c08a7cdd9abfe4b0
scorphus/passpie,scorphus/passpie,marcwebbie/passpie,marcwebbie/passpie
passpie/validators.py
rejected_duplicate
Near-duplicate of sample 18490
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport venusian\n\n\nclass tween_config(object):\n \"\"\" A decorator which allows developers to annotate tween factories. \"\"\"\n\n venusian = venusian\n\n def __init__(self, *args, **kwargs):\n self.args = args\n s...
python
edit
1
1
mit
17bb4f62d13838623ac097ef2f2feb88d95f8539
britco/opbeat_pyramid,monokrome/opbeat_pyramid
opbeat_pyramid/tweens.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nImport the main names to top level.\n\"\"\"\n\nfrom . import models as models\nfrom .compute_fp import compute_fixed_point\nfrom .discrete_rv import DiscreteRV\nfrom .ecdf import ECDF\nfrom .estspec import smooth, periodogram, ar_pe...
python
edit
33
0
bsd-3-clause
1e9fb28b1263bb543191d3c44ba39d8311ad7cae
QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,oyamad/QuantEcon.py
quantecon/__init__.py
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nsys.path.append(os.path.join(os.path.dirname(__file__),'..'))\n\n\nfrom decimal import Decimal\nfrom decimal import getcontext\nfrom FormulaSolidityPort import fixedLog2\n\n\nMIN_PRECISION = 32\nMAX_PRECISION = 127\n\...
python
edit
4
1
apache-2.0
ff9fc6e6036ea99af4db6a5760d05a33cf7336e1
enjin/contracts
solidity/python/constants/PrintLn2ScalingFactors.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\nimport unittest\n\nimport pdb\nimport gui\nimport human_player\nimport rules\nimport game\n#import profile\n\nfrom ai_player import *\n\nclass AIPlayerTest(unittest.TestCase):\n\n def setUp(self):\n # TODO...
python
edit
4
1
mit
1cdf0cd00cbc7006194d07770b3b804dd661500e
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
t_ai_player.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\n__all__ = ['UTC']\n\nfrom datetime import timedelta, tzinfo\n\n\n_ZERO = timedelta(0)\n\n\ndef is_dict_different(d1, d2, epsilon=0.00000000001):\n s1 = set(d1.keys())\n s2 = set(d2.keys())\n intersect = s1.interse...
python
edit
1
7
apache-2.0
17d9c84b01a6b9adc264164041d4c226355a6943
loadimpact/loadimpact-sdk-python
loadimpact/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# from .model.fileio import (stitch_fitted_results, spec_to_hdf, create_movie,\n# combine_data_to_recon, h5file_for_recon, export_to_view)\n# from .model.load_data_from_db import make_hdf, make_hdf_stitched, expo...
python
edit
1
0
bsd-3-clause
2dec3e5810ef9ba532eaa735d0eac149c240aa2f
NSLS-II/PyXRF,NSLS-II-HXN/PyXRF,NSLS-II-HXN/PyXRF
pyxrf/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom os import path\nimport sys\n\nimport yaml\n\n\ndef get_config():\n \"\"\"Get the configurations from .tldrrc and return it as a dict.\"\"\"\...
python
edit
1
5
mit
9c34cdd6f82f84a54bedc505ef0ad4b9df40ef6a
lord63/tldr.py
tldr/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aurorawatchuk as aw\n\n\nclass AuroraWatchUK(object):\n \"\"\"Take a snapshot of the AuroraWatch UK status.\n\n This class mimics the behaviour of the aurorawatchuk.AuroraWatchUK class but its fields are evaluated just once,\n ...
python
edit
1
3
mit
6e4fcfeb6da8f4d61731ec2cb77c14b09fe35d31
stevemarple/python-aurorawatchuk
aurorawatchuk/snapshot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom micropress.models import Article, Section, Press\n\n\nclass ArticleForm(forms.ModelForm):\n section = forms.ModelChoiceField(Section.objects.all(), empty_label=None)\n\n class Meta:\n model = Arti...
python
edit
1
2
mit
96855ef5baee62f63887d942854c065ad6943f87
jbradberry/django-micro-press,jbradberry/django-micro-press
micropress/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\n\ndef quacks_like_dict(object):\n \"\"\"Check if object is dict-like\"\"\"\n return isinstance(object, collections.Mapping)\n \ndef deep_merge(a, b):\n \"\"\"Merge two deep dicts non-destructively\n \n ...
python
edit
1
6
apache-2.0
dcb8678b8f460ce1b5d5d86e14d567a3bcbaa0d1
basho/riak-python-client,bmess/riak-python-client,GabrielNicolasAvellaneda/riak-python-client,basho/riak-python-client,bmess/riak-python-client,GabrielNicolasAvellaneda/riak-python-client,basho/riak-python-client
riak/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\nfrom handler_fixture import StationHandlerTestCase\n\nfrom groundstation.transfer.request_handlers import handle_fetchobject\nfrom groundstation.transfer.response_handlers import handle_terminate\n\n\nclass TestHandlerTerminate...
python
edit
1
1
mit
9310be1429109f5324502f7e66318e23f5ea489d
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_terminate_handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\n\ndef get_latest_header_images(idx=0, num=5):\n resp = requests.get(\"http://www.bing.com/HPImageArchive.aspx?format=js&n={0}&idx={1}\".format(num, idx)).json()\n \n if resp is None:\n return {}\n\n ret...
python
edit
1
3
mit
0469ba1f4f1d907013c328bc2834905dd391dba8
orf/simple,orf/simple,orf/simple
simple/bing_images.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.ext import db\nimport uuid\n\nclass EmailUser(db.Model):\n # the email address that the user sends events to:\n email_address = db.StringProperty(default=str(uuid.uuid4()))\n # the AuthSub token used to authen...
python
edit
1
2
mit
40ac5bc5f8c3f68c0c5b2b6debe19b487893d6f5
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
ecal_users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Ingestion service: create a metaproject (tag) with user-defined name in given space\n\ndef process(transaction, parameters, tableBuilder):\n \"\"\"Create a project with user-defined name in given space.\n ...
python
edit
1
4
apache-2.0
33fd4bba1f2c44e871051862db8071fadb0e9825
aarpon/obit_shared_core_technology,aarpon/obit_shared_core_technology,aarpon/obit_shared_core_technology
core-plugins/shared/1/dss/reporting-plugins/shared_create_metaproject/shared_create_metaproject.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\"\"\"\nAnsibleInventory:\n\nINTRO:\n\nUSAGE:\n\n\"\"\"\n\nimport os\nimport ansible.inventory\n\n\nclass AnsibleInventory(object):\n '''\n Ansible Inventory wrapper class.\n '''\n ...
python
edit
2
5
apache-2.0
31a8d7377d46abef6eec6f7eb5b154f948c3388a
bdastur/spam,bdastur/spam
spam/ansiInventory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Original algorithm by Xavier Defrang.\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81330\n# This implementation by <EMAIL>.\n\nimport re\nimport UserDict\n\n\nclass Textsub(UserDict.UserDict):\n def __init__(self, dict=No...
python
edit
1
3
bsd-3-clause
25121b9bdceda0b0a252e2bdec0e76a4eb733a4c
oohlaf/dotsecrets
dotsecrets/textsub.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nExecute salt convenience routines\n'''\n\n# Import python modules\nimport sys\n\n# Import salt modules\nimport salt.loader\n\nclass Runner(object):\n '''\n Execute the salt runner interface\n '''\n def __init__(self, opts):...
python
edit
4
3
apache-2.0
0b99bf43e02c22f0aa136ca02717521b1f4f2414
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/runner.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.10 on 2016-12-16 15:03\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\nfrom democracy.models import SectionComment\n\n\ndef forwards_func(apps, schem...
python
edit
1
2
mit
b345c00b41ade2e12449566f7cb013a7bb8d078f
City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi
democracy/migrations/0032_add_language_code_to_comment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#-------------------------------------------------------------------------------\n## Description\n\"\"\"\nDefine file for Cache Manager Tool.\n\"\"\"\n#---------------------------------------------------------------...
python
edit
1
0
mit
17b42f9bcd4168494f529104d3d172cb0310d58a
takavfx/Bento
python2.7libs/CacheManager/define.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask\n\napp = Flask(__name__)\nbasedir = os.path.abspath(os.path.dirname('data'))\nbasedir_img = os.path.abspath(os.path.dirname('angular_flask'))\napp.config[\"SECRET_KEY\"] = \"\\xed\\x9c\\xac\\xcd4\\x83k\\xd...
python
edit
3
0
mit
cb1d4de41a7de1687041244c126c14ed76fd6959
Clarity-89/blog,Clarity-89/blog,Clarity-89/blog
angular_flask/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.utils.encoding import smart_text\n\nfrom import_export.admin import ExportMixin\n\nfrom remo.remozilla.models import Bug, Status\n\n\ndef encode_bugzilla_strings(modeladmin, request, queryset):\...
python
edit
1
3
bsd-3-clause
3d8bca4c8f5065342dd2f4c140cc792b2e2d94a1
mozilla/remo,tsmrachel/remo,flamingspaz/remo,tsmrachel/remo,akatsoulas/remo,tsmrachel/remo,mozilla/remo,mozilla/remo,flamingspaz/remo,akatsoulas/remo,akatsoulas/remo,Mte90/remo,akatsoulas/remo,tsmrachel/remo,flamingspaz/remo,mozilla/remo,Mte90/remo,Mte90/remo,flamingspaz/remo,Mte90/remo
remo/remozilla/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf8 -*-\n\"\"\"\nUsage:\nexgrep TERM [options] EXCEL_FILE...\n\nOptions:\nTERM The term to grep for. Can be any valid (python) regular expression.\nEXCEL_FILE The list of files to search throug...
python
edit
1
8
mit
8061b8dd4e836e6af16dd93b332f8cea6b55433c
Sakartu/excel-toolkit
exgrep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\n\n\nclass Steckerbrett:\n def __init__(self):\n pass\n\n\nclass Umkehrwalze:\n def __init__(self, wiring):\n self.wiring = wiring\n\n def encode(self, letter):\n return self.wiring[string.ascii_u...
python
edit
1
2
mit
44fe9bc37b05987c4c323d3be56f69c6f5990b82
ranisalt/enigma
enigma.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"updates subreddit css with compiled sass\"\"\"\nimport subprocess\nimport praw\n\ndef css() -> str:\n \"\"\"compiles sass and returns css\"\"\"\n res: subprocess.CompletedProcess = subprocess.run(\n \"sass index.scss --st...
python
edit
1
1
mit
5d91948e11400253f161be489bb8c9bf13b7ee35
neoliberal/css-updater
source/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest settings for ``eventkit`` app.\n\"\"\"\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'db.sqlite3',\n }\n}\n\nDEBUG = True\nEMAIL_BACKEND = 'django.core.mail.backends.con...
python
edit
1
0
mit
d55b4b0cd7e160be687129482ecd72792b5c6d81
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events
eventkit/tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Data transformation utilities test cases.\"\"\"\n\nimport unittest\n\nfrom datagrid_gtk3.utils.transformations import degree_decimal_str_transform\n\n\nclass DegreeDecimalStrTransformTest(unittest.TestCase):\n\n \"\"\"Degree decima...
python
edit
1
1
mit
387fd69d034260ceb389c33d0f561967fd902db0
nowsecure/datagrid-gtk3,jcollado/datagrid-gtk3
datagrid_gtk3/tests/utils/test_transformations.py
rejected_duplicate
Near-duplicate of sample 5410
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests directories set in the permamodel package definition file.\"\"\"\n\nimport os\nfrom nose.tools import assert_true\nfrom .. import (permamodel_directory, data_directory,\n examples_directory, tests_directory)\n\n\n...
python
edit
1
1
mit
a7946f996d618ad2491f36655f000c513017193c
permamodel/permamodel,permamodel/permamodel
permamodel/tests/test_package_directories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest api_objects.py\n\"\"\"\nimport unittest\n\nfrom fmcapi import api_objects\n\n\nclass TestApiObjects(unittest.TestCase):\n\n def test_ip_host_required_for_put(self):\n self.assertEqual(api_objects.IPHost.REQUIRED_FOR_P...
python
edit
1
1
bsd-3-clause
880b00a92ac86bb9a5d30392bafb2c019dab7b74
daxm/fmcapi,daxm/fmcapi
test/unit/test_api_objects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Leetcode 525. Contiguous Array\nMedium\n\nURL: https://leetcode.com/problems/contiguous-array/\n\nGiven a binary array, find the maximum length of a contiguous subarray\nwith equal number of 0 and 1.\n\nExample 1:\nInput: [0,1]\nOutpu...
python
edit
3
4
bsd-2-clause
d6ed0e5925e0793bf4fc84b09e709b3a0d907f58
bowen0701/algorithms_data_structures
lc0525_contiguous_array.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\n'''NotFoundHandler\n'''\n\nfrom tornado.web import HTTPError\n\nfrom twork_app.web.action.base import BaseHandler\n\n\nclass NotFoundHandler(BaseHandler):\n '''NotFoundHandler, RESTFUL ...
python
edit
1
1
apache-2.0
722c3dad6d0a0cc34955ab4a5cfafb90a7cf0e64
bufferx/twork,bufferx/twork
scaffold/twork_app/twork_app/web/action/not_found.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add blinkenlights metrics workers to vumi.blinkenlights package namespace (for convenience)." }, { "role": "assistant", "content": "\"\"\"Vumi monitoring and control framework.\"\"\"\n\nfrom vumi.blinkenlights.metrics_workers imp...
python
new_file
1
0
bsd-3-clause
768ba3ef82df95e308c1431d17e7173e4ecd2861
vishwaprakashmishra/xmatrix,TouK/vumi,TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,harrissoerja/vumi
vumi/blinkenlights/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Complete example of checking requirements" }, { "role": "assistant", "content": "\"\"\"Example of checking the requirements of bibtext and biblatex.\"\"\"\n\nfrom __future__ import print_function\n\nimport bibpy\nimport os\n\n\nd...
python
new_file
1
5
mit
0f68fdb37f28f01f21ca42d3bf509dc6138fb157
MisanthropicBit/bibpy,MisanthropicBit/bibpy
examples/requirements_check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom melopy import *\n\nm = Melopy('canon', 50)\nmelody = []\n\nfor start in ['d4', 'a3', 'b3m', 'f#3m', 'g3', 'd3', 'g3', 'a3']:\n\tif start.endswith('m'):\n\t\tscale = generate_minor_triad(start[:-1])\n\telse:\n\t\tscale = generate_major_...
python
edit
3
0
mit
38b2bccc4146226d698f5abd1bed1107fe3bbe68
juliowaissman/Melopy,jdan/Melopy
canon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os.path as path\nimport sys\nimport csv\n\nTUMOR_CONFIG_DIALECT = \"tumor-type-config\"\ncsv.register_dialect(TUMOR_CONFIG_DIALECT, delimiter=',', lineterminator='\\n')\n\n_relpath_configfile = path.join('con...
python
edit
1
0
mit
6cd3e11f6ec84cffc0ea71d15d2e164f499529cf
cancerregulome/gidget,cancerregulome/gidget,cancerregulome/gidget
gidget/util/tumorTypeConfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nName: Paul Briant\nDate: 12/11/16\nClass: Introduction to Python\nAssignment: Final Project\n\nDescription:\nCode for Final Project\n\"\"\"\n\nimport pandas\nfrom datetime import datetime\n\n# Change source to smaller file.\ndata = ...
python
edit
3
0
unlicense
d0a2f82686158f6610ec5f57f586598be7569c6d
UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016
students/psbriant/final_project/clean_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass A:\n pass\n\na = A()\nprint(a.f<caret>oo)\n\nx = A() or None\nprint(x.foo)\n```\n\nApply this change: Use more reliable test data as pointed in IDEA-COMMUNITY-CR-936" }, { "role": "assistant", "content": "class A:\n ...
python
edit
3
2
apache-2.0
7b798d923c5a5af37e9f4c2d92881e907f2c0c74
asedunov/intellij-community,orekyuu/intellij-community,clumsy/intellij-community,ftomassetti/intellij-community,TangHao1987/intellij-community,youdonghai/intellij-community,clumsy/intellij-community,caot/intellij-community,diorcety/intellij-community,asedunov/intellij-community,supersven/intellij-community,signed/intel...
python/testData/inspections/PyUnresolvedReferencesInspection/ignoredUnresolvedReferenceInUnionType.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 Topic(models.Model):\n name = models.CharField(max_length=100)\n description = models.TextField()\n attachment = models.ManyToManyField(Attachment)\n\n def...
python
edit
1
1
mit
218aab63d87d6537c6705f6228a5f49e61d27f8f
Hackfmi/Diaphanum,Hackfmi/Diaphanum
protocols/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest example snippets from the lldb 'help expression' output.\n\"\"\"\n\nimport os, time\nimport unittest2\nimport lldb\nfrom lldbtest import *\nimport lldbutil\n\nclass Radar9673644TestCase(TestBase):\n\n mydir = TestBase.comput...
python
edit
12
1
apache-2.0
025bd5d3e3d7c80ea7408a6bd9a846c6b36cc88b
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb
test/expression_command/radar_9673664/TestExprHelpExamples.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2021 TF.Text Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
3
0
apache-2.0
7341cc7a9049d3650cf8512e6ea32fefd4bf3cee
tensorflow/text,tensorflow/text,tensorflow/text
tensorflow_text/python/keras/layers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to populate Base Tags on app startup" }, { "role": "assistant", "content": "from api.models import BaseTag\n\nTAGS = {\n 'fairness': {\n 'color': '#bcf0ff',\n 'description': 'Fairness is ideas of justice, rights...
python
new_file
2
2
mit
18a8a9e90ab0dd31ca1ee147f85d16d0cc7e6bc1
haystack/eyebrowse-server,haystack/eyebrowse-server,haystack/eyebrowse-server,haystack/eyebrowse-server,haystack/eyebrowse-server
api/__init__.py
rejected_duplicate
Near-duplicate of sample 16478
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom boto.utils import ShellCommand, get_ts\nimport boto\nimport boto.utils\n\nclass ScriptBase:\n\n def __init__(self, config_file=None):\n self.instance_id = boto.config.get('Instance', 'instance-id', 'def...
python
edit
1
4
mit
fdc4f3bfc1c3e3aa6f6243f0e6bf200025a79103
kouk/boto,jamesls/boto,stevenbrichards/boto,serviceagility/boto,nikhilraog/boto,j-carl/boto,ryansb/boto,acourtney2015/boto,drbild/boto,revmischa/boto,ric03uec/boto,alfredodeza/boto,tpodowd/boto,clouddocx/boto,jindongh/boto,Pretio/boto,kouk/boto,lochiiconnectivity/boto,drbild/boto,zachmullen/boto,pfhayes/boto,podhmo/bot...
boto/pyami/scriptbase.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom decouple import config\n\nfrom jobs.settings import *\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'test_db',\n 'USER': 'postgres',\n 'PASSWORD': '',\n ...
python
edit
4
0
mit
e50f4bd135b41fa49a3f4d4972f1d7ee594e4447
misachi/job_match,misachi/job_match,misachi/job_match
jobs/test_settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom .common import (\n ReadCancelledError, InvalidParameterError, TypeNotFoundError,\n InvalidChecksumError\n)\n\nfrom .rpc_errors import (\n RPCError, InvalidDCError, BadRequestError, UnauthorizedError,\n Forbidde...
python
edit
19
8
mit
be33ae4e800619e0c50ef9dd7ce5e135e2ebb54b
LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,kyasabu/Telethon,expectocode/Telethon,andr-04/Telethon
telethon/errors/__init__.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# *** DON'T MODIFY THIS FILE! ***\n#\n# Instead copy it to stormtracks_settings.py\n#\n# Default settings for project\n# This will get copied to $HOME/.stormtracks/\n# on install.\nimport os\n\nSETTINGS_DIR = os.path.abspath(os.path.dirname...
python
edit
1
0
mit
e4cfbe6a60a15041a449fd7717166849136cb48b
markmuetz/stormtracks,markmuetz/stormtracks
stormtracks/settings/default_stormtracks_settings.py
rejected_duplicate
Near-duplicate of sample 18609
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Released under The MIT License (MIT)\n# http://opensource.org/licenses/MIT\n# Copyright (c) 2013-2016 SCoT Development Team\n\n\"\"\"Use internally implemented functions as backend.\"\"\"\n\nfrom __future__ import absolute_import\nimport ...
python
edit
1
1
mit
2329886a57a25db56079ff615188b744877f3070
mbillingr/SCoT,scot-dev/scot,scot-dev/scot,cle1109/scot,cbrnr/scot,cle1109/scot,mbillingr/SCoT,cbrnr/scot
scot/backend_builtin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.http import Http404\n\nfrom feincms import settings\nfrom feincms._internal import get_model\nfrom feincms.module.mixins import ContentView\n\n\nclass Handler(ContentVi...
python
edit
1
4
bsd-3-clause
91bf68e26c0fdf7de4209622192f9d57be2d60f8
joshuajonah/feincms,mjl/feincms,matthiask/django-content-editor,michaelkuty/feincms,matthiask/django-content-editor,nickburlett/feincms,feincms/feincms,michaelkuty/feincms,mjl/feincms,mjl/feincms,joshuajonah/feincms,joshuajonah/feincms,nickburlett/feincms,matthiask/django-content-editor,joshuajonah/feincms,feincms/fein...
feincms/views/cbv/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext as _\n\nfrom helper.widgets import EmailInput\n\n\nclass PublicBodyForm(forms.Form):\n name = forms.CharField(label=_(\"Name of Public Body\"))\n description = fo...
python
edit
1
2
mit
b12b1245a5a77f2d9373a4878fe07c01335624f7
stefanw/froide,CodeforHawaii/froide,catcosmo/froide,LilithWittmann/froide,LilithWittmann/froide,ryankanno/froide,okfse/froide,fin/froide,LilithWittmann/froide,CodeforHawaii/froide,LilithWittmann/froide,ryankanno/froide,okfse/froide,fin/froide,stefanw/froide,stefanw/froide,catcosmo/froide,ryankanno/froide,catcosmo/froid...
froide/publicbody/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nimport os\n\nfrom flashcards import storage\nfrom flashcards.study import BaseStudySession\nfrom flashcards.commands import sets as sets_commands\nfrom flashcards.commands import cards as cards_commands\n\n\n@click.group()\nde...
python
edit
1
1
mit
f1ba8bf1aeec6579e1830b093485c27bf54ad869
zergov/flashcards,zergov/flashcards
flashcards/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# General Settings\ntimerestriction = False\ndebug_mode = True\nlog_directory = './logs'\n\n# Email Settings\n# emailtype = \"Gmail\"\nemailtype = \"Console\"\n\n# SMS Settings\n# outboundsmstype = \"WebService\"\noutboundsmstype = \"Consol...
python
edit
1
0
mit
7b96c39fc54f17cd52e4b54fb74d21ae66e2d3f0
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/example_config_files/example_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd.module_interface import IMode, IModuleData, Mode, ModuleData\nfrom txircd.utils import ModeType\nfrom zope.interface import implements\n\nclass LimitMo...
python
edit
1
2
bsd-3-clause
9c1c93dc49f1b5986773164a321cdfcb8e383827
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/rfc/cmode_l.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom jellyfish import soundex, nysiis, metaphone\nfrom metaphone import doublemetapho...
python
edit
7
2
isc
076a129a8468a6c85c8b55a752aca87a60f90d79
nsh87/ehrcorral
ehrcorral/compressions.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\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.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
1
apache-2.0
b8c724cb141f6b0757d38b826b5cfd841284a37e
celebdor/kuryr-libnetwork,celebdor/kuryr-libnetwork,celebdor/kuryr-libnetwork
kuryr_libnetwork/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom serial import serial_for_url\n\nfrom .connection import BufferTooShort, Connection, TimeoutError\n\n\nclass SerialConnection(Connection):\n def __init__(self, url, timeout=None):\n self.__serial = serial_for_url(url, baudrate...
python
edit
1
7
mit
bd7c0a9ac2d357ab635bf2948824256f1e6ddbec
tkem/carreralib
src/carreralib/serial.py
accepted
null
true