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\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'django-orderable',\n version = '1.0.1',\n description = 'Model ordering for the Django administration site.',\n \n author = 'Ted Kaemming'...
python
edit
1
0
mit
d1c93d46f4d9f5a21ca97c0825add06406569fc7
tkaemming/django-orderable,tkaemming/django-orderable,tkaemming/django-orderable
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
python
edit
1
3
apache-2.0
bd11f978535e4a64537eccd000b7eb50e6dab95f
dhellmann/pocket2pinboard
pocket2pinboard/bookmarks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom geopy import Nominatim\nfrom geopy.extra.rate_limiter import RateLimiter\n\n\nclass GeoCodePipeline(object):\n\n def open_spider(self, spider):\n geolocator = Nominatim(timeout=5)\n self.__geocodeFunc = RateLimiter(geo...
python
edit
3
3
mit
342e6134a63c5b575ae8e4348a54f61350bca2da
aberklotz/crimereport,aberklotz/crimereport,aberklotz/crimereport
parser/crimeparser/pipelinesEnricher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Cloud browser application.\n\nProvides a simple filesystem-like browser interface for cloud blob datastores.\n\"\"\"\n\nVERSION = (0, 2, 1)\n\n__version__ = \".\".join(str(v) for v in VERSION)\n__version_full__ = __version__ + \"\".jo...
python
edit
1
0
mit
d9844f5bcf6d48bde1a60d32998ccdaa87e99676
ryan-roemer/django-cloud-browser,UrbanDaddy/django-cloud-browser,UrbanDaddy/django-cloud-browser,ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser
cloud_browser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nimport json\n\nfrom datetime import datetime\nfrom apscheduler.job import Job\nfrom .utils import job_to_dict\n\n\nclass JSONEncoder(json.JSONEncoder):\n def default(self, obj):\n if isinstance(obj, datetime):\n ...
python
edit
1
4
apache-2.0
e753038de039fd23f0d59bb0094f59fc73efe22b
viniciuschiele/flask-apscheduler
flask_apscheduler/json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\n\nfrom .common import * # noqa\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backend...
python
edit
4
0
mit
8b77e1e865d72720a602b7b7cc5912cb852d68cf
pythonindia/junction,pythonindia/junction,pythonindia/junction,pythonindia/junction
settings/dev.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport stat\nfrom os.path import join, abspath\nfrom subprocess import call\n\ndef prepare(globs, locs):\n # RTD defaults the current working directory to where conf.py resides.\n # In our case, t...
python
edit
2
2
mit
2f10aa07422c8132218d8af336406629b336550c
fpoirotte/XRL
docs/src/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cassiopeia as cass\nfrom cassiopeia.core import Champion\n\ndef test_cass():\n #annie = Champion(name=\"Annie\", region=\"NA\")\n annie = Champion(name=\"Annie\")\n print(annie.name)\n print(annie.title)\n print(annie....
python
edit
1
4
mit
c2b0f66d5760d61444b4909e40c45993780cd473
robrua/cassiopeia,meraki-analytics/cassiopeia,10se1ucgo/cassiopeia
examples/champion.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom senpy.plugins import AnalysisPlugin\n\nimport multiprocessing\n\n\nclass AsyncPlugin(AnalysisPlugin):\n def _train(self, process_number):\n return process_number\n\n def _do_async(self, num_processes):\n with multip...
python
edit
1
1
apache-2.0
e582ef07d4b9f537e31d31c1546df870a2bd361c
gsi-upm/senpy,gsi-upm/senpy,gsi-upm/senpy
tests/plugins/async_plugin/asyncplugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFlask server app.\n\"\"\"\n\nimport datetime as dt\nimport sys\nimport flask\nimport sqlalchemy as sa\nimport coils\nimport tables\nimport mapping\n\napp = flask.Flask(__name__)\n\n# Load configuration file.\nCONFIG = sys.argv[1] if...
python
edit
1
1
mit
019d33092226d1ff8fe36897c03d25ddd48e34b1
vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit
serve.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding: utf-8\nimport sys\nfrom os.path import abspath\nfrom os.path import dirname\n\n# Load Django-related settings; necessary for tests to run and for Django\n# imports to work.\nimport local_settings\n\n\nfrom d...
python
edit
3
1
mit
0c42909e5649b78260d9efa4e6ff7b77c82b1934
seler/djoauth2,seler/djoauth2,vden/djoauth2-ng,Locu/djoauth2,vden/djoauth2-ng,Locu/djoauth2
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport math\n\nfrom pythonosc import dispatcher\nfrom pythonosc import osc_server\n\ndef print_volume_handler(args, volume):\n print(\"[{0}] ~ {1}\".format(args[0], volume))\n\ndef print_compute_handler(args, volume):\n t...
python
edit
1
2
unlicense
98649d486b9e2eb2c83e594e73cf6bbaa29213e5
mwicat/python2-osc,attwad/python-osc,ragnarula/python-osc,emlyn/python-osc
examples/simple_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport simple_salesforce\nfrom cumulusci.tasks.salesforce import BaseSalesforceApiTask\n\nclass is_rd2_enabled(BaseSalesforceApiTask):\n def _run_task(self):\n try:\n settings = self.sf.query(\n \"SELECT ...
python
edit
1
4
bsd-3-clause
6942497dc04683e2d627042b168476fd756dcbda
SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus
tasks/check_rd2_enablement.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom mugloar import dragon\n\n\ndef test_partition():\n for solution in dragon.partition(20, 4, 0, 10):\n print(solution)\n assert abs(solution[0]) + abs(solution[1]) + abs(solution[2]) + abs(solution[3]) == ...
python
edit
1
2
mit
5cfb7a1b0feca5cd33f93447cfc43c1c944d4810
reinikai/mugloar
tests/test_dragon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport vtk.numpy_interface.dataset_adapter as dsa\n\ndef get_scalars(dataobject):\n do = dsa.WrapDataObject(dataobject)\n # get the first\n rawarray = do.PointData.GetScalars()\n vtkarray = dsa.vtkDataArrayTo...
python
edit
1
2
bsd-3-clause
17faea99343e37036b7ee35e5d3273f98a52dba9
cryos/tomviz,thewtex/tomviz,cjh1/tomviz,cryos/tomviz,cryos/tomviz,Hovden/tomviz,Hovden/tomviz,yijiang1/tomviz,cjh1/tomviz,thewtex/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,yijiang1/tomviz,cjh1/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,thewtex/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz
Python/tomviz/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scholarly\nimport requests\n\n_EXACT_SEARCH = '/scholar?q=\"{}\"'\n_START_YEAR = '&as_ylo={}'\n_END_YEAR = '&as_yhi={}'\ndef search(query, exact=True, start_year=None, end_year=None):\n \"\"\"Search by scholar query and return a g...
python
edit
1
4
mit
400c506627deca5d85454928254b1968e09dc33e
Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker
scrape.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Settings(object):\n def __init__(self):\n self._settings = {}\n\n def __setattr__(self, name, value):\n if name.startswith('_'):\n super(Settings, self).__setattr__(name, value)\n else:\n ...
python
edit
2
2
mit
6a83ff3a2d1aca0a3663a36ca9502d3d86ea2a93
piotrekw/pirx
pirx/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement expr2bdd function and unique table" }, { "role": "assistant", "content": "\"\"\"\nTest binary decision diagrams\n\"\"\"\n\nfrom pyeda.bdd import expr2bdd\nfrom pyeda.expr import var\n\na, b, c = map(var, 'abc')\n\ndef t...
python
new_file
1
1
bsd-2-clause
099ae768056a4ab160179be89c8750a2bfc06b2c
GtTmy/pyeda,sschnug/pyeda,sschnug/pyeda,karissa/pyeda,sschnug/pyeda,GtTmy/pyeda,karissa/pyeda,pombredanne/pyeda,pombredanne/pyeda,GtTmy/pyeda,cjdrake/pyeda,pombredanne/pyeda,cjdrake/pyeda,karissa/pyeda,cjdrake/pyeda
pyeda/test/test_bdd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\nfrom rest_framework import viewsets\n\nfrom chat.models import Member\nfrom chat.models import ChatRoom\nfrom chat.serializers import MemberSerializer\nfrom chat.serializers import ChatRoomSerializer\n...
python
edit
3
2
bsd-3-clause
fa3ec9a764ca0d646588e908395367ce553981e1
mlalic/TumCampusAppBackend,mlalic/TumCampusAppBackend
tca/chat/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nimport setup_util\nimport os\n\ndef start(args, logfile, errfile):\n try:\n subprocess.check_call(\"mvn clean compile assembly:single\", shell=True, cwd=\"grizzly-bm\", stderr=errfile, stdout=logfile)\n ...
python
edit
4
5
bsd-3-clause
df5a0c3c0d5058fe9e3c4c00ecfb86da3136144c
greg-hellings/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,sxend/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,grob/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jammin...
frameworks/Java/grizzly-bm/setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.admin import Admin\nfrom flask.ext.admin.contrib.sqla import ModelView\n\nfrom dadd.master import models\n\n\nclass ProcessModelView(ModelView):\n # Make the latest first\n column_default_sort = ('start_time', True)\n\n...
python
edit
1
1
bsd-3-clause
ca94513b3487232a2f9714ddc129d141c011b4af
ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd
dadd/master/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom base import BaseStep\nfrom logical.models import Database\n\n\nLOG = logging.getLogger(__name__)\n\n\nclass BuildDatabase(BaseStep):\n\n def __unicode__(self):\n return \"Creating logi...
python
edit
5
6
bsd-3-clause
39b8cb70ffd6be60c6d757ecd4703a3a0ca2a415
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/build_database.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport calendar\nimport datetime\n\nfrom consts.notification_type import NotificationType\nfrom notifications.base_notification import BaseNotification\n\n\nclass UpcomingMatchNotification(BaseNotification):\n\n def __init__(self, match,...
python
edit
3
2
mit
8d52686ddf40266b0022b77816cf3899c726a834
fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,synth3...
notifications/upcoming_match.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport webbrowser\n\nfrom .groupserializer import GroupSerializer\nfrom .statistic import all_statistics\nfrom .statistics import *\n\ndef gstat_stats():\n parser = argparse.ArgumentParser(description=\"Generates stats f...
python
edit
5
8
mit
b1c5f75c266f5f5b9976ce2ca7c2b9065ef41bb1
kjteske/groupmestats,kjteske/groupmestats
groupmestats/generatestats.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport argparse\nfrom .__init__ import __version__\nfrom . make_bash import add_make_bash\nfrom . check_recipe import add_check_recipe\nfrom . list_files import add_list_files\nfrom . search import add_search\nfrom . show_env im...
python
edit
1
2
mit
3964606d6f0e28b127af57b1d13c12b3352f861a
gogetdata/ggd-cli,gogetdata/ggd-cli
ggd/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport brewer2mpl\nimport itertools\nfrom cycler import cycler\n\n\ncmap = brewer2mpl.get_map('Set1', 'Qualitative', 5, reverse=False)\ncolor_cycle = cycler('color', cmap.hex_colors)\nmarker_cycle = cycler('marker', ['s', '^', 'o', 'D', 'v'...
python
edit
1
0
mit
2ba9eaba0bcb229055db09147f1cb654190badbf
maxalbert/paper-supplement-nanoparticle-sensing
notebooks/style_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom django.test import TestCase, RequestFactory\nfrom log_request_id.middleware import RequestIDMiddleware\nfrom testproject.views import test_view\n\n\nclass RequestIDLoggingTestCase(TestCase):\n\n def setUp(self):\n ...
python
edit
1
1
bsd-2-clause
f56d8b35aa7d1d2c06d5c98ef49696e829459042
dabapps/django-log-request-id
log_request_id/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom mws.mws import DictWrapper\n\nrequesters_dir = os.path.dirname(os.path.abspath(__file__))\nresponses_dir = os.path.join(requesters_dir, 'responses')\n\n\ndef write_response(response, fname):\n with open(os.path.join(res...
python
edit
1
2
unlicense
38b236c9fb0f944b41b6300963fbf5e67d0f3fe7
ziplokk1/python-amazon-mws-tools
mwstools/requesters/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.postgres.fields import ArrayField\nfrom django.db import models\n\n\nclass Track(models.Model):\n \"\"\"\n This model help us to store midi files.\n It will be easier for everyone to have one place to listen\n ...
python
edit
1
3
mit
f001bf192e1f0c40eee8c744f83aa55e1846d765
adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc
main/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom transducer.functional import compose\n\n\nclass TestComposition(unittest.TestCase):\n\n def test_single(self):\n \"\"\"\n compose(f)(x) -> f(x)\n \"\"\"\n f = lambda x: x * 2\n c...
python
edit
1
3
mit
e8940b632737f75897c0ea7c108563a63f1a5dde
sixty-north/python-transducers
transducer/test/test_functional.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport re\nfrom xml.parsers.expat import ExpatError\n\nimport requests\nimport xmltodict\n\nfrom settings import goodreads_api_key\n\n\ndef get_goodreads_ids(comment_msg):\n # receives goodreads url\n # return...
python
edit
1
6
mit
c027e671d1a47d485755b748f2dffc202c704ff8
avinassh/Reddit-GoodReads-Bot
goodreadsapi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='gdcdatamodel',\n packages=find_packages(),\n install_requires=[\n 'pytz==2016.4',\n 'graphviz==0.4.2',\n 'jsonschema==2.5.1',\n 'psqlgraph',\...
python
edit
1
0
apache-2.0
3ef25d7105226aadebc5db46ac8c9c290d527164
NCI-GDC/gdcdatamodel,NCI-GDC/gdcdatamodel
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport pika\n\n\nclass Publisher(object):\n\n def __init__(self, rabbit_url, exchange):\n self._rabbit_url = rabbit_url\n self._exchange = exchange\n self._connection = pika.BlockingConnection(pika.URLPa...
python
edit
1
1
mit
a98b8e78d48ce28e63ed0be2a9dbc008cc21ba97
projectweekend/Pi-Broadcast-Service
pi_broadcast_service/rabbit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom django_schedulermanager.manager import manager\n\n\nclass Command(BaseCommand):\n help = 'Schedules a job'\n\n def add_arguments(self, parser):\n # Positional argument...
python
edit
1
4
mit
88e839144f4a1dac1468e03f5cd506841caadc84
marcoacierno/django-schedulermanager
django_schedulermanager/management/commands/schedulejob.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef raindrops(number):\n if is_three_a_factor(number):\n return \"Pling\"\n return \"{}\".format(number)\n\ndef is_three_a_factor(number):\n return number % 3 == 0\n\n```\n\nApply this change: Handle 5 as a factor" }, { ...
python
edit
1
3
mit
f88c2135ddc197283bbfb8b481774deb613571cf
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
python/raindrops/raindrops.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom ....tests.helper import pytest\n\nfrom ..make_kernel import make_kernel\n\ntry:\n import scipy\n HA...
python
edit
2
1
bsd-3-clause
b5cb4fe7abaa9fe1a4c387148af6ee494f69bd07
AustereCuriosity/astropy,MSeifert04/astropy,pllim/astropy,DougBurke/astropy,mhvk/astropy,larrybradley/astropy,kelle/astropy,pllim/astropy,funbaker/astropy,stargaser/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,saimn/astropy,lpsinger/astropy,aleksandr-bakanov/astropy,joergdietrich/astropy,AustereCuriosity/...
astropy/nddata/convolution/tests/test_make_kernel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# OpenMV Unit Tests.\n#\nimport os, sensor, gc\n\nTEST_DIR = \"unittest\"\nTEMP_DIR = \"unittest/temp\"\nDATA_DIR = \"unittest/data\"\nSCRIPT_DIR = \"unittest/script\"\n\nif not (TEST_DIR in os.listdir(\"\")):\n raise Exception...
python
edit
4
1
mit
873833d777536de5aa716a509e590ad1b076198a
kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,openmv/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,kwagyeman/openmv,iabdalkader/openmv
scripts/examples/OpenMV/99-Tests/unittests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom classes.person import Person\n\n\nclass PersonClassTest(unittest.TestCase):\n pass\n # def test_add_person_successfully(self):\n # my_class_instance = Person()\n # initial_person_count = len(my_clas...
python
edit
1
1
mit
fc91e70bfa2d46ce923cdd3e2f2d591f8a5b367b
peterpaints/room-allocator
tests/test_person.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport os, sys\n\nfrom .wrapper import _libgdf_wrapper\nfrom .wrapper import GDFError # re-exported\n\ntry:\n from .libgdf_cffi import ffi\nexcept ImportError:\n pass\nelse:\n def...
python
edit
3
4
apache-2.0
4752f704596613bbb80a649b275c79ce156b32ec
gpuopenanalytics/libgdf,gpuopenanalytics/libgdf,gpuopenanalytics/libgdf,gpuopenanalytics/libgdf
python/libgdf_cffi/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-\n# ex: set expandtab softtabstop=4 shiftwidth=4:\n#\n# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# ...
python
edit
1
0
apache-2.0
3cf11b24cb09c1929d574f0488fac01d1032c205
guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,stdweird/aquilon,stdweird/aquilon
lib/python2.6/aquilon/client/depends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This is the agent which currently takes the action with proper q learning.\"\"\"\n\nimport time\nstart = time.time()\nfrom tqdm import tqdm\nimport env\nimport os\nimport rl\nenv.make(\"text\")\nepisodes = 10000\n\nimport argparse\npa...
python
edit
1
0
mit
3dd205a9dad39abb12e7a05c178117545402c2e1
danieloconell/Louis
reinforcement-learning/train.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ntaskmaster.util\n~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010 DISQUS.\n:license: Apache License 2.0, see LICENSE for more details.\n\"\"\"\n\n\ndef import_target(target, default=None):\n \"\"\"\n >>> import_target('foo.bar:blah', '...
python
edit
6
4
apache-2.0
b8f67c96febd1f7bc2ce1e87f1df0a468faddb87
alex/taskmaster,dcramer/taskmaster
src/taskmaster/util.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017, MIT Licensed, Medicine Yeh\n\n# This file helps to read settings from bash script into os.environ\n\nimport os\nimport sys\nimport subprocess\n\n# This path is the location of the caller script\nMAIN_SCRIPT_PATH = os.p...
python
edit
1
0
mit
15996286496d913c25290362ba2dba2d349bd5f6
snippits/qemu_image,snippits/qemu_image,snippits/qemu_image
imageManagerUtils/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nInterfaces that filesystem APIs need to expose.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom zope.interface import Interface\n\n\nclass IFilesystemSnapshot...
python
edit
1
1
apache-2.0
7b7f33439b16faeef67022374cf88ba9a275ce8a
LaynePeng/flocker,agonzalezro/flocker,AndyHuu/flocker,achanda/flocker,jml/flocker,AndyHuu/flocker,lukemarsden/flocker,mbrukman/flocker,runcom/flocker,Azulinho/flocker,jml/flocker,mbrukman/flocker,w4ngyi/flocker,hackday-profilers/flocker,achanda/flocker,lukemarsden/flocker,achanda/flocker,beni55/flocker,lukemarsden/floc...
flocker/filesystems/interfaces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport unittest\n\nfrom skeletor.config import Config\n\nfrom .helpers import nostdout\n\n\nclass ConfigTests(unittest.TestCase):\n \"\"\" Argument Passing & Config Tests. \"\"\"\n\n def setUp(self):\n self._old_sys...
python
edit
1
4
bsd-3-clause
9247021be1dc60acd11104ec1de04ea5718c054c
krak3n/Facio,krak3n/Facio,krak3n/Facio,krak3n/Facio,krak3n/Facio
tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.deprecation import MiddlewareMixin\n\n\nclass FakeShibbolethMiddleWare(MiddlewareMixin):\n def process_request(self, request):\n if request.POST.get(\"convert-post-headers\") == \"1\":\n for key in req...
python
edit
1
5
mit
b88abd98834529f1342d69e2e91b79efd68e5e8d
uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi
backend/uclapi/dashboard/middleware/fake_shibboleth_middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWalks through your greader-logs directory (or directory containing them)\nand prints every item_name that has been finished but has no valid .warc.gz\n(as determined by greader-warc-checker's .verification logs)\n\"\"\"\n\nimport os...
python
edit
2
12
mit
e8d321c35d6e0a8294e0766c3836efe192ae2df0
ludios/greader-warc-checker
print_items_needing_requeue.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# :Author: Robert Kern\n# :Copyright: 2004, Enthought, Inc.\n# :License: BSD Style\n\nfrom mac_context import get_mac_context\n\n\ndef get_macport(dc):\n \"\"\"\n Returns the Port or the CGContext of a wxDC (or child class) insta...
python
edit
1
2
bsd-3-clause
9f9441cf43e66780ca7f24197d3cd9ece923dd30
tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable
kiva/quartz/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom thefuck.rules.git_push import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.fixture\ndef stderr():\n return '''fatal: The current branch master has no upstream branch.\nTo push the current branc...
python
edit
1
1
mit
612c393ec4d964fb933ebf5b8f957ae573ae65ba
nvbn/thefuck,mlk/thefuck,mlk/thefuck,nvbn/thefuck,SimenB/thefuck,Clpsplug/thefuck,scorphus/thefuck,scorphus/thefuck,SimenB/thefuck,Clpsplug/thefuck
tests/rules/test_git_push.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = \"Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento\"\n__date__ = \"Jun 28, 2012\"\n__version__ = \"2.0.0\"\n\n\"\"\"\nUseful aliases...
python
edit
13
0
mit
19e84f0c528fd1c19dba709972f31343284c0a40
gVallverdu/pymatgen,richardtran415/pymatgen,Bismarrck/pymatgen,fraricci/pymatgen,aykol/pymatgen,gpetretto/pymatgen,johnson1228/pymatgen,mbkumar/pymatgen,dongsenfo/pymatgen,gVallverdu/pymatgen,blondegeek/pymatgen,aykol/pymatgen,vorwerkc/pymatgen,dongsenfo/pymatgen,nisse3000/pymatgen,czhengsci/pymatgen,setten/pymatgen,gV...
pymatgen/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport logging\nfrom bottle import redirect\n\n\nlog = logging.getLogger('bottle-auth.custom')\n\n\nclass Custom(object):\n def __init__(self, login_url=\"/login\",\n callba...
python
edit
1
3
mit
34d1bbc36f7d5c66000eec0d6debfd3ede74366f
avelino/bottle-auth
bottle_auth/custom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.urls import reverse\n\nfrom wagtail.tests.utils import WagtailTestUtils\n\n\nclass TestContentTypeUse(TestCase, WagtailTestUtils):\n fixtures = ['test.json']\n\n def setUp(self):\n ...
python
edit
1
1
bsd-3-clause
31a9b285a0445c895aeff02b2abbeda12bf7f3d7
torchbox/wagtail,FlipperPA/wagtail,gasman/wagtail,gasman/wagtail,mixxorz/wagtail,thenewguy/wagtail,mixxorz/wagtail,torchbox/wagtail,torchbox/wagtail,thenewguy/wagtail,gasman/wagtail,rsalmaso/wagtail,mixxorz/wagtail,wagtail/wagtail,takeflight/wagtail,FlipperPA/wagtail,torchbox/wagtail,zerolab/wagtail,thenewguy/wagtail,t...
wagtail/admin/tests/pages/test_content_type_use_view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\ndef test_get_user_list(client, user):\n response = client.get(\"/api/v1/users\")\n user_list = json.loads(str(response.data))\n user_data = user_list[\"data\"][0]\n assert user_data[\"github_name\"] == user.gith...
python
edit
1
1
mit
15c474fb25479f044e0199a26e5f0ec95c2bb0ec
PythonClutch/python-clutch,PythonClutch/python-clutch,PythonClutch/python-clutch
tests/test_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport morepath\nimport chameleon\n\n\nclass ChameleonApp(morepath.App):\n pass\n\n\n@ChameleonApp.setting_section(section='chameleon')\ndef get_setting_section():\n return {\n 'auto_reload': False\n }\n\n\n@ChameleonApp.tem...
python
edit
1
1
bsd-3-clause
e494e38b28fbafc70a1e5315a780d64e315113b4
morepath/more.chameleon
more/chameleon/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = \"Shyue Ping Ong, Anubhav Jain, Michael Kocher, \" + \\\n \"Geoffroy Hautier, William Davidson Richard, Dan Gunter, \" + \\\n \"Shreyas Cholia, Vincent L Chevrier, Rickard Armiento\"\n__date__ = \"Jul 27...
python
edit
13
0
mit
b16b701f6ad80d0df27ab6ea1d9f115a6e2b9106
blondegeek/pymatgen,tallakahath/pymatgen,dongsenfo/pymatgen,mbkumar/pymatgen,vorwerkc/pymatgen,mbkumar/pymatgen,johnson1228/pymatgen,setten/pymatgen,johnson1228/pymatgen,tschaume/pymatgen,davidwaroquiers/pymatgen,fraricci/pymatgen,dongsenfo/pymatgen,blondegeek/pymatgen,aykol/pymatgen,richardtran415/pymatgen,dongsenfo/p...
pymatgen/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport requests\nimport pprint\nimport argparse\n\nparser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')\nparser.add_argument('-e', '--email-account'...
python
edit
3
0
bsd-3-clause
72f03f05adc39a3d920ee8372f4108b5c8c8671c
L1ghtn1ng/usaf,L1ghtn1ng/usaf
modules/pwnchecker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os, sys\n\nsys.path.insert(0, '..')\n\nPROJECT_ROOT = os.path.dirname(__file__)\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psy...
python
edit
1
0
bsd-3-clause
b42cd651d3d839e3fa42aa1b155aab7a9eb33505
djangonauts/django-pgjson,djangonauts/django-pgjson
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\n\ndef get_app_env():\n return os.environ.get('RBM2M_ENV', 'Production')\n\n\nclass Config(object):\n APP_ENV = get_app_env()\n DEBUG = False\n TESTING = False\n DATABASE_URI = 'mysql://rb...
python
edit
1
1
apache-2.0
4934d3488321126fb73d236f00f37fe152f05476
notapresent/rbm2m,notapresent/rbm2m
rbm2m/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Find the largest palindrome made from the product of two n-digit numbers.\n\n# Since the result could be very large, you should return the largest palindrome mod 1337.\n\n# Example:\n# Input: 2\n# Output: 987\n# Explanation: 99 x 91 = 900...
python
edit
4
7
mit
a1390619619a364b9fab13504fb5c2464491d449
Kunal57/Python_Algorithms
Largest_Palindrome_Product.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add initial function for get_source_files" }, { "role": "assistant", "content": "__version__ = \"0.1\"\n\nimport requests\nimport io\nimport tarfile\n\nimport ccr\n\ndef get_source_files(pkgname, workingdir):\n \"\"\"Download ...
python
new_file
1
1
bsd-3-clause
57c34cae582764b69bb32faa712110a46df69dde
rshipp/chaser,rshipp/chaser
chaser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nconfig = {\n 'description': 'Python Connector for Mongrel2',\n 'author': 'Zed A. Shaw',\n 'url': 'http://pypi.python.org/pypi/mo...
python
edit
1
0
bsd-3-clause
b3f5aed7097241adffd54d9b1ff705cd44455165
ged/mongrel2,ged/mongrel2,ged/mongrel2,ged/mongrel2
examples/python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aiohttp\nimport os.path\nfrom datetime import datetime\nfrom aioes import Elasticsearch\n\nfrom .importer import import_data\nfrom .kudago import KudaGo\nfrom .utils import read_json_file\n\n\nELASTIC_ENDPOINTS = ['localhost:9200']\n...
python
edit
1
2
mit
b278cf74b6ac57daee8e4ead6044f43ffd89a1f1
despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics
importer/importer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport xlsxwriter\n\n\nclass ExcelWorkbookXlsx(object):\n\n @property\n def workbook(self):\n return ...
python
edit
1
2
mit
d0b2b0aa3674fb6b85fd788e88a3a54f4cc22046
thombashi/pytablewriter
pytablewriter/_excel_workbook.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport random\nimport numpy as np\nimport pandas as pd\nimport sklearn\nimport requests\n\ndef gettingData():\n url = \"https://www.coingecko.com/price_charts/export/279/eur.csv\"\n content = requests.get(url).content\n ...
python
edit
5
3
mit
11323a28d90ed59f32d1120224c2f63bdbed0564
samuxiii/prototypes,samuxiii/prototypes
learning/stock/ethstock.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module provides plugins for basic duplicate code detection.\"\"\"\n\nfrom hairball.plugins import HairballPlugin\n\nclass DuplicateScripts(HairballPlugin):\n\n \"\"\"Plugin that keeps track of which scripts have been \n use...
python
edit
2
5
bsd-2-clause
4be7f694220ee969683f07b982f8fcbe61971a04
ucsb-cs-education/hairball,jemole/hairball,thsunmy/hairball,jemole/hairball,ucsb-cs-education/hairball,thsunmy/hairball
hairball/plugins/duplicate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 \"Shopify inc.\" All rights reserved.\n# Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.\nfrom __future__ import unicode_literals\n\nfrom pylint import lint\nfrom shopif...
python
edit
3
1
mit
c0549cc670af0735753e08c2c375d32989f04c9c
Shopify/shopify_python
shopify_python/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom simtk import openmm\n\n# Check major version number\nassert openmm.Platform.getOpenMMVersion() == '7.1', \"openmm.Platform.getOpenMMVersion() = %s\" % openmm.Platform.getOpenMMVersion()\n\n# Check git hash\nass...
python
edit
1
0
mit
43ee2b8cfde4d0276cfd561063554705462001cf
peastman/conda-recipes,cwehmeyer/conda-recipes,jchodera/conda-recipes,peastman/conda-recipes,swails/conda-recipes,cwehmeyer/conda-recipes,cwehmeyer/conda-recipes,swails/conda-recipes,swails/conda-recipes,jchodera/conda-recipes,omnia-md/conda-recipes,jchodera/conda-recipes,omnia-md/conda-recipes,cwehmeyer/conda-recipes,...
openmm/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"test_project URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.11/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_a...
python
edit
1
0
bsd-3-clause
b5d812504924af2e2781f4be63a6191e5c47879d
nimbis/django-selenium-testcase,nimbis/django-selenium-testcase
test_project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport blinkycolor\nimport serial\n\nclass BlinkyTape(object):\n def __init__(self, port, baud_rate = 57600, pixel_count = 60):\n self._serial = serial.Serial(port, baud_rate)\n self._pixel_count = pixel_count\n self...
python
edit
1
2
mit
78d0fce5f9dd973e288a90bd58040060406cb962
jonspeicher/blinkyfun
blinkylib/blinkytape.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom todo import app\n\nfrom flask import jsonify, request, url_for\nfrom flask import json\n\nfrom todo.database import db_session\nfrom todo.models import Entry\n\n@app.route(\"/\", methods=[\"GET\", \"POST\", \"DELETE\"])\ndef index():\n...
python
edit
1
4
mit
d19fa3b085d691780bbdc7b8e5edf9e8b53906e6
Faerbit/todo-backend-flask
todo/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding:utf-8\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport sys\n\nunicode = type(\"\")\n\nclass BytesOnly(bytes):\n def __new__(cls, s):\n if isinstance(s, unicode):\n s...
python
edit
3
2
mit
5a7291b9c305445aebe77ef020017ac9cffd35e2
m-labs/pythonparser
pythonparser/test/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass BitforgeError(Exception):\n def __init__(self, *args, **kwargs):\n self.cause = kwargs.pop('cause', None)\n self.prepare(*args, **kwargs)\n self.message = self.__doc__.format(**self.__dict__)\n\n def prepa...
python
edit
1
1
mit
a3d087b2d7ec42eb5afe9f0064785d25500af11b
muun/bitforge,coinforge/bitforge
bitforge/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Dependency injector.\"\"\"\n\nfrom .catalog import AbstractCatalog\nfrom .catalog import override\n\nfrom .providers import Provider\nfrom .providers import Delegate\nfrom .providers import Factory\nfrom .providers import Singleton\nf...
python
edit
1
0
bsd-3-clause
a1cf7353917bbcee569cb8b6bb0d6277ee41face
rmk135/dependency_injector,ets-labs/dependency_injector,rmk135/objects,ets-labs/python-dependency-injector
dependency_injector/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, division, absolute_import\n\nimport unittest\nimport gitnl\n\n\nclass GitnlTestCase(unittest.TestCase):\n \"\"\"Tests from 'gitnl.py'.\"\"\"\n\n def test_push_remotename_branchfrom(self):\n ...
python
edit
1
1
mit
d80f7a89b5bc23802ad5ec9bb8cc6ad523976718
eteq/gitnl,eteq/gitnl
test_gitnl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.contrib import admin\nfrom django.conf import settings\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^admin/', admin.site.urls),\n url(r'^publication/', include('pro...
python
edit
16
0
bsd-2-clause
c8483dd1cd40db8b9628f19c9ba664165708a8ab
anjos/website,anjos/website
project/urls.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: latin-1 -*-\nimport unittest\n\nfrom github2.issues import Issue\nfrom github2.client import Github\n\n\nclass ReprTests(unittest.TestCase):\n \"\"\"__repr__ must return strings, not unicode objects.\"\"\"\n\n def test_i...
python
edit
1
1
bsd-3-clause
fb213097e838ddfa40d9f71f1705d7af661cfbdf
ask/python-github2
tests/unit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Return true if two strings are anagrams of one another\n\ndef is_anagram(str_one, str_two):\n\t# lower case both strings to account for case insensitivity\n\ta = str_one.lower()\n\tb = str_two.lower()\n\n\t# convert strings into lists and...
python
edit
3
2
mit
ad1e635688dffe5a5ba3f7f30f31d804f695d201
derekmpham/interview-prep,derekmpham/interview-prep
string/anagram.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this...
python
edit
1
0
apache-2.0
a662eded2841b87ccbccdd6dfb21315725d0a0c5
hortonworks-spark/spark-llap,hortonworks-spark/spark-llap,hortonworks-spark/spark-llap
python/pyspark_llap/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nsettings = \"\"\"settings = {\n logfile = \"/var/log/lsyncd/lsyncd.log\",\n statusFile = \"/var/log/lsyncd/lsyncd-status.log\",\n statusInterval = 5,\n pidfile = \"/var/run/lsyncd.pid\"\n}\n\n\"\"\"\n\nsync =...
python
edit
1
0
apache-2.0
c2fb76dfa3b6b7a7723bb667a581c6f583710d89
rcbau/hacks,rcbau/hacks,rcbau/hacks
lsync/templates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport string\nimport random\n\ndef generate_string(str_len=6, src=string.ascii_lowercase):\n return \"\".join(random.choice(src) for x in xrange(str_len))\n\ndef lorem_ipsum():\n words_count = random.randint(20, 50)\...
python
edit
3
2
mit
6f7dba3beccca655b84879ccd0f3071d15536b2f
sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda
test/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndetails_source = './source/details/'\nxml_source = './source/raw_xml/'\ncourse_dest = './source/courses/'\ninfo_path = './courses/info.json'\nterm_dest = './courses/terms/'\nmappings_path = './related-data/generated/'\nhan...
python
edit
1
1
mit
bf142af653dec7eb781faf6a45385a411bdfeee2
StoDevX/course-data-tools,StoDevX/course-data-tools
scripts/lib/paths.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\n\nDEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')\n\n# For choosing what the main landing page displays\nKICKOFF = 1\nBUILDSEASON = 2\nCOMPETITIONSEASON = 3\nOFFSEASON = 4\n\n# The CONFIG variables sh...
python
edit
3
0
mit
b71aac6f519dd254bf23a9c74899ca20485dd340
phil-lopreiato/the-blue-alliance,josephbisch/the-blue-alliance,1fish2/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,josephbisch/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,josephbisch/th...
tba_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom HTMLParser import HTMLParser\nfrom BeautifulSoup import BeautifulSoup\n\ndef run(data, settings):\n if data['payload'] == 'urban dictionary me':\n r = requests.get('http://www.urbandictionary.com/random.php')...
python
edit
1
3
mit
95b03703e82aecf0c7e942551c0dc37f1f74936c
kyleterry/tenyks-contrib,cblgh/tenyks-contrib,colby/tenyks-contrib
src/tenyksscripts/scripts/urbandictionary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Generated by statirator\nimport os\n\n# directories setup\n\nROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))\nSOURCE_DIR = os.path.join(ROOT_DIR, '{{ source }}')\nBUILD_DIR = os.path.join(ROOT_DIR, '{{ build...
python
edit
null
null
mit
0b3f6ae3b21cd51b99bcecf17d5ea1275c04abfd
MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator
statirator/project_template/project_name/settings.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.auth.models import Abstract...
python
edit
1
1
mit
9d9825d7f08c7cc3c078f9b43b3a67019335f75d
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/core/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, division\n\nfrom sympy.core.basic import Basic\nfrom sympy.logic.boolalg import And, Or, Not, true, false\nfrom sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,\n ...
python
edit
16
1
bsd-3-clause
85a873c79e3c3c7289a23da6fe3673259fac9cbd
sampadsaha5/sympy,VaibhavAgarwalVA/sympy,mcdaniel67/sympy,MechCoder/sympy,farhaanbukhsh/sympy,abhiii5459/sympy,MechCoder/sympy,madan96/sympy,kaushik94/sympy,jaimahajan1997/sympy,skidzo/sympy,ahhda/sympy,abhiii5459/sympy,mafiya69/sympy,Curious72/sympy,shikil/sympy,aktech/sympy,hargup/sympy,Vishluck/sympy,oliverlee/sympy...
sympy/sets/conditionset.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nUnit tests for the implementation ``flocker-deploy``.\n\"\"\"\n\nfrom twisted.trial.unittest import TestCase, SynchronousTestCase\n\nfrom ...testtools import FlockerScr...
python
edit
3
1
apache-2.0
9e9256a65afa8569950ca344b3d074afcd6293c5
moypray/flocker,LaynePeng/flocker,1d4Nf6/flocker,LaynePeng/flocker,AndyHuu/flocker,hackday-profilers/flocker,LaynePeng/flocker,agonzalezro/flocker,achanda/flocker,agonzalezro/flocker,Azulinho/flocker,adamtheturtle/flocker,beni55/flocker,agonzalezro/flocker,mbrukman/flocker,wallnerryan/flocker-profiles,mbrukman/flocker,...
flocker/cli/test/test_deploy_script.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django\nfrom django.db.models.signals import post_save\n\nclass DirtyFieldsMixin(object):\n def __init__(self, *args, **kwargs):\n super(DirtyFieldsMixin, se...
python
edit
1
3
bsd-3-clause
98b6f81f68ce4338e932afc14b7b9d4c8a810e71
mattcaldwell/django-dirtyfields,georgemarshall/django-dirtyfields
src/dirtyfields/dirtyfields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\n\nfrom ..schema import UserSchema\n\n\nclass TokenFactory(object):\n def __init__(self, request, user):\n self.user = user\n self.request = request\n\n def create_access_token(se...
python
edit
1
1
mit
c19a64ecdbde5a387a84dec880c2ebea1013c3d6
josuemontano/api-starter,josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/API-platform,josuemontano/api-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform
canopus/auth/token_factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\ndynmen - A simple python interface to dynamic menus like dmenu or rofi\n\nimport dynmen\nmenu = dynmen.Menu(['dmenu', '-fn', 'Sans-30'])\noutput = menu({'a': 1, 'b': 2, 'c': 3})\n\nYou can make the menu non-...
python
edit
6
1
mit
2c006d4fd1a823eba2cec933671a43182f0c10f5
frostidaho/dynmen
src/dynmen/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Created by Noah Kantrowitz on 2007-07-04.\n# Copyright (c) 2007 Noah Kantrowitz. All rights reserved.\n\nfrom trac.db import Table, Column\n\nname = 'mastertickets'\nversion = 2\ntables = [\n Table('mastertickets', key=('source','dest'...
python
edit
2
2
bsd-3-clause
3f5a6dcd622d7b1c890ced67468ecebd02b1806f
SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin
mastertickets/db_default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import url\nfrom rest_framework.settings import api_settings\n\n\ndef format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):\n \"\"\"\n Supplement existing urlpatterns with corros...
python
edit
1
5
bsd-2-clause
3e77090b2142e7802203b5e37f81b5d4cbb6f40d
delinhabit/django-rest-framework,abdulhaq-e/django-rest-framework,pombredanne/django-rest-framework,werthen/django-rest-framework,sbellem/django-rest-framework,hunter007/django-rest-framework,waytai/django-rest-framework,arpheno/django-rest-framework,kgeorgy/django-rest-framework,arpheno/django-rest-framework,adambain-...
rest_framework/urlpatterns.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Helper functions\n\nConsists of functions to typically be used within templates, but also\navailable to Controllers. This module is available to templates as 'h'.\n\"\"\"\n# Import helpers as desired, or define your own, ie:\n#from we...
python
edit
1
3
apache-2.0
8e14f3a7d40d386185d445afc18e6add57cd107e
jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo...
LR/lr/lib/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nINSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n\n 'allauth',\n 'allauth.account',\n 'djcelery',...
python
edit
1
0
mit
854709e1c2f5351c8e7af49e238fe54632f23ff5
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
takeyourmeds/settings/defaults/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport six\n\nfrom asv import confi...
python
edit
1
3
bsd-3-clause
1bc61edde0e41ec3f2fe66758654b55ed51ec36a
pv/asv,waylonflinn/asv,airspeed-velocity/asv,pv/asv,qwhelan/asv,mdboom/asv,waylonflinn/asv,waylonflinn/asv,ericdill/asv,giltis/asv,ericdill/asv,airspeed-velocity/asv,mdboom/asv,qwhelan/asv,giltis/asv,airspeed-velocity/asv,qwhelan/asv,edisongustavo/asv,mdboom/asv,spacetelescope/asv,edisongustavo/asv,ericdill/asv,pv/asv,...
test/test_repo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" The Acme Lab application. \"\"\"\n\n\n# Standard library imports.\nfrom logging import DEBUG\n\n# Enthought library imports.\nfrom enthought.envisage.ui.workbench.api import WorkbenchApplication\nfrom enthought.pyface.api import Abou...
python
edit
1
1
bsd-3-clause
a5f3c2c027588a72a9861a72cfa975d2f3e24bea
certik/hermes-gui
acme/acmelab/acmelab.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass AttributeInputType:\n \"\"\"The type that we expect to render the attribute's values as.\"\"\"\n\n DROPDOWN = \"dropdown\"\n MULTISELECT = \"multiselect\"\n FILE = \"file\"\n REFERENCE = \"reference\"\n\n CHOICES = [...
python
edit
1
0
bsd-3-clause
1aa121daa3c99849173d5cd4c6a80d6bf94f5186
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/attribute/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"curses\n\nThe main package for curses support for Python. Normally used by importing\nthe package, and perhaps a particular module inside it.\n\n import curses\n from curses import textpad\n curses.initwin()\n ...\n \n\"\"\...
python
edit
4
4
mit
166bff52496bfb47c5a3a03585bd10fb449b8d77
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/curses/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom jip.repository import MavenFileSystemRepos\nfrom jip.maven import Artifact\nfrom contextlib import contextmanager\nimport shutil\nimport tempfile\n\nimport errno \nimport os\n\n@contextmanager\ndef tmpdir():\n ...
python
edit
1
4
mit
92d61a641cfade2ed323576719cfc0ff54d34cbd
sunng87/jip,sunng87/jip
test/repository_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Download genome files from the NCBI\"\"\"\nfrom .config import (\n SUPPORTED_TAXONOMIC_GROUPS,\n NgdConfig\n)\nfrom .core import (\n args_download,\n download,\n argument_parser,\n)\n\n__version__ = '0.2.8'\n__all__ = [...
python
edit
1
0
apache-2.0
36e9f441d75109bef7cd0e0bd17c40db0a6564d4
kblin/ncbi-genome-download,kblin/ncbi-genome-download
ncbi_genome_download/__init__.py
accepted
null
true