messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nfrom time import mktime\nimport json\n\n\nclass DJSONEncoder(json.JSONEncoder):\n def default(self, obj):\n if isinstance(obj, datetime):\n return {\n ...
python
edit
1
3
mit
c716124b8ede9678ca24eb07f1aa83c1fba9f177
mwielgoszewski/doorman,mwielgoszewski/doorman,mwielgoszewski/doorman,mwielgoszewski/doorman
doorman/celery_serializer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 OpenStack Foundation\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...
python
edit
1
0
apache-2.0
98516d4fa4a7f56e5133377b228ac8c90aed74c9
openstack/magnum,ArchiFleKs/magnum,ArchiFleKs/magnum,openstack/magnum
magnum/tests/fake_policy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom amo.utils import chunked\n\nfrom mkt.developers.tasks import generate_image_assets\nfrom mkt.webapps.models import Webapp\n\n\ndef run():\n \"\"\"Generate featured tiles.\"\"\"\n for chunk in chunked(Webapp.objects.all(), 50):\n ...
python
edit
2
3
bsd-3-clause
1e03a6ba2a5277c6e665cde994e0ced8b15192c0
Joergen/olympia,aviarypl/mozilla-l10n-addons-server,mstriemer/olympia,lavish205/olympia,wagnerand/olympia,robhudson/zamboni,Nolski/olympia,andymckay/zamboni,kmaglione/olympia,mdaif/olympia,eviljeff/zamboni,eviljeff/zamboni,tsl143/zamboni,andymckay/addons-server,jamesthechamp/zamboni,harikishen/addons-server,yfdyh000/ol...
migrations/482-generate-featured-image-assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n__author__ = 'katharine'\n\nimport os\nimport subprocess\n\nfrom pebble_tool.exceptions import MissingSDK\nfrom pebble_tool.util import get_persist_dir\n\n\ndef sdk_path():\n path = os.getenv('PEBB...
python
edit
1
5
mit
70b23dbd315b93213fc62540aab6293665b9dd0c
pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool
pebble_tool/sdk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport rpyc\nfrom rpyc.utils.server import OneShotServer\n\n\nclass GhcompService(rpyc.ClassicService):\n def on_connect(self, conn):\n print('Incoming connection.')\n super(GhcompService, self).on_connect(conn)...
python
edit
3
2
mit
4ec3bd4e4d45c0dba9b8333b52ecd8e8a4a6796f
Digital-Structures/ghpythonremote,pilcru/ghpythonremote
ghpythonremote/ghcompservice.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nlogging.basicConfig(\n format='%(asctime)s %(levelname)-8s %(message)s',\n level=logging.INFO,\n datefmt='%Y-%m-%d %H:%M:%S')\n\n```\n\nApply this change: Add logging to file on side of logging to stdout" }, {...
python
edit
1
0
mit
79cbfc35ecca75434cf31839416e5866bad7909d
futuresimple/triggear
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Script to act as a template\"\"\"\n\nimport os\nimport sys\n\n\ndef main(args):\n return os.EX_OK\n\n\nif __name__ == '__main__':\n sys.exit(main(sys.argv[1:]))\n\n```\n\nApply this change: Hide variable till something actually ...
python
edit
1
1
mit
b9fc50abab64f784c8d6defb74aaaf5bdb5a45a7
jalanb/jab,jalanb/dotjab,jalanb/dotjab,jalanb/jab
src/python/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse\nfrom myblog.models import Article\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.utils import timezone\nfrom django.core.urlreso...
python
edit
4
3
mit
e9df4039849e88433f75869b8b6997f21726e761
mileto94/Django-tutorial,mileto94/Django-tutorial
blog/myblog/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\napp = Flask(__name__)\n\n\nfrom pymongo import MongoClient\n\nconnection = MongoClient()\n\n\n@app.route(\"/\")\ndef hello():\n\t\n return connection.essa.users.find({}).next()['name']\n\n\n@app.route('/halla...
python
edit
1
1
apache-2.0
7bae2375adfbd178ce71cc817d1d44876aa58ab7
raklove/hello-world
flaskapp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.importlib import import_module\n\ndef get_backend():\n \"\"\"\n Return an instance of the registration backend for use on thi...
python
edit
4
3
bsd-3-clause
da0ba836636f6ce78d8606a5932de34a8e1160a1
Geffersonvivan/django-registration,tanjunyen/django-registration,rulz/django-registration,allo-/django-registration,furious-luke/django-registration,kinsights/django-registration,yorkedork/django-registration,mick-t/django-registration,torchingloom/django-registration,alawnchen/django-registration,furious-luke/django-r...
registration/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Views for the general application.\"\"\"\n\nfrom django.views.generic import TemplateView\nfrom django.http import HttpResponse\n\n\nclass GeneralIndexView(TemplateView):\n \"\"\"View for the homepage that renders from a template.\...
python
edit
1
1
mit
3398ca0dbdb6e76986ddaadf8ee35c637ce13c14
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
csunplugged/general/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Training LeNet on MNIST data.\"\"\"\n\nimport athenet\nfrom athenet.data_loader import MNISTDataLoader\n\n\nnetwork = athenet.models.lenet(trained=False)\nnetwork.data_loader = MNISTDataLoader()\n\nconfig = athenet.TrainConfig()\n\nco...
python
edit
2
0
bsd-2-clause
47bf4b10624d8bcdbf3906ff69f5430975679c1c
heurezjusz/Athenet,heurezjusz/Athena
demo/mnist_learning_lenet.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#encoding:utf-8\n\nfrom urllib.parse import urlparse\n\nfrom utils import get_url\n\n\nt_channel = '@ya_metro'\nsubreddit = 'Subways'\n\n\ndef send_post(submission, r2t):\n what, url, ext = get_url(submission)\n title = submission.tit...
python
edit
1
7
mit
3b257526c9f0ed523d51b023fa454bae59ecac5c
nsiregar/reddit2telegram,nsiregar/reddit2telegram,Fillll/reddit2telegram,Fillll/reddit2telegram
channels/ya_metro/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n salt.utils.yamldumper\n ~~~~~~~~~~~~~~~~~~~~~\n\n'''\n# pylint: disable=W0232\n# class has no __init__ method\n\nfrom __future__ import absolute_import\ntry:\n from yaml import CDumper as Dump...
python
edit
1
1
apache-2.0
7297f61674d37795f3d63ec990f87e9950d68456
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/utils/yamldumper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\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/li...
python
edit
3
0
apache-2.0
44f603cd947f63101cf6b7eb8e49b5210cfa4f6f
ocadotechnology/wry
wry/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n # Python >=3.2\n from tempfile import TemporaryDirectory\nexcept ImportError:\n import shutil\n import tempfile\n\n class TemporaryDirectory(object):\n \"\"\"\n Very simple temporary directory context man...
python
edit
1
2
mit
88ae237911346d74c1c8a51a11dd47b486f3b4c5
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/py31compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Product\n\n\nclass ProductAdmin(admin.ModelAdmin):\n list_display = ('description', 'product_type', 'account_number')\n ordering = ('description',)\n\n class Meta:\n mo...
python
edit
1
0
bsd-3-clause
3849a5a842137a29ce06b5b7e027c8f8efd4e00e
CorbanU/corban-shopify,CorbanU/corban-shopify
shopify/product/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nHandle loading six package from system or from the bundled copy\n\"\"\"\n\nimport imp\n\n\n_SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six']\n\n\ndef _find_module(name, path=None):\n \"\"\"\n Alternative to `imp.find_module...
python
edit
1
3
mit
ddb91c20793d8e5e8a01e0302afeaaba76776741
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/extern/six.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/python\n\n# installation:\n# pip install pytz pyuploadcare~=2.1.0\n\nimport pytz\nfrom datetime import timedelta, datetime\nimport time\nfrom pyuploadcare import conf\nfrom pyuploadcare.api_resources import FileList, FilesStorage\n\n...
python
edit
1
0
mit
0d9542011b78dca40f0c4c18a932a06d5305f6ef
uploadcare/pyuploadcare
examples/delete_old_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import WhitelistedUsername\n\n\nclass WhitelistedUsernameAdmin(admin.ModelAdmin):\n pass\n\n\nadmin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin)\n\n```\n\nApply this change...
python
edit
1
0
mit
49f3c5bf5b95a7d678e541d93e0999f37f8a2b26
muhummadPatel/raspied,muhummadPatel/raspied,muhummadPatel/raspied
students/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pyrc\nimport pyrc.utils.hooks as hooks\n\nclass GangstaBot(pyrc.Bot):\n @hooks.command()\n def bling(self, target, sender):\n \"will print yo\"\n if target.startswith(\"#\"):\n self.message(target, \"%s: yo\" % sender)\n...
python
edit
1
2
mit
1001a61d345e1b3018eccfbd1cdb4a2111e23cca
sarenji/pyrc
example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import *\nfrom fabric.colors import *\n\nenv.colorize_errors = True\nenv.hosts = ['sanaprotocolbuilder.me']\nenv.user = 'root'\nenv.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh'\nenv.pro...
python
edit
28
1
bsd-3-clause
fde84efc866d2276eac5faed0af3df5a672664f5
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
fabfile.py
rejected_lint
Too many lint violations: 28
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nimport requests\nfrom bs4 import BeautifulSoup\n\nCRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml'\n\n# Fetching matches\ndef get_matches():\n\tr = requests.get(CRICINFO_RSS_URL)\n\tsoup = BeautifulSoup(r.text)\n\tretu...
python
edit
1
2
mit
3ccfed2e70e6da68452d466353c7b0df1ff9811c
voidabhi/cricinfo,voidabhi/cricinfo
cricinfo/my_bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.words.protocols import irc\nfrom txircd.modbase import Command\n\nclass NamesCommand(Command):\n\tdef onUse(self, user, data):\n\t\tfor chan in data[\"targetchan\"]:\n\t\t\tuser.report_names(chan)\n\t\n\tdef processParams(self,...
python
edit
1
5
bsd-3-clause
edd6368f4b21372e268adef04b9beb85d5603f40
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
txircd/modules/cmd_names.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import TestCase\n\nfrom llvmlite import binding as llvm\nfrom llvmlite.binding import dylib\nimport platform\nfrom ctypes.util import find_library\nimport unittest\n\n@unittest.skipUnless(platform.system() in {\"Linux\", \"Darwin\"},...
python
edit
1
4
bsd-2-clause
709252b84cd4b7f1f00e26980c2998db9b1495e5
markdewing/llvmlite,markdewing/llvmlite,numba/llvmlite,sklam/llvmlite,sklam/llvmlite,m-labs/llvmlite,pitrou/llvmlite,markdewing/llvmlite,pitrou/llvmlite,sklam/llvmlite,m-labs/llvmlite,squisher/llvmlite,sklam/llvmlite,ssarangi/llvmlite,numba/llvmlite,ssarangi/llvmlite,ssarangi/llvmlite,pitrou/llvmlite,squisher/llvmlite,...
llvmlite/tests/test_dylib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'dcl9'\nfrom render import render_template\nimport argparse\nimport yaml\n\n\ndef generate_track_dict(metadata):\n d = dict()\n d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata...
python
edit
1
3
mit
8128107f10971a61f3d0057bcb9e9ea8413b8cef
Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator
python/render/render_tracks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# from __future__ import print_function #(if python2)\n\nimport sys\n\n\ndef eprint(*args, **kwargs):\n \"\"\" Just like the print function, but on stderr\n \"\"\"\n print(*args, file=sys.stderr, **kwargs)...
python
edit
3
3
unlicense
0b82789823dbfa1fc74af0eee7b8911783519f91
paolobolzoni/useful-conf,paolobolzoni/useful-conf,paolobolzoni/useful-conf
scripts/starting_py_program.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\nfrom examsys import views\n\nurlpatterns = patterns('',\n\t\t# (r'^$', lambda r: HttpResponseRedirect('examsys/'))\n url(r'^$', views.index, name='index'),\n url(r'^login/', views.login, n...
python
edit
1
0
mit
0adf184e841bedffa118e85eda94ff099862cb6f
icyflame/test-taking-platform,icyflame/test-taking-platform
examsys/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport scrapy\nimport json\n\nfrom locations.items import GeojsonPointItem\n\n\nclass SuperAmericaSpider(scrapy.Spider):\n name = \"superamerica\"\n allowed_domains = [\"superamerica.com\"]\n start_urls = (...
python
edit
1
2
mit
98acdc9262cfa8c5da092e0c3b1264afdcbde66a
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
locations/spiders/speedway.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rockstar import RockStar\n\nags_code = \"Display(\"Hello, world!\");\"\nrock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code)\nrock_it_bro.make_me_a_rockstar()\n\n```\n\nApply this change: Fix AGS (Adventure Game ...
python
edit
1
0
mit
fdcb0bc502ea3976f7edd613f0bdb0857104fc82
jehb/rockstar,monsterwater/rockstar,avinassh/rockstar,Endika/rockstar,yask123/rockstar,ActuallyACat/rockstar,varunparkhe/rockstar,jrajath94/RockStar,haosdent/rockstar,gokaygurcan/rockstar
examples/ags_rockstar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Manager to handle plugins\"\"\"\nimport pathlib\n\nfrom pluginbase import PluginBase\n\nfrom .exceptions import PluginNotFound\n\n\nclass PluginManager:\n \"\"\"Class to manage and create Spinnaker applications\n\n Args:\n ...
python
edit
1
2
apache-2.0
10e4efb1b28eb6b32f0cef3eee510f9a6e0b6909
gogoair/foremast,gogoair/foremast
src/foremast/plugin_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Gitless - a version control system built on top of Git.\n# Licensed under GNU GPL v2.\n\n\"\"\"gl switch - Switch branches.\"\"\"\n\n\nfrom __future__ import unicode_literals\n\nfrom . import pprint\n\n\ndef parse...
python
edit
1
2
mit
298a90c942bd44f920e1b12ea0af384b7f06c6f1
sdg-mit/gitless,sdg-mit/gitless
gitless/cli/gl_switch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nManagement command to make sure the permissions exist\nfor all kinds of proposals.\n\"\"\"\nfrom django.core.management.base import NoArgsCommand\n\n\nclass Command(NoArgsCommand):\n\n def handle_noargs(self, **options):\n ...
python
edit
1
1
bsd-3-clause
19e26d09659dc4db6bcd27565dacd458b7e3e4cd
PyCon/pycon,njl/pycon,njl/pycon,njl/pycon,PyCon/pycon,njl/pycon,PyCon/pycon,PyCon/pycon
symposion/proposals/management/commands/ensure_proposal_records.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nfrom getpass import getpass, _raw_input\nimport logging\nimport sys\n\nfrom argh import ArghParser, arg\nfrom ghtools import cli\nfrom ghtools.api import envkey, GithubAPIClient\n\nlog = logging.getL...
python
edit
1
3
mit
dcda634f00d2e04e1c77bca14059a9df1a1fdc5c
alphagov/ghtools
ghtools/command/login.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.contrib.gis.utils import LayerMapping\n\nfrom ..load import get_processed_data_file\nfrom .models import WaterParcel, waterparcel_mapping\n\n\ndef from_shapefile(transaction_mode='autocommit', **kwargs):\n \"\"\"...
python
edit
2
5
bsd-3-clause
36593f21c93a16beb5d2ab77ba803a9059099615
ebrelsford/django-phillydata
phillydata/waterdept/load.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 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.\nimport os\n\nfrom telemetry.test import tab_test_case\n\nclass Inspecto...
python
edit
1
1
bsd-3-clause
fef260c3731408592fd88e73817fe0f0cd7fe769
benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult-csm,benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,sahiljain/catap...
telemetry/telemetry/core/chrome/inspector_memory_unittest.py
rejected_duplicate
Near-duplicate of sample 1329
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef topological_sort():\n \"\"\"Topological Sorting for Directed Acyclic Graph (DAG).\"\"\"\n pass\n\n\ndef main():\n ...
python
edit
3
1
bsd-2-clause
243523ee5e70a94914de23d8444478425b7bb782
bowen0701/algorithms_data_structures
alg_topological_sort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tempfile\nimport os.path as op\nimport numpy as np\nimport IPython.display as display\n\nimport nibabel as nib\nfrom dipy.viz import fvtk\nfrom palettable.tableau import Tableau_20\n\n\ndef visualize_bundles(trk, ren=None, inline=Tru...
python
edit
1
7
bsd-2-clause
342d3791aa80084309ffc00a9e5e936fa8277401
yeatmanlab/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ
AFQ/viz.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Shared utility functions\"\"\"\n\nfrom django.conf import settings\nfrom django.template.defaultfilters import slugify as django_slugify\nfrom django.utils.translation import ugettext_lazy as _\n\ndef get_language_name(language_code):...
python
edit
1
4
mit
10f48dda3337cdb2778d76dee0df1ed4e5601439
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
apps/storybase/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add visualization for search results" }, { "role": "assistant", "content": "from search.html import HTMLVisualization\nfrom utils.transcription import WordCoord\n\ndef search_word(word, save=False):\n \"\"\"\n Finds all loc...
python
new_file
1
6
mit
cdd3989536e123877755fef621b95d0121e4c665
dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016
search/kws_dataset.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom support import lib,ffi\nfrom qcgc_test import QCGCTest\n\nclass AllocatorTest(QCGCTest):\n def test_cells_to_bytes(self):\n for i in range(1,17):\n self.assertEqual(1, lib.bytes_to_cells(i))\n self.assertEqu...
python
edit
1
3
mit
35f2838d1451681f1cc49fba3b4466389bf2cf68
ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc
test/test_allocator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import System\n\n\nclass transition(object):\n \"Transition context manager.\"\n def __init__(self, obj, state, event=None, start_time=None,\n message=None, exception_fail=True):\n\n self.system = System...
python
edit
1
5
bsd-3-clause
eaa75a86a3ea64e2c98dbcdd0a0b9731c9505abf
chop-dbhi/django-sts,chop-dbhi/django-sts
sts/contextmanagers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Picture(models.Model):\n \"\"\"\n This is a small demo using just two fields. ImageField depends on PIL or\n pillow (where Pillow is easily installable in a virtualenv. If you have\n probl...
python
edit
1
1
mit
7ad1d9afdbf8db2960ac6b402f4da3f1675cc86f
sigurdga/django-dropzone-upload,sigurdga/django-dropzone-upload
fileupload/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# VOD metadata file generator - md5_checksum sub-module\n# Copyright 2013 Bo Bayles (<EMAIL>)\n# See README for more information\n# See LICENSE for license\nimport hashlib\n\ndef md5_checksum(file_path, chunk_bytes=163840):\n \"\"\"Return ...
python
edit
1
3
mit
cc7a5fd3bdf7197f99bd45e4bbcb0b8fe6e5ccd6
bbayles/vod_metadata
md5_checksum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom arrange_schedule import *\n\n\ndef test_read_system_setting():\n keys = ['board_py_dir','shutdown','max_db_log','min_db_activity']\n system_setting = read_system_setting()\n for key in keys:\n assert key in system_setti...
python
edit
8
2
apache-2.0
928d1d8aab846e9393f925690bd1f51f327fb5ad
stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,SWLBot/electronic-blackboard,Billy4195/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,stvreumi/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/elec...
test_arrange_schedule.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404\nfrom django.template import RequestContext\n\nfrom user_messages.models import Thread, Message\n\n@lo...
python
edit
6
4
mit
d855e5626ee639a237467af7f6f57947cd17f9c4
pinax/pinax-messages,arthur-wsw/pinax-messages,arthur-wsw/pinax-messages,eldarion/user_messages,pinax/pinax-messages,eldarion/user_messages
user_messages/views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add signal hooks to create practice objects" }, { "role": "assistant", "content": "from django.contrib.auth.models import Permission\nfrom django.db.models.signals import post_save, pre_delete\nfrom django.dispatch import receive...
python
new_file
4
3
mit
2046d82addab9ec83dbb85a2d08c727a52065d8b
DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune
deckglue/models.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template, g\nfrom porick import app, model\n\n\n@app.route('/')\ndef landing_page():\n return render_template('/index.html')\n\n\n@app.route('/browse')\n@app.route('/browse/<area>')\n@app.route('/browse/<area>/pa...
python
edit
4
1
apache-2.0
a3dd1f1c358ab8be7987f9e93ff4f2c0351ae43e
stesh/porick-flask,stesh/porick-flask,stesh/porick-flask
porick/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nclass Product():\n def __init__(self, cost, name, date):\n self.cost = cost\n self.name = name\n self.date = date\n\n def days_left(self):\n return datetime.now() - self.dat...
python
edit
2
1
mit
76c193f457bb45e8e821594de67da8e15c4352d4
AliGhahraei/phar-ant-colony
product.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2012 Alexander Shorin\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution.\n#\n\nfrom .version ...
python
edit
26
1
bsd-3-clause
6a1c699f92f43cbe65bf729352695473474a91ae
asingla87/python-astm,kxepal/python-astm,123412345/python-astm,andrexmd/python-astm,MarcosHaenisch/python-astm,eddiep1101/python-astm,briankip/python-astm,pombreda/python-astm,Iskander1b/python-astm,tinoshot/python-astm,mhaulo/python-astm,LogicalKnight/python-astm,AlanZatarain/python-astm,kxepal/python-astm,tectronics/...
astm/__init__.py
rejected_lint
Too many lint violations: 26
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime_plugin\n\n\nclass SelectExactMatchCommand(sublime_plugin.TextCommand):\n last_selection = None\n\n def run(self, edit):\n selections = self.view.sel()\n if selections[0].empty():\n selections.ad...
python
edit
1
8
mit
b5fb888c5b74cc99008cdc7e226f354d20b71b8c
spywhere/SelectExact,spywhere/SelectExact
select_exact.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"halaqat URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app imp...
python
edit
1
0
mit
aa143e28b61118c0fc3e5d28f2330572213b501c
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
halaqat/urls.py
rejected_duplicate
Near-duplicate of sample 2878
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport peewee\n\nAPP_DIR = os.path.dirname(__file__)\n\ntry:\n import urlparse\n import psycopg2\n urlparse.uses_netloc.append('postgres')\n url = urlparse.urlparse(os.environ[\"DATABASE_URL\"])\n database = peew...
python
edit
3
0
mit
b6dea08a0a9908d2303693cf4534c7b0beec4154
analyticpi/analyticpi,analyticpi/analyticpi,analyticpi/analyticpi
analyticpi/db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nimport socket\nimport threading\n\nfrom connection import Connection\nimport shared\n\n\nclass Listener(threading.Thread):\n def __init__(self, host, port, family=socket.AF_INET):\n super()...
python
edit
1
3
mit
ad0859f2e7b6f659fe964f786277ea2ad3fdf787
TheKysek/MiNode,TheKysek/MiNode
src/listener.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport psutil\nimport os\nimport time\n\ndef create_bar(filled):\n low = '.'\n high = '|'\n if filled > 1:\n low = str(int(filled))\n high = str(int(filled + 1))\n filled = filled - int(f...
python
edit
null
null
mit
a581d057366d8b4ae94754e18ef02e4ec59e3c05
wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar
gensysinfo.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom raven.contrib.flask import Sentry\n\napp = Flask(__name__)\napp.config.from_object(os.environ.get('SETTINGS'))\ndb = SQLAlchemy(app)\n\n\n...
python
edit
1
2
mit
082897d8216f3ec2feca8af4afbc0be7401956d5
LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha
systemofrecord/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import (\n\tFlask,\n\trender_template,\n\tabort\n)\n\nfrom glanerbeard.server import Server\n\napp = Flask(__name__)\napp.config.from_object('glanerbeard.default_settings')\napp.config.from_envvar('GLANERBEARD_S...
python
edit
4
2
apache-2.0
a116c3eae892a73b11372225a9bdf0194db75598
daenney/glanerbeard
glanerbeard/web.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nMonkey patch setuptools to write faster console_scripts with this format:\n\n from mymodule import entry_function\n entry_function()\n\nThis is better.\n'''\nfrom setuptools.command import easy_install\n\n\n@classmethod\ndef get_...
python
edit
3
5
bsd-2-clause
b33222fd9d16efa88864d0c1f28cce9d0a8c3f68
ninjaaron/fast-entry_points
fastentrypoints.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for farnsworth 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-2-clause
8e45eb77394ad47579f5726e8f2e63794b8e10c5
knagra/farnsworth,knagra/farnsworth,knagra/farnsworth,knagra/farnsworth
farnsworth/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\n\nurlpatterns = patterns('basic.events.views',\n url(r'^(?P<year>\\d{4})/(?P<month>\\w{3})/(?P<day>\\d{1,2})/(?P<slug>[-\\w]+)/(?P<id>\\d)/$',\n view='event_detail',\n name='event_...
python
edit
8
0
bsd-3-clause
75dfc329430732159c6fd8735898922ee4d86a86
sedden/django-basic-apps,sedden/django-basic-apps
basic/events/urls.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nGIT_SEMINAR_PATH = 'data/seminar-test/'\nTASK_MOOSTER_PATH = 'task-mooster/'\n\n\n```\n\nApply this change: Fix path to seminar repository." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*...
python
edit
1
0
mit
a033fdde5a7f8a250865fbeed6f2ff6ce6908420
fi-ksi/web-backend,fi-ksi/web-backend
util/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom windberg_register import models\nfrom django.contrib import admin\n\n\nclass StarterAdmin(admin.ModelAdmin):\n list_display = (\"name\", \"given\", \"age_group_short\", \"club_name\", \"email\", \"run_list\", \"comment\")\n list_...
python
edit
3
5
bsd-3-clause
03b07ca359c218b10837c2f1cdf4027474fdd856
janLo/Windberg-web,janLo/Windberg-web
windberg_register/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import execute, local, settings, task\n\n\n@task\ndef preprocess_header():\n local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')\n\n\n@task\ndef docs():\n local('make -C docs/ html')\n\n\n@task\ndef ...
python
edit
1
2
apache-2.0
f050d47ae8f835c4da7cdb45e217be77f42f01f5
felix1m/pyspotify,jodal/pyspotify,kotamat/pyspotify,kotamat/pyspotify,jodal/pyspotify,felix1m/pyspotify,kotamat/pyspotify,mopidy/pyspotify,jodal/pyspotify,mopidy/pyspotify,felix1m/pyspotify
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom selenium_test import FirefoxTest, ChromeTest,\\\n setUpModule, tearDownModule\n\n\nclass glPointsBase(object):\n testCase = ('pointClustering',)\n testRevision = 4\n\n def loadPage(self):\n s...
python
edit
4
1
apache-2.0
6f770e3da8dda9bc91300e323d386f6a6863c86e
OpenGeoscience/geojs,OpenGeoscience/geojs,Kitware/geojs,OpenGeoscience/geojs,Kitware/geojs,Kitware/geojs
testing/test-cases/selenium-tests/pointClustering/testPointCluster.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n'''\nCustom filters for use in openshift_hosted\n'''\n\n\nclass FilterModule(object):\n ''' Custom ansible filters for use by openshift_hosted role'''\n\n @staticmethod\n def get_router_r...
python
edit
1
9
apache-2.0
7fbc356ec6896e441f2423bd3168ff231b4a8bb2
detiber/openshift-ansible,openshift/openshift-ansible,miminar/openshift-ansible,ttindell2/openshift-ansible,aveshagarwal/openshift-ansible,gburges/openshift-ansible,tagliateller/openshift-ansible,abutcher/openshift-ansible,mmahut/openshift-ansible,zhiwliu/openshift-ansible,zhiwliu/openshift-ansible,EricMountain-1A/open...
roles/openshift_hosted/filter_plugins/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import platform_specific, input\n\nfrom .graphics import screen, Surface, Image\nfrom .run_loop import main_run_loop, every\nfrom .input import touch\nfrom .button import press\nfrom .web import webhook\n\nplatform_specific.fixup_env...
python
edit
13
2
bsd-2-clause
2ed0f0e9f875722d2ae21d595701d37646b74885
furbrain/tingbot-python
tingbot/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport json\n\nfrom geopandas import GeoDataFrame\n\nclass TestSeries(unittest.TestCase):\n\n def setUp(self):\n # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip\n # saved as geopandas/ex...
python
edit
1
1
bsd-3-clause
4733055d8eee5e0e3ca3bd47eaa5c776bb62c9a8
maxalbert/geopandas,fonnesbeck/geopandas,geopandas/geopandas,geopandas/geopandas,scw/geopandas,micahcochran/geopandas,jdmcbr/geopandas,koldunovn/geopandas,jwass/geopandas,snario/geopandas,IamJeffG/geopandas,ozak/geopandas,perrygeo/geopandas,jdmcbr/geopandas,ozak/geopandas,urschrei/geopandas,geopandas/geopandas,jorisvan...
tests/test_geodataframe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom decimal import Decimal\n\nfrom django.test import TestCase\n\nfrom shop.money.money_maker import AbstractMoney, MoneyMaker\n\n\nclass AbstractMoneyTest(TestCase):\n\n def test_is_abstract(self):\n self.assertRaises(TypeError,...
python
edit
2
1
bsd-3-clause
97d1dd6b14cff5196ccd2e2efad8a0aba5bf240b
nimbis/django-shop,jrief/django-shop,awesto/django-shop,rfleschenberg/django-shop,jrief/django-shop,nimbis/django-shop,jrief/django-shop,awesto/django-shop,khchine5/django-shop,rfleschenberg/django-shop,jrief/django-shop,divio/django-shop,divio/django-shop,rfleschenberg/django-shop,nimbis/django-shop,khchine5/django-sh...
tests/test_money.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.5\n#\n# Copyright 2008 the Melange authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licen...
python
edit
1
1
apache-2.0
b19568c85458ac04b902dc03010e2d50177477e1
MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='barsystem',\n version='1.0.0',\n packages=find_packages('src'),\n package_dir={'': 'src'},\n include_package_data=True,\n\n entry_points={\n 'console_scr...
python
edit
1
0
mit
8f96a89e14bfcb8ed66e0e276966df609b7651c1
TkkrLab/barsystem,TkkrLab/barsystem,TkkrLab/barsystem
barsystem/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport pprint\nimport os\n\n\nwith open('json/test.json') as json_data:\n d = json.load(json_data)\n# print(d)\n# pprint.pprint(d)\n for stat_categories in d[\"divisionteamstandings\"][\"division\"][0][\"teamentry\"...
python
edit
3
0
mit
709d6c530296fe9e0b03ad5ed28facd7c69b93fa
prcutler/nflpool,prcutler/nflpool
importjson.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom Axon.Component import component\nfrom threading import Timer\n\nclass TimerMixIn(object):\n \n def __init__(self, *argl, **argd):\n super(TimerMixIn,self).__init__(*argl,**argd)\n self.timer =...
python
edit
1
3
apache-2.0
19fb86f8b3a2307489f926d9d5d78bd84c6b05a1
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Sketches/MH/TimerMixIn.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom six import string_types\n\n\ndef listify(arg):\n \"\"\"\n Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of\n `list`, then we return [arg], else arg is returned.\n\n...
python
edit
1
4
apache-2.0
87b3d17bcee42630ec502475e67d5f58cee4f577
abn/python-cafe
cafe/utilities.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pycomicvine\nimport unittest\n\napi_key = \"476302e62d7e8f8f140182e36aebff2fe935514b\"\n\nclass TestSearch(unittest.TestCase):\n def test_search_resource_type(self):\n search = pycomicvine.Search(\n resources...
python
edit
1
2
mit
91c6c7b8e8077a185e8a62af0c3bcb74d4026e7c
authmillenon/pycomicvine
tests/search.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom django.conf import settings\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\nfrom user import tokens\nfrom user.models import User\n\nREGEX_PATTERN = getattr(settings, 'REGEX_HACKATH...
python
edit
1
6
mit
2df886059a9edd8d75fdb255fc185c2f96a02c29
hackupc/backend,hackupc/backend,hackupc/backend,hackupc/backend
user/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tcxparser\nfrom darksky import forecast\nfrom configparser import ConfigParser\n\n# Darksky weather API.\n# Create config file manually\nparser = ConfigParser()\nparser.read('slowburn.config', encoding='utf-8')\ndarksky_key = parser....
python
edit
3
1
mit
7faa73b5046fb87099d955705c4f00c5240f3544
briansuhr/slowburn
running.py
rejected_duplicate
Near-duplicate of sample 1188
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\r\n\r\nimport aiohttp\r\nfrom discord.ext import commands\r\nimport yaml\r\n\r\n\r\nclass Cat:\r\n def __init__(self, bot):\r\n self.bot = bot\r\n with open('config.yaml') as file:\r\n data = yaml.load(...
python
edit
4
1
mit
95186f684328d5b84611f405d47d474c53cad619
BeatButton/beattie,BeatButton/beattie-bot
cat.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add sample Darksky API call" }, { "role": "assistant", "content": "import tcxparser\nfrom darksky import forecast\nfrom configparser import ConfigParser\n\n# Darksky weather API.\n# Create config file manually\nparser = ConfigPar...
python
new_file
1
0
mit
2ec1975da12cb9d95b1e1db7820f30850e075e4e
briansuhr/slowburn
running.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .binding import sort as _sort\n\nimport numpy\nfrom numpy.lib.recfunctions import append_fields\n\ntry:\n unicode = unicode\nexcept NameError:\n # 'unicode' is undefined, must be Python 3\n str = str\n unicode = str\n by...
python
edit
3
3
bsd-2-clause
c11152dc83416efb33bd4c8286633a311430c0f6
rainwoodman/MP-sort,rainwoodman/MP-sort,rainwoodman/MP-sort
mpsort/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport six\n\nfrom .node import Node\n\n\n@six.python_2_unicode_compatible\nclass Investment(Node):\n \"\"\"Represents a Investment (investor-investment) on CrunchBase\"\"\"\n\n KNOWN_PROPERTIES = [\n 'type',\n 'uuid',\n...
python
edit
8
4
mit
acdcb3d01dea2af0dc94c22ee5f40304da8d462a
ngzhian/pycrunchbase,SidSachdev/pycrunchbase,alabid/pycrunchbase
src/pycrunchbase/resource/investment.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom abc import ABCMeta, abstractmethod\n\nWithABCMeta = ABCMeta('WithABCMeta', (object,), {})\n\nclass Disposable(WithABCMeta):\...
python
edit
1
2
mit
ed0551007c2f7bac2639aad8ced0b084d26efcb4
jstasiak/python-cg,jstasiak/python-cg
src/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Set 01 - Challenge 01.\"\"\"\nimport base64\n\nhex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f'\n '69736f6e6f7573206d757368726f6f6d')\nb64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGE...
python
edit
1
1
mit
4d1444e2f2a455e691342a82f0e116e210593411
sornars/matasano-challenges-py
s01/c01.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals, absolute_import\n\nimport pytest\n\nfrom boxsdk.util.multipart_stream import MultipartStream\n\n\n@pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'}...
python
edit
1
7
apache-2.0
498552599753f07d179025b5de1e8207ec2b94cd
Frencil/box-python-sdk,Frencil/box-python-sdk,box/box-python-sdk
test/unit/util/test_multipart_stream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport random\nfrom pytz import timezone\nfrom datetime import datetime\nimport pytz\nfrom libs import post_text\nimport spotipy\nimport os\nfrom spotipy.oauth2 import SpotifyClientCredentials\n\n'''\nsadness_texts = [line.strip...
python
edit
4
0
mit
1072e6225a49f409b2b20b000ccdc6f70f0c45e8
Boijangle/GroupMe-Message-Bot
spotify.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom models import User\nfrom passlib.apps import custom_app_context as pwd_context\n\ndef create_user(session, username, password):\n \"\"\"Add a new user to the database.\n\n session is expected to be a dbsession, username and passw...
python
edit
1
2
mit
8e61726b178c5175347008b9b77032fd223b6114
Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us
elections_r_us/security.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create KeyAPI class + method to construct endpoint" }, { "role": "assistant", "content": "# Copyright (c) 2015, Stavros Sachtouris\n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, with or without\...
python
new_file
1
1
bsd-2-clause
b141956f915a2b3e87e1c85949f6bddccf62c57c
saxtouri/okpub
okpub/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom examples.gbest_pso import main as gbest\nfrom examples.lbest_pso import main as lbest\nfrom examples.gc_pso import main as gc\nfrom examples.pso_optimizer import main as pso_optimizer\n\n\n@pytest.mark.parametrize(\"di...
python
edit
2
1
apache-2.0
79996420e775994b53d88f5b7c9ad21106a77831
avanwyk/cipy
examples/tests/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.sources import rlimsp\n\n\ndef test_simple_usage():\n rp = rlimsp.process_pmc('PMC3717945')\n stmts = rp.statements\n assert len(stmts) == 6, len(stmts)\n\n\ndef test_ungrounded_usage():\n rp = rlimsp.process_pmc('PMC...
python
edit
1
2
bsd-2-clause
77f820fe1286a5d39f2704c3821251bcbe20a2ba
sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,johnbachman/indra
indra/tests/test_rlimsp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef f1(a, # S100\n b): # S101\n pass\n\n\ndef f2(\n a,\n b # S101\n):\n pass\n\n\ndef f3(\n a,\n b,\n):\n pass\n\n\n# trailing comma after *args or **kwargs is a syntax error therefore\n# we don't want to enfor...
python
edit
1
1
mit
7bde0ba157431311ae138acd8a2018f85d8af91d
smarkets/flake8-strict
test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom sqlalchemy.schema import Column\nfrom sqlalchemy.types import DateTime, Integer\n\nfrom sqlalchemy.ext.declarative import declarative_base, declared_attr\n\n\nBase = declarative_base()\n\n\nclass BaseMixin:\n\n id...
python
edit
1
1
mit
f6cd6b3377769af524377979438b9e662bb9175a
TangledWeb/tangled.site
tangled/site/model/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\n\n\nclass SingletonMixin(object):\n __singleton_lock = threading.Lock()\n __singleton_instance = None\n\n @classmethod\n def instance(cls, *args, **kwargs):\n if not cls.__singleton_instance:\n ...
python
edit
1
4
apache-2.0
176c98dd7fec26980591a9ba3bb71bee1eeab8a7
ATRAN2/fureon
backend/fureon/components/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='tchannel',\n version='0.1.0+dev0',\n author='Aiden Scandella',\n author_email='<EMAIL>',\n description='Network multiplexing and framing protocol for RPC',\n ...
python
edit
1
0
mit
adc8e9fd9a6e0960038e51e03bc3c211de283a39
vanloswang/tchannel,sasa233/tchannel,benfleis/tchannel,hustxiaoc/tchannel,savaki/tchannel,RyanTech/tchannel,Zirpon/tchannel,RyanTech/tchannel,i/tchannel,chenwenbin928/tchannel,i/tchannel,vanloswang/tchannel,sasa233/tchannel,bunnyblue/tchannel,Zirpon/tchannel,i/tchannel,benfleis/tchannel,benfleis/tchannel,chenwenbin928/...
python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (c) 2013, AnsibleWorks\n#\n# This file is part of Ansible Commander\n#\n# Ansible Commander is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Softwa...
python
edit
7
0
apache-2.0
38f3fb09857a4babbd893f546f39c60ce4865fb1
snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx
lib/main/tests/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom breach.models import SampleSet, Victim, Target, Round\n\n\nclass RuptureTestCase(TestCase):\n def setUp(self):\n target = Target.objects.create(\n endpoint='https://di.uoa.gr/?brea...
python
edit
1
1
mit
dc2ed8e733d0497e1812ee31b61279083ef1861f
dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,d...
backend/breach/tests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport ctypes\nimport os\nimport glob\n\nimport numpy as np\n\n\n# Load the Rust library when loading this module\n\ntarget = \"debug\"\n# target = \"release\"\n\nlibpath = os.path.join(\"target\", target, \"libsor...
python
edit
1
11
bsd-3-clause
8d93b696700459db7772e1a3f3ae3601af5417d3
nbigaouette/rust-sorting,nbigaouette/rust-sorting,nbigaouette/rust-sorting
rust_sorting.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom core import Tokenizer\nfrom utilities import url_to_json\n\n\ndef run(project_id, repo_path, cursor, **options):\n t_sub = options.get('sub')\n t_star = options.get('star')\n t_forks = options.get('forks')\n\n ...
python
edit
1
7
apache-2.0
b3c2e4636b3f271eeba2e9a7c11f491ed7d77f71
RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper
attributes/community/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nCopyright 2016 Brian Quach\nLicensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa\n\nCode Citation:\n https://github.com/udacity/FSND-P4-Design-A-Gam...
python
edit
4
6
mit
f5d3fb307bb17bc6651fe32ea2f520e7b87d37ca
brianquach/udacity-nano-fullstack-game
utility.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hecate.core.base import CellularAutomaton\nfrom hecate.core.properties import (\n IntegerProperty,\n)\nfrom hecate.core.topology.lattice import (\n OrthogonalLattice,\n)\nfrom hecate.core.topology.neighborhood import (\n Moore...
python
edit
1
0
mit
e6ee77f88ab0d05b221b5470d2c649d3d242f505
a5kin/hecate,a5kin/hecate
hecate/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = '0.3.2'\n\n# This list defines all the modules that will be loaded if a user invokes\n# from climLab import *\n\n# totally out of date!\n\n#__all__ = [\"constants\", \"thermo\", \"orbital_table\",\n# \"long_orbita...
python
edit
24
0
mit
a980be7e64193fa29f3913651f48a413c02f5fa3
cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab
climlab/__init__.py
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"add a flag for review active\n\nRevision ID: 4d45dd3d8ce5\nRevises: 49d09b3d2801\nCreate Date: 2014-02-26 16:29:54.507710\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '4d45dd3d8ce5'\ndown_revision = '49d09b3d2801'...
python
edit
1
1
mit
c2003d452914a2725e04f58a744bbafe4554dec5
holmes-app/holmes-api,holmes-app/holmes-api
holmes/migrations/versions/4d45dd3d8ce5_add_a_flag_for_review_active.py
accepted
null
true