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\nimport unittest\nimport time\n\nclass TestE(unittest.TestCase):\n def test_many_lines(self):\n \tfor i in xrange(100):\n \t\tprint 'Many lines', i\n\n def test_feat_1_case_1(self):\n time.sleep(0.5)\n\n def test_feat_1... | python | edit | 3 | 2 | mit | d2a0c23766cfd80f32b406503f47a5c5355bf6db | martinsmid/pytest-ui | test_module_b/test_feat_3.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function\n\nfrom django.db import models\nfrom django.utils import timezone\n\nfrom sentry.db.models import FlexibleForeignKey, Model, sane_repr\n\n\nclass SavedSearch(Model):\n \"\"\"\n A... | python | edit | 1 | 0 | bsd-3-clause | fcee154a123c7f9db81c92efce6d4a425dc0a3b1 | mvaled/sentry,jean/sentry,mvaled/sentry,nicholasserra/sentry,BuildingLink/sentry,gencer/sentry,JackDanger/sentry,beeftornado/sentry,mvaled/sentry,zenefits/sentry,nicholasserra/sentry,daevaorn/sentry,gencer/sentry,beeftornado/sentry,fotinakis/sentry,JamesMura/sentry,JackDanger/sentry,fotinakis/sentry,looker/sentry,JackD... | src/sentry/models/savedsearch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\nimport django_filters\nfrom .models import Questionary\nfrom atom.filters import CrispyFilterMixin, AutocompleteChoiceFilter\n\n\nclass QuestionaryFilter(Cris... | python | edit | 1 | 2 | mit | 25a916a176affb396a403ab72031208df44735ed | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | feder/questionaries/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport argparse\n\nfrom alerta.app import app\nfrom alerta.app import db\nfrom alerta.version import __version__\n\nLOG = app.logger\n\ndef main():\n\n parser = argparse.ArgumentParser(\n prog='alertad',\n description='Al... | python | edit | 3 | 1 | apache-2.0 | 524eb80f426a3a4530fe7ce5940eb0ef619b5396 | guardian/alerta,guardian/alerta,guardian/alerta,skob/alerta,skob/alerta,guardian/alerta,skob/alerta,skob/alerta | alerta/app/shell.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom collections import namedtuple\n\nfrom pytest import fixture\nfrom flask import Flask, g\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_perm import Perm\nfrom flask_perm.core import db\n\n@fixture\ndef a... | python | edit | 4 | 2 | mit | 7b02aa6560fae3f36374f58c0b355381070047ec | soasme/flask-perm,soasme/flask-perm,soasme/flask-perm | tests/conftest.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom keras.layers import Conv2D\nfrom keras.models import Sequential\n\nfrom toolbox.metrics import psnr\n\n\ndef compile_srcnn(input_shape, c=1, f1=9, f2=1, f3=5, n1=64, n2=32):\n \"\"\"Compile an SRCNN model.\n\n See https://arxiv.o... | python | edit | 1 | 1 | mit | de84be15c4c519a680121e15c26d6eed6d091cd2 | qobilidop/srcnn,qobilidop/srcnn | toolbox/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack Foundation\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance wit... | python | edit | 1 | 0 | apache-2.0 | 2eb8dfdfdc31c5315546ff7c89cd59f8d6cb4727 | priya-pp/Tacker,openstack/tacker,zeinsteinz/tacker,trozet/tacker,priya-pp/Tacker,stackforge/tacker,openstack/tacker,trozet/tacker,openstack/tacker,stackforge/tacker,zeinsteinz/tacker | tacker/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hypothesis_auto import auto_pytest_magic\n\nfrom isort import parse\nfrom isort.settings import Config\n\nTEST_CONTENTS = \"\"\"\nimport xyz\nimport abc\n\n\ndef function():\n pass\n\"\"\"\n\n\ndef test_file_contents():\n (\n ... | python | edit | 1 | 1 | mit | f79b8834ff88b9f4517d464407240f2bce6c7f5a | PyCQA/isort,PyCQA/isort | tests/test_parse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport chatexchange\n\nimport live_testing\n\n\nif live_testing.enabled:\n def test_user_info():\n client = chatexchange.Client('stackexchange.com')\n\n user = client.get_user(-2)\n assert user.id == -2\n asse... | python | edit | 1 | 1 | apache-2.0 | 88746539211d193e0d0f04510c71d64218cc6927 | Charcoal-SE/ChatExchange,ByteCommander/ChatExchange6,ByteCommander/ChatExchange6,Charcoal-SE/ChatExchange | test/test_users.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport platform\n\ndef GetInstallationPaths():\n path = os.path.dirname(os.path.dirname(__file__))\n PYTHONPATH = path\n PV_PLUGIN_PATH = '%s/%s' % (path, 'PVPlugins')\n\n script = 'curl -s https://cdn.ra... | python | edit | 1 | 2 | bsd-3-clause | ebc7aa75d871929220ee0197aaf92a24efc3f9da | banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics | PVGeo/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom django.http import HttpResponse\nfrom taggit.models import Tag\n\ndef filter_tags(request):\n\t\"Returns a JSON formatted list of tags starting with the value of GET variable 'q'.\"\n\tlimiter = request.GET['q']\n\tresults... | python | edit | 1 | 2 | bsd-3-clause | 0785554db32573f3c693ef4d3a6de952a2f841cc | harrislapiroff/django-taggit-tokenfield,harrislapiroff/django-taggit-tokenfield | taggittokenfield/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport typing\nfrom typing import Optional, Text\n\nfrom rasa.shared.utils.cli import print_info, print_success\nfrom rasa.shared.nlu.interpreter import RegexInterpreter\nfrom rasa.shared.constants import INTENT_MESSAGE_PREF... | python | edit | 3 | 4 | apache-2.0 | 21b8c54d564fb48d9982e8377e0f2a8c0effb96e | RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | rasa/nlu/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import path\n\nfrom qr_code import views\n\n\napp_name = 'qr_code'\nurlpatterns = [\n path('images/serve-qr-code-image/', views.serve_qr_code_image, name='serve_qr_code_image')\n]\n\n```\n\nApply this change: Introduce s... | python | edit | 1 | 0 | bsd-3-clause | 4c765b0765b8c5eb43b5850d9c3877d37d40ed5b | dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code | qr_code/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom classes.room import Room\n\n\nclass RoomClassTest(unittest.TestCase):\n pass\n # def test_create_room_successfully(self):\n # my_class_instance = Room()\n # initial_room_count = len(my_class_instanc... | python | edit | 7 | 1 | mit | cca387dc889b12457c1b1d8bb7b61ad3d2bbd57a | peterpaints/room-allocator | tests/test_room.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import ApplicationTable,OldUser,Snippit,SnippitData,HolesTable,GoogleAuth,Comment\n# Register your models here.\nadmin.site.register(ApplicationTable)\nadmin.site.register(OldUser)\nadmin.site.... | python | edit | 1 | 0 | mit | 8b34daa2a61422c79fef2afd9137bf2f1c2a5b12 | 326-WEBSCALE/webscale-synthesizer,326-WEBSCALE/webscale-synthesizer,326-WEBSCALE/webscale-synthesizer,326-WEBSCALE/webscale-synthesizer,326-WEBSCALE/webscale-synthesizer | project3/webscale/synthesizer/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Family module for LyricWiki.\"\"\"\n\n__version__ = '$Id$'\n\nfrom pywikibot import family\n\n\n# The LyricWiki family\n\n# user_config.py:\n# usernames['lyricwiki']['en'] = 'user'\nclass Family(family.Family... | python | edit | 1 | 1 | mit | 491657b0b4e9344416ae3f84114eef403e020b43 | TridevGuha/pywikibot-core,magul/pywikibot-core,jayvdb/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,h4ck3rm1k3/pywikibot-core,happy5214/pywikibot-core,PersianWikipedia/pywikibot-core,jayvdb/pywikibot-core,wikimedia/pywikibot-core,icyflame/batman,happy5214/pywikibot-core,wikimedia/pywikibot-core,Darkdada... | pywikibot/families/lyricwiki_family.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport fileinput\nimport textwrap\nimport sys\n\n\nclass Table(object):\n\n def __init__(self):\n self.lines = []\n self.width = 20 \n\n def feed(self,line):\n self.lines.append(line.split(\"\\t\"))\n\n def pri... | python | edit | 4 | 5 | mit | 1fbea5f1a10613eba97ef3ff66d7ba197837b1e9 | wouteroostervld/tsv2md | tsv2md/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef add_nvm_segment():\n import os\n import subprocess\n\n try:\n output = subprocess.check_output(['bash', '-c', '. ~/.nvm/nvm.sh; nvm current'])\n except (OSError, subprocess.CalledProcessError):\n return\n\n ... | python | edit | 6 | 3 | mit | 09eb73a9af576dd4026c69c2bc87c98be21c0e4e | saghul/shline | segments/nvm.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# python 3 support\nimport six\nif six.PY3:\n basestring = str\n long = int\n xrange = range\n unicode = str\n\n# todo fix apply and bind\n\n\nclass FunctionPrototype:\n def toString():\n if not this.is_callable():\n ... | python | edit | 23 | 4 | mit | b5fbaafddf41f4efc1a4841a8a35f2fda094e60a | PiotrDabkowski/Js2Py,PiotrDabkowski/Js2Py,PiotrDabkowski/Js2Py | js2py/prototypes/jsfunction.py | rejected_lint | Too many lint violations: 23 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup, find_packages\n\nimport pkg_re... | python | edit | 3 | 0 | mit | b1a0ccda6aa4cb9408512af15bed47b2986509e1 | beanbaginc/pillowfight | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nsetup(\n name='brew',\n version='0.0.1',\n author='Chris Gilmer',\n author_email='<EMAIL>',\n maintainer='Chris Gilmer',\n maintainer_email='<EMAIL>',\n... | python | edit | 1 | 0 | mit | ca7f95e3a6b6ad8bb0ddca170a365211b9a05f3e | chrisgilmerproj/brewday,chrisgilmerproj/brewday | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Database(object):\n def __init__(self, channels):\n self.userdb = {}\n for i in channels:\n self.userdb[i] = {}\n\n def removeEntry(self, event, nick):\n try:\n del self.userdb[event.ta... | python | edit | 1 | 4 | mit | c876794a24e9adb83f41d9878220dc8c63228e2e | wolfy1339/Python-IRC-Bot | utils/database.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Module for factories for tesing resources application.\"\"\"\n\nimport random\nfrom factory import DjangoModelFactory, Faker, post_generation\nfrom factory.faker import faker\nfrom resources.models import (\n Resource,\n Resourc... | python | edit | 1 | 5 | mit | 015eb13331f121452ce44be39cb52aef3465f5c6 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/tests/resources/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# (C) 2015 Jean Nassar\n# Released under BSD\nimport glob\nimport os\nimport subprocess as sp\n\nimport rospkg\nimport tqdm\n\n\ndef get_launch_dir(package: str) -> str:\n return os.path.join(rospkg.RosPack().get... | python | edit | 1 | 2 | mit | 5b735dff075cb4fb2e9fd89dc4d872281210964d | masasin/spirit,masasin/spirit | config/regenerate_launch_files.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom polyglotdb.gui.widgets.basic import DirectoryWidget\n\ndef test_directory_widget(qtbot):\n widget = DirectoryWidget()\n qtbot.addWidget(widget)\n\n widget.setPath('test')\n\n assert(widget.value() == 'test')\n\n```\n\nApp... | python | edit | 1 | 0 | mit | b9a54ba81dbd7b0235ad774602a7098d590eb92c | PhonologicalCorpusTools/PolyglotDB,PhonologicalCorpusTools/PolyglotDB,samihuc/PolyglotDB,MontrealCorpusTools/PolyglotDB,PhonologicalCorpusTools/PyAnnotationGraph,samihuc/PolyglotDB,PhonologicalCorpusTools/PyAnnotationGraph,MontrealCorpusTools/PolyglotDB | tests/test_gui_widgets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport os\n\nINSTALLED_APPS += [\n 'data_aggregator.apps.DataAggregatorConfig',\n 'webpack_loader',\n]\n\nif os.getenv('ENV') == 'localdev':\n DEBUG = True\n DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_g... | python | edit | 4 | 0 | apache-2.0 | e0d66977ed4aca80eefc4d011bd8753987df3e8e | uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics | docker/settings.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cmdparse\nimport commands\nimport logging\nimport optparse\nimport sys\n\nparser = cmdparse.CommandParser()\nparser.add_option(\"\", \"--debug\", action=\"store_true\",\n help=optparse.SUPPRESS_HELP)\nparser.add_opti... | python | edit | 1 | 6 | mit | 2fbbe27d4d0e64d21e5cdcad5d717d12e5f2d583 | LeMagnesium/cobe,DarkMio/cobe,pteichman/cobe,pteichman/cobe,meska/cobe,DarkMio/cobe,wodim/cobe-ng,tiagochiavericosta/cobe,wodim/cobe-ng,meska/cobe,tiagochiavericosta/cobe,LeMagnesium/cobe | cobe/control.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# *** DON'T MODIFY THIS FILE! ***\n#\n# Instead copy it to stormtracks_settings.py\n# \n# Default settings for project\n# This will get copied to $HOME/.stormtracks/\n# on install.\nimport os\n\nSETTINGS_DIR = os.path.abspath(os.path.dirnam... | python | edit | 1 | 0 | mit | 07b6484b33d687a7c32f91b5c2274d54c1e106ff | markmuetz/stormtracks,markmuetz/stormtracks | stormtracks/settings/default_stormtracks_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"\n\nfrom django.test import TestCase\n\n\ncla... | python | edit | 1 | 1 | bsd-3-clause | fbe05b7e2fe97724cb126f0a5b5dd656591d41d7 | datphan/teracy-tutorial,teracyhq/django-tutorial | apps/polls/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport numpy as np\n\n\nclass Bubble2D(object):\n \"\"\"\n Class for candidate bubble portions from 2D planes.\n \"\"\"\n def __init__(self, props):\n super(Bubble2D, self).__init__()\n\n self._channel = props[0]... | python | edit | 1 | 1 | mit | aa966c1a208f2c3f4b2a2a196c39b1df5a0b67c8 | e-koch/BaSiCs | basics/candidate.py | rejected_duplicate | Near-duplicate of sample 12634 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom infra_buddy.context.deploy_ctx import DeployContext\nimport datadog as dd\n\n\nclass DataDogNotifier(object):\n def __init__(self, key, deploy_context):\n # type: (DeployContext) -> None\n super(DataDogNotifier, self).... | python | edit | 1 | 1 | apache-2.0 | faf861e53c1d4f554da82cd66b6b8de4fa7a2ab7 | AlienVault-Engineering/infra-buddy | src/main/python/infra_buddy/notifier/datadog.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport uritemplate\nimport simplejson\nimport sys\n\nfilename = sys.argv[1]\nprint \"Running\", filename\nf = file(filename)\ntestdata = simplejson.load(f)\n\ntry:\n desired_level = int(sys.argv[2])\nexcept IndexError:\n desired_level = 4... | python | edit | 3 | 0 | apache-2.0 | a5b70775d106d07acfb54ce0b3998a03ed195de7 | uri-templates/uritemplate-py | test/uritemplate_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass User(object):\n \"\"\"An importable dummy class used for testing purposes.\"\"\"\n\n class_attribute = 'foo'\n\n @staticmethod\n def static_method():\n pass\n\n @classmethod\n def class_method(cls):\n r... | python | edit | 1 | 1 | mit | 34e0934d2f62a98728601a18126fa21eb50cf5a5 | uber/doubles | doubles/testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Provide the standard Python string.Template engine.\"\"\"\n\nfrom __future__ import print_function\n\n\nfrom string import Template\n\nfrom . import Engine\n\n\nclass StringTemplate(Engine):\n\n \"\"\"String... | python | edit | 1 | 2 | mit | 24538a6e91983974c729a559ab24ee90ad529d7e | blubberdiblub/eztemplate | engines/string_template_engine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Field(object):\n \"\"\"\n Base class for all field types\n \"\"\"\n\n # This tracks each time a Field instance is created. Used to retain order.\n creation_counter = 0\n\n def __init__(self, name=None, primary_key=Fa... | python | edit | 1 | 1 | bsd-2-clause | 48362fa70ab20f66f4f398c68ab252dfd36c6117 | dstufft/crust | crust/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport csv\n\nimport sqlite3\nfrom flask import Flask, request, render_template, g, jsonify\n\napp = Flask(__name__)\n\n\ndb_filename = 'db.sqlite'\n\ndef connect_db():\n conn = sqlite3.connect(db_filename)\n curs = conn.execute('PRAG... | python | edit | 5 | 2 | mit | b2e2ff0c6a31472e16706cb72765a0ca939e1414 | Koblaid/distrostats,Koblaid/distrostats | web.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Make the array API constants into dimension 0 arrays\n\nThe spec does not actually specify whether these should be dimension 0 arrays\nor Python floats (which they are in NumPy). However, making them dimension 0\narrays is cleaner, and ensur... | python | new_file | 1 | 0 | bsd-3-clause | e6fa443412a909bc01e2dd8d9944ff3ddba35089 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | numpy/_array_api/_constants.py | rejected_duplicate | Near-duplicate of sample 3438 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom us_ignite.awards.models import Award\n\n\nclass AwardAdmin(admin.ModelAdmin):\n list_display = ('name', 'slug')\n\nadmin.site.register(Award, AwardAdmin)\n\n```\n\nApply this change: Add mechanics t... | python | edit | 1 | 0 | bsd-3-clause | a1e7cade8fb5e4a301244a8a0cef382b49399d46 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/awards/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n###############################################################################\n# This is a very strange handler setup, but this is how it's documented.\n# See https://github.com/DataDog/datadogpy#quick-start-guide\n#######################... | python | edit | 1 | 1 | mit | 0933e4c671ca1297378b2ad388933e11265321d0 | istresearch/traptor,istresearch/traptor | traptor/dd_monitoring.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nIn this example the Q-learning algorithm is used via self-play\nto learn the state-action values for all Tic-Tac-Toe positions.\n'''\nfrom capstone.game.games import TicTacToe\nfrom capstone.game.utils import tic2pdf\nfrom capstone.rl ... | python | edit | 3 | 0 | mit | e2b382a69473dcfa6d93442f3ad3bc21ee6c90a0 | davidrobles/mlnd-capstone-code | examples/tic_ql_tabular_selfplay_all.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Generated by Django 2.2.24 on 2021-09-13 21:04\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('app_manager', '0018_migrate_case_search_labels'),\n ]\n\n oper... | python | edit | 1 | 0 | bsd-3-clause | 264075d9b313f5c2677e32fcf5d340bba73f0b0e | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/app_manager/migrations/0019_exchangeapplication_required_privileges.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subprocess import Popen, PIPE\nimport json\nimport platform\n\n# Remove \"sys.exit\" after feedstock creation when running\n# on linux-anvil-cos7-x86_64 image\nif platform.system() == \"Linux\":\n import sys\n sys.exit(0)\n\nif p... | python | edit | 1 | 0 | bsd-3-clause | b5e13cb92f539545873d59553c03e1523eac1dbb | kwilcox/staged-recipes,ocefpaf/staged-recipes,stuertz/staged-recipes,johanneskoester/staged-recipes,jochym/staged-recipes,SylvainCorlay/staged-recipes,goanpeca/staged-recipes,igortg/staged-recipes,mariusvniekerk/staged-recipes,conda-forge/staged-recipes,patricksnape/staged-recipes,goanpeca/staged-recipes,johanneskoeste... | recipes/kaleido-core/run_test.py | rejected_duplicate | Near-duplicate of sample 18225 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Person.email must be unique\n\nRevision ID: 2bf7c04016c9\nRevises: 2b709b655bf\nCreate Date: 2013-07-24 02:16:06.282258\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '2bf7c04016c9'\ndown_revision = '2b709b655bf'\n\... | python | edit | 4 | 1 | apache-2.0 | c3de0c71a8392a884f8fd08dbee8f337ba7833c7 | AleksNeStu/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,uskudnik/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,uskudnik/ggrc-core,andrei-karalionak/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,vladan-m/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,uskudnik/ggrc-core,hasanalom/ggrc... | src/ggrc/migrations/versions/20130724021606_2bf7c04016c9_person_email_must_be.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"forms for accounts app\n\n\"\"\"\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.core.mail import EmailMultiAlternatives\nfrom django.contrib.sites.shortcuts import get_current_site\n\nfrom accou... | python | edit | 1 | 1 | mit | 9b18cc62dc0338a9dff6ae7dd448a4dca960c941 | randomic/aniauth-tdd,randomic/aniauth-tdd | accounts/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Node, Info, Transmission\nfrom sqlalchemy import ForeignKey, Column, String\nimport random\n\n\nclass Source(Node):\n __tablename__ = \"source\"\n __mapper_args__ = {\"polymorphic_identity\": \"generic_source\"}\n\... | python | edit | 4 | 2 | mit | ade65a931408dd96e59b484dc9cb1bfae3bf8848 | Dallinger/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,suchow/Wallace,berkeley-cocosci/Wallace,berkeley-cocosci/Wallace,Dallinger/Dallinger,suchow/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,suchow/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dalli... | wallace/sources.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, request\nfrom flask.ext.uploads import UploadSet, configure_uploads, IMAGES\nfrom scipy import misc\nimport numpy as np\n\nfrom VGG16_gs_model import *\n\n\n# sett opp nevralt nettverk:\nmodel = VGG... | python | edit | 4 | 3 | apache-2.0 | b92c75e1145915892723206a77593b9701e608bf | jchalvorsen/ConsultantOrNot,jchalvorsen/ConsultantOrNot,jchalvorsen/ConsultantOrNot | webapp/hello.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom chalice.app import Chalice\nfrom chalice.app import (\n ChaliceViewError, BadRequestError, UnauthorizedError, ForbiddenError,\n NotFoundError, ConflictError, TooManyRequestsError, Response, CORSConfig\n)\n\n__version__ = '0.8.0'\... | python | edit | 14 | 0 | apache-2.0 | ac9ee17f93b90a79b629d222d8c2846debed6f04 | awslabs/chalice | chalice/__init__.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\n_FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'\n_formatter = logging.Formatter(_FORMAT)\n_handler = logging.StreamHandler()\n_handler.setFormatter(_formatter)\n\nlogger = logging.getLogger('yatsm... | python | edit | 1 | 0 | mit | 62f8c68165f7f519b5769c99db00ef8822e9f534 | c11/yatsm,valpasq/yatsm,c11/yatsm,ceholden/yatsm,valpasq/yatsm,ceholden/yatsm | yatsm/log_yatsm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport os\n\nPKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'\n\nsetup(\n name='python3-indy',\n version=PKG_VERSION,\n packages=['indy'],\n url='https://github.com/hyperledger/indy-sd... | python | edit | 1 | 0 | apache-2.0 | c671adabcae728fb6992bb91001838b3b9cbfd8a | Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/i... | wrappers/python/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\"\"\"\nLibCrowdsData\n-------------\n\nGlobal data repository page for LibCrowds.\n\"\"\"\n\nimport os\nimport json\nimport default_settings\nfrom flask import current_app as app\nfrom flask.ext.plugins import Plugi... | python | edit | 1 | 5 | bsd-3-clause | ce443b03ca919e799566751d13a3d357299d38c2 | LibCrowds/libcrowds-data,LibCrowds/libcrowds-data | libcrowds_data/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for crabigator.wanikani.\"\"\"\n\nfrom __future__ import print_function\nfrom crabigator.wanikani import WaniKani, WaniKaniError\nimport os\nfrom unittest import TestCase\n\n\n# TestCase exposes too many public methods. Disable ... | python | edit | 1 | 2 | mit | 2d85ea5594cf1395fef6caafccc690ed9a5db472 | jonesinator/crabigator | crabigator/tests/test_wanikani.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import render_template, current_app\nfrom . import main\nimport os\n\n@main.route('/')\ndef index():\n return render_template('editor2.html')\n\n```\n\nApply this change: Fix bug where wrong template name was used"
},
{
... | python | edit | 4 | 1 | mit | d0c05d5d254ef321d192975e0027d4dedca9a1f7 | TheVindicators/Vis,TheVindicators/Vis,TheVindicators/Vis | app/main/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n 'CircuitBreaker',\n 'timer',\n]\n\nimport asyncio\nimport collections\nimport time\n\n\nclass CircuitBreaker:\n \"\"\"Break (disconnect) when no less than `count` errors happened\n within last `period` seconds.\... | python | edit | 1 | 4 | mit | 9685ab2793ad9dc79df5c6f1bd1c22b302769b2c | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | py/garage/garage/asyncs/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\n\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom django.utils.encoding import python_2_unicode_compatible\n\n\n@python_2_unicode_compatible\... | python | edit | 3 | 2 | mit | 835aa149e4bccd7bcf94390d1a878133b79b768f | Alkemic/yaACL,Alkemic/yaACL | yaacl/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import current_app, g\nfrom flask.ext.script import Manager, Server, prompt_bool\nfrom massa import create_app\n\n\nmanager = Manager(create_app)\nmanager.add_option('-c', '--config', dest='config', req... | python | edit | 1 | 2 | mit | 3507d71223122a72d8e71fbf30849586485b0790 | jaapverloop/massa | manage.py | rejected_duplicate | Near-duplicate of sample 717 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nReturn data to a redis server\n\nTo enable this returner the minion will need the python client for redis\ninstalled and the following values configured in the minion or master\nconfig, these are the defaults:\n\n redis.db: '0'\n ... | python | edit | 4 | 2 | apache-2.0 | 4425aa1170a1acd3ed69c32ba5e3885301593524 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/returners/redis_return.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.nnet import conv\nfrom theano.tensor.nnet import softmax\nfrom theano.tensor import shared_randomstreams\nfrom theano.tensor.signal import downsample\n\n\nclas... | python | edit | 2 | 1 | cc0-1.0 | fee9504387319dd406eb5131281c6344a427fad7 | cn04/insanity | insanity/layers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"web 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 import ... | python | edit | 1 | 0 | mit | 78a9ee621e20bf1fe930bd0d2046715c5737df03 | chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas | web/patlms-web/web/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\n\n# Outlier\ndef iqr_bounds(ys):\n \"\"\"\n Return upper and lower bound for an array of values\n\n Lower bound: Q1 - (IQR * 1.5)\n Upper bound: Q3 + (IQR * 1.5)\n\n :param list ys: List of values to cal... | python | edit | 1 | 1 | mit | b2d9b56ceb96718d1f3edc8ec019ca7218e33e7d | jvivian/rnaseq-lib,jvivian/rnaseq-lib | src/rnaseq_lib/math/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nfrom website.app import init_app\n\n\nif __name__ == \"__main__\":\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings')\n\n from django.core.management import execute_fro... | python | edit | 1 | 0 | apache-2.0 | f511eb39aef5005df6ac5d234d1da7ae829983f9 | GageGaskins/osf.io,njantrania/osf.io,kch8qx/osf.io,njantrania/osf.io,zachjanicki/osf.io,felliott/osf.io,ZobairAlijan/osf.io,DanielSBrown/osf.io,adlius/osf.io,felliott/osf.io,rdhyee/osf.io,haoyuchen1992/osf.io,zamattiac/osf.io,crcresearch/osf.io,alexschiller/osf.io,doublebits/osf.io,baylee-d/osf.io,acshi/osf.io,emetsger... | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function\nimport argparse\nimport os\nimport random\nimport sys\n\ndef natural_int(x):\n x = int(x)\n if x < 0:\n raise argparse.ArgumentTypeError(str(x) + ' is not a natura... | python | edit | 1 | 2 | bsd-3-clause | 4dbe38996e5bfd6b3f12be1f9cde8de379108934 | dmtucker/keysmith | keysmith.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nimport os\nimport time\nimport struct\nimport binascii\n\nimport sys\nif sys.version_info.major is 2:\n string_types = basestring\nelse:\n string_types = str\n\n_rnd = random.Random()\n_current_pid = 0\n\n\ndef generate... | python | edit | 4 | 2 | mit | 2d90da5171dee8ed143c53d89d7f99bf910f083f | instana/python-sensor,instana/python-sensor | instana/util.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# manage.py\nimport os\nimport subprocess\n\nfrom flask_migrate import Migrate, MigrateCommand\nfrom flask_script import Manager, Shell\n\nfrom app import create_app, db\nfrom app.models import Users, Agencies, Requests, Responses, Events, ... | python | edit | 1 | 1 | apache-2.0 | f5a5f185958ed3088518f3a2fca15ff7b57e982c | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on Sep 16, 2016\n\n@author: rtorres\n'''\nfrom flask_restful import Api\nfrom flask_jwt import JWTError\nfrom flask import jsonify\nimport collections\n\n\n\nclass CustomApi(Api):\n \"\"\"A simple class to keep the default E... | python | edit | 3 | 3 | mit | 4069a7017d0bbda2aa4d436741619304df3f654f | rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel | flaskiwsapp/snippets/customApi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') 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 file... | python | edit | 1 | 0 | apache-2.0 | 2bd14f768ce7d82f7ef84d1e67d61afda5044581 | punalpatel/st2,lakshmi-kannan/st2,Plexxi/st2,jtopjian/st2,Plexxi/st2,grengojbo/st2,emedvedev/st2,punalpatel/st2,peak6/st2,dennybaa/st2,alfasin/st2,Plexxi/st2,Itxaka/st2,pinterb/st2,StackStorm/st2,nzlosh/st2,grengojbo/st2,nzlosh/st2,Itxaka/st2,pixelrebel/st2,Plexxi/st2,tonybaloney/st2,peak6/st2,StackStorm/st2,jtopjian/s... | st2common/st2common/constants/logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom corehq.apps.locations.models import LocationType, SQLLocation\n\n\ndef build_location_filters(location_id):\n try:\n location = SQLLocation.ob... | python | edit | 1 | 3 | bsd-3-clause | 0a5e0935782bdd4c8669a39566d619aa4816ab60 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | custom/aaa/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pickle as pck\nimport numpy as np\nfrom pprint import pprint\nimport sys\n\nfrom scripts.sudokuExtractor import Extractor\nfrom scripts.train import NeuralNetwork\nfrom scripts.sudoku_str import SudokuStr\n\nclass Sudoku(o... | python | edit | 4 | 7 | mit | f8d43af9b2772f642fddc21f941e1c8da635bcaa | prajwalkr/SnapSudoku,ymittal/SnapSudoku,ymittal/SnapSudoku | sudoku.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/etc/usr/python\n\nfrom scapy.all import *\nimport sys\n\niface = \"eth0\"\nfilter = \"ip\"\n#victim in this case is the initiator\nVICTIM_IP = \"192.168.1.121\"\nMY_IP = \"192.168.1.154\"\n# gateway is the target\nGATEWAY_IP = \"192.168.... | python | edit | 2 | 4 | mit | c22bb1da7e9a6c0f2fdaddfd3cf6b549de0ad9cb | Illinois-tech-ITM/BSMP-2016-ISCSI-Packet-Injection,illinoistech-itm/pykkon,illinoistech-itm/pykkon,Illinois-tech-ITM/BSMP-2016-ISCSI-Packet-Injection,illinoistech-itm/pykkon,Illinois-tech-ITM/BSMP-2016-ISCSI-Packet-Injection | Scapy/ip_forward.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlite3\n\nfrom django.db import OperationalError\n\n\ndef fts5_available():\n # based on https://stackoverflow.com/a/36656216/1853523\n if sqlite3.sqlite_version_info < (3, 19, 0):\n # Prior to version 3.19, SQLite does... | python | edit | 1 | 4 | bsd-3-clause | 952e681fe6aaf5fa20b2c3a83d3097f87286e98b | wagtail/wagtail,jnns/wagtail,wagtail/wagtail,zerolab/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,zerolab/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,mixxorz/wagtail,jnns/wagtail,zerolab/wagtail,thenewguy/wagtail,jnns/wagtail,mixxorz/wagtail,jnns/wagtail,rsalmaso/wagtail,wagtail/wagtail,mixxorz/wagtail,then... | wagtail/search/backends/database/sqlite/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport requests\n\n\nclass LumidatumClient(object):\n\n def __init__(self, authentication_token, model_id=None, host_address='https://www.lumidatum.com'):\n self.authentication_token = authentication_token\n se... | python | edit | 1 | 3 | mit | a8b606fc5b95bc3728082cee4341ca8075bab965 | daws/lumidatumclients,Lumidatum/lumidatumclients,Lumidatum/lumidatumclients,Lumidatum/lumidatumclients | python/lumidatumclient/classes.py | rejected_duplicate | Near-duplicate of sample 11118 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add imports to imager_images test"
},
{
"role": "assistant",
"content": "from __future__ import unicode_literals\nfrom django.contrib.auth.models import User\nfrom django.test import TestCase\nimport factory\nfrom faker import Fa... | python | new_file | 9 | 0 | mit | d4dc22be443fb73157d542f86dbee5d89ac5a713 | jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager | imagersite/imager_images/tests.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom kazoo.zkclient import ZooKeeperClient\n\n__all__ = ['ZooKeeperClient']\n\n\n# ZK C client likes to spew log info to STDERR. disable that unless an\n# env is present.\n\ndef disable_zookeeper_log():\n import zookeeper\n ... | python | edit | 1 | 1 | apache-2.0 | 3289027d2cc5b07a83dca422bfc14114854618f8 | nimbusproject/kazoo | kazoo/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# Copyright (c) 2009 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Makes sure that the app/ code is cpplint c... | python | edit | 1 | 1 | bsd-3-clause | 7a0c0e6ed56e847b7b6300c1a0b4a427f26b296d | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser | app/PRESUBMIT.py | rejected_duplicate | Near-duplicate of sample 3531 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom unidecode import unidecode\n\nfrom .models import Book\n\n\nclass BookIndex(indexes.SearchIndex, indexes.Indexable):\n text = indexes.CharField(document=True, use_template=False)\n genres = indexes.M... | python | edit | 2 | 5 | bsd-2-clause | f55cc84fa738d5fe2c7d9d75d05c6a74a1e0571c | bogdal/calibre-books,bogdal/calibre-books | calibre_books/calibre/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# `json` is a module that helps us use the JSON data format.\nimport json\n\n# `requests` is a module for interacting with the Internet\nimport requests\n\ndef main():\n url = 'https://www.govtrack.us/api/v2/bill... | python | edit | 2 | 1 | mit | c5b01a233ae2dc52b2acedb7e1648a892a2be021 | tommeagher/pycar14,rnagle/pycar,ireapps/pycar,tommeagher/pycar14 | project4/step_1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\nALLOWED_HOSTS = ['138.197.197.47']\n\nCORS_ORIGIN_WHITELIST = ('138.197.197.47')\n\nSTATIC_ROOT = os.path.jo... | python | edit | 4 | 0 | mit | 9a26460377db4f177014ab8583cec63302a56190 | erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online | jp2_online/settings/production.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib.request\nimport os\n\n## Get HTML for given url\ndef getHtml( self, url, useragent):\n\ttry:\n\t\tif useragent == True:\n\t\t\tuser_agent = \"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)\"\n\t\t\theaders = ... | python | edit | 3 | 4 | mit | 61fad64a141a63578fb978ed729824b0e5317e3d | jasuka/pyBot,jasuka/pyBot | modules/syscmd.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 | 0 | bsd-3-clause | 069f0024a7de3399333dac2d6b5e4cdab28e81b6 | glyph/cryptography,dstufft/cryptography,Ayrx/cryptography,sholsapp/cryptography,skeuomorf/cryptography,kimvais/cryptography,Ayrx/cryptography,sholsapp/cryptography,skeuomorf/cryptography,sholsapp/cryptography,Lukasa/cryptography,dstufft/cryptography,Lukasa/cryptography,kimvais/cryptography,Lukasa/cryptography,Hasimir/c... | cryptography/bindings/openssl/bignum.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\n__version__ = '0.6.0'\n\n```\n\nApply this change: Bump version to 0.6.1 for PyPI"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\nfrom __fut... | python | edit | 1 | 0 | bsd-3-clause | 1a2b8b05f17a5974de997f98ed108f0a57dcd1b0 | czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog | aldryn_newsblog/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG)\n\ntry:\n from . import minivect\nexcept ImportError:\n print logging.error(\"Did you forget to update submodule minivect?\")\n print logging.error(\"Run 'git s... | python | edit | 3 | 0 | bsd-2-clause | 698a997b7eb9a5dd2e10e2e7129414ab0d6c59fe | gdementen/numba,gmarkall/numba,shiquanwang/numba,jriehl/numba,jriehl/numba,seibert/numba,stefanseefeld/numba,pombredanne/numba,stuartarchibald/numba,sklam/numba,stefanseefeld/numba,numba/numba,numba/numba,gdementen/numba,stefanseefeld/numba,jriehl/numba,pombredanne/numba,stuartarchibald/numba,ssarangi/numba,pitrou/numb... | numba/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.tools import assert_true, assert_false\nfrom imagekit.cachefiles import ImageCacheFile\nfrom mock import Mock\nfrom .utils import create_image\nfrom django.core.files.storage import FileSystemStorage\nfrom imagekit.cachefiles.back... | python | edit | 3 | 1 | bsd-3-clause | bbf48a79539493fcade9b5cdb4b1c637b64961ee | FundedByMe/django-imagekit,tawanda/django-imagekit,FundedByMe/django-imagekit,tawanda/django-imagekit | tests/test_optimistic_strategy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom serf_master import SerfHandlerProxy\nfrom base_handler import BaseHandler\ntry:\n from my_handler import MyHandler\nexcept ImportError:\n print \"Could not import user's handler.\"\n print \... | python | edit | 1 | 0 | mit | 4c04979de66cf5d0858ff00002ef40df196ccd05 | waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode | serfnode/build/handler/handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests, json, urllib\n\nSEARCH_URL = 'http://core.ac.uk:80/api-v2/articles/search/'\nAPI_KEY = 'FILL THIS IN'\n\ndef getCOREMentions(identifier, **kwargs):\n \"\"\"Return the number of mentions in CORE and a descriptor, as a tup... | python | edit | 3 | 1 | bsd-3-clause | 34d94f771b61a73ee484fc576f8e5dd2d0b14a0f | softwaresaved/softwareindex,softwaresaved/softwareindex | softwareindex/handlers/coreapi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport os\nimport socket\n\nfrom sphinx.application import Sphinx\nfrom six import StringIO\n\nfrom .base import unittest\nfrom .tmpdir import temp_dir\nfrom unittest import sk... | python | edit | 1 | 2 | bsd-3-clause | ef8f869c5a254d2e3d84c3fa8829215da88681b4 | nephila/djangocms-export-objects,nephila/djangocms-export-objects | djangocms_export_objects/tests/docs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nfrom jupyter_kernel import MagicKernel\n\n\nclass BashKernel(MagicKernel):\n implementation = 'Bash'\n implementation_version = '1.0'\n language = 'bash'\n language_version = '0.1'\n b... | python | edit | 1 | 3 | bsd-3-clause | be88549f5a2f95090018b2f44bdebb8b270f9997 | Calysto/metakernel | bash_kernel/bash_kernel.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tastypie.resources import ModelResource\nfrom tastypie.authorization import Authorization\n\nfrom peel.models import Article\n\n\nclass ArticleResource(ModelResource):\n def dehydrate_tags(self, bundle):\n # Needed to properl... | python | edit | 1 | 1 | mit | ef4f85808c061f81f123fb91b52fd4c8eb3e32b6 | imiric/peel,imiric/peel,imiric/peel | peel/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Setting(models.Model):\n name = models.CharField(max_length=40, unique=True)\n label = models.CharField(max_length=60)\n help_text = models.TextField()\n current_value = models.TextField(b... | python | edit | 1 | 1 | mit | d2c552b8996ce1ef8a2d5ef64f6a2b60ce306cf3 | 7ws/django-setmagic | setmagic/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python2\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport json\nimport urllib\nimport datetime\nimport subprocess\n\n# api key, 1000 times per hour\nAPIKEY = 'WGCxN9fzvCxPo0nqlzGLCPUc'\nPATH = '~/vocabulary' # make s... | python | edit | 3 | 1 | mit | 54d5a984aeecd9bad501ec484c173f2dc504dfa5 | pidofme/T4LE | dict.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\n\... | python | edit | 3 | 3 | bsd-3-clause | 196162fe0782cb0e5934dd51f96b4f1d05a108ed | dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart... | tools/bots/functional_testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import List, Union, Callable, Tuple\n\nfrom ..types import Ints2d, Doc\nfrom ..model import Model\nfrom ..config import registry\n\n\nInT = List[Doc]\nOutT = List[Ints2d]\n\n\n@registry.layers(\"FeatureExtractor.v1\")\ndef Featu... | python | edit | 1 | 4 | mit | 582c0e432db918237d1dcbcc4034983408766b4f | spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | thinc/layers/featureextractor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nDOMAIN = {\n \"texts\": {\n \"schema\": {\n \"name\": {\n \"type\": \"string\",\n \"required\": True,\n \"unique\": True,\n },\n \"fulltext... | python | edit | 1 | 0 | mit | a10c866db352e19acf8ade1d3e7cedc9a68ce06f | mattiaslundberg/typer,mattiaslundberg/typer,mattiaslundberg/typer,mattiaslundberg/typer | server/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# noqa\nfrom dodo_commands.system_commands import DodoCommand\nfrom dodo_commands.dodo_activate import Activator\n\n\nclass Command(DodoCommand): # noqa\n help = \"\"\n decorators = []\n\n def add_arguments_imp(self, parser): # n... | python | edit | 1 | 3 | mit | 09ae901f6def59a2d44aa994cb545afb559f9eb1 | mnieber/dodo_commands | dodo_commands/system_commands/activate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nclass Agent(object):\n def __init__(self, dim_action):\n self.dim_action = dim_action\n\n def act(self, ob, reward, done, vision):\n #print(\"ACT!\")\n\n # Ge... | python | edit | 3 | 2 | mit | 01a86c09b768f6cc4e5bf9b389d09512f9e56ceb | travistang/late_fyt,travistang/late_fyt,ugo-nama-kun/gym_torcs,travistang/late_fyt,ugo-nama-kun/gym_torcs,ugo-nama-kun/gym_torcs,travistang/late_fyt,travistang/late_fyt,ugo-nama-kun/gym_torcs,ugo-nama-kun/gym_torcs,travistang/late_fyt,ugo-nama-kun/gym_torcs,travistang/late_fyt,ugo-nama-kun/gym_torcs | sample_agent.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\npeople = '123456'\nroom = 'abcdef'\n\n# murder configuration\n# who was where\n# who is the murderer\n\n# current configuration\n# who was where\n# player location\n\n\n```\n\nApply this change: Add random people and rooms"
},
{
... | python | edit | 1 | 0 | mit | 7e080edea2139c5cce907f4d752320943b044ac7 | tomviner/dojo-adventure-game | game.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.contrib import admin\nfrom chess import views\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^accounts/home/', views.home_page, name='home'),\n url(r'^accounts/his... | python | edit | 1 | 0 | mit | e99c230f2bf7bdc010552c03ca657adddebaf818 | EyuelAbebe/gamer,EyuelAbebe/gamer | chessfellows/chess/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route('/')\n\ndef hello():\n return open('index.html').read()\n\nport = os.getenv('VCAP_APP_PORT', '5000')\n\nif __name__ == \"__main__\":\n ap... | python | edit | 1 | 1 | apache-2.0 | e9ace6b47d2b9a86988903d3572dc2b8074bf78a | CenturyLinkCloud/af-python-jumpstart,CenturyLinkCloud/af-python-jumpstart | home.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\n\n\ndef user_to_bot_ratio(guild: discord.Guild):\n \"\"\" Calculates the user to bot ratio for a guild. \"\"\"\n bots = len(list(filter(lambda u: u.bot, guild.members)))\n users = len(list(filter(lambda u: not u.bot... | python | edit | 1 | 6 | mit | d5697d6176dd9a3d54abc13d38f94f1a326eac84 | slice/dogbot,sliceofcode/dogbot,slice/dogbot,sliceofcode/dogbot,slice/dogbot | dog/core/botcollection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 The Regents of the University of Michigan\n# All rights reserved.\n# This software is licensed under the BSD 3-Clause License.\n\"\"\"The signac framework aids in the management of large and\nheterogeneous data spaces.\... | python | edit | 1 | 0 | bsd-3-clause | c1b797b74098fd6f7ea480f7f1bf496d5f52bdc7 | csadorf/signac,csadorf/signac | signac/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/python3\n\"\"\" This script contains functions for the REST client.\n \n Author: Julien Delplanque\n\"\"\"\nimport http.client\nimport json\n\ndef get_pacman_pkgs_to_update(ip: str, username: str, passwd: str):\n \"\"\" Get ... | python | edit | 1 | 1 | mit | e61385b03663b4b56c929b3ebdb0e0505b8fb2ff | juliendelplanque/raspirestmonitor | client/raspi_rest_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nMain script to execute the gesture recognition software.\n\"\"\"\n\n# Import native python libraries\nimport inspect\nimport os\nimport sys\nfrom listener import MyListener\nfrom face_detection import face_detector_gui\nimport time\... | python | edit | 1 | 3 | mit | a43634b3c9ec4d47d8ec032e34a197210a6dddb7 | oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition,oscarorti/pae-gesture-recognition | gesture_recognition/gesture_recognizer.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.