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 os\nimport platform\n\n# If you are adding a new entry, please include a short comment\n# explaining why the specific test is blacklisted.\n\n_unix_black_list = set([name.lower() for name in [\n 'blackparrot',\n 'blackucode',\n 'b...
python
edit
1
3
apache-2.0
3291b015a5f3d311c72980913756a08d87b1ac1a
chipsalliance/Surelog,alainmarcel/Surelog,alainmarcel/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,chipsalliance/Surelog
scripts/blacklisted.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom eigen3 import toEigen\nimport rbdyn as rbd\n\nclass WLSSolver(object):\n def __init__(self):\n self.tasks = []\n\n\n def addTask(self, task, weight):\n t = [task, weight]\n self.tasks.append(t)\n\n r...
python
edit
1
2
bsd-2-clause
54f27f507820b5c9a7e832c46eb2a5ba3d918a2f
jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn
scripts/task/solver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#from phonenumber_field.serializerfields import PhoneNumberField\nfrom rest_framework import serializers\nfrom drf_extra_fields.geo_fields import PointField\n\nfrom .models import User\n\n\nclass UserSerializer(serializers.ModelSerializer):...
python
edit
1
0
mit
fb427a72bf3d8fb3802689bf89a9d71dee47108c
Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_platform
semillas_backend/users/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nNOTE: There are no tests that check for data validation at this point since\nthe interpreter doesn't have any data validation as a feature.\n\"\"\"\nimport pytest\n\nfrom calc import INTEGER, Token\n\n\ndef test_no_defaults():\n ...
python
edit
1
1
isc
e913ed7d5643c4acc85ed7ec82a70c235053360f
bike-barn/red-green-refactor
tests/test_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__VERSION__ = (2014, 5, 26)\nCURRENT_DIR = os.path.dirname(os.path.realpath(__file__))\nSTOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')\n\n\ndef get_version():\n \"\"\"\n :rtype: basestring\n \"\"\"\n retu...
python
edit
1
4
bsd-3-clause
9b043b0bd31f35e140831f61a4484513922f8712
Alir3z4/python-stop-words
stop_words/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nimport httplib2\nimport json\nimport time\nimport random\n\nfrom apiclient import errors\nfrom apiclient.discovery import build\nfrom oauth2client.client import SignedJwtAssertionCredentials\n\nclass...
python
edit
7
4
mit
e8aca80abcf8c309c13360c386b9505a595e1998
lumapps/lumRest
app/oauth.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nmap\n\nfrom st2actions.runners.pythonrunner import Action\n\n\"\"\"\nNote: This action requires nmap binary to be available and needs to run as root.\n\"\"\"\n\nclass PortScanner(Action):\n\n def run(self, host):\n result = []\n...
python
edit
3
6
apache-2.0
eb2f19a95175d68c5ac5345d38c8ce8db3b3ba9c
pinterb/st2contrib,psychopenguin/st2contrib,tonybaloney/st2contrib,jtopjian/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,psychopenguin/st2contrib,lmEshoo/st2contrib,lmEshoo/st2contrib,meirwah/st2contrib,pidah/st2contrib,armab/st2contrib,tonybaloney/st2contrib,pearsontechnology/st2contrib,digideskio/st2...
packs/linux/actions/get_open_ports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.wtf import Form\nfrom wtforms import StringField, BooleanField\nfrom wtforms.validators import DataRequired\n\n\nclass LoginForm(Form):\n openid = StringField('openid', validators=[DataRequired()])\n remember_me = Boole...
python
edit
1
0
mit
c30bd67d4fc1773ce8b0752d8e4a7cc00e2a7ae4
ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme
app/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nLEVEL_CHOICES = (\n ('v1-org-patron', '$5'),\n ('v1-org-supporter', '$10'),\n)\n\n\nclass GoldUser(models.Model):\n pub_date = models.DateTime...
python
edit
1
0
mit
1d0dd7856d1c1e80f24a94af4fc323530383b009
hach-que/readthedocs.org,istresearch/readthedocs.org,VishvajitP/readthedocs.org,laplaceliu/readthedocs.org,stevepiercy/readthedocs.org,VishvajitP/readthedocs.org,davidfischer/readthedocs.org,jerel/readthedocs.org,clarkperkins/readthedocs.org,soulshake/readthedocs.org,sunnyzwh/readthedocs.org,michaelmcandrew/readthedocs...
readthedocs/gold/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport transitions\n\nfrom panoptes.utils.logger import has_logger\n\n\n@has_logger\nclass PanState(transitions.State):\n\n \"\"\" Base class for PANOPTES transitions \"\"\"\n\n def __init__(self, *args, **kwargs):\n ...
python
edit
1
4
mit
0024b8b921d788a0539bc242bd1600c0da666bd6
panoptes/POCS,panoptes/POCS,joshwalawender/POCS,AstroHuntsman/POCS,joshwalawender/POCS,joshwalawender/POCS,panoptes/POCS,panoptes/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS
panoptes/state_machine/states/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\nimport numpy as np\n\nSAMPLES = 1201 # For SRTM3, use 3601 for SRTM1\n\n\ndef get_elevation(lat, lon):\n file = get_file_name(lat, lon)\n if file:\n return read_elevation_from_file(file, lat, lon)\n #...
python
edit
null
null
mit
032bd078b7650905148ceb3adf653d1f78f7e73f
aatishnn/srtm-python
srtm.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import mulungwishi_app as url\nfrom flask import render_template\n\n\n@url.route('/')\ndef index():\n return render_template('index.html')\n\n\n@url.route('/<query>')\ndef print_user_input(query):\n if '=' in query:\n ...
python
edit
1
2
mit
b529ef8eb6985103e8b0a0cf81399a50a26c05f5
admiral96/mulungwishi-webhook,engagespark/mulungwishi-webhook,engagespark/public-webhooks,engagespark/public-webhooks,admiral96/public-webhooks,admiral96/mulungwishi-webhook,engagespark/mulungwishi-webhook,admiral96/public-webhooks
app/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Fixes nodes without is_folder set.\n\nThis script must be run from the OSF root directory for the imports to work.\n\"\"\"\n\nfrom framework.mongo import database\n\n\ndef main():\n\n database['node'].update({\"is_folder\": {'$exis...
python
edit
1
1
apache-2.0
5c90e74139f2735d0b4d62f524eb624780c48847
kushG/osf.io,cwisecarver/osf.io,cldershem/osf.io,caseyrygt/osf.io,ticklemepierce/osf.io,brandonPurvis/osf.io,danielneis/osf.io,rdhyee/osf.io,pattisdr/osf.io,barbour-em/osf.io,Johnetordoff/osf.io,felliott/osf.io,samchrisinger/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,DanielSBrown/osf.io,crcresearch/osf.io,mluke93/osf.io...
scripts/migration/projectorganizer/migrate_projectorganizer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom compiler import error, parse\n\n\nclass ParserDB():\n \"\"\"A class for parsing with memoized parsers.\"\"\"\n\n parsers = {}\n\n @classmethod\n def _parse(cls, data, start='program'):\n mock = error.LoggerMock()\n\n...
python
edit
1
2
mit
42465957542fe232739d58c2a46098d13fb9c995
Renelvon/llama,dionyziz/llama,dionyziz/llama,Renelvon/llama
tests/parser_db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pract2d.game import gamemanager\n\nif __name__ == '__main__':\n game = gamemanager.GameManager()\n game.run()\n\n```\n\nApply this change: Set the default sdl2 library locations." }, { "role": "assistant", "content": ...
python
edit
1
0
bsd-2-clause
e45b3d3a2428d3703260c25b4275359bf6786a37
mdsitton/pract2d
launcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012 OpenStack, LLC\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:...
python
edit
1
1
apache-2.0
c01cef9340a3d55884fe38b60b209dbad5f97ea6
petrutlucian94/nova,adelina-t/nova,DirectXMan12/nova-hacking,sridevikoushik31/nova,gooddata/openstack-nova,alvarolopez/nova,whitepages/nova,thomasem/nova,affo/nova,berrange/nova,eayunstack/nova,mahak/nova,cernops/nova,felixma/nova,apporc/nova,cyx1231st/nova,openstack/nova,klmitch/nova,JianyuWang/nova,CiscoSystems/nova,...
nova/db/sqlalchemy/migrate_repo/versions/080_add_hypervisor_hostname_to_compute_nodes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple functional test to test the title of the app's home page" }, { "role": "assistant", "content": "from selenium import webdriver\nimport unittest\n\n\nclass FunctionalTest(unittest.TestCase):\n\n def setUp(self):\n ...
python
new_file
1
1
bsd-3-clause
38496eddbb214ee856b588e5b1cda62d5e353ab7
mfcovington/django-system-maintenance,mfcovington/django-system-maintenance,mfcovington/django-system-maintenance
system_maintenance/tests/functional/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport os\n\nimport pytvdbapi.api as tvdb\n\n\nclass Renamer:\n def __init__(self, api_key):\n self.tvdb = tvdb.TVDB(api_key)\n\n @staticmethod\n def flat_file_list(directory):\n directory = os.path.normpat...
python
edit
1
3
mit
452955ca8b7ba2ef01fc97800e5f350fee3e3a6e
tomleese/tvnamer,thomasleese/tvnamer
tvnamer/renamer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest that we respect the sysroot when building the std module.\n\"\"\"\n\nfrom lldbsuite.test.decorators import *\nfrom lldbsuite.test.lldbtest import *\nfrom lldbsuite.test import lldbutil\nimport os\n\nclass ImportStdModule(TestBa...
python
edit
10
1
apache-2.0
c0b09cc5d1f51672e696364616552008c13b89c4
llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb
packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport hashlib\n\nfrom wdim.client.storable import Storable\n\n\nclass Blob(Storable):\n\n HASH_METHOD = 'sha1'\n\n @classmethod\n def _create(cls, data):\n sha = hashlib(cls.HASH_METHOD, json.dumps(data))\n ...
python
edit
1
2
mit
39086b074dbac8d6d743ede09ce3556e4861e5a4
chrisseto/Still
wdim/client/blob.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2017 Stanford University\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 Licens...
python
edit
1
1
apache-2.0
ca7580c12ffefafce1705d60ab74fcb22af18eb4
StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion
examples/python_interop/python_interop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport json\nfrom pprint import pprint\ntry:\n import requests\nexcept ImportError:\n print(\n 'Script requires requests package. \\n'\n 'You can install it by running \"pip install req...
python
edit
2
3
mit
a839dcaa51cde0bf191cc87ff2cf54bbc483d61e
sevazhidkov/rest-wrapper
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\ndef fix():\n p = os.path.join(os.path.dirname(__file__), '../../src/')\n if p not in sys.path:\n sys.path.insert(0, p)\n\nif \"__main__\" == __name__:\n ...
python
edit
3
2
bsd-3-clause
35d5ca76a0c7f63545d2e8bc6b877c78ba9eab1d
michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes
tests/adapter/_path.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport traceback\n\nbuiltin_cmds = {'cd', 'pwd',}\n\ndef prompt():\n print '%s $ ' % os.getcwd(),\n\ndef read_command():\n return sys.stdin.readline()\n\ndef parse_command(cmd_text):\n return (cmd_text, cmd_t...
python
edit
1
5
mit
1bf15bca7a492bf874dccab08e24df053b7a859f
mmichie/mesh
mesh.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport os\n\nsetup(\n name = \"cmsplugin-bootstrap-carousel\",\n packages = ['cmsplugin_bootstrap_carousel',],\n\n package_data = {\n '': [\n 'templates/cmsplugin_bootstrap_carousel/*...
python
edit
1
0
bsd-3-clause
cba3b00a92194cb34d27a63e71a17f2239079c7b
360youlun/cmsplugin-bootstrap-carousel,360youlun/cmsplugin-bootstrap-carousel
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado.httpclient import HTTPRequest\nimport json\nimport os.path\nimport json\nimport shutil\nfrom xml.etree import ElementTree as ET\n\nfrom util import generate_filename\nfrom util import make_trace_folder\n\nfrom tests.base import...
python
edit
10
1
bsd-3-clause
cadab3fef1e95c0b186dc28860ac4797243fdf22
openxc/web-logging-example,openxc/web-logging-example
tests/test_visualization.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 The TensorFlow Authors. 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 Licens...
python
edit
1
0
apache-2.0
eaaf941646ff8b22a6d3ef3689f22ad1b9f7a8e2
jbedorf/tensorflow,arborh/tensorflow,zasdfgbnm/tensorflow,jhseu/tensorflow,kobejean/tensorflow,Intel-tensorflow/tensorflow,ZhangXinNan/tensorflow,jbedorf/tensorflow,jart/tensorflow,nburn42/tensorflow,annarev/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,kobejean/tensorflow,ageron/tensorflow,dendisuhubdy/tensorflow,...
tensorflow/contrib/py2tf/impl/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport editorconfig\n\nsetup(\n name='EditorConfig',\n version=editorconfig.__version__,\n author='EditorConfig Team',\n packages=['editorconfig'],\n url='http://editorconfig.org/',\n license=...
python
edit
1
0
bsd-2-clause
255d1f753ee8b48cbb2d7131e72ebc5dfbaf443c
pocke/editorconfig-vim,VictorBjelkholm/editorconfig-vim,benjifisher/editorconfig-vim,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfig-vim,pocke/editorconfig-vim,benjifisher/editorconfig-vim,johnfraney/editorconfig-vim,benjifisher/editorconfig-vim,pocke/editorconfig-vim,johnfraney/editorconfig-vim,VictorBjelkhol...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nimport factory\n\nfrom website.models import Db, Query\n\n\nclass TagsFactory(factory.DjangoModelFactory):\n class Meta:\n abstract = True\n\n @fact...
python
edit
1
3
mit
edd21fc76068894de1001a163885291c3b2cfadb
sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz
tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport bottle\n\nimport collections\nimport itertools\n\nimport search\nimport tmap\n\n# the canonical list of search plugins used to do all the searches\nSEARCHERS = [\n search.AmazonSearch(),\n search.HuluSe...
python
edit
3
3
mit
e31b532b318851df8633c3464913029c463561e0
jasontbradshaw/multivid,jasontbradshaw/multivid
multivid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\n\nclass SetupNetworkMixin(object):\n def _setup_hostname(self):\n with self.get_attachment(['uts']).attach():\n subprocess.check_call(['hostname', self.hostname])\n\n def _setup_virtual_ethernet(...
python
edit
1
1
mit
9c281ff44d6a28962897f4ca8013a539d7f08040
ianpreston/cask,ianpreston/cask
src/libcask/network.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Event(models.Model):\n when = models.DateTimeField(auto_now=True)\n what = models.TextField()\n\n```\n\nApply this change: Return human-sensible time in Event" }, { "role": "assistant", "c...
python
edit
1
1
mit
28cdad6e8ab6bd400ef50331a2f93af93620cc7f
schatten/logan
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom aspc.senate.views import DocumentList, AppointmentList\n\nurlpatterns = patterns('',\n url(r'^documents/$', DocumentList.as_view(), name=\"document_list\"),\n url(r'^documents/...
python
edit
3
0
mit
d698d4ce3002db3b518e061075f294cf9b0089a6
theworldbright/mainsite,aspc/mainsite,aspc/mainsite,aspc/mainsite,theworldbright/mainsite,aspc/mainsite,theworldbright/mainsite,theworldbright/mainsite
aspc/senate/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Statement for enabling the development environment\nDEBUG = True\n\nTESTING = True\n\n# Define the application directory\nimport os\n\nBASE_DIR = os.path.abspath(os.path.dirname(__file__))\n\n# Define the database - we are working with\n#...
python
edit
1
0
mit
60323c2944e81b8c0ff7b7e24de7aff28db238de
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
server/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom handlers.nodes import NodesHandler \nfrom handlers.node import NodeHandler \nfrom handlers.streams import StreamsHandler\nfrom handlers.stream import StreamHandler\nfrom handlers.ping import PingHandler\nfrom handlers.events import Eve...
python
edit
1
0
mit
ecd8d1ce0135e1c0a3901e73619d4f4d5bf1e6c7
peplin/astral
astral/api/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest2\n\nfrom penchy import util\n\n\nclass ClasspathTest(unittest2.TestCase):\n\n def test_valid_options(self):\n expected = 'foo:bar:baz'\n options = ['-cp', expected]\n self.assertEquals(util...
python
edit
1
1
mit
97b6894671c0906393aea5aa43e632a35bd2aa27
fhirschmann/penchy,fhirschmann/penchy
penchy/tests/test_util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Generated by Django 2.2.10 on 2020-02-14 14:41\n\nimport django.contrib.gis.db.models.fields\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n (\"councils\", \"0004_auto_2020020...
python
edit
1
0
bsd-3-clause
3fc45407eaba1452092a364eeb676bdaab6d5edc
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/councils/migrations/0005_geom_not_geog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport os\nimport re\nimport subprocess\n\ndir_path = os.path.dirname(os.path.realpath(__file__))\nfilename = 'chatterino.pro'\ndata = \"\"\n\nwith open(filename, 'r') as project:\n data = project.read()\n source...
python
edit
1
0
mit
754f5c968ad1dff3ae7f602d23baac1299731062
Cranken/chatterino2,hemirt/chatterino2,fourtf/chatterino2,Cranken/chatterino2,hemirt/chatterino2,Cranken/chatterino2,fourtf/chatterino2,Cranken/chatterino2,fourtf/chatterino2,hemirt/chatterino2,hemirt/chatterino2
update_filelist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import absolute_import, division, print_function\n\nfrom .api import DBStats, ShortenedURL\nfrom .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase\nfrom .exc import (\n YOURLSAPIError, YOURLSHTT...
python
edit
1
0
mit
65f7a8912a0a7b1f408c4ab429065aad8dba12fc
RazerM/yourls-python,RazerM/yourls-python
yourls/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, with_statement\n\nimport collections\nfrom json import JSONEncoder\n\n\n# A JSONEncoder subclass which handles map-like and list-like objects.\nclass BuckJSONEncoder(JSONEnco...
python
edit
1
5
apache-2.0
3202d2c067ce76f7e7e12f42b7531e7e082b1b88
brettwooldridge/buck,brettwooldridge/buck,JoelMarcey/buck,brettwooldridge/buck,rmaz/buck,Addepar/buck,facebook/buck,rmaz/buck,romanoid/buck,nguyentruongtho/buck,rmaz/buck,facebook/buck,SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,rmaz/buck,romanoid/buck,nguyentruongtho/buck,Addepar/buck,SeleniumHQ/buck,Addepar/buck,b...
python-dsl/buck_parser/json_encoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom ... import sha\n\ndef test_query():\n # Example queries for SHA API help page\n sha.query(ra=163.6136, dec=-11.784, size=0.5)\n sha.query(naifid=2003226)\n sh...
python
edit
7
1
bsd-3-clause
28cb04ae75a42e6b3ce10972e12166a6cbd84267
imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery
astroquery/sha/tests/test_sha.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\nAPI_URL = 'https://api.github.com/users/{}/repos'\n\n\ndef main(user):\n return parse(request(user))\n\n\ndef request(user):\n return requests.get(url=API_URL.format(user))\n\n\ndef parse(response):\n repos = res...
python
edit
1
5
mit
b41ce2be52bc3aebf5ad9a737700da0753602670
kshvmdn/github-list,kshvmdn/github-list,kshvmdn/github-list
parser.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
471be725896b69439369143b6138f614a062aca5
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\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route(\"/\", methods=[\"GET\", \"POST\"])\ndef hello():\n from flask import request\n # print dir(request)\n # print request.values\n sdp_headers = request.form.get('sdp')...
python
edit
1
1
mit
8292c4afe43ac636ebf23a0740eb06a25fbbb04d
optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video
backend/post_handler/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom optparse import make_option\n\nfrom django.core.management import call_command\nfrom django.core.management.base import NoArgsCommand\n\nclass Command(NoArgsCommand):\n \n option_list = NoArgsCommand.option_list + (\n ...
python
edit
2
6
apache-2.0
07e825b31912a821d116b2a2b394bd041321cd6d
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
molly/utils/management/commands/deploy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPython introspection helpers.\n\"\"\"\n\nfrom types import CodeType as code, FunctionType as function\n\n\ndef copycode(template, changes):\n names = [\n \"argcount\", \"nlocals\", \"stacksize\", \"flags\", \"code\", \"con...
python
edit
1
4
mit
53204208c30780092f1e21ff0d4d66d7a12930ff
glyph/automat,glyph/Automat
automat/_introspection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nclass VtImageViewer:\n\n def __init__(self):\n print(\"Woot!\")\n\n\n```\n\nApply this change: Add initial corrections to class\n\nNow the class loads and does not crash. I added the help information;\nh...
python
edit
2
1
mit
9c6cb0943381271052e11d35df7c35c677c52cdf
kprussing/vtimshow
vtimshow/vtimageviewer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2012 OpenStack LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtai...
python
edit
1
0
apache-2.0
4e15bc71205cf308c8338b2608213f439a48d5d6
ironsmile/python-swiftclient,varunarya10/python-swiftclient,pratikmallya/python-swiftclient,ironsmile/python-swiftclient,JioCloud/python-swiftclient,jeseem/python-swiftclient,krnflake/python-hubicclient,varunarya10/python-swiftclient,openstack/python-swiftclient,VyacheslavHashov/python-swiftclient,VyacheslavHashov/pyth...
swiftclient/version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef get_connected_components(g):\n \"\"\"\n Return an array of arrays, each representing a connected component.\n\n :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n.\n :returns: array of a...
python
edit
2
4
mit
52922fd4117640cc2a9ce6abd72079d43d5641f7
stephtzhang/algorithms
connected_components.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\nfrom urllib.parse import urljoin\nfrom isodate import parse_datetime, parse_duration\n\nimport requests\nfrom solcast.base import Base\n\n\nclass RadiationEstimatedActuals(Base):\n\n end_point = ...
python
edit
6
3
mit
dd1aa173c8d158f45af9eeff8d3cc58c0e272f12
cjtapper/solcast-py
solcast/radiation_estimated_actuals.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import FlaskForm\nfrom wtforms import StringField, PasswordField, BooleanField\nfrom wtforms.validators import DataRequired, Length, EqualTo, Email, URL\n\n\nclass BookmarkForm(FlaskForm):\n b_id = StringField('Bookmark ID...
python
edit
1
0
apache-2.0
7d14d51d138081c4f53ed185f54e975e0a074955
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
bookmarks/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\...
python
edit
1
1
apache-2.0
c4e0cc76e6051e59078e58e55647671f4acd75a3
mahak/neutron,openstack/neutron,openstack/neutron,mahak/neutron,mahak/neutron,openstack/neutron
neutron/conf/policies/floatingip_pools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport json\n\nclass ShellReporter:\n def report_categories(self, categories):\n to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) }\n category_dict_list ...
python
edit
1
2
mit
fbb9824e019b5211abd80ade9445afebc036bb27
luigiberrettini/build-deploy-stats
reporting/shellReporter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\" Simple urls for use in testing the gcframe app. \"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls.defaults import patterns, url\n\nfrom .views import normal, framed, exempt\n\n\nurl...
python
edit
1
0
bsd-3-clause
cb4eae7b76982c500817859b393cb9d4ea086685
benspaulding/django-gcframe
gcframe/tests/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.auth.backends import ModelBackend\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db.models import get_model\n\nclass UserModelBackend(ModelBackend):\n\tdef authent...
python
edit
1
5
mit
560e441c64943500a032da8c4f81aef1c3354f84
hackerspacesg/hackdo
hado/auth_backends.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use import * in traversal submodule." }, { "role": "assistant", "content": "from .depth_first_search import *\nfrom .breadth_first_search import *\nfrom .edgedfs import *\n" } ]
python
new_file
4
0
bsd-3-clause
f350b716157f787c7161b1e914e1210ff9ee4e2e
ionanrozenfeld/networkx,RMKD/networkx,aureooms/networkx,beni55/networkx,wasade/networkx,ionanrozenfeld/networkx,jakevdp/networkx,ghdk/networkx,ghdk/networkx,ltiao/networkx,chrisnatali/networkx,jni/networkx,jni/networkx,dhimmel/networkx,michaelpacer/networkx,farhaanbukhsh/networkx,SanketDG/networkx,dhimmel/networkx,jake...
networkx/algorithms/traversal/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport json\n\ndef ftag(t):\n return lambda node: node.tag == t\n\ndef ustr(s):\n if sys.version_info < (3, 0):\n #py2\n return unicode(s).encode('utf-8')\n else:\n return str(s)\n\nclass TableJSONE...
python
edit
2
3
mit
0a7104680d1aeaa7096f9bb7603cd63d46efb480
bcicen/wikitables
wikitables/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom import_export import fields, resources\n\nfrom .models import TalkProposal\n\n\nclass TalkProposalResource(resources.ModelResource):\n\n name = fields.Field(attribute='submitter__speaker_name')\n email = fields.Field(attribute='s...
python
edit
1
0
mit
c97339e3a121c48ec3eed38e1bf901e2bf1d323c
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
src/proposals/resources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.contrib import admin\nfrom django import forms\nfrom django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet\n\nfrom models import ImageOfModel\n\nclass ImageFormset(B...
python
edit
3
3
bsd-3-clause
4c4b5a99e2fd02eff3451bf6c3a761163794a8ce
vixh/django-imageofmodel
imageofmodel/admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix imports now that the serializer is in its own sub-package.\n\n--HG--\nextra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800" }, { "role": "assistant", "content": "\nimport os.path\n__path__.append(...
python
new_file
6
0
mit
b40e1f42af2d392f821ec0da41717d9d14457f8d
mgilson/html5lib-python,mgilson/html5lib-python,ordbogen/html5lib-python,html5lib/html5lib-python,alex/html5lib-python,alex/html5lib-python,dstufft/html5lib-python,dstufft/html5lib-python,mindw/html5lib-python,gsnedders/html5lib-python,mgilson/html5lib-python,ordbogen/html5lib-python,mindw/html5lib-python,gsnedders/htm...
src/serializer/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\nimport os\n\ndef getSetting(key,default=None):\n\ts = sublime.load_settings(\"Fuse.sublime-settings\")\n\treturn s.get(key, default)\n\ndef getFusePathFromSettings():\n\tpath = getSetting(\"fuse_path_override\")\n\tif path =...
python
edit
1
3
mit
7e80f197d6cd914b9d43f0bc1d9f84e3d226a480
fusetools/Fuse.SublimePlugin,fusetools/Fuse.SublimePlugin
fuse_util.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\n settings.configure(\n DEBUG=True,\n USE_TZ=True,\n DATABASES={\n \"default\": {\n \"ENGINE\": \"django.db.backends.sqlite3\",\n ...
python
edit
1
3
bsd-3-clause
7280bb895284986e141a4660d9f2616b7d2aa99c
blag/django-watchman,blag/django-watchman,mwarkentin/django-watchman,ulope/django-watchman,JBKahn/django-watchman,gerlachry/django-watchman,ulope/django-watchman,mwarkentin/django-watchman,JBKahn/django-watchman,gerlachry/django-watchman
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'mjwtom'\n\nimport sqlite3\nimport unittest\n\n\nclass fp_index:\n def __init__(self, name):\n if name.endswith('.db'):\n self.name = name\n else:\n self.name = name + '.db'\n self....
python
edit
3
2
apache-2.0
b2df5972bcc9f3367c3832719d1590410317bbba
mjwtom/swift,mjwtom/swift
swift/obj/dedupe/fp_index.py
rejected_duplicate
Near-duplicate of sample 5588
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom bitarray import bitarray as _bitarray\n\ndef utf9encode(string):\n bits = _bitarray()\n for char in string:\n for idx, byte in enumerate(char.encode('utf-8')):\n bits.append(idx)\n ...
python
edit
2
5
mit
8925c3a827659e1983827368948e95e764a40585
enricobacis/utf9
utf9/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport mica.stats.acq_stats\nmica.stats.acq_stats.update()\n\nimport os\ntable_file = mica.stats.acq_stats.table_file\nfile_stat = os.stat(table_file)\nif file_stat.st_size > 50e6:\n print \"\"\"\nWarning: {tfile...
python
edit
2
0
bsd-3-clause
8bdbcc235a4f7615c0ecbd22f5e6c764feb21e47
sot/mica,sot/mica
scripts/update_acq_stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ircu import consts\n\n\ndef int_to_base64(n, count):\n buf = ''\n while count > 0:\n count -= 1\n buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf\n n >>= consts.BASE64_NUMNICKLOG\n retu...
python
edit
1
2
mit
55d9da44e71985e8fa81ffa60ea07f6db8c5e81e
briancline/ircu-python
ircu/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bootstrapform.templatetags.bootstrap import *\nfrom django.template import Template, Context, Library\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nregister = Library()\n\n```\n\nApp...
python
edit
5
4
mit
3d3319b96475f40de6dd4e4cf39cdae323fd3b3d
PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,kfarr2/django-arcutils,wylee/django-arcutils,mdj2/django-arcutils,mdj2/django-arcutils
arcutils/templatetags/arc.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport datetime\nimport tornado.gen\nimport statsd\n\nif os.environ.get(\"STATSD_URL\", None):\n ip, port = os.environ.get(\"STATSD_URL\").split(':')\n statsd_client = statsd.Client(ip, int(port))\nelse:\n statsd_client ...
python
edit
1
4
apache-2.0
89a95df295036a9fc55ae061eac8e5921f85e095
upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift
lib/py/src/metrics.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 The Regents of the University of Michigan\n# All rights reserved.\n# This software is licensed under the BSD 3-Clause License.\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass BasicFormat(object):\n ...
python
edit
1
0
bsd-3-clause
e0ffee5d5d6057a6dd776b02fea33c6509eb945c
csadorf/signac,csadorf/signac
signac/contrib/formats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\n\nclass MigrationsCheck(TestCase):\n def setUp(self):\n from django.utils import translation\n self.saved_locale = translation.get_language()\n translation.deactivate_all()\n\n ...
python
edit
1
2
mit
15d2f98980b5a2baea5e6c55cc2d42c848a19e63
django-pci/django-axes,jazzband/django-axes
axes/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nimport jd2chm_log\nimport jd2chm_conf\n\nlogging = None\nconfig = None\n\ndef getAppDir():\n if hasattr(sys, \"frozen\"): # py2exe\n return os.path.dirname(sys.executable)\n return os.path.dirname(sys.argv[0])\...
python
edit
1
2
mit
5df86afa64aafb4aee1adb066307910e0fb64256
andreburgaud/jd2chm,andreburgaud/jd2chm
jd2chm_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\nfrom django.template import TemplateDoesNotExist\nfrom django.test import TestCase\n\nfrom core.models import Image\nfrom core.tests import create_user\nfrom us...
python
edit
4
1
bsd-2-clause
814782f5ef291728ecad6ce6bf430ce1fd82e5c4
pinry/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,lapo-luchini/pinry
core/tests/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"change_url_length\n\nRevision ID: d2780d5aa510\nRevises: dce488646127\nCreate Date: 2016-03-11 09:39:32.593231\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = 'd2780d5aa510'\ndown_revision = 'dce488646127'\n\nfrom al...
python
edit
1
1
apache-2.0
2ecc676dd2521c727eb1d720bac6c2533f8337d9
openstack/barbican,openstack/barbican
barbican/model/migration/alembic_migrations/versions/d2780d5aa510_change_url_length.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import path\n\n\nclass BaseApi(object):\n\n \"\"\"\n Simple class to buid path for entities\n \"\"\"\n\n def __init__(self, mc_client):\n \"\"\"\n Initialize the class with you user_id and secret_key\n ...
python
edit
3
1
mit
a0a93d1ccd2a2e339da59f6864c63b0fc9857886
s0x90/python-mailchimp,charlesthk/python-mailchimp
mailchimp3/baseapi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom . import tmp_dir_fixture # NOQA\n\n\ndef test_uri_property(tmp_dir_fixture): # NOQA\n\n from dtoolcore import _BaseDataSet\n\n admin_metadata = {\n \"name\": os.path.basename(tmp_dir_fixture),\n \"uui...
python
edit
1
1
mit
49570c1b7dd5c62495a01db07fe070c34db18383
JIC-CSB/dtoolcore
tests/test_BaseDataSet_uri_property.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport config\nimport logging\nimport logging.handlers\n\n\n# ######### Set up logging ##########\n# log.basicConfig(format=\"%(asctime)s - %(levelname)s: %(message)s\", level=log.DEBUG)\nlogger = logging.getLogger(\"blockbuster\")\nlogger....
python
edit
1
0
mit
5041862eafcd4b8799f8ab97c25df7d494d6c2ad
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/bb_logging.py
rejected_duplicate
Near-duplicate of sample 4405
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urlparse\n\nfrom django.conf import settings\n\nfrom ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin\nfrom s3_folder_storage.s3 import DefaultStorage, StaticStorage\n\n\ndef domain(url):\n return urlparse.urlpa...
python
edit
1
1
apache-2.0
660fc35a1bb25e728ad86d2b0ce8d3af46645a99
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/apps/storage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The vumi.application API.\"\"\"\n\n__all__ = [\"ApplicationWorker\", \"SessionManager\", \"TagpoolManager\",\n \"MessageStore\"]\n\nfrom vumi.application.base import ApplicationWorker\nfrom vumi.application.session import Se...
python
edit
1
0
bsd-3-clause
5d0a29a908a4019e7d7cf1edc17ca1e002e19c14
TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi
vumi/application/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom breach.models import SampleSet, Victim, Target, Round\n\n\nclass RuptureTestCase(TestCase):\n def setUp(self):\n target = Target.objects.create(\n endpoint='https://di.uoa.gr/?brea...
python
edit
1
1
mit
e23ba33c3a57cb384b93bf51a074a83711f0dea0
dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/ruptur...
backend/breach/tests/base.py
rejected_duplicate
Near-duplicate of sample 12567
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Pipeline(object):\n \"\"\"Defines a pipeline for transforming sequence data.\"\"\"\n\n def __init__(self, convert_token=None):\n if convert_token is None:\n self.convert_token = lambda x: x\n elif callab...
python
edit
1
3
bsd-3-clause
939a95c2bf849509fd70356ad37c6645e2ca81e4
pytorch/text,pytorch/text,pytorch/text,pytorch/text
torchtext/data/pipeline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Node(object):\n def __eq__(self, other):\n return (\n self.__class__ == other.__class__ and\n self.__dict__ == other.__dict__\n )\n\n def __ne__(self, other):\n return not self == other...
python
edit
1
2
mit
6381204585c64ed70bf23237731bdb92db445c05
Magnetic/cycy,Magnetic/cycy,Magnetic/cycy
cycy/parser/ast.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\n\nif len(sys.argv) < 2:\n print(\"Usage: %s <changelog> [<version>]\" % (sys.argv[0],))\n sys.exit(1)\n\nchangelog = open(sys.argv[1]).readlines()\nversion = \"latest\"\nif len(sys.argv) > 2:\n vers...
python
edit
1
0
apache-2.0
4e8043ef74d440d6ece751341664ab1bb3bddebd
skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive
scripts/ci/extract-changelog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom .utc_timezone import UTC\n\nFORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ'\nFORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ'\n\n\nclass utcdatetime(object):\n def __init__(self, year, month, day, hour=0, minute=0, second...
python
edit
1
4
mit
4a045eb12eb7931b2aad302450c4bca944b42f93
paulfurley/python-utcdatetime,paulfurley/python-utcdatetime
utcdatetime/utcdatetime.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add comments in boostrap script" }, { "role": "assistant", "content": "# TODO: Implement!\n\n'''\nWe want a folder structure something like this:\n\n|-bin\n|-conf\n|-doc\n| \\-paper\n|-experiments\n| \\-2000-01-01-example\n| |-...
python
new_file
1
0
mit
c8c68dfc05c4e661a147a32eccc27b3fd3e84174
pharmbio/sciluigi,samuell/sciluigi,pharmbio/sciluigi
tools/bootstrap_project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.core.context_processors import csrf\nimport json\n\nfrom students.models import Student\n\nSTATUS_OK = {\n 'success' : 'API is running'\n}\n\n# status view\ndef status(request): \n\n retu...
python
edit
3
5
mit
294b1c4d398c5f6a01323e18e53d9ab1d1e1a732
Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker
web/mooctracker/api/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport pytest\nimport requests\n\n\n@pytest.fixture\ndef url():\n return os.getenv(\"SITE\", \"http://localhost:5000\")\n\n\ndef test_post_images(expect, url):\n params = {\"key\": \"iw\", \"lines\": [\"test\", \"deployme...
python
edit
1
1
mit
a135e5a0919f64984b1348c3956bd95dc183e874
jacebrowning/memegen,jacebrowning/memegen
scripts/test_deployment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db.models.signals import post_save\nfrom django.db.models.signals import post_delete\n\nfrom django_esutils.mappings import SearchMappingType\n\nfrom demo_esutils.models import Article\n\n\nARTICLE_MAPPI...
python
edit
1
1
mit
911ae13f760d221f5477cb5d518d4a9719386b81
novafloss/django-esutils,novafloss/django-esutils
demo/demo_esutils/mappings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: fileencoding=utf-8\nfrom __future__ import print_function, absolute_import, unicode_literals\nimport sys\n\nclass VersionError (ValueError):\n pass\n\ndef check_ex ():\n v = sys.version_info\n if v.major == 3:\n if v....
python
edit
1
7
mit
911a7a2fb68f4dcc64e88b65b758e4a06b2d7dcb
sapphirecat/cloud-maker,sapphirecat/cloud-maker
cloud_maker/py_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\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.apache.or...
python
edit
1
0
apache-2.0
543336f68dd96a9d19a6cc4598ddd99fd06ad026
mattrobenolt/warehouse,mattrobenolt/warehouse,techtonik/warehouse,robhudson/warehouse,techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse
warehouse/accounts/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\n__version_info__ = '0.1.0'\n__version__ = '0.1.0'\nversion = '0.1.0'\nVERSION = '0.1.0'\n\ndef get_version():\n return version #...
python
edit
1
1
bsd-2-clause
b4578d34adaa641dab5082f9d2bffe14c69649c5
kezabelle/wsgi-detour
detour/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n#\n# Define containerized environment for running Diosix on Qemu\n#\n# On Google Cloud Run: Creates HTTP server on port 8080\n# or whatever was specified using the PORT system variable.\n# Outputs via the HTTP port. This...
python
edit
1
1
mit
e4559636b7b95414fef10d40cce1c104712c432e
diodesign/diosix
entrypoint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# imports\nfrom flask import render_template, Blueprint\n\nfrom project import db # pragma: no cover\nfrom project.models import Person # pragma: no cover\n\n\n# config\nhome_blueprint = Blueprint(\n 'home', __name__,\n template...
python
edit
1
4
isc
369f607df1efa7cd715a1d5ed4d86b972f44d23b
dhmncivichacks/timewebsite,mikeputnam/timewebsite,mikeputnam/timewebsite,dhmncivichacks/timewebsite,dhmncivichacks/timewebsite,mikeputnam/timewebsite
project/home/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContributed by Michael Mericikel.\n\"\"\"\n\nfrom pyramid.decorator import reify\nimport pyramid.url as url\n\nclass URLGenerator(object):\n def __init__(self, context, request):\n self.context = context\n self.requ...
python
edit
1
1
mit
24d67552f1ae16179fb1aa21a06c191c6d596fb1
hlwsmith/akhet,hlwsmith/akhet,Pylons/akhet,hlwsmith/akhet,Pylons/akhet
akhet/urlgenerator.py
rejected_duplicate
Near-duplicate of sample 5622
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools.command.egg_info import egg_info\nimport subprocess\nimport time\n\nclass EggInfoFromGit(egg_info):\n \"\"\"Tag the build with git commit timestamp.\n\n If a build tag has already been set (e.g., \"egg_info -b\", build...
python
edit
1
2
apache-2.0
3d6577432444c46f0b35bd4b39e0a05f39c37e7f
jeremiahsavage/cwltool,SciDAP/cwltool,chapmanb/cwltool,common-workflow-language/cwltool,dleehr/cwltool,jeremiahsavage/cwltool,chapmanb/cwltool,common-workflow-language/cwltool,dleehr/cwltool,jeremiahsavage/cwltool,common-workflow-language/cwltool,chapmanb/cwltool,SciDAP/cwltool,chapmanb/cwltool,SciDAP/cwltool,dleehr/cw...
gittaggers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..mcapp import app\nfrom ..decorators import apikey, jsonp\nfrom flask import g\nimport rethinkdb as r\n#from .. import dmutil\nfrom .. import args\nfrom ..utils import error_response\n\n@app.route('/v1.0/user/<user>/projects', methods...
python
edit
1
3
mit
42869823b4af024906606c5caf50e5dc5de69a57
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
api/mcapi/user/projects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport getopt, sys\n\nif __name__ == '__main__':\n sippy_path = None\n\n try:\n opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b')\n except getopt.GetoptError:\n usage()\n\n for o, a in opts:\n if o == '-...
python
edit
2
0
bsd-2-clause
21e47557da10e1f4bb14e32d15194bf95211882a
sippy/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy
python/getmonotime.py
rejected_duplicate
Near-duplicate of sample 11321
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.contrib import admin\nfrom django.conf import settings\n\nadmin.autodiscover()\nurlpatterns = patterns('',\n (r'^admin/(.*)', admin.site.root),\n (r'^', include('blangoblog.blango.u...
python
edit
5
0
bsd-3-clause
f0ed93d51980856daa1d7bff8bf76909fabe5b65
fiam/blangoblog,fiam/blangoblog,fiam/blangoblog
urls.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass PatroniException(Exception):\n pass\n\n\nclass DCSError(PatroniException):\n\n \"\"\"Parent class for all kind of exceptions related to selected distributed configuration store\"\"\"\n\n def __init__(self, value):\n se...
python
edit
1
1
mit
fa22d91e053f301498d9d09a950558758bf9b40f
sean-/patroni,pgexperts/patroni,zalando/patroni,sean-/patroni,jinty/patroni,jinty/patroni,zalando/patroni,pgexperts/patroni
patroni/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Contains all of the exceptions used in NBConvert explicitly\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the terms o...
python
edit
1
0
bsd-3-clause
a406334f0fcc26f235141e1d453c4aa5b632fdaf
jupyter-widgets/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywi...
nbconvert/utils/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport os\n\nif os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift\n virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/'\n virtualenv = os.path.join(virtenv, 'bin/activate_this.py')\n try:\n ...
python
edit
2
0
apache-2.0
90a6d5be4e328a4ee9a2c05c40188d639e191be5
notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss
wsgi.py
accepted
null
true