messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\nfrom time import sleep\n\nclass APIQuerier:\n\n def __in...
python
edit
1
4
bsd-3-clause
63a539ff4a3a832286136c40a74b1a8b3db1a5c0
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/api/uri/api_querier.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.view import view_config\n\nfrom social.utils import module_member\nfrom social.actions import do_auth, do_complete, do_disconnect\nfrom social.apps.pyramid_app.utils import psa, login_required\n\n\n@view_config(route_name='soci...
python
edit
1
1
bsd-3-clause
8aca599083f69fbc4427f608554d4035c7d2dccf
fearlessspider/python-social-auth,cjltsod/python-social-auth,python-social-auth/social-app-django,tobias47n9e/social-core,python-social-auth/social-core,python-social-auth/social-app-django,python-social-auth/social-storage-sqlalchemy,fearlessspider/python-social-auth,python-social-auth/social-app-cherrypy,cjltsod/pyth...
social/apps/pyramid_app/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\nfrom sphinxwrapper import build\n\n__author__ = 'Ash Wilson'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\n\ndef main():\n sys.exit(build(sys.argv))\n\n\nif __name__ == '__main__':\n main()\n\...
python
edit
1
1
apache-2.0
f413f5bc2015843a4e74dd969d56bc54f9dbba4e
deconst/preparer-sphinx,ktbartholomew/preparer-sphinx,smashwilson/deconst-preparer-sphinx,deconst/preparer-sphinx,ktbartholomew/preparer-sphinx
deconstrst/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial update permissions after migration" }, { "role": "assistant", "content": "\"\"\"\nScript for create/update app permissions after migrations\nAuthor: Shirlei Chaves - <EMAIL>\nVersion 1.0 - 03/2015\n\nwith ideas from h...
python
new_file
4
7
apache-2.0
68e4cddb0e66bf75f13c0d9ee0e8064acc2c1cd1
shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server
heliosinstitution/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport time\nimport machinepark as mp\n\n\nif __name__ == \"__main__\":\n \n machine_ids = mp.machines_list()\n\n sample = {'env': {} }\n \n for mid in machine_ids:\n sample[mid] = {}\n ...
python
edit
1
0
apache-2.0
3aa233e0fcf7dea1e089a4bf03197c31b098b5de
andreynech/iotchallenge,andreynech/iotchallenge
apitest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# PYTHON_ARGCOMPLETE_OK\n\"\"\"The stagpy module is callable\"\"\"\n\nfrom . import config\n\n\ndef main():\n \"\"\"StagPy entry point\"\"\"\n args = config.parse_args()\n args.func(args)\n\nif __name__ == '__main__':\n main()\n...
python
edit
1
1
apache-2.0
44e64c4f0c0296015fb124cddf87bea2188559fe
StagPython/StagPy
stagpy/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Compress string using counts of repeated characters\n\ndef compress_str(str):\n\toutput = \"\"\n\tcurr_char = \"\"\n\tchar_count = \"\"\n\n\tfor i in str:\n\n\t\tif curr_char != str[i]:\n\t\t\toutput = output + curr_char + char_count # ad...
python
edit
2
3
mit
b2f6d9c5fec4316dbceb25bd91cb5831065c1957
derekmpham/interview-prep,derekmpham/interview-prep
string/compress.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nModule defining views for the JASMIN notifications app.\n\"\"\"\n\n__author__ = \"Matt Pryor\"\n__copyright__ = \"Copyright 2015 UK Science and Technology Facilities Council\"\n\nfrom django.views.decorators.http import require_safe...
python
edit
3
5
mit
519d1f23682b6815c41c2ac34df775ea2e333eab
cedadev/jasmin-notifications,cedadev/jasmin-notifications
jasmin_notifications/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\nimport tensorflow as tf\n\nfrom ..util import static_shape, funcname_scope\nfrom .embeddings_to_embedding import embeddings_to_embedding\n\n\n\n@funcname_scope\ndef bidirectional_embeddings_to_embedding(child_embeddings,\n...
python
edit
3
1
unlicense
fdf132c0b7cba6bd00f855b54ab354462c924b5c
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/embedding/bidirectional_embeddings_to_embedding.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#\n# An HTTP client that checks that the content of the response has at least\n# Content-Length bytes.\n#\n# For requests 2.x (not needed for requests 3.x).\n#\n\nimport requests\nimport sys\n\nresponse = requests.ge...
python
edit
1
0
bsd-3-clause
f4415c9ba2df6f0cd511986d78e454194017db2e
s3rvac/blog,s3rvac/blog,s3rvac/blog,s3rvac/blog
en-2018-04-22-on-incomplete-http-reads-and-the-requests-library-in-python/clients/python/client-with-check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\nimport logging\n\nfrom jetcomcrawl import browser\nimport jetcomcrawl.libs.queue\n\n\nclass Worker(object):\n def __init__(self):\n self.queue_categories = jetcomcrawl.libs.queue.Queue('queue_categor...
python
edit
1
5
mit
12b3c2e99878a586602410a599d18fdebd0f4a3c
tdickman/jetcom-crawl
jetcomcrawl/modes/items.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# EForge project management system, Copyright © 2010, Element43\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the abov...
python
edit
5
0
isc
ccdb5001a450859ae9eb85f1c2c90a9a80fa0ce1
oshepherd/eforge,oshepherd/eforge,oshepherd/eforge
eforge/wiki/urls.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nimport six\n\nif six.PY2:\n import unittest2 as unittest\nelse:\n import unittest\n\n\ndef main():\n # Configure python path\n parent = os.path.dirname(os.path.abspath(__file__))\n ...
python
edit
1
4
bsd-3-clause
e2574515d9879a5aa023df949031370969dc896c
andreif/djedi-cms,andreif/djedi-cms,5monkeys/djedi-cms,5monkeys/djedi-cms,andreif/djedi-cms,5monkeys/djedi-cms
runtests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add generic grid search function" }, { "role": "assistant", "content": "\"\"\" Functions for determinig best-fit template parameters by convolution with a\ngrid \"\"\"\n\nimport dem\nimport WindowedTemplate as wt\nimport numpy as...
python
new_file
22
4
mit
a576432d045d14308012a4eaa6eaeb12fe004a37
rmsare/scarplet,stgl/scarplet
scarplet.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# coding: utf-8\n\n### An example to demostrate the usage of make boolean function.\n\n# In[1]:\n\nfrom __future__ import print_function\nfrom BinPy.algorithms.makebooleanfunction import *\n\n\n# In[2]:\n\n# Usage of make_boolean() functi...
python
edit
4
0
bsd-3-clause
a61148a71a022b6877af0445f799f3dfa3eb6136
daj0ker/BinPy,rajathkumarmp/BinPy,yashu-seth/BinPy,BinPy/BinPy,rajathkumarmp/BinPy,BinPy/BinPy,daj0ker/BinPy,yashu-seth/BinPy
BinPy/examples/source/algorithms/make_boolean_function_example.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport json\n\nimport SocketExtend as SockExt\nimport config as conf\nimport parser as p\n\ndef ping(sock):\n\ttry:\n\t\trand = random.randint(1, 99999)\n\t\tdata = {'request':'ping', 'contents': {'value':rand}}\n\t\tSockExt....
python
edit
4
4
bsd-2-clause
0d37ada90d4648f1e45cc3aa95dace014a26c599
mavroudisv/Crux
components/includes/utilities.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.db.models.signals import pre_save, post_save\nfrom django.dispatch import receiver\nfrom django.contrib.auth.models import User\nfrom django.conf import settings\n\nimport markdown\nimport bleach\n\...
python
edit
1
2
bsd-3-clause
98393be0011f4e4227e6f5e86db68533af8b78e0
siggame/webserver,siggame/webserver,siggame/webserver
webserver/profiles/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom redbot.message import headers\n\n\nclass x_pad(headers.HttpHeader):\n canonical_name = \"X-Pad\"\n description = \"\"\"\\\n The `%(field_name)s` header is used to \"pad\" the response header size.\n\n V...
python
edit
1
0
mit
2515a49f3ceae6de3e3de68bac9ec3f12fc2eba8
mnot/redbot,mnot/redbot,mnot/redbot
redbot/message/headers/x_pad.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\ndef getUserFilesDirectory():\n exe = sys.executable\n if hasattr(sys, 'frozen'):\n folder = os.path.dirname(exe)\n else:\n script = sys.argv[0]\n if exe.endswith(\"python\") or exe.ends...
python
edit
1
5
bsd-3-clause
fe7e841c166ebc227e00baca4c8a72fb04ce0693
Rubisk/mcedit2,vorburger/mcedit2,vorburger/mcedit2,Rubisk/mcedit2
src/mcedit2/util/directories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom reviewboard.hostingsvcs.service import HostingService\n\n\nclass FakeHostingService(HostingService):\n \"\"\"A hosting service that is not provided by Review Board.\n\n Fake hosting serv...
python
edit
1
0
mit
72dcd015a001dc86cde96d35e5f25f88904f9715
chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard
reviewboard/hostingsvcs/fake.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render,render_to_response\nfrom django.template import RequestContext\n\nfrom new_buildings.models import Builder, ResidentalComplex, NewApartment\nfrom feedback.models import Feedback\nfrom company.views import...
python
edit
7
1
mit
170293123c89696bbdcfca0cbc72233ea03f90c8
Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency
real_estate_agency/real_estate_agency/views.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) Metakernel Development Team.\n# Distributed under the terms of the Modified BSD License.\n\n\nfrom metakernel import Magic\nimport os\n\nclass CDMagic(Magic):\n\n def line_cd(self, path):\n \"\"\"\n %cd PATH...
python
edit
1
3
bsd-3-clause
2a00e0b25ebbcac58b7e65efbfcd88bd0539c3e7
Calysto/metakernel
metakernel/magics/cd_magic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom random import random\nimport logging\n\nfrom django.conf import settings\nfrom django.utils.importlib import import_module\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.co...
python
edit
1
3
mit
ca43f30998290193290177f4c55c1c8577123974
mdj2/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,mdj2/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils
arcutils/sessions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Tests for dakota.dakota_base module.\n#\n# Call with:\n# $ nosetests -sv\n#\n# Mark Piper (<EMAIL>)\n\nimport os\nimport filecmp\nfrom nose.tools import *\nfrom dakota.dakota_base import DakotaBase\n\n\n# Fixtu...
python
edit
12
1
mit
21c7232081483c05752e6db3d60692a04d482d24
csdms/dakota,csdms/dakota
dakota/tests/test_dakota_base.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2010 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\nfrom autotest_lib.client.cros import chrome_test\n\nclass desktopui_S...
python
edit
1
1
bsd-3-clause
b597956cd427a3b830a498c69602753ce6117119
dednal/chromium.src,Jonekee/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,keishi/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,dushu1203/chromium.src,dednal/chromium.src,chuan9/chromi...
chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
rejected_duplicate
Near-duplicate of sample 17643
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport json\nimport codecs\n\nimport zipimport\nimporter = zipimport.zipimporter('landmark.mod')\nextraction = importer.load_module('extraction')\npostprocessing = importer.load_module('postprocessing')\...
python
edit
14
0
apache-2.0
9fcff13a4438268aa76cf2817bca1086258a083b
usc-isi-i2/landmark-extraction,usc-isi-i2/landmark-extraction,usc-isi-i2/landmark-extraction
src/mr_landmark_mapper.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom stella import stella\nfrom random import randint\nfrom test import *\n\ndef return_bool(): return True\ndef return_arg(x): return x\ndef equality(a,b): return a==b\n\ndef test1():\n make_eq_test(return_bool,...
python
edit
11
1
apache-2.0
5a4ff0b4da37a97e6ef86074dde63b47ba553ad8
squisher/stella,squisher/stella,squisher/stella,squisher/stella
test/typing.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Wait up to 30 seconds for postgres to be available.\n\nThis is useful when running in docker, as the first time we create a\npostgres volume it takes a few seconds to become ready.\n\n\"\"\"\nimport time\nfrom os import environ\nimpor...
python
edit
2
0
mit
76981dc76d17b51c73682f84ba94ae4d6329d66d
ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing
scripts/wait_for_postgres.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.test import TestCase\n\nfrom ansible.models import Playbook\n\n\nclass PlaybookListViewTest(TestCase):\n fixtures = ['initial_data.json']\n\n def test_view_url_exists_at_desire...
python
edit
3
1
bsd-3-clause
a149c8664ed8f44ab9118a85440d95239362edf2
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/ansible/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef check_argv(argv):\n \"\"\"Check if arguments are ok.\n\n When executing, there must be argument switch for test/live.\n There also must be filename.\n Method returns set(is_correct, filename, is_test)\n \"\"\"``\n pyth...
python
edit
4
5
mit
21b91eeade40d750da12cc42e89ab157911ed403
ThePavolC/CleanJira
src/utils/run_check.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .apps import ditto_apps\nfrom ..flickr import app_settings\n\n\ndef ditto(request):\n return {\n 'enabled_apps': ditto_apps.enabled(),\n 'DITTO_FLICKR_USE_LOCAL_MEDIA':\n app_settings...
python
edit
3
1
mit
4c00345ec0a66363d3b9d7e423e2fcd19aa2a307
philgyford/django-ditto,philgyford/django-ditto,philgyford/django-ditto
ditto/core/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport sys, os\nfrom re import sub\nimport zipfile, json\n\n# from pyspark import SparkContext\n# from pyspark.sql import SQLContext\n# from pyspark.sql import Row\n# from pyspark.sql.types import St...
python
edit
1
4
apache-2.0
812f1fec796e4c7d86731d5e3e91293fb1b0296b
ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim
scripts/europeana-meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import widgets\nfrom django.utils.safestring import *\n\n# See static/js/querywidget.js\nclass QueryWidget(widgets.Textarea):\n def __init__(self, attrs=None):\n default_attrs = {'class': \"queryWidget\"}\n ...
python
edit
3
2
mit
760a952851664232b11ad95acb8884dda59308a4
iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview
sysrev/widgets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n```\n# 1.\n$ cp -r ~/.zipline/data/quandl-xjpx/2016-12-28T08\\;14\\;58.046694 \\\n /tmp/quandl-xjpx/\n\n# 2.\n$ python transform_quandl_xjpx_archive.py\n```\n\"\"\"\nimport tarfile\n\n\nwith tarfile.o...
python
edit
1
0
apache-2.0
7f41a424143334a8c8e1ccbd768c911f8e6ffb31
magne-max/zipline-ja,magne-max/zipline-ja
transform_quandl_xjpx_archive.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# tests.test_set_pref\n\nimport nose.tools as nose\nimport yvs.set_pref as yvs\n\n\ndef test_set_language():\n \"\"\"should set preferred language\"\"\"\n new_language = 'es'\n yvs.main('language:{}'.format(new_language))\n user...
python
edit
1
1
mit
0ec5aeca33676172f458ec6761282157dcb19635
caleb531/youversion-suggest,caleb531/youversion-suggest
tests/test_set_pref.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc...
python
edit
3
0
bsd-3-clause
a5beccfa3574f4fcb1b6030737b728e65803791f
anntzer/numpy,charris/numpy,mattip/numpy,endolith/numpy,mhvk/numpy,charris/numpy,mhvk/numpy,jakirkham/numpy,seberg/numpy,endolith/numpy,pdebuyl/numpy,jakirkham/numpy,rgommers/numpy,seberg/numpy,numpy/numpy,rgommers/numpy,anntzer/numpy,charris/numpy,pdebuyl/numpy,endolith/numpy,mhvk/numpy,seberg/numpy,endolith/numpy,rgo...
numpy/array_api/_typing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Common fixtures and configurations for this test directory.\"\"\"\nimport os\nimport shutil\nimport sys\n\nimport pytest\n\n\n@pytest.fixture('module')\ndef cwd_module_dir():\n \"\"\"Change current directory to this module's folder...
python
edit
1
1
bsd-3-clause
6c497109cee9c3fa69ca9be118f8546f7696a937
pyecore/pyecoregen
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth import authenticate, get_user_model\nfrom django.core import mail\n\nUser = get_user_model()\n\n\nclass TestEmailAuthBackendWhenUsersShareAnEmail(TestCase):\n\n def test_authenti...
python
edit
1
2
bsd-3-clause
9d65dbb84126a26e8e6dfe31179087f75134f564
jinnykoo/wuyisj.com,josesanch/django-oscar,itbabu/django-oscar,kapt/django-oscar,Jannes123/django-oscar,nickpack/django-oscar,bnprk/django-oscar,marcoantoniooliveira/labweb,lijoantony/django-oscar,ahmetdaglarbas/e-commerce,marcoantoniooliveira/labweb,itbabu/django-oscar,manevant/django-oscar,bschuon/django-oscar,faratr...
tests/integration/auth_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport base64\nimport betamax\nimport os\n\ncredentials = [os.environ.get('GH_USER', 'foo').encode(),\n os.environ.get('GH_PASSWORD', 'bar').encode()]\n\nwith betamax.Betamax.configure() as config:\n config.cassette_library...
python
edit
1
0
bsd-3-clause
e743bcddbc53d51142f3e1277919a3f65afaad90
sigmavirus24/github3.py,agamdua/github3.py,christophelec/github3.py,jim-minter/github3.py,ueg1990/github3.py,degustaf/github3.py,balloob/github3.py,h4ck3rm1k3/github3.py,icio/github3.py,wbrefvem/github3.py,krxsky/github3.py,itsmemattchung/github3.py
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom xml.etree.ElementTree import ParseError\nimport xml.etree.ElementTree as ET\nimport glob\nimport sys\n\ndef eprint(*args, **kwargs):\n print(*args,...
python
edit
1
4
apache-2.0
7756236c5e1fa70f1173dbd58b7e57f56214c19f
wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework
unitTestUtils/parseXML.py
rejected_duplicate
Near-duplicate of sample 3525
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA set of classes used to dynamically wrap FAUST DSP programs in Python.\n\nThis package defines three types:\n- PythonUI is an implementation of the UIGlue C struct.\n- FAUSTDsp wraps the DSP struct.\n- FAUST integrates the other tw...
python
edit
2
0
mit
166ca44e70221e35a8e0bd36b5b21ba51f7032ca
marcecj/faust_python
FAUSTPy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nsetup(\n name='WsgiService',\n version='0.2',\n description=\"A lean WSGI framework for easy creation of REST services\",\n author=\"Patrice Neff\",\n url='http://github.com/pneff/...
python
edit
1
0
bsd-2-clause
cea8c101c64a33b2daedc9b8561a7d8e38f0b958
pneff/wsgiservice,beekpr/wsgiservice
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nImport COUNCIL\n\"\"\"\nimport sys\n\nfrom data_collection.management.commands import BaseShpShpImporter\n\nclass Command(BaseShpShpImporter):\n \"\"\"\n Imports the Polling Station data from COUNCIL\n \"\"\"\n council_i...
python
edit
3
1
bsd-3-clause
1916d1effbad1a26b95594b909c30b3732df3580
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_shape_shape.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\nimport time\n\n\nDEFAULT_SLEEP = 0.01\n\n\nclass CustomError(Exception):\n pass\n\n\ndef defer(callback, *args, **kwargs):\n sleep = kwargs.pop('sleep', DEFAULT_SLEEP)\n expected_return = kwargs.pop('expected_retu...
python
edit
1
3
mit
7ab7eae4254f8ee62b3a8620982c72b07c2299e4
FichteFoll/resumeback
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\n\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nclassifiers = [\n 'Development Status :: 4 - Beta',\n 'License :: OSI Approved :: BSD License',\n 'Programming Language :: Pyt...
python
edit
4
0
bsd-2-clause
680e8472416e71da5fff41032db49398f62e52d7
getwarped/powershift-cli,getwarped/powershift-cli
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\nfrom os import path\n\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, 'README.rst'), encoding='utf-8') as f:\n long...
python
edit
1
0
apache-2.0
071d8df8a985c77397c5b2caf27722101aaefea1
vurmux/gorynych
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='planet_alignment',\n version='1.0.0',\n packages=['planet_alignment', 'planet_alignment.test'],\n url='https://github.com/paulfanelli/planet_alignment.git',\n license='MIT',\...
python
edit
1
0
mit
2ceb5601a98b825276d6199a140277c18c2e4c5d
paulfanelli/planet_alignment
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\n\nwith open('requirements.txt') as fobj:\n install_requires = [line.strip() for line in fobj]\n\n\nwith open('README.rst') as fobj:\n long_description = fobj.read()...
python
edit
1
0
apache-2.0
8e24be46bfcb59dc8a4a9ba8d73f21aa32d18683
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import path\n\nfrom setuptools import setup, find_packages\n\nhere = path.abspath(path.dirname(__file__))\n\n# with open(path.join(here, 'README.rst'), encoding='utf-8') as f:\n# long_description = f.read()\n\nsetup(\n name='E...
python
edit
1
0
mit
6463ae4da70e27d85a6036d5094548679742a2fe
SetBased/py-etlt
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom setuptools import setup, find_packages\n\nrequires = ['six']\n\nif sys.version_info[0] == 2:\n requires += ['python-dateutil>=1.0, <2.0, >=2.1']\nelse:\n # Py3k\n requires += ['python-dateu...
python
edit
1
0
apache-2.0
15c7cc3cf1599efa65896e7138f3015e68ae5998
spulec/freezegun,Affirm/freezegun,adamchainz/freezegun,Sun77789/freezegun
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nsetup(\n name='wagtailcodeblock',\n version=\"0.2.2\",\n description='Wagtail Code Block provides PrismJS syntax highlighting in Wagtail.',\n long_description='A work-in-progress alph...
python
edit
1
0
bsd-3-clause
22cb266fcec5c0b3b299a3a974e79810d5ecdbaf
FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nfrom setuptools import setup\n\ndescription = \"\"\"\nSimple, powerfull and nonobstructive django email middleware.\n\"\"\"\n\nsetup(\n name=\"djmail\",\n url=\"https://github.com/niwibe/djmail\",\n aut...
python
edit
1
0
bsd-3-clause
146aedd8b65c1fb110f16579bd812d7adad3cc1f
CloudNcodeInc/djmail,CloudNcodeInc/djmail,CloudNcodeInc/djmail
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport codecs\nfrom setuptools import setup, find_packages\n\nfrom axes import get_version\n\nsetup(\n name='django-axes',\n version=get_version(),\n description=\"Keep track of faile...
python
edit
1
0
mit
f1474d683b068356567e316c7a1fa177404ae7ab
django-pci/django-axes,jazzband/django-axes
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nsetup(name='cc.license',\n version='0.01',\n description=\"License selection based on ccREL-based metadata.\",\n classifiers=[],\n keywords='',\n author...
python
edit
4
0
mit
2b5a13a32dce747d9dc9f5611aadf40969239cf0
creativecommons/cc.license,creativecommons/cc.license
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom setuptools import setup, find_packages\n\nfrom oscar_support import get_version\n\n\ndef location(path):\n return os.path.join(os.path.dirname(__file__))\n\n\nsetup(\n name='django-oscar-suppor...
python
edit
1
0
bsd-3-clause
2320fba5befcca313626fac1572b5245f454d675
snowball-one/django-oscar-support,snowball-one/django-oscar-support,snowball-one/django-oscar-support
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nimport os\nimport re\n\n\ndef read(*parts):\n here = os.path.abspath(os.path.dirname(__file__))\n with open(os.path.join(here, *parts)) as f:\n return f.read()\n\nVERSION = re.sear...
python
edit
1
1
mit
518fdf73b0d009f8bbe46054154f293ba209a544
inglesp/http-crawler,inglesp/http-crawler,inglesp/http-crawler
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='gears-coffeescript',\n version='0.1.dev',\n url='https://github.com/gears/gears',\n license='ISC',\n author='Mike Yumatov',\n author_email='<EMAIL>',\n des...
python
edit
1
1
isc
f891dbeca1b9c3cd23bcb1b70ebad149a8f57d4b
gears/gears-coffeescript,gears/gears-coffeescript
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom distutils.core import setup\nimport pypandoc\n\nlong_description = pypandoc.convert('README.md', 'rst')\n\nsetup(\n name='robber',\n version='1.0.0',\n description='BDD / TDD ass...
python
edit
1
0
mit
1f5183c345444f35891927014d92510b66b96f5b
vesln/robber.py,taoenator/robber.py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ncur_dir = os.path.dirname(__file__)\nreadme = os.path.join(cur_dir, 'README.md')\nif os.path.exists(readme):\n with open(readme) as fh:\n long_de...
python
edit
1
0
mit
b99fa752feceded0ff6ea1e46e1966ceb76abff2
coleifer/walrus
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='jobcli',\n version='0.1.a1',\n py_modules=['jobcli'],\n install_requires=['click', 'requests',],\n entry_points={'console_scripts':['jobcli=jobcli:cli',]},\n url='https://www....
python
edit
1
0
mit
8684e06ed7056171d86ccdb5943bdf28c518c589
jobcli/jobcli-app,jobcli/jobcli-app
setup.py
rejected_duplicate
Near-duplicate of sample 20311
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',...
python
edit
1
2
mit
56cd2b9804718caeb8728c3b01fb6f0bc0f2d0d4
Doist/todoist-python
setup.py
rejected_duplicate
Near-duplicate of sample 2235
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom glob import glob\nfrom distutils.core import setup\n\n\nsetup(\n name='whisper',\n version='0.9.10',\n url='https://launchpad.net/graphite',\n author='Chris Davis',\n author_email='<EMAIL>',\n ...
python
edit
3
0
apache-2.0
c1eafa32f9fafa859a0fcaf047f4a80b9bc52969
penpen/whisper,deniszh/whisper,graphite-server/whisper,alexandreboisvert/whisper,akbooer/whisper,graphite-project/whisper,cbowman0/whisper,piotr1212/whisper,kerlandsson/whisper,obfuscurity/whisper
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFlask-Twilio\n-------------\n\nMake Twilio voice/SMS calls with Flask\n\"\"\"\nfrom setuptools import setup\nexec(open('flask_twilio.py').readline())\n\n\nsetup(\n name='Flask-Twilio',\n version=__version__,\n url='http://e...
python
edit
2
0
bsd-3-clause
22ea99b8183f11c3fc9f39810892256a2989ced5
lpsinger/flask-twilio
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport os\n\nimport imbox\n\nversion = imbox.__version__\n\n\ndef read(filename):\n return open(os.path.join(os.path.dirname(__file__), filename)).read()\n\nsetup(\n name='imbox',\n version=version,\n ...
python
edit
1
1
mit
203cb874331a5df40d297ed6143b75ddbf8cda1e
martinrusev/imbox
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rtmbot.core import Plugin\n\n\nclass ShutupSlackbot(Plugin):\n def process_message(self, data):\n if data[\"text\"] in [\"Bpye Berg Nyberg\"]:\n self.outputs.append([data[\"channel\"], \"Hold kjeft, slackbot...\"])...
python
edit
1
2
mit
04e111ff36d1c2769bca74d4271cbaa996dd2bae
RadioRevolt/SlackBot
plugins/shutup_slackbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom _botan import *\n\ninit = LibraryInitializer()\n\nclass SymmetricKey(OctetString):\n pass\n\nclass InitializationVector(OctetString):\n pass\n\ndef Filter(name, key = None, iv = None, dir = None):\n if key != None and iv != No...
python
edit
10
7
bsd-2-clause
efaeb8fe4458cd6b214896ad72f3d41c25c23313
Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randomb...
misc/python/botan/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='gdcdatamodel',\n packages=find_packages(),\n install_requires=[\n 'pytz==2016.4',\n 'graphviz==0.4.2',\n 'jsonschema==2.5.1',\n 'psqlgraph',\...
python
edit
1
0
apache-2.0
27a9d12b7547c7a14f30c2c06c52e311a960f3ac
NCI-GDC/gdcdatamodel,NCI-GDC/gdcdatamodel
setup.py
rejected_duplicate
Near-duplicate of sample 626
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nTest for the tcv module\n\"\"\"\n\n```\n\nApply this change: Add an empty placeholder tests." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: u...
python
edit
1
1
isc
749c1254a240053d2ca2abb1cc88d5eb7ae284eb
wagdav/tcvpy
tests/test_tcv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nCamoco Library - CoAnalysis of Molecular Components\n\nCacheMoneyCorn\n\n\"\"\"\n\n__license__ = \"\"\"\n Creative Commons Non-Commercial 4.0 Generic\n http://creativecommons.org/licenses/by-nc/4.0/\n\"\"\"\n\n__version__ = ...
python
edit
22
0
mit
5edc89f4ba516ba497f2b171bba865487116bbe0
schae234/Camoco,schae234/Camoco
camoco/__init__.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.conf.urls import url\n\nfrom eb_sqs.views import process_task\n\napp_name = 'eb_sqs'\nurlpatterns = [\n url(r'^process$', process_task, name='process_task'),\n]\n\n`...
python
edit
1
0
mit
3a37211f09c000f0fcb41ca076cb98b90bfae030
cuda-networks/django-eb-sqs,cuda-networks/django-eb-sqs
eb_sqs/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections, copy, queue\nfrom . import control\nfrom .. util import artnet_message, log, server_cache, udp\n\nQUEUE_TIMEOUT = 0.1\n\n\nclass ArtNet(control.ExtractedControl):\n def __init__(self, *args, ip_address, port=artnet_me...
python
edit
6
1
mit
d1c1d257a3fb54c6acef4c66c8ed639f48a0c426
rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel
bibliopixel/control/artnet.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dataitem import DataItem\n\nclass DataFile(DataItem):\n def __init__(self, name, access, owner):\n super(DataFile, self).__init__(name, access, owner, \"datafile\")\n self.checksum = \"\"\n self.size = 0\n ...
python
edit
1
1
mit
72a5d74496d8cfd3d2216ac9b5f5ef2d4b054ed0
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/loader/model/datafile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom distutils.version import LooseVersion\nimport matplotlib as mpl\n\n\nfrom ..gui import PVSlicer\n\nfrom .test_slicer import make_test_hdu\n\ntry:\n import PyQt5\n PYQT5OK = True\nexcept ImportError:\n PYQT5OK = ...
python
edit
1
2
bsd-3-clause
5cd66754dc4a53bf9e0631733541c2ed5e4be06e
radio-astro-tools/pvextractor,keflavich/pvextractor
pvextractor/tests/test_gui.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wex.url import URL\n\nexpected_lines = [\n b\"FTP/1.0 200 OK\\r\\n\",\n b\"X-wex-url: ftp://anonymous:<EMAIL>/pub/site/README\\r\\n\",\n b\"\\r\\n\",\n b\"This directory contains files related to the operation of the\\n\",\...
python
edit
1
2
bsd-3-clause
1270c31dcf35c17a26a282605d2e04ffd2e8d985
eBay/wextracto,gilessbrown/wextracto,gilessbrown/wextracto,eBay/wextracto
tests/test_ftp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pylons import c, g\n\nfrom r2.lib.pages import Ads as BaseAds\n\n\nclass Ads(BaseAds):\n def __init__(self):\n BaseAds.__init__(self)\n adzerk_test_srs = g.live_config.get(\"adzerk_test_srs\")\n if adzerk_test_s...
python
edit
1
4
bsd-3-clause
90d933a957509da4189b8f793e27ac563b73264b
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
reddit_adzerk/adzerkads.py
rejected_duplicate
Near-duplicate of sample 12480
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013-2014 DataStax, 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.apa...
python
edit
1
0
apache-2.0
4cfa123da2ccf416e2cb7e4bd9bc0c189a06081b
jregovic/python-driver,thobbs/python-driver,mobify/python-driver,stef1927/python-driver,stef1927/python-driver,coldeasy/python-driver,thelastpickle/python-driver,beobal/python-driver,bbirand/python-driver,HackerEarth/cassandra-python-driver,yi719/python-driver,HackerEarth/cassandra-python-driver,thelastpickle/python-dr...
tests/__init__.py
rejected_duplicate
Near-duplicate of sample 19026
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport subprocess\nimport sys\n\ndef execute_command(target):\n os.chdir(target)\n command = sys.argv[1:]\n try:\n subprocess.check_call(command)\n except Excepti...
python
edit
3
3
bsd-3-clause
7aa1875f9e542ae539729730cf9457e78d8b775b
darylyu/walker,darylyu/walker
walker/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib.request import urlopen\n\n\ndef fetch_words():\n with urlopen('http://sixty-north.com/c/t.txt') as story:\n story_words = []\n for line in story:\n line_words = line.decode('utf-8').split()\n ...
python
edit
1
4
mit
d1c5e7971814d5aeedec11bb7610680a4c5a0000
kentoj/python-fundamentals
text_processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nimport docflow\nfrom werkzeug.exceptions import Forbidden\n\n__all__ = ['WorkflowStateException', 'WorkflowTransitionException',\n 'WorkflowPermissionException', 'Workflo...
python
edit
2
4
bsd-2-clause
52a95cb48d0829d864d25b5e8c380c0e58d51b16
hasgeek/coaster
coaster/docflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2011 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\n\"\"\"Top-level presubmit script for GYP.\n\nSee http://dev.chromiu...
python
edit
1
1
bsd-3-clause
ef27b615702d9ce84db9087898c1f66286e66cf2
csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp
PRESUBMIT.py
rejected_duplicate
Near-duplicate of sample 5769
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import app\nfrom app.models import Post\nfrom flask import render_template\n\n\n@app.route('/')\n@app.route('/page/<int:page>')\ndef blog(page=1):\n \"\"\"View the blog.\"\"\"\n posts = Post.query.filter_by(visible=True) \\\n...
python
edit
1
2
mit
293a1f63b7a3011c36a0cba71874b92be460e1aa
thebitstick/Flask-Blog,thebitstick/Flask-Blog
app/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom osf.models.base import generate_object_id\n\n\ndef copy_files(src, target_node, parent=None, name=None):\n \"\"\"Copy the files from src to the target node\n :param Folder src: The source to copy children from\n :param Node ta...
python
edit
1
8
apache-2.0
cd1edf946fcf8b22b5f78f4a1db393b777951527
adlius/osf.io,felliott/osf.io,HalcyonChimera/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,pattisdr/osf.io,mfraezz/osf.io,cslzchen/osf.io,caseyrollins/osf.io,mfraezz/osf.io,saradbowman/osf.io,pattisdr/osf.io,aaxelb/osf.io,aaxelb/osf.io,adlius/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,cslzchen/osf.io,cslzchen/osf.io,case...
website/files/utils.py
rejected_duplicate
Near-duplicate of sample 11489
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''Utility function for logging'''\nimport logging\nimport sys\n\n\ndef configure_logging(debug, silent=False):\n '''Sets the default logger and the boto logger to appropriate levels of chattiness.'''\n logger = logging.getLogger('')\...
python
edit
1
6
bsd-2-clause
059b5db0768048d4e11fc012e1720213ba365538
amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq
disco_aws_automation/disco_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport json\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom opps.core.models import Publishable\nfrom opps.db import Db\n\n\nNOTIFICATION_TYPE = ...
python
edit
1
1
mit
659036918e2c90b47c83c640eef62eaeec42b35a
williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps,YACOWS/opps
opps/contrib/notifications/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numba import autojit\nimport numpy as np\nprint np.zeros(10).dtype\n\n\n@autojit\ndef closure_modulo(a, b):\n c = np.zeros(10)\n @jit('f8[:]()')\n def foo():\n c[0] = a % b\n return c\n return foo()\n\nprint c...
python
edit
2
1
bsd-2-clause
841d89ea9199bfad94c74b75f2bab5ae2690ede4
ssarangi/numba,stefanseefeld/numba,pitrou/numba,pombredanne/numba,cpcloud/numba,stefanseefeld/numba,gdementen/numba,seibert/numba,sklam/numba,pombredanne/numba,IntelLabs/numba,IntelLabs/numba,numba/numba,gdementen/numba,ssarangi/numba,pombredanne/numba,shiquanwang/numba,stuartarchibald/numba,stonebig/numba,IntelLabs/nu...
numba/tests/broken_issues/test_closure_modulo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport code\nimport collections\nimport logging\nimport sys\n\nimport numpy\n\nimport rasterio\n\n\nlogger = logging.getLogger('rasterio')\n\nStats = collections.namedtuple('Stats', ['min', 'max', 'mean'])\n\ndef main(banner, dataset):\n\...
python
edit
3
2
bsd-3-clause
632470cad13b7bfe88c52d4aafd9cbf9fff37b07
perrygeo/rasterio,perrygeo/rasterio,clembou/rasterio,johanvdw/rasterio,njwilson23/rasterio,clembou/rasterio,clembou/rasterio,johanvdw/rasterio,njwilson23/rasterio,snorfalorpagus/rasterio,brendan-ward/rasterio,kapadia/rasterio,youngpm/rasterio,kapadia/rasterio,sgillies/rasterio,kapadia/rasterio,brendan-ward/rasterio,joh...
rasterio/tool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nimport sys\n\nfrom tcconfig.tcshow import main\n\n\nif __name__ == '__main__':\n sys.exit(main())\n\n```\n\nApply this change: Fix...
python
edit
1
0
mit
f2d972831733fc77fef93d7d665750a55bbd4c33
thombashi/tcconfig,thombashi/tcconfig
cli_tcdel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. import types, alltlobjects\nfrom ..custom.message import Message as _Message\n\nclass MessageEmpty(_Message, types.MessageEmpty):\n pass\n\ntypes.MessageEmpty = MessageEmpty\nalltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = ...
python
edit
1
0
mit
845fe88451dfc8e3505d4481e8160344942d3fdf
LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon
telethon/tl/patched/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom go.router.view_definition import RouterViewDefinitionBase, EditRouterView\n\n\nclass KeywordForm(forms.Form):\n keyword = forms.CharField()\n target_endpoint = forms.CharField()\n\n\nclass BaseKeywordF...
python
edit
1
3
bsd-3-clause
7906153b4718f34ed31c193a8e80b171e567209c
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/routers/keyword/view_definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core import urlresolvers\nfrom django.utils import translation\nfrom localeurl import utils\n\ndef reverse(*args, **kwargs):\n reverse_kwargs = kwargs.get('kwargs', {})\n locale = utils.su...
python
edit
1
2
mit
ed326fba4f44552eeb206f3c5af9ad6f5e89ca44
eugena/django-localeurl
localeurl/models.py
rejected_duplicate
Near-duplicate of sample 1227
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef get_or_create(model, **kwargs):\n \"\"\" Returns an instance of model and whether or not it already existed in a tuple. \"\"\"\n instance = model.query.filter_by(**kwargs).first()\n if instance:\n return instance, False\...
python
edit
1
2
mit
25ec9d2ee99437d0b68f53c9a4f1f5bc72ecf71f
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
app/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import connection, models\nfrom django.db.models.expressions import RawSQL\n\n\ndef test_plain():\n cursor = connection.cursor()\n cursor.execute(\"some sql\") # $getSql=\"some sql\"\n\n\ndef test_context():\n with ...
python
edit
1
1
mit
03c62fd2676918524a8cef469028d41f1b74d2f4
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
python/ql/test/experimental/library-tests/frameworks/django/SqlExecution.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom .models import Conference, ConferenceVenue, Room\n\n\nclass ConferenceSerializer(serializers.HyperlinkedModelSerializer):\n status = serializers.CharField(source='get_status_display')\n\n ...
python
edit
1
0
mit
d367f32d6b8269d402305714eb95fe708f8e2b0d
ChillarAnand/junction,praba230890/junction,nava45/junction,pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,nava45/junction,nava45/junction,farhaanbukhsh/junction,nava45/junction,praba230890/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junct...
junction/conferences/serializers.py
rejected_duplicate
Near-duplicate of sample 17201
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Libraries\nfrom datetime import datetime\n\n# Django stuff\nfrom Instanssi.kompomaatti.misc.events import get_upcoming\nfrom Instanssi.screenshow.models import IRCMessage\nfrom Instanssi.kompomaatti.models impor...
python
edit
1
3
mit
7d761d538c501cefb5e6acf62d3f0e945584b5ec
Instanssi/KompomaattiBot
src/django_integration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_rq import job\n\nfrom .. import utils\n\n\n@job\ndef send_sms(to, body):\n utils.send_sms(to=to, body=body)\n\n```\n\nApply this change: Split SMS sending into multiple jobs (to get around Heroku timeout)" }, { "role"...
python
edit
1
2
mit
101784851bf8c7add95bba7dbb4277114b7a3098
ukch/refugeedata,ukch/refugeedata,ukch/refugeedata,ukch/refugeedata
refugeedata/mailings/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"empty message\n\nRevision ID: 1815829d365\nRevises: 3fcddd64a72\nCreate Date: 2016-02-09 17:58:47.362133\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '1815829d365'\ndown_revision = '3fcddd64a72'\n\nfrom alembic im...
python
edit
3
1
mit
54d88ef6ebfacbb2924ca9bc94935ed81fc90244
LandRegistry/system-of-record,LandRegistry/system-of-record
migrations/versions/1815829d365_.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.test import (\n TransactionTestCase,\n Client,\n override_settings,\n)\n\nfrom . import (\n import_data,\n)\nfrom .resources import (\n GeographyResource,\n MunicipalityProfileResource,\n Medi...
python
edit
3
1
mit
7ffe4749d1c8f5315775a50a9f7b6eb632c6a258
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
scorecard/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.views.generic import TemplateView\n\nfrom tastypie.api import Api\n\nfrom .api import ImageResource, ThumbnailResource, PinResource, UserResource\n\nv1_api = Api(api_name='v1')\nv1_api....
python
edit
1
0
bsd-2-clause
a2e63f05d7992058b09a3d8e72b91e022cb94ef1
pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry
core/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
ad1c654422413b90c78614f66af61c1410cc1a77
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.2\n# Copyright (c) 2006-2008 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\nimport md5\n\n\"\"\"64-bit fingerprint sup...
python
edit
8
2
bsd-3-clause
6854f128461c5e94e90e12183ab91c4cc4a8724b
hgl888/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,keishi/chromium,nacl-webkit/chrome_deps,dednal/chromium.src,ondra-novak/chromium.src,robclark/chromiu...
tools/grit/grit/extern/FP.py
rejected_lint
Too many lint violations: 8
true