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 __future__ import print_function, unicode_literals\n\nimport nose.tools as nose\n\nfrom tests.utils import run_filter\n\n\ndef test_ignore_case():\n \"\"\"should ignore case when querying art...
python
edit
1
1
mit
0cc9d5ccc815161d2a64edf4183fc6d14326b43a
caleb531/play-song,caleb531/play-song
tests/test_playartist/test_query.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nshopping_list = []\n\ndef show_help():\n print(\"What should we pick up at the store?\")\n print(\"Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.\")\n\n\n```\n\nApply this change: Add an item to the sho...
python
edit
1
1
mit
429c2548835aef1cb1655229ee11f42ccf189bd1
adityatrivedi/shopping-list
shopping_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICE...
python
edit
1
1
apache-2.0
ba98874be9370ec49c2c04e89d456f723b5d083c
openstack/monasca-ui,openstack/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui,openstack/monasca-ui
monitoring/test/test_data/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport sys\n\nfrom perf.tests import get_output\nfrom perf.tests import unittest\n\n\nclass SystemTests(unittest.TestCase):\n def test_show(self):\n args = [sys.executable, '-m', 'perf', 'system', 'show']\n ...
python
edit
1
1
mit
1a3c251abe2e8ebf3020a21a3449abae6b04c2b1
vstinner/pyperf,haypo/perf
perf/tests/test_system.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The MIT License\n#\n# Copyright (c) 2010 Jeffrey Jenkins\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Softw...
python
edit
1
1
mit
245dd2ef403cd88aebf5dd8923585a9e0489dd97
shakefu/MongoAlchemy,shakefu/MongoAlchemy,shakefu/MongoAlchemy
mongoalchemy/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='syslog2IRC',\n version='0.8',\n description='A proxy to forward syslog messages to IRC',\n url='http://homework.nwsnet.de/releases/c474/#syslog2irc',\n author='Jochen Kuppersch...
python
edit
1
0
mit
6b358e001c270b4ee735550c829a47c4ee4118b4
Emantor/syslog2irc,homeworkprod/syslog2irc
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nDEBUG = True\nSECRET_KEY = '##CHANGEME##'\nSQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa'\nSQLALCHEMY_ECHO = False\n\n```\n\nApply this change: Disable debug mode in default configuration." ...
python
edit
1
0
mit
3b50b38ff71c2a35376eccfffbba700815868e68
jaapverloop/massa
massa/default_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom moto.compat import OrderedDict\nfrom .responses import S3ResponseInstance\n\nurl_bases = [\n \"https?://s3(.*).amazonaws.com\",\n \"https?://(?P<bucket_name>[a-zA-Z0-9\\-_.]*)\\.?s3(.*)....
python
edit
1
0
apache-2.0
a7938ed9ec814fa9cf53272ceb65e84d11d50dc1
william-richard/moto,kefo/moto,botify-labs/moto,2rs2ts/moto,dbfr3qs/moto,im-auld/moto,william-richard/moto,william-richard/moto,Affirm/moto,kefo/moto,botify-labs/moto,Brett55/moto,ZuluPro/moto,ZuluPro/moto,okomestudio/moto,spulec/moto,whummer/moto,william-richard/moto,kefo/moto,kefo/moto,ZuluPro/moto,dbfr3qs/moto,heddl...
moto/s3/urls.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\"\"\"Tests for `judicious` package.\"\"\"\n\nimport pytest\n\n\nimport judicious\n\n\n@pytest.fixture\ndef response():\n \"\"\"Sample pytest fixture.\n\n See more at: http://doc.pytes...
python
edit
1
1
mit
9d0e9af5844772c18ca24d4012642d4518b66dfc
suchow/judicious,suchow/judicious,suchow/judicious
tests/test_judicious.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.mail.backends.smtp import EmailBackend as SMTPBackend\n\nfrom bandit.backends.base import HijackBackendMixin, LogOnlyBackendMixin\n\n\nclass HijackSMTPBackend(HijackBackendMixin, S...
python
edit
1
0
bsd-3-clause
f7fac123bf72af01272bc27a1dfabb788f611908
caktus/django-email-bandit,caktus/django-email-bandit
bandit/backends/smtp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nManage RDP Service on Windows servers\n'''\n\n\ndef __virtual__():\n '''\n Load only if network_win is loaded\n '''\n return 'rdp' if 'rdp.enable' in __salt__ else False\n\n\ndef enabled(name):\n ...
python
edit
8
3
apache-2.0
e0091310ffdb39127f7138966026445b0bac53fc
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/rdp.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nif sys.version_info < (3,):\n sys.exit(\"catimg requires Python 3\")\n\nfrom setuptools import setup\nimport versioneer\n\nsetup(\n name='catimg',\n version=versioneer.get_version(),\n cmdcla...
python
edit
1
0
mit
d9ed160e54ff40783a007154e194767af0574ec1
asmeurer/catimg
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.3 on 2016-12-12 13:25\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom django.utils.text import slugify\n\n\ndef create_slugs(apps, schema_editor):\n V...
python
edit
1
2
bsd-3-clause
b24af9c3e4105d7acd2e9e13545f24d5a69ae230
KenMutemi/saleor,maferelo/saleor,jreigel/saleor,KenMutemi/saleor,jreigel/saleor,itbabu/saleor,itbabu/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,tfroehlich82/saleor,KenMutemi/saleor,mociepka/saleor,car3oon/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,UITools/saleor,UITools/saleor,UITools/sal...
saleor/product/migrations/0018_auto_20161212_0725.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .interfaces import IRoot, IApp\nfrom .publish import publish\nfrom .request import Request\nfrom .traject import Traject\nfrom comparch import ClassRegistry, Lookup, ChainClassLookup\n\nknown_apps = {}\n\nclass App(IApp, ClassRegistry)...
python
edit
3
2
bsd-3-clause
e9ae6b7f92ee0a4585adc11e695cc15cbe425e23
faassen/morepath,morepath/morepath,taschini/morepath
morepath/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport inspect\nfrom _base import BaseExporter\n\n\nclass JSONGeneratorEncoder(json.JSONEncoder):\n \"Handle generator objects and expressions.\"\n def default(self, obj):\n if inspect.isgenerator(obj):\n ...
python
edit
1
2
bsd-2-clause
fef12d2a5cce5c1db488a4bb11b9c21b83a66cab
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
avocado/export/_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\nimport theano\nimport theano.tensor as T\n\nclass Linear():\n\n\tdef __init__(self, rng, input, n_in, n_out, W=None, b=None):\n\n\t\tself.input = input\n\n\t\tif W is None:\n\t\t\tW_values = numpy.asarray(\n\t\t\t\trng.uniform...
python
edit
null
null
mit
e715dd65d3adf74624bc2102afd6a6d8f8706da6
nusnlp/corelm
dlm/models/components/linear.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom djpjax.utils import strip_pjax_parameter\nfrom django.conf import settings\nimport djpjax\n\n\nclass DjangoPJAXMiddleware(object):\n\n def __init__(self):\n djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URL...
python
edit
1
3
bsd-3-clause
c8785033d313f0b6b78eff4bb01c7fa2df330f0d
AlexHill/djpj,AlexHill/djpj
djpjax/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom unittest import TestCase\nfrom rover import Rover\n\nclass TestRover(TestCase):\n\n def setUp(self):\n self.rover = Rover()\n\n def test_rover_compass(self):\n assert self.rover.compass == ['N', 'E', 'S', 'W']\n\n...
python
edit
1
1
mit
6bbd81efbd4821a3963a021d8456531f01edfd6c
authentik8/rover
tests/test_rover_instance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flask import Flask, abort, make_response\nfrom socket import inet_aton, error as socket_error\n\nfrom .db import Database\n\napp = Flask(__name__)\ndb = Database()\n\n\n@app.route('/ip/<ip>')\ndef lookup(ip):\n...
python
edit
1
3
bsd-3-clause
f48b3dee81d0ce34740cfa65b499409f55a2588e
wbolster/whip
whip/web.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom .current_playlist import CurrentPlaylistController\nfrom .library import LibraryController, BaseLibraryProvider\nfrom .playback import PlaybackController, BasePlaybackProvider\nfrom .stored_playlists import (StoredPla...
python
edit
9
0
apache-2.0
7206d68648c91790ac4fa14a3074c77c97c01636
adamcik/mopidy,vrs01/mopidy,pacificIT/mopidy,jmarsik/mopidy,jcass77/mopidy,glogiotatidis/mopidy,kingosticks/mopidy,ZenithDK/mopidy,rawdlite/mopidy,glogiotatidis/mopidy,ZenithDK/mopidy,tkem/mopidy,kingosticks/mopidy,jmarsik/mopidy,SuperStarPL/mopidy,bencevans/mopidy,diandiankan/mopidy,quartz55/mopidy,glogiotatidis/mopid...
mopidy/backends/base/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport matplotlib.pyplot as plt\n\n\n__all__ = ['figure', 'figsize']\n\n\ndef figure(aspect_ratio=1.3, scale=1, width=None, *args, **kwargs):\n \"\"\"Return matplotlib figure window.\n\n Parameters\n ----------\n aspect_ratio : ...
python
edit
1
2
bsd-3-clause
849b9eb93220af324343facb5f83d112de952fa0
tonysyu/mpltools,matteoicardi/mpltools
mpltools/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# For now I am assuming the investment date will be returned from the db \n# as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time\n\n#!/usr/bin/env python3\n\nfrom datetime import datetime, timedelta\nimport pytz...
python
edit
1
1
apache-2.0
93650252e195b036698ded99d271d6249f0bd80f
googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks
project/scripts/dates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utils macros\n\nUtility macros\n\"\"\"\n\ndef macros(macro, environ, *args, **kwargs):\n \"\"\"Return a list of available macros\"\"\"\n\n s = \"\\n\".join([\"* %s\" % k for k in environ[\"macros\"].keys()])\n\n return enviro...
python
edit
1
2
mit
8dccce77f6c08a7c20f38b9f1bacc27b71ab56a1
treemo/circuits,eriol/circuits,treemo/circuits,eriol/circuits,nizox/circuits,treemo/circuits,eriol/circuits
examples/web/wiki/macros/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\ndescription = 'The official Python3 Domo API SDK - Domo, Inc.'\nlong_description = 'See https://github.com/domoinc/domo-python-...
python
edit
1
0
mit
ab3c5e7709dc4eda89821c120d220fc9898ca03c
domoinc/domo-python-sdk,domoinc/domo-python-sdk
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport bmemcached\nimport bz2\n\nclass MemcachedTests(unittest.TestCase):\n def setUp(self):\n self.server = '127.0.0.1:11211'\n self.client = bmemcached.Client(self.server, 'user', 'password')\n sel...
python
edit
1
1
mit
f45e182ec206ab08b1bea699033938b562558670
xmonster-tech/python-binary-memcached,jaysonsantos/python-binary-memcached,xmonster-tech/python-binary-memcached,jaysonsantos/python-binary-memcached
test/test_compression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport yaml\n\n\ndef runLoop( config ):\n\t\"\"\"\n\tRuns indefinitely. On user input (card swipe), will gather the card number,\n\tsend it to the server configured, and if it has been authorized, open the\n\trelay with a G...
python
edit
1
4
mit
709d4386a308ce8c0767eab1f2174ec321ea59fd
aradler/Card-lockout,aradler/Card-lockout,aradler/Card-lockout
client/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\nfrom functools import wraps\nimport os\n\nextensions = {}\n\n\ndef extension(f):\n # keep unwrapped function\n unwrapped = f\n\n @wraps(f)\n def wrapper(**kwargs):\n wrapper.settings = dict(kwargs)\n ...
python
edit
1
3
mit
901e6cc8bdafcd6e6d419ffd5eee4e58d266d40a
rolurq/flask-gulp
extensions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSTARTER = -1\nSEPARATOR = 0\nTERMINATOR = 1\n\ndef readlines(fp, sep, mode=TERMINATOR, retain=True, size=512):\n if mode < 0:\n return _readlines_start(fp, sep, retain, size)\n elif mode == 0:\n return _readlines_sep(fp,...
python
edit
1
5
mit
fe78335e4f469e22f9a1de7a1e5ddd52021a7f0f
jwodder/linesep
linesep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django page CMS test suite module\"\"\"\nfrom djangox.test.depth import alltests\n\ndef suite():\n return alltests(__file__, __name__)\n\n```\n\nApply this change: Remove the dependency to django-unittest-depth" }, { "role"...
python
edit
1
1
bsd-3-clause
7665e2b0af042948dfc7a1814275cd3309f5f6cf
remik/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page-cms,batiste/django-page-cms,akaihola/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,akaihola/django-page-cms,bat...
pages/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 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 the License at\n#\n# ...
python
edit
1
0
apache-2.0
108fa65760ed6334181d7ed5b129a2e8e24c38d2
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom codecs import open\nfrom setuptools import setup, find_packages\n\nrepo_path = os.path.abspath(os.path.dirname(__file__))\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept (I...
python
edit
1
0
mit
3ca2203a977f6d25c780e7a6168a16c4f7dec732
brejoc/django-intercoolerjs
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport json\nimport os.path\nimport requests\n\n\ndef posts_at_url(url):\n\n current_page = 1\n max_page = sys.maxint\n\n while current_page <= max_page:\n url = os.path.expandvars(url)\n resp = requests.g...
python
edit
1
5
cc0-1.0
15a7ced2d0da014e5d5508ed50c045de3cc9e9d2
imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh
_lib/wordpress_faq_processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The ox_herd package provides a way for herding tests together (like oxen).\n\"\"\"\n\nVERSION = '0.6.10'\n\n```\n\nApply this change: Fix bug in showing form" }, { "role": "assistant", "content": "\"\"\"The ox_herd package...
python
edit
1
0
bsd-2-clause
d940faee24f01d18e398da0592d88bed3908a46d
aocks/ox_herd,aocks/ox_herd,aocks/ox_herd
ox_herd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import Flask\nimport os\nimport psycopg2\nfrom contextlib import closing\n\nDB_SCHEMA = \"\"\"\nDROP TABLE IF EXISTS entries;\nCREATE TABLE entries (\n id serial PRIMARY KEY,\n title VARCHAR (127) N...
python
edit
1
1
mit
3db0d12163d839c00965338c4f8efe29a85b3de7
lfritts/learning_journal,lfritts/learning_journal
journal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport os\n\nINSTALLED_APPS += [\n 'data_aggregator.apps.DataAggregatorConfig',\n 'webpack_loader',\n]\n\nif os.getenv('ENV') == 'localdev':\n DEBUG = True\n DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_g...
python
edit
4
0
apache-2.0
035d871399a5e9a60786332b2a8c42fbea98397f
uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics
docker/settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'macroeco',\n version = 1.0,\n packages = find_packages(),\n entry_points = {'console_scripts': ['mecodesktop=macroeco:mecodesktop',],},\n package_data = {'': ['*...
python
edit
1
0
bsd-2-clause
533569965f23f9425a4ee07f4e613f0a843792ec
jkitzes/macroeco
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.test import Client\n\nfrom projects.models import Project\nfrom innovate import urls\n\n\ndef test_routes():\n c = Client()\n for pattern in urls.urlpatterns:\n response...
python
edit
1
2
bsd-3-clause
09a78126595ff355f59f70e4f381c3e2c4bef045
mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite
apps/innovate/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nNames of the modalities\n\"\"\"\n\n# Set constants of the names of the models so they can always be referenced\n# as variables rather than strings\n\n# Most of the density is at 0\nNEAR_ZERO = '~0'\n\n# Old \"middle\" modality - mos...
python
edit
1
0
bsd-3-clause
e4abd01162bfd4af8cd1f2e657e8a6343b766e8c
YeoLab/anchor
anchor/names.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\n\nfrom google.appengine.api import oauth\nfrom google.appengine.ext import ndb\n\nfrom pulldb import users\nfrom pulldb.api.base import OauthHandler, JsonModel\nfrom pulldb.base import create_app, Route\nfrom pu...
python
edit
6
1
mit
2cde3dbb69077054c6422cbe96e9b996be700d29
xchewtoyx/pulldb
pulldb/api/subscriptions.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\ndef find_points(prices, window):\n pivot = None\n next_pivot = None\n profit = 0\n\n for i, price in enumerate(prices):\n if pivot is None or price < prices[pivot]:\n pivot = i\n ...
python
edit
4
8
mit
8c8eb5207fd34ba381b89cb147dd3c38b68cf3ad
jrasky/planetlabs-challenge
stocks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\nimport os\n\nfrom boto.s3.connection import S3Connection\nfrom django.test import TestCase, override_settings\nfrom reports.utils import get_s3_connection\n\n\nclass UtilsTestCase(TestCase):\n @override_settings(AWS_ACCESS_K...
python
edit
1
1
mit
2b58318ad7134a8c894b70918520a89b51a2d6dd
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/reports/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"a Python frontend to ontologies\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\n__version__ = 'dev'\n__author__ = 'Martin Larralde'\n__author_email__ = '<EMAIL>'\n__license_...
python
edit
9
0
mit
6dc4314f1c5510a6e5f857d739956654909d97b2
althonos/pronto
pronto/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.db import models\nfrom django_orm.postgresql.fields.arrays import ArrayField\nfrom django_orm.postgresql.fields.interval import IntervalField\nfrom django_orm.postgresql.fields.bytea import ByteaField\...
python
edit
1
0
bsd-3-clause
1e47f79647baffd62d2a434710fe98b3c2247f28
EnTeQuAk/django-orm,EnTeQuAk/django-orm
tests/pgcomplex_app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom south.db import DEFAULT_DB_ALIAS\n\nclass MigrationHistory(models.Model):\n app_name = models.CharField(max_length=255)\n migration = models.CharField(max_length=255)\n applied = models.DateTimeFi...
python
edit
1
3
apache-2.0
7dd17cc10f7e0857ab3017177d6c4abeb115ff07
smartfile/django-south,smartfile/django-south
south/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom io import BytesIO\n\nfrom zeus.artifacts.xunit import XunitHandler\nfrom zeus.constants import Result\nfrom zeus.models import Job\nfrom zeus.utils.testresult import TestResult as ZeusTestResult\n\n\ndef test_result_generation(sample_x...
python
edit
1
1
apache-2.0
fffca3d2198f7c65b2e4fa2b805efa54f4c9fdb9
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
tests/zeus/artifacts/test_xunit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass MonsterAI(object):\n def __init__(self, level):\n self.owner = None\n self.level = level\n\n def take_turn(self):\n self.owner.log.log_begin_turn(self.owner.oid)\n self._take_turn()\n\n def _take_t...
python
edit
2
8
mit
fe85f1f135d2a7831afee6c8ab0bad394beb8aba
MoyTW/RL_Arena_Experiment
src/ais.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom vumi_http_proxy.servicemaker import Options, ProxyWorkerServiceMaker\nfrom vumi_http_proxy import http_proxy\nfrom twisted.trial import unittest\n\n\nclass TestOptions(unittest.TestCase):\n def test_defaults(self):\n options ...
python
edit
1
1
bsd-3-clause
53d09ddacc92a52219a3cd18bba606840b870fcd
praekelt/vumi-http-proxy,praekelt/vumi-http-proxy
vumi_http_proxy/test/test_servicemaker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Core XML support for Python.\n\nThis package contains three sub-packages:\n\ndom -- The W3C Document Object Model. This supports DOM Level 1 +\n Namespaces.\n\nparsers -- Python wrappers for XML parsers (currently only supports...
python
edit
1
0
mit
58d131e8aceb1adbbcdce2e1d4a86f5fb4615196
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/xml/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\ntry:\n import spotpy\nexcept ImportError:\n import sys\n sys.path.append(\".\")\n import spotpy\n\n\nfrom spotpy.examples.spot_setup_hymod_python import spot_setup\n\n\n\nclass TestFast(unittest.TestCase):\n ...
python
edit
1
1
mit
2649e2e6a2d79febad14e0728c65b1429beb8858
thouska/spotpy,bees4ever/spotpy,thouska/spotpy,bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy
spotpy/unittests/test_fast.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom api.logs import views\n\nurlpatterns = [\n url(r'^(?P<log_id>\\w+)/$', views.NodeLogDetail.as_view(), name=views.NodeLogDetail.view_name),\n url(r'^(?P<log_id>\\w+)/nodes/$', views.LogNodeList....
python
edit
1
0
apache-2.0
9e7aed847c2d5fcd6e00bc787d8b3558b590f605
abought/osf.io,mfraezz/osf.io,TomHeatwole/osf.io,chennan47/osf.io,RomanZWang/osf.io,alexschiller/osf.io,billyhunt/osf.io,crcresearch/osf.io,saradbowman/osf.io,acshi/osf.io,jnayak1/osf.io,RomanZWang/osf.io,emetsger/osf.io,KAsante95/osf.io,zachjanicki/osf.io,mattclark/osf.io,RomanZWang/osf.io,emetsger/osf.io,monikagrabow...
api/logs/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os, os.path\nimport sys\nimport unittest\n\nfrom macrotest import JSONSpecMacroTestCaseFactory\n\n\ndef JSONTestCaseLoader(tests_path, recursive=False):\n \"\"\"\n Load JSON specifications for Jinja2 ...
python
edit
3
6
cc0-1.0
2cc55a25b13ac6575424ba70857a8419b796ca76
imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh
_tests/macro_testing/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\r\n\r\nclass XmlJsonImportModuleException(Exception):\r\n pass\r\n\r\n\n```\n\nApply this change: Throw exception for not existing XSLT_FILES_DIR setting" }, { "role": "assistant", "content": ...
python
edit
1
0
mit
3509243e467a8546a3fa9ba123f77a1a96643402
lev-veshnyakov/django-import-data,lev-veshnyakov/django-import-data
xml_json_import/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\r\nimport yaml\r\n\r\napp = Flask(__name__)\r\n\r\n\r\n@app.route(\"/\")\r\ndef hello():\r\n return \"Hello World!\"\r\n\r\n\r\nif __name__ == '__main__':\r\n # read and return a yaml file (called 'config.yaml'...
python
edit
4
1
mit
e229d8f731b8b34294127702b1333eefec6f95bc
aradler/Card-lockout,aradler/Card-lockout,aradler/Card-lockout
server/main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport tempfile\nfrom subprocess import call\n\n\nclass SlidePresenter(object):\n\n def __init__(self):\n pass\n\n def present(self, slides):\n for sno, slide in enumerate(slides):\n with open(os.pa...
python
edit
1
2
mit
b4cd58a9c5c27fb32b4f13cfc2d41206bb6b86a1
gabber12/slides.vim
lib/presenter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\n__author__ = 'eric'\n\n\n'''\nNeed to create some test data\n'''\n\n```\n\nApply this change: Test script for generating metadata" }, { "role": "assistant", "content": "#!/usr/bin/e...
python
edit
1
0
mit
9d65eaa14bc3f04ea998ed7bc43b7c71e5d232f7
TheShellLand/pies,TheShellLand/pies
v3/scripts/testing/create-8gb-metadata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport logging\nimport psutil\nfrom subprocess import PIPE\n\nclass FfmpegProcess(object):\n def __init__(self):\n self._cmdline = None\n self._process = None\n self._paused = False\n\n def run(...
python
edit
1
3
mit
0a234829ecdde1483273d0f6fb249cc9fc0425d5
dkrikun/ffmpeg-rcd
ffmpeg_process.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import assert_equal, assert_true, assert_false, assert_raises\nfrom vispy.testing import assert_in, run_tests_if_main\n\nfrom vispy.app import set_interactive\nfrom vispy.ext.ipy_inputhook import inputhook_manager\n\n\n# Exp...
python
edit
1
1
bsd-3-clause
9e7e61256eb2ca2b4f4f19ce5b926709a593a28b
jay3sh/vispy,ghisvail/vispy,hronoses/vispy,kkuunnddaannkk/vispy,michaelaye/vispy,dchilds7/Deysha-Star-Formation,sh4wn/vispy,QuLogic/vispy,srinathv/vispy,sh4wn/vispy,QuLogic/vispy,julienr/vispy,kkuunnddaannkk/vispy,drufat/vispy,Eric89GXL/vispy,jay3sh/vispy,jdreaver/vispy,RebeccaWPerry/vispy,RebeccaWPerry/vispy,jay3sh/vi...
vispy/app/tests/test_interactive.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCreate odorant stimuli in hd5 format\n\"\"\"\n\n\"\"\"\nCreate the gexf configuration based on E. Hallem's cell paper on 2006\n\n\"\"\"\n\nimport numpy as np\nimport h5py\n\nosn_num = 1375;\nf = h5py.File(\"al.hdf5\",\"w\")\n\ndt = ...
python
edit
1
0
bsd-3-clause
2022357fd0f81be6f3ca91718a6c8c1d1d46ac1b
cerrno/neurokernel
examples/olfaction/config_files/gen_olf_stimuli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport pcpp\n\n\nclass FortranPreprocessor(pcpp.Preprocessor):\n def __init__(self):\n super(pcpp.Preprocessor, self).__init__()\n\n def parse_to_string_lines(self, text):\n with io.StringIO() as f:\n ...
python
edit
1
1
mit
9deef39639bd42d6a6c91f6aafdf8e92a73a605d
ZedThree/fort_depend.py,ZedThree/fort_depend.py
fortdepend/preprocessor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 Ansible, Inc.\n# All Rights Reserved.\n\nfrom social.strategies.django_strategy import DjangoStrategy\n\n\nclass AWXDjangoStrategy(DjangoStrategy):\n \"\"\"A DjangoStrategy for python-social-auth containing\n f...
python
edit
1
5
apache-2.0
cc8b115c6ab8265e5122e992a8ebe9960c92ada9
wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx
awx/sso/strategies/django_strategy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"HTTP headers\n\n.. seealso:: :rfc:`2616#section-2.2`\n\n.. seealso:: :rfc:`2616#section-4.2`\n\n.. seealso:: :rfc:`2616#section-14`\n\"\"\"\n\n__all__ = ['Headers']\n\n# FIXME: python3?\n# TODO: add a MAXIMUM ...
python
edit
4
0
mit
536746eaf35f4a2899a747bfe0b1e8918f9ec8c9
spaceone/httoop,spaceone/httoop,spaceone/httoop
httoop/header/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import patterns, url\n\nfrom . import app_settings\nfrom .views import (map_screenshot, convert, history_delete,\n serve_secure_media, JSSettings)\n\n\n_MEDIA_URL = ...
python
edit
1
0
bsd-3-clause
74b2883c3371304e8f5ea95b0454fb006d85ba3d
Anaethelion/django-mapentity,Anaethelion/django-mapentity,makinacorpus/django-mapentity,makinacorpus/django-mapentity,Anaethelion/django-mapentity,makinacorpus/django-mapentity
mapentity/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport traceback\n\nclass NurlyResult():\n def __init__(self, code='200 OK', head=None, body=''):\n self.head = {} if type(head) != dict else head\n self.body = body\n self.code = code\n\n\nclass NurlyStatus():\n ...
python
edit
1
4
mit
6c314451e002db3213ff61d1e6935c091b605a8d
mk23/nurly,mk23/nurly,mk23/nurly,mk23/nurly
server/nurly/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport pkg_resources\n\npkg_resources.declare_namespace(__name__)\n\nVERSION = (0, 2, 1)\n\n__version__ = \".\".join(map(str, VERSION))\n__status__ = \"Development\"\n__description__ = u\"Open...
python
edit
1
0
mit
1d361c8a743868b66bec7bd506aa0e33b19ed59c
YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps,opps/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps
opps/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\r\nCreated on Jun 20, 2010\r\n\r\n@author: jnaous\r\n'''\r\nfrom django import forms\r\nfrom expedient.ui.html.models import SliceFlowSpace\r\n\r\nclass FlowSpaceForm(forms.ModelForm):\r\n \"\"\"\r\n Form to edit flowspace.\r\n ...
python
edit
1
1
bsd-3-clause
0c6dfa4ad297562ec263a8e98bb75d836d2ab054
avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf
src/python/expedient/ui/html/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# RatToolsDev\n#\n# The development versions of rattools \n#\n# Author P G Jones - 15/10/2012 <<EMAIL>> : First revision\n############################################################################################...
python
edit
1
1
mit
a0740ec8373a3a178e3e83b4ec2768621c697181
mjmottram/snoing,mjmottram/snoing
versions/rattoolsversions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .common import *\nimport dj_database_url\n\n# Settings for production environment\nDEBUG = False\n\n# Update database configuration with $DATABASE_URL.\ndb_from_env = dj_database_url.config(conn_max_age=500)\nDATABASES['default'].updat...
python
edit
7
0
mit
429716ef6d15e0c7e49174409b8195eb8ef14b26
jumbocodespring2017/bostonathleticsassociation,jumbocodespring2017/bostonathleticsassociation,jumbocodespring2017/bostonathleticsassociation
back-end/BAA/settings/prod.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"Base forms\"\n\nfrom flask_wtf import Form\nfrom wtforms import StringField, TextAreaField\nfrom cla_public.apps.base.fields import MultiRadioField\n\nfrom cla_public.apps.base.constants import FEEL_ABOUT_SERVICE,...
python
edit
3
0
mit
6ecada90e944ee976197e0ee79baf1d711a20803
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/apps/base/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\n ModernGL: PyOpenGL alternative\n'''\n\nfrom .error import *\nfrom .buffer import *\nfrom .compute_shader import *\nfrom .conditional_render import *\nfrom .context import *\nfrom .framebuffer import *\nfrom .program import *\nfrom ...
python
edit
18
0
mit
80524970b9e802787918af9ce6d25110be825df4
cprogrammer1994/ModernGL,cprogrammer1994/ModernGL,cprogrammer1994/ModernGL
moderngl/__init__.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.urls import reverse\nfrom six.moves.urllib.parse import urljoin\n\nfrom kolibri.utils.conf import OPTIONS\n\n\ndef reverse_remote(\n baseurl, viewname, urlconf=None, args=None, kwargs=None, current_app=None\n):\n # Get the...
python
edit
1
1
mit
811421407379dedc217795000f6f2cbe54510f96
learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
kolibri/core/utils/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for job_runner project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``r...
python
edit
1
0
bsd-3-clause
fe873844448d4123520e9bd6afe3231d4c952850
spilgames/job-runner,spilgames/job-runner
job_runner/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nimport vfp2py\n\ndef parse_args(argv=None):\n parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')\n parser.add_argument(\"infile\", help=\"file to convert\", type=str)\n parse...
python
edit
1
1
mit
fac280a022c8728f14bbe1194cf74af761b7ec3f
mwisslead/vfp2py,mwisslead/vfp2py
vfp2py/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors\n\nfrom __future__ import unicode_literals\n\nimport shlex\nimport subprocess\nimport unittest\n\nimport frappe\n\n\ndef clean(value):\n\tif isinstance(value, (bytes, str)...
python
edit
1
2
mit
99496d97f3e00284840d2127556bba0e21d1a99e
saurabh6790/frappe,StrellaGroup/frappe,adityahase/frappe,mhbu50/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,yashodhank/frappe,mhbu50/frappe,mhbu50/frappe,StrellaGroup/frappe,saurabh6790/frappe,yashodhank/frappe,frappe/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,adityahase/frappe,...
frappe/tests/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#copyright ReportLab Inc. 2000\n#see license.txt for license details\n#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/platypus/__init__.py?cvsroot=reportlab\n#$Header: /tmp/reportlab/reportlab/platypus/__init__.py,v 1.12 20...
python
edit
27
0
bsd-3-clause
03d07a20928997ecc136884110311453217443c3
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
reportlab/platypus/__init__.py
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# IdeaScaly\n# Copyright 2015 Jorge Saldivar\n# See LICENSE for details.\n\nimport six\nimport dateutil.parser\n\nfrom datetime import datetime\n\n\ndef parse_datetime(str_date):\n date_is = dateutil.parser.parse(str_date)\n return da...
python
edit
3
3
mit
9ed0848a869fc3a4e16890af609259d18b622056
joausaga/ideascaly
ideascaly/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os.path\nimport sys\nimport subprocess\nimport unittest\n\ntests_dir = os.path.dirname(__file__)\nsys.path.insert(0, os.path.dirname(tests_dir))\n\nimport secretstorage\n\nif __name__ == '__main__':\n\tmajor,...
python
edit
1
0
bsd-3-clause
58dbfa0b449b8e4171c5f9cef1c15db39b52c1f0
mitya57/secretstorage
tests/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass RawContent(models.Model):\n text = models.TextField(_('text'), blank=True)\n\n class Meta:...
python
edit
1
1
bsd-3-clause
864d8908fce4c92382916f5e3e02992f83fd6e6e
joshuajonah/feincms,pjdelport/feincms,michaelkuty/feincms,matthiask/django-content-editor,feincms/feincms,joshuajonah/feincms,hgrimelid/feincms,joshuajonah/feincms,matthiask/feincms2-content,mjl/feincms,michaelkuty/feincms,matthiask/django-content-editor,nickburlett/feincms,pjdelport/feincms,mjl/feincms,joshuajonah/fei...
feincms/content/raw/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name=\"Demo\",\n packages=[\"orangedemo\"],\n package_data={\"orangedemo\": [\"icons/*.svg\"]},\n classifiers=[\"Example :: Invalid\"],\n # Declare orangedemo package to contain widg...
python
edit
1
0
bsd-2-clause
ee3aac7a285cf5b80e8c836b9f825173bad2eb59
cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,cheral/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,cheral/orange3
doc/development/source/orange-demo/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom malcolm.core import Process\nfrom malcolm.modules.builtin.controllers import ManagerController\nfrom malcolm.modules.pmac.blocks import pmac_status_block\nfrom malcolm.modules.pmac.parts import PmacStatusPart\nfrom malcolm.testutil imp...
python
edit
1
1
apache-2.0
9828e5125cdbc01a773c60b1e211d0e434a2c5aa
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
tests/test_modules/test_pmac/test_pmacstatuspart.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\nimport Natural.util as util\nimport sublime, sublime_plugin\n\n\nclass PerformEventListener(sublime_plugin.EventListener):\n \"\"\"Suggest subroutine completions for the perform statement.\"\"\"\n\n def on_query_c...
python
edit
1
6
mit
ff308a17c79fe2c27dcb2a1f888ee1332f6fdc11
andref/Unnatural-Sublime-Package
events.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n# pylint: disable=W0401,W0614\n\n\nfrom telemetry.page import page as page_...
python
edit
1
2
bsd-3-clause
6776a538f946a25e921f8ecd11a0ce1ddd422d0d
TeamTwisted/external_skia,vanish87/skia,shahrzadmn/skia,VRToxin-AOSP/android_external_skia,TeamTwisted/external_skia,shahrzadmn/skia,pcwalton/skia,TeamExodus/external_skia,YUPlayGodDev/platform_external_skia,boulzordev/android_external_skia,qrealka/skia-hc,TeamTwisted/external_skia,HalCanary/skia-hc,rubenvb/skia,pcwalt...
tools/skp/page_sets/skia_ukwsj_nexus10.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\n\ndef run(command):\n try:\n subprocess.check_call(command, shell=True)\n except:\n pass\n\n```\n\nApply this change: Set expected exception class in \"except\" block\n\nFix issue E722 of flake8" }...
python
edit
1
2
mit
4f2e23fe260e5f061d7d57821908492f14a2c56a
renanivo/with
withtool/subprocess.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom cms.models import CMSPlugin\n\n\nclass MarkdownPlugin(CMSPlugin):\n markdown_text = models.TextField(max_length=8000)\n\n```\n\nApply this change: Add __str__ method for better representation in front...
python
edit
1
2
mit
bea258e2affc165f610de83248d9f958eec1ef4e
bitmazk/cmsplugin-markdown,bitmazk/cmsplugin-markdown,bitmazk/cmsplugin-markdown
cmsplugin_markdown/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom kokki import *\n\nif env.config.mdadm.arrays:\n Package(\"mdadm\")\n\nExecute(\"mdadm-update-conf\",\n action = \"nothing\",\n command = (\"(\"\n \"echo DEVICE partitions > /etc/mdadm/mdadm.conf\"\n \"; mdadm -...
python
edit
10
0
bsd-3-clause
bccfc6d3c0035e2a5668607ebb7dd6047ee1942f
samuel/kokki
kokki/cookbooks/mdadm/recipes/default.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Removing unique constrai...
python
edit
5
1
bsd-3-clause
8c11b2db7f09844aa860bfe7f1c3ff23c0d30f94
camilonova/sentry,1tush/sentry,vperron/sentry,drcapulet/sentry,fuziontech/sentry,boneyao/sentry,mvaled/sentry,ifduyue/sentry,pauloschilling/sentry,boneyao/sentry,beni55/sentry,Kryz/sentry,beeftornado/sentry,jean/sentry,gg7/sentry,JamesMura/sentry,rdio/sentry,wong2/sentry,songyi199111/sentry,daevaorn/sentry,looker/sentr...
sentry/migrations/0062_correct_del_index_sentry_groupedmessage_logger__view__checksum.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import standard_library\nstandard_library.install_aliases()\nimport unittes...
python
edit
1
2
mit
f4429e49c8b493fa285d169a41b82cb761716705
toslunar/chainerrl,toslunar/chainerrl
tests/explorers_tests/test_additive_ou.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2017-TODAY LasLabs Inc.\n# License MIT (https://opensource.org/licenses/MIT).\n\nimport properties\n\nfrom .. import BaseModel\n\n\nclass Folder(BaseModel):\n\n name = properties.String(\n 'Fol...
python
edit
1
0
mit
c12a1b53166c34c074e018fcc149a0aa2db56b43
LasLabs/python-helpscout
helpscout/models/folder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAssign articles from AmCAT sets for background processing in nlpipe\n\"\"\"\n\nimport sys, argparse\n\nfrom nlpipe import tasks\nfrom nlpipe.pipeline import parse_background\nfrom nlpipe.backend import get_input_ids\nfrom nlpipe.cel...
python
edit
4
0
mit
5f39fd311c735593ac41ba17a060f9cadbe80e18
amcat/nlpipe
nlpipe/scripts/amcat_background.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom decimal import Decimal as D\nfrom decimal import InvalidOperation\n\nfrom babel.numbers import format_currency\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.translation import get_language, to_locale...
python
edit
1
5
bsd-3-clause
45e04697303eb85330bd61f1b386e483fc42f49b
solarissmoke/django-oscar,solarissmoke/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,solarissmoke/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar
src/oscar/templatetags/currency_filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport kerberos\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.backends import ModelBackend\n\n\nlogger = logging.getLogger(__name__)\n\nclass KrbBackend(ModelBa...
python
edit
3
3
mit
775aecd0a39e5112a704ec30657d3e46e3621bdd
02strich/django-auth-kerberos,mkesper/django-auth-kerberos
django_auth_kerberos/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom redsolutioncms.make import BaseMake\nfrom redsolutioncms.models import CMSSettings\n\nclass Make(BaseMake):\n def make(self):\n super(Make, self).make()\n cms_settings = CMSSettings.objects.get_settings()\n cms_...
python
edit
1
1
bsd-3-clause
f9be8cce93134dc4e5592591beb605c0a75c813c
redsolution/django-chunks,redsolution/django-chunks
chunks/redsolution_setup/make.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport webapp\nimport unittest\n\nclass WebappTestExtractingServiceDomainsFromLinks(unittest.TestCase):\n\n #def setUp(self):\n # self.app = webapp.app.test_client()\n\n def test_extract_service...
python
edit
3
1
mit
6cf42d661facf1c11de545959b91c073709eac8e
alphagov/service-domain-checker
webapp_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Tag(models.Model):\n name = models.CharField(max_length=31)\n slug = models.SlugField()\n\n\nclass Startu...
python
edit
1
0
bsd-2-clause
4c76a99e1d72820a367d2195fbd3edc1b0af30fd
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom chainer import testing\nimport chainer.functions as F\nimport numpy\n\n\ndef make_data(shape, dtype):\n # Input values close to -1 or 1 would make tests unstable\n x = numpy.random.uniform(-0.9, 0.9, shape).ast...
python
edit
1
1
mit
da9c0743657ecc890c2a8503ea4bbb681ae00178
okuta/chainer,keisuke-umezawa/chainer,wkentaro/chainer,wkentaro/chainer,okuta/chainer,chainer/chainer,niboshi/chainer,okuta/chainer,pfnet/chainer,chainer/chainer,tkerola/chainer,chainer/chainer,niboshi/chainer,keisuke-umezawa/chainer,okuta/chainer,wkentaro/chainer,hvy/chainer,wkentaro/chainer,niboshi/chainer,niboshi/ch...
tests/chainer_tests/functions_tests/math_tests/test_arctanh.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom corehq.apps.locations.models import SQLLocation\nfrom dimagi.utils.logging import notify_exception\n\n\ndef is_submission_from_test_location(person_case):\n try:\n phi_location = SQLLocation.objects.get(location_id=person_cas...
python
edit
1
2
bsd-3-clause
e5bd4884fc7ea4389315d0d2b8ff248bbda9a905
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/enikshay/integrations/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.testing import TestCase\nimport unittest\nfrom app import app, db\n\nclass BaseTestCase(TestCase):\n def create_app(self):\n app.config.from_object('config.TestingConfiguration')\n return app\n\n def setUp...
python
edit
1
1
mit
6246c26365b2df4cbb91142969aa857c7187e094
rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy
app/test_base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel\nfrom matplotlib.axes import SubplotBase\nfrom seaborn.apionly import JointGrid\n\nfrom ..plots import plot_pop_resids, plot_msm_network, plot_timesca...
python
edit
2
2
mit
81dfb5cb952fbca90882bd39e76887f0fa6479eb
msmexplorer/msmexplorer,msmexplorer/msmexplorer
msmexplorer/tests/test_msm_plot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nimport tldt\n\n\ndef main():\n parser = argparse.ArgumentParser(description=\"cacat\")\n parser.add_argument(\"head_repo\")\n parser.add_argument(\"head_sha\")\n parser.add_argument(\"base_repo\")\n parser....
python
edit
1
1
unlicense
64cd71fd171cd1b76b111aedc94423006176f811
rciorba/tldt,rciorba/tldt
src/tldt/cli.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='aubreylib',\n version='2.0.0',\n description='A helper library for the Aubrey access system.',\n author='University of North Texas Libraries',\n author_e...
python
edit
1
0
bsd-3-clause
8eb9de99511a96b1966ece6892fb937add5b2295
unt-libraries/aubreylib
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport time\nimport thread\nimport Adafruit_DHT as dht\nimport config\n\nh = 0.0\nt = 0.0\n\ndef get_ht_thread():\n while True:\n ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)\n h = '{0:0.1f...
python
edit
1
2
mit
c8301f1e3165a5e5eaac46de9bdf97c4c1109718
yunbademo/yunba-smarthome,yunbademo/yunba-smarthome
dht.py
accepted
null
true