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 pytest\n\nfrom ..reports import get_world_pedir\n\n\n@pytest.mark.parametrize(\"orientation,pe_dir,expected\", [\n ('RAS', 'j', 'Posterior-Anterior'),\n ('RAS', 'j-', 'Anterior-Posterior'),\n ('RAS', 'i', 'Left-Right'),\n ... | python | edit | 1 | 1 | bsd-3-clause | 4bb8a61cde27575865cdd2b7df5afcb5d6860523 | oesteban/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep | fmriprep/interfaces/tests/test_reports.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport configargparse\n\n\nDEFAULT_CONFIG_FILES=[\n './track.cfg',\n '~/.track.cfg',\n]\n\n\n# Bit of a cheat... not actually an object constructor, just a 'make me an object' method\ndef ArgParser():\n return configargparse.ArgPar... | python | edit | 1 | 1 | mit | cdf545cf9385a0490590cd0162141025a1301c09 | bgottula/track,bgottula/track | track/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '0.9.2'\n\n\ndef description(message):\n pass\n\n\ndef _description(message):\n pass\n\n\ndef it(message):\n pass\n\n\ndef _it(message):\n pass\n\n\ndef context(message):\n pass\n\n\ndef _context(message):\n ... | python | edit | 1 | 1 | mit | 95ea1d7d6564bcbb2e3b8d2ba254ccd2c1c38436 | nestorsalceda/mamba | mamba/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport sys\n\nfrom pyspark.sql import SparkSession\nfrom pyspark.sql.functions import lit, col, coalesce\n\nif __name__ == \"__main__\":\n if len(sys.argv) != 3:\n print(\"Usage: c19.py <in... | python | edit | 1 | 0 | apache-2.0 | 86791effb26c33514bbc6713f67a903e8d9e5295 | ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim | scripts/c19.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .misc import DancingLinks\nfrom .permutation import Permutation\nimport random\n\nclass Permutations(object):\n def __init__(self, n):\n assert 0 <= n\n self.n = n\n\n def __iter__(self):\n\n left = DancingLi... | python | edit | 1 | 4 | bsd-3-clause | 148d4c44a9eb63016b469c6bf317a3dbe9ed7918 | PermutaTriangle/Permuta | permuta/permutations.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for strait and fjord"
},
{
"role": "assistant",
"content": "# osm_id: 43950409 name: San Pablo Bay\nassert_has_feature(\n 14, 2623, 6318, 'water',\n { 'kind': 'bay', 'label_placement': 'yes' })\n\n# osm_id: 360566... | python | new_file | 4 | 0 | mit | 29e491c5505d2068b46eb489044455968e53ab70 | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/400-bay-water.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\nimport urllib.parse as urllib\n\nfrom django.contrib.auth.models import User\nfrom django.db import models\n\n\n# extension to django's User class which has authentication details\n# as well as some basic info such as name\n... | python | edit | 3 | 1 | isc | 7b4531ec867982ba2f660a2a08e85dbae457083e | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | users/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.staticfiles import finders\nfrom django.utils.safestring import mark_safe\n\nfrom svg.exceptions import SVGNotFound\n\nlogger = ... | python | edit | 1 | 4 | mit | 54c48073dfb8ffd418efe234c0c107f7a5c303a9 | mixxorz/django-inline-svg | svg/templatetags/svg.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom base import jsonrpyc\n\n\nclass MyClass(object):\n\n def one(self):\n return 1\n\n def twice(self, n):\n return n * 2\n\n def arglen(self, *args, **kwargs):\n return len(args) ... | python | edit | 1 | 1 | mit | 390fa07c191d79290b1ef83c268f38431f68093a | riga/jsonrpyc | tests/clients/simple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nskipif_markers\n--------------\n\nContains pytest skipif markers to be used in the suite.\n\"\"\"\n\nimport pytest\nimport os\n\n\ntry:\n os.environ[u'TRAVIS']\nexcept KeyError:\n... | python | edit | 1 | 0 | bsd-3-clause | 2c37ed091baf12e53885bfa06fdb835bb8de1218 | pjbull/cookiecutter,atlassian/cookiecutter,sp1rs/cookiecutter,0k/cookiecutter,cichm/cookiecutter,takeflight/cookiecutter,atlassian/cookiecutter,kkujawinski/cookiecutter,foodszhang/cookiecutter,christabor/cookiecutter,ramiroluz/cookiecutter,cguardia/cookiecutter,tylerdave/cookiecutter,benthomasson/cookiecutter,Springerl... | tests/skipif_markers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Console(object):\n def __init__(self, shell, stdout):\n self._shell = shell\n self._stdout = stdout\n \n def run(self, description, command, **kwargs):\n return self.run_all(description, [command], **... | python | edit | 1 | 4 | bsd-2-clause | 6e67a9e8eedd959d9d0193e746a375099e9784ef | mwilliamson/toodlepip | toodlepip/consoles.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport figgypy.config\n\nimport sys\nimport os\n\nclass TestConfig(unittest.TestCase):\n def test_config_load(self):\n os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'\n c = figgypy.config.Config('t... | python | edit | 3 | 1 | mit | 1df8efb63333e89777820a96d78d5a59252b303d | theherk/figgypy | tests/test_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\nimpo... | python | edit | 1 | 0 | apache-2.0 | 73d0be7a432340b4ecd140ad1cc8792d3f049779 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | tests/factories/user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom copy import copy\n\nfrom unittest import TestCase\n\nfrom address_book import Person\n\n\nclass PersonTestCase(TestCase):\n\n def test_get_groups(self):\n pass\n\n def test_add_address(self):\n basic_address = ['Rus... | python | edit | 1 | 1 | mit | 66eddf04efd46fb3dbeae34c4d82f673a88be70f | dizpers/python-address-book-assignment | tests/test_person.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nc = get_config()\nc.CourseDirectory.db_assignments = [dict(name=\"1\", duedate=\"2019-12-09 17:00:00 UTC\")]\nc.CourseDirectory.db_students = [\n dict(id=\"foo\", first_name=\"foo\", last_name=\"foo\")\n]\nc.ClearSolutions.code_stub = {'... | python | edit | 2 | 0 | mit | 458d61ffb5161394f8080cea59716b2f9cb492f3 | pbutenee/ml-tutorial,pbutenee/ml-tutorial | nbgrader_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, re, requests\nrootdir = '_posts'\n\nfor subdir, dirs, files in os.walk(rootdir):\n for file in files:\n filename = os.path.join(subdir, file)\n\n \tf = open(filename, \"r\")\n \tcontents = f.readlines()\n \tf.c... | python | edit | 6 | 0 | mit | f26c2059ff6e2a595097ef7a03efe149f9e253eb | up1/blog-1,up1/blog-1,up1/blog-1 | iterator.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import JsonResponse\nfrom django.views.decorators.http import require_http_methods\nfrom oidc_provider.lib.utils.oauth2 import protected_resource_view\n\nfrom .api_tokens import get_api_tokens_by_access_token\n\n\n@require_... | python | edit | 1 | 1 | mit | 7c77a7b14432a85447ff74e7aa017ca56c86e662 | mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo | oidc_apis/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom cthulhubot.models import Buildmaster\n\nclass Command(BaseCommand):\n help = 'Restart all Buildmaster processes'\n args = \"\"\n\n def handle(self, *fixture_labels, **opti... | python | edit | 5 | 6 | bsd-3-clause | 3f70ead379b7f586313d01d5ab617fd5368f8ce3 | centrumholdings/cthulhubot | cthulhubot/management/commands/restart_masters.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Disable Floating IPs\nfrom openstack_dashboard.dashboards.project.access_and_security import tabs\nfrom openstack_dashboard.dashboards.project.instances import tables\nimport horizon\n\nNO = lambda *x: False\n\ntabs.FloatingIPsTab.allowed... | python | edit | 1 | 0 | apache-2.0 | 355040c346ee26f763561529422b951e312e3db2 | eckhart/himlar,tanzr/himlar,TorLdre/himlar,mikaeld66/himlar,norcams/himlar,raykrist/himlar,eckhart/himlar,norcams/himlar,TorLdre/himlar,norcams/himlar,norcams/himlar,raykrist/himlar,mikaeld66/himlar,eckhart/himlar,TorLdre/himlar,tanzr/himlar,mikaeld66/himlar,tanzr/himlar,TorLdre/himlar,mikaeld66/himlar,eckhart/himlar,n... | profile/files/openstack/horizon/overrides.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom models import UserProfile\n\nclass UserProfileAdmin(admin.ModelAdmin):\n\tlist_display = ('user',)\n\t# list_display = ('user','sex')\n\t# search_fields = ('user',)\n # list_filter = ('sex',ist_disp... | python | edit | 1 | 0 | mit | dc229325a7a527c2d2143b105b47899140018e32 | s1na/darkoob,s1na/darkoob,s1na/darkoob | darkoob/social/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='HotCIDR',\n version='0.1.0',\n author='ViaSat',\n author_email='<EMAIL>',\n packages=['hotcidr', 'hotcidr.test'],\n scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-valida... | python | edit | 1 | 0 | apache-2.0 | 3db23515437a0073cc374d5064f496c1d84e1bb7 | ViaSat/hotcidr | HotCIDR/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\nclass Graph(object):\n \"\"\"Graph class.\"\"\"\n pass\n\n\ndef main():\n pass\n\n\nif __name__ == '__main__':\n ... | python | edit | 1 | 1 | bsd-2-clause | 76709e594bd863476c4111185d98ca2551c460d3 | bowen0701/algorithms_data_structures | ds_graph.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\n\ndef test_govuk_frontend_jinja_overrides_on_design_system_v3():\n with open(\"package.json\") as package_file:\n package_json = json.load(package_file)\n\n assert package_json[\"dependencies\"][\"govuk-frontend\... | python | edit | 1 | 1 | mit | b03f32dc74785154ccb01f354a30457c53b1526f | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | tests/templates/components/test_radios_with_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Basic test to check that the catlog loads in IE\n#\n\ndef run(driver):\n driver.get('https://demo.geomoose.org/master/desktop/')\n\n if not 'GeoMoose' in driver.title:\n raise Exception('Unable to load geomoose demo!')\n\n... | python | edit | 1 | 3 | mit | 181c094a8918bc386771aaf2d7c99d4cc011a3a5 | geomoose/gm3,geomoose/gm3,geomoose/gm3 | selenium/tests/basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint, request, redirect, render_template, url_for\nfrom flask.views import MethodView\nfrom recipyGui import recipyGui, mongo\nfrom forms import SearchForm\n\nruns = Blueprint('runs', __name__, template_folder='templa... | python | edit | 3 | 4 | apache-2.0 | 7a14c03e0864ca51993d2f05eabd2319c495ba90 | recipy/recipy-gui,musically-ut/recipy,github4ry/recipy,github4ry/recipy,recipy/recipy,MichielCottaar/recipy,recipy/recipy-gui,MBARIMike/recipy,recipy/recipy,MBARIMike/recipy,bsipocz/recipy,bsipocz/recipy,MichielCottaar/recipy,musically-ut/recipy | recipyGui/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom fabric.api import task, run\n\ndef _generate_password():\n import string\n from random import sample\n chars = string.letters + string.digits\n return ''.join(sample(chars, 8))\n\n\ndef create_mys... | python | edit | 1 | 1 | mit | 4e94612f7fad4b231de9c1a4044259be6079a982 | goncha/fablib | fabtasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n# Ensuring that the proper path is found; there must be a better way\nimport os\nimport sys\nsys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), \"..\")))\n# other imports proceed\n\nfrom parsers.regex_parser impo... | python | edit | 3 | 1 | bsd-3-clause | 25777afb24441f54edab1f9daa1bfc7a25c6d0ad | aroberge/docpicture,aroberge/docpicture | tests/test_regex_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python2\nfrom __future__ import print_function\n\n''' summon.py\nA simple wrapper for OS-dependent file launchers.\n\nCopyright 2013 Julian Gonggrijp\nLicensed under the Red Spider Project License.\nSee the License.txt that ... | python | edit | 1 | 3 | mit | 7187dbb7ca378726e2b58dc052dbc150582f9a24 | the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red... | src/summon.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2017-12-04 10:03\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\nimport uuid\n\n\nclass Migration(migrations.Mi... | python | edit | 1 | 0 | apache-2.0 | 01c571a3767339caf81dca61c6525f9c9bcf66fd | toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity | formlibrary/migrations/0005_auto_20171204_0203.py | rejected_duplicate | Near-duplicate of sample 2313 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Add columns to supplier_frameworks to indicate\n Pass/Fail and whether a Framework Agreement has\n been returned.\n\nRevision ID: 360_add_pass_fail_returned\nRevises: 340\nCreate Date: 2015-10-23 16:25:02.068155\n\n\"\"\"\n\n# ... | python | edit | 1 | 1 | mit | b37e9d1cc315e04d763b646bb028612b86768d37 | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | migrations/versions/360_add_pass_fail_returned.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\nimport os\n\nimport flake8\nif flake8.__version_info__ < (3,):\n from flake8.engine import get_style_guide\nelse:\n from flake8.api... | python | edit | 1 | 5 | mit | ac7fefd3a2058e2e9773d7e458f8fad6112fc33c | wbond/asn1crypto | dev/lint.py | rejected_duplicate | Near-duplicate of sample 2376 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# from jaraco.util.itertools\ndef always_iterable(item):\n \"\"\"\n Given an object, always return an iterable. If the item is not\n already iterable, return a tuple containing only the item.\n\n >>> always_iterable([1,2,3])\n ... | python | edit | 2 | 3 | mit | d22f77a8e1a54d373f426589364b95f742b70b3f | jaraco/irc | irc/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nimport smolder\nimport nose\nimport json\nimport os\nfrom nose.tools import assert_raises\nfrom imp import reload\n\nTHIS_DIR = os.path.dirname(os.path.realpath(__file__))\n\ndef test_noop_test():\n assert smolder.n... | python | edit | 1 | 2 | bsd-3-clause | 6d5ebbebd558a716afeda1933f45f0dfbef41bb4 | sky-shiny/smolder,sky-shiny/smolder | tests/smolder_tests.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\"\"\"\nUnit tests for spam filters.\n\"\"\"\n\nimport unittest\n\nfrom django.conf import settings\nfrom django.test import TestCase\n\ntry:\n import honeypot\nexcept... | python | edit | 1 | 1 | mit | e10743d9973f479a4d9816f4aafeaacaffa1bd4d | zsiciarz/django-envelope,r4ts0n/django-envelope,zsiciarz/django-envelope,r4ts0n/django-envelope | tests/test_spam_filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cbagent.collectors import Collector\nfrom cbagent.collectors.libstats.psstats import PSStats\n\n\nclass PS(Collector):\n\n COLLECTOR = \"atop\" # Legacy\n\n KNOWN_PROCESSES = (\"beam.smp\", \"memcached\", \"indexer\", \"projecto... | python | edit | 1 | 7 | apache-2.0 | d6a817949c51462af7d95d542ece667547b23cce | pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner | cbagent/collectors/ps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#------------------------------------------------------------------------------\n# Copyright (c) 2005-2013, Enthought, Inc.\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license inclu... | python | edit | 1 | 0 | bsd-3-clause | 48beff57b1c98db24a83ee0c4fdb3f3b436978be | geggo/pyface,geggo/pyface,brett-patterson/pyface | pyface/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Adaptive configuration dialogs.\n\nAttributes:\n __version__: The current version string.\n\"\"\"\n\nimport os\nimport subprocess\n\n\ndef _get_version(version=None): # overwritten by setup.py\n if version is None:\n pkg... | python | edit | 1 | 2 | apache-2.0 | 2b464c9be11ad8aa0de62bca4424fed7d4d3e2b3 | yasserglez/configurator,yasserglez/configurator | configurator/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom optparse import make_option\nfrom optparse import OptionParser\nfrom scaffolder.core.commands import BaseCommand\nfrom scaffolder.core.template import TemplateManager\n\nclass TemplateC... | python | edit | 3 | 1 | mit | 3dc9e45448211a5bd36c1f4e495eddef6e0e485e | goliatone/minions | scaffolder/commands/list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport sys\nimport os\n\nprefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.insert(0, prefix)\n\n# Workaround current bug in docutils:\n# http://permalink.gmane.org/gmane.text.docutils.devel/63... | python | edit | 3 | 0 | bsd-3-clause | f2c34f7e0e7f50ca6669632d6fd89feb26c98609 | pydotorg/pypi,pydotorg/pypi,pydotorg/pypi,pydotorg/pypi | tools/daily.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport numpy\nimport json\n\nimport sys\nimport fileinput\n\nfrom collections import OrderedDict\n\ndef main():\n for filename in sys.argv[1:]:\n print 'Processing', filename\n word_freqs = OrderedDict(... | python | edit | 3 | 7 | bsd-3-clause | a6eeda7ed6037285627ca6e468a7ef8ab467034f | rsennrich/nematus,shuoyangd/nematus,EdinburghNLP/nematus,Proyag/nematus,shuoyangd/nematus,EdinburghNLP/nematus,EdinburghNLP/nematus,Proyag/nematus,rsennrich/nematus,yang1fan2/nematus,Proyag/nematus,Proyag/nematus,yang1fan2/nematus,yang1fan2/nematus,cshanbo/nematus,rsennrich/nematus,rsennrich/nematus,shuoyangd/nematus,P... | data/build_dictionary.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pymodm\nimport slugify\n\n\nclass DevicePlot(pymodm.MongoModel):\n device_name = pymodm.fields.CharField()\n slug = pymodm.fields.CharField()\n plot_title = pymodm.fields.CharField()\n x_label = pymodm.fields.CharField()\... | python | edit | 4 | 2 | mit | 670b896f0ef8a4feda9cbb0181364f277dc50299 | juannyG/miner-plotter,juannyG/miner-plotter,juannyG/miner-plotter | miner_plotter/models.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Tests for the play plugin\"\"\"\n\nfrom __future__ import (division, absolute_import, print_function,\n unicode_literals)\n\nfrom mock import patch, Mock\n\nfrom test._common import un... | python | edit | 1 | 1 | mit | d15b996dc4a741390507a96d6facf113f8da0869 | lengtche/beets,SusannaMaria/beets,jcoady9/beets,xsteadfastx/beets,diego-plan9/beets,shamangeorge/beets,jackwilsdon/beets,jcoady9/beets,LordSputnik/beets,sampsyo/beets,LordSputnik/beets,lengtche/beets,madmouser1/beets,mosesfistos1/beetbox,mried/beets,LordSputnik/beets,jcoady9/beets,SusannaMaria/beets,ibmibmibm/beets,swt... | test/test_play.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nGala\n===\n\n Gala is a Python package for nD image segmentation. \n\"\"\"\nfrom __future__ import absolute_import\n\nimport sys, logging\nif sys.version_info[:2] < (2,6):\n logging.warning('Gala has not been tested on Python ... | python | edit | 11 | 0 | bsd-3-clause | 4e68ee7d361bc34e77002cbdcfe077e89fcb3bd8 | jni/gala,janelia-flyem/gala | gala/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\ndef pytest_funcarg__api_factory(request):\n class APIFactory:\n def create(self, token='dummy_token'):\n from annict.api import API\n return API(token)\n return APIFactory()\n\... | python | edit | 1 | 1 | mit | b5593bbfb8fda3bbdb9c5408f17078949ab91481 | kk6/python-annict | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nimport pytest\n\n\napp = Flask('__config_test')\n\n\n@pytest.fixture()\ndef client():\n return app, app.test_client()\n\n```\n\nApply this change: Add config and plugin wrapper for app test fixture."
},
{
... | python | edit | 1 | 1 | mit | 36740bf92999dae7258e1aeb6e8d82b43e1773f5 | christabor/flask_extras,christabor/flask_extras,christabor/jinja2_template_pack,christabor/jinja2_template_pack | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\\\n FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\\\n GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\\\n ... | python | edit | 18 | 0 | bsd-3-clause | ad4c1014184f8a7c4b72a4620262bf5fda3264d2 | rahuldan/sympy,debugger22/sympy,pbrady/sympy,farhaanbukhsh/sympy,kevalds51/sympy,yashsharan/sympy,toolforger/sympy,Sumith1896/sympy,Vishluck/sympy,kaushik94/sympy,asm666/sympy,pandeyadarsh/sympy,rahuldan/sympy,madan96/sympy,sampadsaha5/sympy,sunny94/temp,skirpichev/omg,Curious72/sympy,sahmed95/sympy,jbbskinny/sympy,Mri... | sympy/physics/gaussopt.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gevent\nfrom kvclient import KeyValueClient\n\n\nclass TestClient(KeyValueClient):\n yield_loop = gevent.sleep\n\n```\n\nApply this change: Fix gevent.sleep not having a parameter."
},
{
"role": "assistant",
"content":... | python | edit | 1 | 0 | unlicense | 07b7a666bc1c538580b5e7f528e528e4cc4bc25d | squirly/eece411-kvclient | testing/client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom copy import copy\nfrom django.template.defaulttags import CsrfTokenNode\nfrom django import template\nfrom ..models import Token\n\n\nregister = template.Library()\n\n\n@register.simple_tag(takes_context=True)\ndef per_view_csrf(contex... | python | edit | 1 | 2 | bsd-3-clause | d3670f4c8a07cc9e29c417a0f0ffa6499a3f53e2 | nvbn/django-session-csrf,nvbn/django-session-csrf | session_csrf/templatetags/session_csrf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\nimport sys\n\nsys.path.append('..')\nfrom skytap.Vpns import Vpns # noqa\n\nvpns = Vpns()\n\n\ndef test_vpn_count():\n \"\"\"Test VPN count.\"\"\"\n assert len(vpns) > 0, 'Vpn list is empty.'\n\n\ndef test_vpn... | python | edit | 3 | 2 | mit | 3f0a3cd5540680be07e25afe282ed7df7381e802 | FulcrumIT/skytap,mapledyne/skytap | tests/testVpns.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 | 1 | 1 | apache-2.0 | b9c6d875bcddca73deaff35e14a56e373e5dcf46 | guardian/alerta,skob/alerta,skob/alerta,guardian/alerta,guardian/alerta,guardian/alerta,skob/alerta,skob/alerta | alerta/app/shell.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import defaultdict, Counter\nclass Solution(object):\n def longestIncreasingPath(self, matrix):\n \"\"\"\n :type matrix: List[List[int]]\n :rtype: int\n \"\"\"\n if not matrix:\n ... | python | edit | 4 | 10 | apache-2.0 | f0a721f2dbc4b8b9354e459d45325a08a646e09b | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/longest-increasing-path-in-a-matrix.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, unicode_literals\nfrom capstone.game import Connect4 as C4\n\n\ndef load_instance(instance):\n '''\n Loads a position from the UCI Connect 4 database:\n\n https://archive.ics.uci.edu... | python | edit | 1 | 3 | mit | 9c84e5d4c1ef0670b3b6622fb7946486f78ff7fe | davidrobles/mlnd-capstone-code | capstone/util/c4uci.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Entry point defined here.\"\"\"\nfrom paystackapi.cpanel import ControlPanel\nfrom paystackapi.customer import Customer\nfrom paystackapi.invoice import Invoice\nfrom paystackapi.misc import Misc\nfrom paystackapi.page import Page\nfr... | python | edit | 1 | 1 | mit | 3c319e21ea026651ee568d3c2a74786d33257a93 | andela-sjames/paystack-python | paystackapi/paystack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module provides bindings to C functions defined by OpenMC shared library.\nWhen the :mod:`openmc` package is imported, the OpenMC shared library is\nautomatically loaded. Calls to the OpenMC library can then be via functions or... | python | edit | 9 | 0 | mit | 745b0b2d83cdbd28fcb4f565b77b31ef6f888350 | walshjon/openmc,johnnyliu27/openmc,liangjg/openmc,shikhar413/openmc,amandalund/openmc,liangjg/openmc,liangjg/openmc,shikhar413/openmc,wbinventor/openmc,liangjg/openmc,mit-crpg/openmc,amandalund/openmc,smharper/openmc,walshjon/openmc,smharper/openmc,johnnyliu27/openmc,smharper/openmc,shikhar413/openmc,wbinventor/openmc,... | openmc/capi/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport itertools\nimport inspect\n\nfrom collections import namedtuple\n\n_PY2 = sys.version_info.major == 2\n\nif _PY2:\n\n range_ = xrange\n\n zip_ = itertools.izip\n\n def iteritems(d):\n return d.iteritems()\... | python | edit | 2 | 1 | apache-2.0 | 3489cc9f6ab593cd3664f2086577a6fde5e4ab94 | oneklc/dimod,oneklc/dimod | dimod/compatibility23.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The Adventure game.\"\"\"\n\ndef load_advent_dat(data):\n import os\n from .data import parse\n\n datapath = os.path.join(os.path.dirname(__file__), 'advent.dat')\n with open(datapath, 'r', encoding='ascii') as datafile:\n... | python | edit | 1 | 2 | apache-2.0 | 5012ff1dfbcd8e7d0d9b0691f45c7b3efd811a08 | devinmcgloin/advent,devinmcgloin/advent | adventure/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012 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\nGITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-sa... | python | edit | 1 | 0 | bsd-3-clause | 92b90cbdd41905d69863b7cd329d8280a3662db8 | anirudhSK/chromium,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,anirudhSK/chromium,M4sse/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,fuj... | chrome/common/extensions/docs/server2/url_constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport re\n\nNUMBER_REGEX = re.compile(r'([0-9])([a-z])')\n\ndef to_camel_case(text):\n # We only care about Graphene types\n if not text.startswith('graphene_') and not text.endswith('_t'):\n return text\n\n res... | python | edit | 1 | 6 | mit | d1d668139be98283dc9582c32fadf7de2b30914d | ebassi/graphene,ebassi/graphene | src/identfilter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Install VSCode Extensions from file.\n\nfrom __future__ import print_function\n\nimport subprocess\n\n\nEXTENSIONS_FILE = \"extensions.txt\"\n\n\ndef extensions(filename):\n \"\"\" Yield each of the extensions in... | python | edit | 1 | 2 | mit | d5819e689ee5284b5c6aae28d20a6ef88051b4ef | kashev/dotfiles,kashev/dotfiles | vscode_manual/install_extensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os.path\nimport sys\n\n### CONFIGURE THESE PATHS ###\nbinaryPath = \"/home/opensim/opensim/opensim-current/bin\"\npidPath = \"/tmp/OpenSim.pid\"\n### END OF CONFIG ###\n\nif not os.path.exists(pidPath):\n print ... | python | edit | 3 | 0 | bsd-3-clause | 1a48f85e04f9192ccf9ba675ff8ddd5719752950 | justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools | infrastructure/control/simple/src/start-opensim.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom plugin import plugin, require\nimport requests\nfrom colorama import Fore\nfrom plugins.animations import SpinnerThread\n\n\n@require(network=True)\n@plugin('joke daily')\nclass joke_of_day:\n \"\"\"\n Provides you with a joke of... | python | edit | 2 | 3 | mit | ffe9bba2e4045236a3f3731e39876b6220f8f9a1 | sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis | jarviscli/plugins/joke_of_day.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"'lit' Testing Tool\"\"\"\n\n__author__ = 'Daniel Dunbar'\n__email__ = '<EMAIL>'\n__versioninfo__ = (0, 6, 0)\n__version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev'\n\n__all__ = []\n\n```\n\nApply this change: Fix issue which... | python | edit | 3 | 0 | apache-2.0 | 420b9a4e2b52de7234734b9c457e0711bb0f1a70 | apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llv... | utils/lit/lit/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom pystray import Icon, Menu, MenuItem\nimport webview\nimport sys\n\nif sys.platform == 'darwin':\n raise NotImplementedError('This example does not work on macOS.')\n \nfrom threading import Thread\nfrom que... | python | edit | 3 | 2 | bsd-3-clause | 45e0605a178c36a4075b59026952ef5a797e09aa | r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview | examples/pystray_icon.py | rejected_duplicate | Near-duplicate of sample 13856 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom collections import OrderedDict\nimport os\nimport StringIO\nfrom django.conf import settings\nfrom django.utils.encoding import smart_str\nfrom ..base import Processor\n\n\nERROR_STRING = (\"Failed to execute Java VM or yuicompressor... | python | edit | 4 | 4 | bsd-2-clause | b0e558b70613871097361ee3c1f016aa60e4c2f1 | potatolondon/assetpipe | processors/yui.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom channels import Group\nfrom channels.auth import channel_session_user, channel_session_user_from_http\n\n\n@channel_session_user_from_http\ndef ws_connect(message):\n\n Group('btc-price').add(message.reply_channel)\n\n message.re... | python | edit | 1 | 3 | mit | 4dd13a8b031a57f6290fb43dc6daa5082041658a | alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor | dashboard/consumers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\n\nConfiguration = namedtuple(\n 'Configuration',\n ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH']\n)\n\n\nclass Factory:\n def __init__(self, config_dict):\n self._confi... | python | edit | 1 | 2 | bsd-3-clause | 7ef053749f4bfbcf7c2007a57d16139cfea09588 | socialwifi/jsonapi-requests | jsonapi_requests/configuration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom persistent_dict import *\n\nclass PreservedGame():\n def game_name(self):\n return \"Freddo\" # TODO\n\nclass AllPreservedGames():\n def __init__(self, filename):\n self.games = PersistentDict(filename, 'c', format=... | python | edit | 4 | 1 | mit | e3bf9032e704989aee2044f90a053064e9fd9253 | cropleyb/pentai,cropleyb/pentai,cropleyb/pentai | preserved_game.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom weblab.admin.script import Creation\n\nAPACHE_CONF_NAME = 'apache.conf'\nMIN_PORT = 10000\n\nDEFAULT_DEPLOYMENT_SETTINGS = {\n Creation.COORD_ENGINE: 'redis',\n Creation.COORD_REDIS_DB: 0,\n Creation.COORD_REDIS_PORT: 6379,\n ... | python | edit | 1 | 0 | bsd-2-clause | 3d281a3524a4cd1bf9e2f60767ec8d89d3b589e2 | morelab/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,zstars/weblabdeusto,... | tools/wcloud/wcloud/deploymentsettings.py | rejected_duplicate | Near-duplicate of sample 11747 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 Mirantis Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.ap... | python | edit | 1 | 1 | apache-2.0 | 3c145a47a20a55787b8ce8a4f00ff3449306ccbc | stackforge/blazar,stackforge/blazar,openstack/blazar,ChameleonCloud/blazar,ChameleonCloud/blazar,openstack/blazar | blazar/cmd/manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom redash.models import db, Alert, AlertSubscription\n\nif __name__ == '__main__':\n with db.database.transaction():\n Alert.create_table()\n AlertSubscription.create_table()\n\n db.close_db(None)\n\n```\n\nApply this ch... | python | edit | 1 | 0 | bsd-2-clause | 5208abd072d747c0da9dbd599ee50ea63c61842e | 44px/redash,imsally/redash,chriszs/redash,useabode/redash,vishesh92/redash,M32Media/redash,rockwotj/redash,jmvasquez/redashtest,jmvasquez/redashtest,imsally/redash,EverlyWell/redash,amino-data/redash,denisov-vlad/redash,EverlyWell/redash,getredash/redash,getredash/redash,M32Media/redash,amino-data/redash,M32Media/redas... | migrations/0010_create_alerts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# import vocabulary\n# from init import init\n# from malware import Malware\n# from threat_exchange_member import ThreatExchangeMember\n# from threat_indicator import ThreatIndicator\n\n```\n\nApply this change: Add an `__all__` array to ex... | python | edit | 1 | 0 | bsd-3-clause | e812791b42c16a809e9913d682562804f5335be6 | theCatWisel/ThreatExchange,theCatWisel/ThreatExchange,mgoffin/ThreatExchange,theCatWisel/ThreatExchange,RyPeck/ThreatExchange,mgoffin/ThreatExchange,tiegz/ThreatExchange,mgoffin/ThreatExchange,tiegz/ThreatExchange,tiegz/ThreatExchange,wxsBSD/ThreatExchange,RyPeck/ThreatExchange,RyPeck/ThreatExchange,theCatWisel/ThreatE... | pytx/pytx/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logging import getLogger\nfrom pkg_resources import get_distribution\n\nfrom django import apps\n\nlog = getLogger(__name__)\n\n\nclass AppConfig(apps.AppConfig):\n name = \"axes\"\n initialized = False\n\n @classmethod\n d... | python | edit | 1 | 6 | mit | 122f38717170766473df4dffd79632f90b3d41ad | jazzband/django-axes | axes/apps.py | rejected_duplicate | Near-duplicate of sample 2679 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nsys.path.insert(0,\".\")\nimport unittest\nimport neuroml\nimport neuroml.writers as writers\nimport PyOpenWorm\nfrom PyOpenWorm import *\nimport networkx\nimport rdflib\nimport rdflib as R\nimport pint as Q\nimport os\nimport s... | python | edit | 21 | 1 | mit | 6848b3ad8709a16a520ba1db1aa6eb94c201728f | gsarma/PyOpenWorm,openworm/PyOpenWorm,openworm/PyOpenWorm,gsarma/PyOpenWorm | tests/ExperimentTest.py | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Yifan Peng'\n\n__version__ = '1.0.0-SNAPSHOT'\n\nfrom bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \\\n BioCRelation, BioCLocation, BioCNode, parse, merge, validate\nfrom iterparse im... | python | edit | 1 | 0 | bsd-3-clause | e02d1ffc989b81cadaf6539685388b421444a4a4 | yfpeng/pengyifan-pybioc,yfpeng/bioc | bioc/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom boolean import *\n\ndef graphColouring2SAT(G, k):\n conj = []\n for i in range(len(G)):\n conj.append(Or(*((i, j) for j in range(k))))\n for j in range(k):\n for jj in range(j+1, k):\n conj... | python | edit | 10 | 7 | mit | f269b7b5c7b0bb0973f504db1c3605c9ff3ac6da | jaanos/LVR-2016,jaanos/LVR-2016 | tutorials/2017/thursday/graphColouring.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport mock\n\nfrom slackelot.slackelot import SlackNotificationError, send_message\n\n\ndef test_send_message_success():\n \"\"\"Returns True if response.status_code == 200\"\"\"\n with mock.patch('slackelot.slackelot.... | python | edit | 5 | 1 | mit | b18c0f6b732b5adc42f123d83886d260c8278ad5 | Chris-Graffagnino/slackelot | tests/test_slackelot.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom myuw_mobile.views.page import index, myuw_login\nfrom myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact\n\nurlpatterns = patterns('myuw_mobile.view... | python | edit | 5 | 0 | apache-2.0 | 5d1bc24d585c6a51367d322cfaf52a84be05a132 | fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw,fanglinfang/myuw,uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw | myuw_mobile/urls.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# BULKSMS Configuration.\n\n# BULKSMS base url.\nBULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za'\n\n# Credentials required to use bulksms.com API.\nBULKSMS_AUTH_USERNAME = ''\nBULKSMS_AUTH_PASSWORD = ''\n\n# URL for sending single and b... | python | edit | null | null | mit | 27f4499dc11628b2520de65c5f8db6b397d19b69 | tsotetsi/django-bulksms | src/bulksms/settings.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2012 Google Inc. 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\"\"\"\nVerifies that app bundles are rebuilt correctl... | python | edit | 3 | 0 | bsd-3-clause | 02b1611f26f5d6e572e4c818eab8ae4d9bcbcf2f | witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp | test/mac/gyptest-rebuild.py | rejected_duplicate | Near-duplicate of sample 14213 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nwith open(\"src/conf.lua.bak\") as f:\n conf = f.read()\n\n conf = conf.replace(\"t.release = false\",\n \"t.release = true\")\n conf = conf.replace(\"ac1c2db50f1332444fd0caff... | python | edit | 1 | 0 | mit | 2092467a123c380edfadb52aa42ac9f063524f90 | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua | scripts/release_conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n# Thomas Levine, ScraperWiki Limited\n\n'''\nLocal version of ScraperWiki Utils, documentation here:\nhttps://scraperwiki.com/docs/python/python_help_documentation/\n'''\n\nfrom .utils import scrape, pdftoxml, status... | python | edit | 6 | 0 | bsd-2-clause | bb27d997c728542dd3ec883ba44a3fefb126c42e | hudsonkeithl/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,hudsonkeithl/scraperwiki-python | scraperwiki/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport shutil\nimport subprocess\nimport string\nimport random\n\nfrom chunsabot.database import Database\nfrom chunsabot.botlogic import brain\n\nRNN_PATH = Database.load_config('rnn_library_path')\nMODEL_PATH = os.... | python | edit | 1 | 3 | mit | cef38ccaca08b75f271d16a4a007cb5c5f4a93b2 | susemeee/Chunsabot-framework | chunsabot/modules/images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom direct.showbase.ShowBase import ShowBase\n \nclass MyApp(ShowBase):\n \n def __init__(self):\n ShowBase.__init__(self)\n \napp = MyApp()\napp.run()\n\n```\n\nApply this change: Add the rest of Panda3D test program."
},
{
... | python | edit | 1 | 1 | mit | 6f540821e891f49e0f2059757b58d2aa0efdf267 | CheeseLord/warts,CheeseLord/warts | src/panda_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.db.models.signals import post_delete, post_save\nfrom wagtail.wagtailsearch.backends import get_search_backends\nfrom wagtail.wagtailsearch.index import get_indexed_models\nfrom wagtail.wagtail... | python | edit | 1 | 4 | mit | 1cb052fc829f286ecc6f7ea5b230e2b5f37d2062 | OpenCanada/website,OpenCanada/website,OpenCanada/website,OpenCanada/website | core/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom mock import Mock\nfrom .middleware import RewriteNemoURLsMiddleware\n\nclass CartMiddlewareTest(TestCase):\n\n def setUp(self):\n self.middleware = RewriteNemoURLsMiddleware()\n self.r... | python | edit | 3 | 1 | cc0-1.0 | b72af894539ca50d08fa1fa78a5c394fa246323d | kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh | cfgov/transition_utilities/test_middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport unittest\n\ndef setup_django_settings():\n os.chdir(os.path.join(os.path.dirname(__file__), \"..\"))\n sys.path.insert(0, os.getcwd())\n os.environ[\"DJANGO_SETTINGS_MODULE\"]... | python | edit | 1 | 2 | bsd-2-clause | 97f1d671966917d29d20c0afb554aaed69c4f9af | danirus/django-wysihtml5,danirus/django-wysihtml5,danirus/django-wysihtml5 | wysihtml5/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2021, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 39.1.0\n\n\nfrom . import AWSObject,... | python | edit | 1 | 0 | bsd-2-clause | 7c6238e51640794b2812eaf6ca22d3c15dfb90fb | cloudtools/troposphere,cloudtools/troposphere | troposphere/finspace.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport pygame\n\nscreen_size = 640, 480\n\ndef start():\n pygame.init()\n screen = pygame.display.set_mode( screen_size )\n\ndef black_screen():\n pass\n\ndef wait():\n pass\n\ndef shape():\n pass\n\n... | python | edit | 3 | 3 | mit | 1a96377332df63a0dd6bc62d6856ff8aa0d0a018 | andybalaam/redgreen | redgreen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Provides an example of attaching an action on hug server startup\"\"\"\nimport hug\n\ndata = []\n\n\n@hug.startup()\ndef add_data(api):\n \"\"\"Adds initial data to the api on startup\"\"\"\n data.append(\"It's working\")\n\n\n@... | python | edit | 1 | 1 | mit | d4d76ae28ae8aa028c5a06f7499a20644b45b986 | MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug,MuhammadAlkarouri/hug,timothycrosley/hug,timothycrosley/hug | examples/on_startup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom .version import __version__\n\ntry:\n __TYPHON_SETUP__\nexcept:\n __TYPHON_SETUP__ = False\n\nif not __TYPHON_SETUP__:\n from . import arts\n from . import atmosphere\n from . import config\n ... | python | edit | 20 | 1 | mit | 17266889388c6ae45ac5235a8e22900bf169eba3 | atmtools/typhon,atmtools/typhon | typhon/__init__.py | rejected_lint | Too many lint violations: 20 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Craigslist City Scraper\n# By Marshall Ehlinger\n# For sp2015 Systems Analysis and Design\n\nfrom bs4 import BeautifulSoup\nimport requests\nimport re\n\nsoup = BeautifulSoup(requests.get(\"http://www.craigslist.org/about/sites\").text, \... | python | edit | 3 | 0 | mit | b92e7c281f18dc0a3c9c65a995e132c89d9f82f1 | MuSystemsAnalysis/craigslist_area_search,MuSystemsAnalysis/craigslist_area_search | areaScraper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\ntry:\n from django.conf import settings\n from django.test.utils import get_runner\n\n settings.configure(\n DEBUG=True,\n USE_TZ=True,\n DATABASES={\n \"default\": {\n \... | python | edit | 1 | 3 | bsd-3-clause | ab328b71e5ef72211e8ffe8833759854d4342582 | aaronbassett/DisposableEmailChecker | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url\n\nurlpatterns = patterns('avatar.views',\n url('^add/$', 'add', name='avatar_add'),\n url('^change/$', 'change', name='avatar_change'),\n url('^delete/$', 'delete', name='avatar_... | python | edit | 1 | 0 | bsd-3-clause | 22df7a89020cbbcf80a88bcf3572dea591884861 | tbabej/django-avatar,Brendtron5000/django-avatar,Nuevosmedios/django-avatar,stellalie/django-avatar,barbuza/django-avatar,allenling/django-avatar,allenling/django-avatar,tbabej/django-avatar,z4r/django-avatar,imgmix/django-avatar,hexenxp14/django-avatar,MachineandMagic/django-avatar,brajeshvit/avatarmodule,integricho/d... | avatar/urls.py | rejected_duplicate | Near-duplicate of sample 10576 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport time, os, json\nfrom apns import APNs, Frame, Payload\nfrom push.models import DevelopFileModel, ProductFileModel\nfrom django.conf import settings\n\nPEM_FILE_DIR = settings.BASE_DIR + '/push/files/'\n\ndef execute... | python | edit | 3 | 5 | apache-2.0 | f37d26541d6baf3da47a8f373a8c7a65177067db | nnsnodnb/django-mbaas,nnsnodnb/django-mbaas,nnsnodnb/django-mbaas | push/modules/push_notification.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module implements different strategies to resolve the current Organization we are using.\n\nBy default we use the simple single_org strategy, which assumes you have a\nsingle Organization in your installation.\n\"\"\"\n\nimport... | python | edit | 1 | 2 | bsd-2-clause | bf2366bf1caae7671fad09199da3c5d6aff1b790 | moritz9/redash,stefanseifert/redash,moritz9/redash,imsally/redash,EverlyWell/redash,crowdworks/redash,crowdworks/redash,hudl/redash,stefanseifert/redash,alexanderlz/redash,rockwotj/redash,chriszs/redash,vishesh92/redash,stefanseifert/redash,imsally/redash,hudl/redash,hudl/redash,vishesh92/redash,getredash/redash,useabo... | redash/authentication/org_resolving.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os.path\nimport sys\n\nfrom . import util\n\n\nclass SSHKey(object):\n @staticmethod\n def rebuild_authorized_keys():\n lines = []\n ssh_dir = os.path.expanduser('... | python | edit | 1 | 3 | mit | e01e5cca84c3eeb04d20b3a91bbb44d688418bf3 | fintura/pyPaaS,fintura/pyPaaS | pypaas/sshkey.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Revert \"Added to allow local imports.\"\n\nThis reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d."
},
{
"role": "assistant",
"content": "# Copyright 2015 Jarrod N. Bakker\n#\n# Licensed under the Apache License, Version 2... | python | new_file | 1 | 0 | apache-2.0 | dd0ceaaadbdb401e2423fbc3b7c395a117a2ef79 | bakkerjarr/ACLSwitch,bakkerjarr/ACLSwitch | Command_Line_Interface/__init__.py | rejected_duplicate | Near-duplicate of sample 3094 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport tkinter\nfrom tkinter import font\nfrom test.support import requires, run_unittest\nimport tkinter.test.support as support\n\nrequires('gui')\n\nclass FontTest(unittest.TestCase):\n\n def setUp(self):\n sup... | python | edit | 3 | 2 | mit | 91db70d1fc266e3e3925e84fcaf83410e0504e37 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/tkinter/test/test_tkinter/test_font.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"git_branch\n\nRevision ID: 1c398722878\nRevises: f8d315a31e\nCreate Date: 2015-10-18 00:38:22.737519\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '1c398722878'\ndown_revision = 'f8d315a31e'\nbranch_labels = None\n... | python | edit | 1 | 1 | isc | 3aa327ad470d772c0c487a11e8dce7e256e9f14d | RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI | alembic/versions/1c398722878_git_branch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# The purpose of this file is to provide base classes with the needed functions\n# already defined; this allows us to guarantee that any exceptions raised\n# during function calls are a problem with the module and not just that the\n# parti... | python | edit | 1 | 1 | bsd-3-clause | b178b2622aff7da7e7d4b6730f5d1c98680b1266 | Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd | txircd/modbase.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.