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\"\"\"\nSome very beta tools for IRIS\n\"\"\"\n\nimport sunpy.io\nimport sunpy.time\nimport sunpy.map\n\n__all__ = ['SJI_to_cube']\n\ndef SJI_to_cube(filename, start=0, stop=None):\n \"\"\"\n Read a SJI file and return a MapCube\n ...
python
edit
1
3
bsd-2-clause
e75e6ec300e1127f7010d36ef63343e522318f90
Alex-Ian-Hamilton/sunpy,dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy,Alex-Ian-Hamilton/sunpy,Alex-Ian-Hamilton/sunpy
sunpy/instr/iris/iris.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2006, 2007, 2008 Andrey Golovizin\n#\n# This file is part of pybtex.\n#\n# pybtex is free software; you can redistribute it and/or modify\n# under the terms of the GNU General Public License as published by the\n# Free Soft...
python
edit
1
0
mit
2515509c8e0d0461df043b26e74bcc5b574464a9
live-clones/pybtex
pybtex/bibtex/exceptions.py
rejected_duplicate
Near-duplicate of sample 11887
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"empty message\n\nRevision ID: 1f9c61031fa\nRevises: 1f872d11bbf\nCreate Date: 2016-01-24 17:46:54.879784\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '1f9c61031fa'\ndown_revision = '1f872d11bbf'\n\nfrom alembic im...
python
edit
1
1
mit
7e883fcfc539f18cd29c2babaf083583495f46d3
Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger
migrations/versions/1f9c61031fa_.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nPROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))\nsys.path.insert(0, os.path.join(PROJECT_ROOT, '..'))\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n }\n}\n\n\nINST...
python
edit
1
0
bsd-3-clause
6a01e99585db3ea38a8d8325dd4f826e78fc0f1d
pmclanahan/django-celery-email,pmclanahan/django-celery-email
test_project/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import views\nfrom django.conf.urls import url\n\n\nurlpatterns = [\n url(r'^by_topic/', views.bill_list_by_topic),\n url(r'^by_location', views.bill_list_by_location),\n url(r'^latest_activity/', views.latest_bill_activity)...
python
edit
1
0
mit
faed82947209b34ccb4063e8244a9da019fa52a2
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
bills/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\nfrom elasticsearch_dsl import Search\nfrom elasticsearch_dsl.result import Response\n\n\nclass ShareSearch(Search):\n BASE_URL = 'https://osf.io/api/v1/share/search/'\n HEADERS = {'content-type': 'appli...
python
edit
1
3
mit
f59b249cf2b149f96833d9e1025a98819bf5f62a
CenterForOpenScience/sharepa,fabianvf/sharepa
sharepa/search.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport os, stat\n\nfrom botbot import checker, problems\n\ndef test_fastq_checker():\n assert checker.is_fastq(\"bad.fastq\") == problems.PROB_FILE_IS_FASTQ\n assert checker.is_fastq(\"good.py\") == problems.PROB_NO_PRO...
python
edit
4
3
mit
230bb0a09146cd0b696b528b3ad6dd9ccf057113
jackstanek/BotBot,jackstanek/BotBot
tests/test_checker.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass SDP:\n def __init__(self, local_addr, ptime):\n self.local_addr = local_addr\n self.ptime = ptime\n\n local_addr_desc = f'IN IP4 {self.local_addr[0]}'\n self.payload = '\\r\\n'.join([\n 'v=0',...
python
edit
1
1
apache-2.0
26c1daab6095c6110995104b94ad5b6260557c70
vodik/aiortp
aiortp/sdp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.admin import ModelAdmin, register\nfrom django.contrib.gis.admin import GeoModelAdmin\nfrom weather.models import WeatherStation, Location\n\n\n@register(Location)\nclass LocationAdmin(GeoModelAdmin):\n pass\n\n\n@reg...
python
edit
1
0
bsd-3-clause
e2ee9045c59e3f03c5342ee41d23e4adece43535
parksandwildlife/resource_tracking,parksandwildlife/resource_tracking,ropable/resource_tracking,ropable/resource_tracking,ropable/resource_tracking,parksandwildlife/resource_tracking
weather/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor\n\ndef test_xor_find_singlechar_key():\n input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'\n cipherte...
python
edit
1
1
bsd-2-clause
bbd3190b31a3751d9173b81d6f53c937208969a7
cpach/cryptopals-python3
tests/main_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\n\nASSET_MANAGER_TYPES = {'Accredited Investor', 'Bank', 'Broker', 'Corporate Treasury', 'Family Office',\n 'Fund Administrator', 'Fu...
python
edit
1
0
apache-2.0
283f4d0dc1896b35e1c6be3458a99c87b9296659
paul-rs/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python
amaascore/asset_managers/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport pkg_resources\n\npkg_resources.declare_namespace(__name__)\n\nVERSION = (0, 1, 4)\n\n__version__ = \".\".join(map(str, VERSION))\n__status__ = \"Development\"\n__description__ = u\"Opps...
python
edit
1
0
mit
e58e33fbce322ba94ce60afc053b3610ad5bf993
jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps
opps/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import division\n\nimport numpy as np\nimport numexpr as ne\n\n__all__ = 'qn', 'FlowCumulant'\n\n\ndef qn(n, phi):\n return ne.evaluate('sum(exp(1j*n*phi))')\n\n\nclass FlowCumulant(object):\n ...
python
edit
1
2
mit
b17104be53389604b4b7f5f109895bdaa6389e43
jbernhard/hic,Duke-QCD/hic
hic/flow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__version__ = \"0.2.3\"\nfrom config import Config\nfrom build_init import build_init\nfrom build_diff import build_diff\n\n```\n\nApply this change: Add skiping not Table, Procedure files" }, { "role": "ass...
python
edit
5
0
mit
6a54876a30ec92c0243cf758b7ddf35d7ad3b926
stepan-perlov/pgup
pgup/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# -*- mode: python; coding: utf-8 -*-\n# Copyright 2016 the HERA Collaboration\n# Licensed under the 2-clause BSD license.\n\n\"\"\"\nScript to write out antenna locations for use in cal files.\n\"\"\"\nimport pandas...
python
edit
1
0
bsd-2-clause
e44eb0bd99b4dec1b78707c7343fc6d9b647c7bb
HERA-Team/hera_mc,HERA-Team/Monitor_and_Control,HERA-Team/hera_mc
scripts/write_antenna_location_file.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
6bbee1abf5e53c3e3ce9cc84f35820ee9fe11500
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\nimport sublime\nimport sublime_plugin\n\n\nclass TrimmerCommand(sublime_plugin.TextCommand):\n def run(self, edit):\n view = self.view\n\n trailing_white_space = view.find_all(\"[\\t ]+$\")\n trailing_white_space.rev...
python
edit
1
2
mit
4545d11c2462ccb6d7848d185f5fe358a51af5f6
jonlabelle/Trimmer,jonlabelle/Trimmer
Trimmer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport os\n\nfrom microbit import *\n\nif 'messages.txt' in os.listdir():\n\n with open('messages.txt') as message_file:\n messages = message_file.read().split('\\n')\n\n while True:\n if button_a.was_pres...
python
edit
3
0
mit
e3cba925ea106baa99951ac7b3ee72599ee7277d
mathisgerdes/microbit-macau
demos/fs-demo/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Simple blueprint.\"\"\"\nimport os\n\nfrom flask import Blueprint, current_app, make_response, render_template\n\nblueprint = Blueprint('simple', __name__, url_prefix='/simple',\n template_folder='templates')\n\n\n@b...
python
edit
1
4
mit
ca6891f3b867fd691c0b682566ffec1fd7f0ac2a
Dinoshauer/pryvate,Dinoshauer/pryvate
pryvate/blueprints/simple/simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom socketio import socketio_manage\nfrom django.conf.urls import patterns, url, include\nfrom django.http import HttpResponse\n\n\nSOCKETIO_NS = {}\n\nclass namespace(object):\n def __init__(self, name=''):\n s...
python
edit
4
2
bsd-3-clause
52e675ec6789d8ecaddae98a6b36bc8b0c3f6e1e
abourget/gevent-socketio,yacneyac/gevent-socketio,kazmiruk/gevent-socketio,kazmiruk/gevent-socketio,yacneyac/gevent-socketio,arnuschky/gevent-socketio,gutomaia/gevent-socketio,smurfix/gevent-socketio,arnuschky/gevent-socketio,hzruandd/gevent-socketio,theskumar-archive/gevent-socketio,abourget/gevent-socketio,gutomaia/g...
socketio/sdjango.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\n\nclass School:\n def __init__(self):\n self.db = defaultdict(list)\n\n def add_student(self, name, grade):\n self.db[grade].append(name)\n self.db[grade] = sorted(self.db[grad...
python
edit
1
2
mit
1fdceb6b8072317eff901a8f2b74db60269ca373
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
python/grade-school/grade_school.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
644c69a25d81ae4473d19bfe1faa6b7fe10e8afd
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 __future__ import unicode_literals\n\nimport logging\n\nimport requests\n\nfrom .parsers import WebObsResultsParser\n\n\nlogger = logging.getLogger(__name__)\n\nWEBOBS_RESULTS_URL = 'http://www.aavso.org/apps/webobs/results/'\n\n\ndef ...
python
edit
1
3
mit
37c08c15ecc31f90429b20ee2d4561c2886036c2
zsiciarz/pyaavso
pyaavso/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\nimport sys\n\nfiles = sys.argv[1:]\n\nkeys = set()\nfileVals = []\nfor file in files:\n vals = {}\n fileVals.append(vals)\n try:\n for line in open(file).readlines():\n k, v = line.split()\n vals[k]...
python
edit
6
0
apache-2.0
8ff8b9400adf24e082908befed7788099b01f328
basheersubei/swift-t,blue42u/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,blue42u/swift-t,swift-lang/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,basheersubei/swift-t,basheersubei/swift-t,Jo...
bench/pact-suite/scripts/opcount_merge.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Transformer(object):\n class Feats():\n exclude = None\n\n def __init__(self):\n for field in self.get_feats():\n getattr(self.Feats, field).bind(field, self)\n\n def get_feats(self):\n return ...
python
edit
1
4
mit
17cdaa0cf7313e4edf5ef28ea2634410bd085d4f
rsk-mind/rsk-mind-framework
rsk_mind/transformer/transformer.py
rejected_duplicate
Near-duplicate of sample 11312
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom flask.ext.testing import TestCase\n\nfrom quokka import create_app\nfrom flask.ext.security.utils import encrypt_password\nfrom ..models import User\n\n\nclass TestAuthModels(TestCase):\n def setUp(self):\n s...
python
edit
1
1
mit
b6099b64efb6e74e754d0911bd64512b6b6b631b
maurobaraldi/quokka,ChengChiongWah/quokka,wushuyi/quokka,cbeloni/quokka,alexandre/quokka,wushuyi/quokka,cbeloni/quokka,wushuyi/quokka,fdumpling/quokka,fdumpling/quokka,lnick/quokka,maurobaraldi/quokka,fdumpling/quokka,ChengChiongWah/quokka,romulocollopy/quokka,CoolCloud/quokka,romulocollopy/quokka,CoolCloud/quokka,Ckai...
quokka/modules/accounts/tests/test_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils import six\n\nfrom boardinghouse.base import SharedSchemaMixin\nfrom boardinghouse.schema import activate_schema, deactivate_schema\n\n\n@six.python_2_unicode_compatible\nclass SchemaTemplate(...
python
edit
1
1
bsd-3-clause
2ebb667b38b3d74003948347f411f177ca584834
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/contrib/template/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gengine.app.tests import db as db\nfrom gengine.metadata import init_declarative_base, init_session\nimport unittest\nimport os\nimport pkgutil\nimport testing.redis\nimport logging\n\nlog = logging.getLogger(__name__)\n\ninit_session(...
python
edit
1
3
mit
a6ae4171de33dd77e9109523380c1330d4037f9f
ActiDoo/gamification-engine,ActiDoo/gamification-engine,ActiDoo/gamification-engine,ActiDoo/gamification-engine
gengine/app/tests/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\n\nclass Pokehelper(object):\n\n def __init__(self):\n\n basepath = os.path.dirname(__file__)\n filepath = os.path.abspath(os.path.join(basepath, 'data/pokemon.json' ))\n with open(filepath) as...
python
edit
1
2
mit
191d73fb6d30b691da8d9c55bfd36f055aea19d5
Phaetec/pogo-cruncher,Phaetec/pogo-cruncher,Phaetec/pogo-cruncher
backend/pokehelper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Copyright (c) 2014 Mirantis.\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.apac...
python
edit
1
1
apache-2.0
674dfb000cca79998674cd0b490ae6f3f992b313
openstack/python-blazarclient,ChameleonCloud/python-blazarclient,stackforge/python-blazarclient
blazarclient/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.sitemaps import Sitemap\nfrom .models import Term\n\n\nclass TermsSitemap(Sitemap):\n changefreq = 'yearly'\n priority = 0.1\n\n def items(self):\n return Term.objects.all()\n\n```\n\nApply this change: E...
python
edit
1
1
bsd-3-clause
0ea4abe8b2e44bdd02308ad590ffb1e846201300
philippeowagner/django-terms,BertrandBordage/django-terms,philippeowagner/django-terms,BertrandBordage/django-terms
terms/sitemaps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor\nfrom django.db.migrations.state import StateApps\n\nfrom z...
python
edit
6
2
apache-2.0
ddf2075228a8c250cf75ec85914801262cb73177
hackerkid/zulip,kou/zulip,amanharitsh123/zulip,brockwhittaker/zulip,showell/zulip,hackerkid/zulip,rishig/zulip,verma-varsha/zulip,synicalsyntax/zulip,zulip/zulip,amanharitsh123/zulip,showell/zulip,punchagan/zulip,amanharitsh123/zulip,punchagan/zulip,timabbott/zulip,rht/zulip,tommyip/zulip,eeshangarg/zulip,Galexrt/zulip...
zerver/migrations/0032_verify_all_medium_avatar_images.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# For the license of this file, please consult the LICENSE file in the\n# root directory of this distribution.\n#\n\n# All tests in the test suite.\n__all__ = ( \"bitfield_tests\", \"zscii_tests\" )\n\n```\n\nApply this change: Make run_...
python
edit
5
0
bsd-3-clause
a17aade30c5925ba40eacfa2ab2a067a9141aa84
BGCX262/zvm-hg-to-git,BGCX262/zvm-hg-to-git
tests/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nHOME_URL = 'https://github.com/ftobia/longshot/blob/master/longshot.py'\n\n\ndef upgrade():\n backup_self()\n download_and_overwrite()\n restart()\n\n\ndef backup_self():\n import shutil\n new_name = __file__ + '.bak'\n ...
python
edit
1
1
bsd-3-clause
4b3e2289dbf20c0e2a7e0f83c7bd5963f2aa311f
ftobia/longshot
longshot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom ._base import get_base_rdio_client\n\n\nclass _RdioExportClient(object):\n def __init__(self, base_client):\n self.base_client = base_client\n\n def get_current_user_key(self):\n return self.base_client...
python
edit
3
4
isc
7574528d839dc627ea53032b547e0e1c23a51f6b
alexhanson/rdio-export
rdioexport/_client/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\nfrom datetime import datetime\n\nimport psutil\n\nfrom pyprobe.sensors import *\n\n\n__author__ = 'Dirk Dittert'\n\n\nclass UptimeSensor(BaseSensor):\n KIND = u'uptime'\n\n def define(self, configuration):\n res...
python
edit
8
1
apache-2.0
a5f3aa3d1098645f1b24539714bf22244141811c
dittert/pyprobe,dittert/pyprobe
src/pyprobe/sensors/system/sensor_uptime.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.validators import ValidationError\n\n# A list of allowable thumbnail file extensions.\nALLOWABLE_THUMBNAIL_EXTENSIONS = getattr(\n settings, 'ALLOWABLE_THUMBNAIL_EXTENSIONS', ['png', 'jp...
python
edit
1
3
bsd-3-clause
1e6ccfe615ee5d3e873e341a3d38553c3b07a3a0
ligonier/django-athumb
athumb/validators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\n\nclass Posts(list):\n \"\"\"\n Represents a list of posts in a thread.\n \"\"\"\n\n def __init__(self, *args):\n \"\"\"\n Initialise a new posts ...
python
edit
1
3
mit
bb575cfdf4a6781c878a12f80987fb3e62fe56d4
gebn/chandl,gebn/chandl
chandl/model/posts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom tower import ugettext_lazy as _lazy\n\nfrom flicks.base.util import country_choices\nfrom flicks.users.models import UserProfile\n\n\nclass UserProfileForm(forms.ModelForm):\n # L10n: Used in a choice fie...
python
edit
1
1
bsd-3-clause
65cd819b73c4a28b67a30b46b264b330d9967582
mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks
flicks/users/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Dispatched(object):\n\tdef __init__(self, w=None, cb=None):\n\t\tself.w = w\n\t\tself.cb = cb\n\t\tself.retval = None\n\t\tself.output = None\n\nclass DispatchInquiry(object):\n\tdef __init__(self, msg=None, payload=None, res...
python
edit
1
2
mit
1fa7fed7d63fc7819ae5378f9a9addf7439e9b92
joushou/dispatch,joushou/dispatch
messages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Tests for `pyutrack` package.\"\"\"\n\n\nimport unittest\nfrom click.testing import CliRunner\n\nfrom pyutrack import cli\n\n\nclass TestYoutrack_cli(unittest.TestCase):\n\n def tes...
python
edit
4
1
mit
074dcf9c822827c6609dc11c0047aa79dd8c1ad8
alisaifee/pyutrack,alisaifee/pyutrack
tests/test_cli.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom tinydb import TinyDB\nfrom core.models import Movie\n\nTABLE_POPULAR = \"popular\"\nTABLE_NAME_TO_ID = \"name_to_id_mapping\"\nTABLE_MOVIES = \"movies\"\n\nclass Application(object):\n def __in...
python
edit
1
2
mit
5bd56894f3f4bbb3fadc3430238c394660b249c4
EmilStenstrom/nephele
core/bootstrap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\nfrom django import forms\n\n\nclass SearchForm(forms.Form):\n search = forms.CharField(\n label='', required=False,\n widget=forms.widgets.TextInput())\n\n```\n\nApply this change: Add unique model fields...
python
edit
1
4
mit
e1bfa7170d4cf6a78cd0f2ca9c3d5302e04323f5
code-kitchen/django-utensils,code-kitchen/django-utensils,code-kitchen/django-utensils
utensils/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .mcmc import hmc, nuts, rmh\nfrom .mcmc_adaptation import window_adaptation\n\n__version__ = \"0.3.0\"\n\n__all__ = [\n \"hmc\",\n \"nuts\",\n \"rmh\",\n \"window_adaptation\",\n \"adaptive_tempered_smc\",\n \"tempere...
python
edit
3
0
apache-2.0
c9c0aace029dd07a96ceed4f14303d5f0eadee13
blackjax-devs/blackjax
blackjax/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\nimport logbook\nlogger = logbook.Logger('connman-dispatcher')\n\n\ndef execute_scripts_in_dirs(paths, state):\n for path in sorted(paths):\n if os.path.exists(path) and os.path.isdir(path):\n ...
python
edit
1
4
isc
3d84e8e871b1049102815136ef23e3e630461918
a-sk/connman-dispatcher
connman_dispatcher/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractUser\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.template.defaultfilters import slugify\n\n\nclass BaseUser(AbstractUser):\n slug = mo...
python
edit
1
4
bsd-3-clause
d3992b1677a5186b8b4072c9fdf50e4cb44dc5ef
Nomadblue/django-nomad-base-accounts,Nomadblue/django-nomad-base-accounts
base_accounts/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport string\n\nclass Command(object):\n\n def execute(self, command: str):\n cliArgs = self.parseCliArgs(command)\n\n process = subprocess.Popen(cliArgs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subp...
python
edit
3
13
apache-2.0
f3cbe52e0d65e8d6647815b25c79a836db93fb41
claudio-walser/gitcd,claudio-walser/gitcd
gitcd/Cli/Command.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\r\nfrom courant.core.search.views import *\r\n\r\nfrom haystack.forms import ModelSearchForm\r\nfrom haystack.query import SearchQuerySet\r\nfrom haystack.views import SearchView\r\n\r\nurlpatterns = ...
python
edit
5
0
bsd-3-clause
c72b712cf84e63dd2d72fdc6d64c50a65b8a88a0
maxcutler/Courant-News,maxcutler/Courant-News
courant/core/search/urls.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport timevis\n\n\nclass TestAPIs(unittest.TestCase):\n def setUp(self):\n self.app = timevis.app.test_client()\n\n def test_api(self):\n resp = self.app.get('/api/v2/experiment')\n self.assertIs...
python
edit
1
1
mit
c6a56604562460b2a8a72b25b23ce2ff4958d184
gaoce/TimeVis,gaoce/TimeVis,gaoce/TimeVis
test/test_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)\n\n# This script is provided under the terms and conditions of the MIT license:\n# Permission is hereby granted, free of charge, to...
python
edit
10
0
mit
f21da23d45c328acffaba69a6f2fbf2056ca326b
jdhp-sap/sap-cta-data-pipeline,jdhp-sap/sap-cta-data-pipeline,jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/data-pipeline-standalone-scripts
datapipe/denoising/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom .models import Product, PriceList\n\n\ndef create_product_for_good(good, price, quantity=1):\n \"\"\"\n Creates a product for the specified `good` with `quantity`. `price` is set to the ...
python
edit
1
2
bsd-2-clause
d413345197abe9092979e324498c766f7410d34b
evonove/django-bazaar,evonove/django-bazaar,meghabhoj/NEWBAZAAR,evonove/django-bazaar,meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR
bazaar/goods/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import sudo, cd, env, run, local\n\nenv.hosts = ['<EMAIL>']\n\nDEPLOY_DIR = '/var/www/mcbench/mcbench'\n\n\ndef deploy():\n with cd(DEPLOY_DIR):\n run('git pull origin master')\n restart()\n\n\ndef restart():\n ...
python
edit
1
1
mit
c9b38972486b588790371ab41c961e68609e0b4b
isbadawi/mcbench,isbadawi/mcbench
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport pytest\n\npytest.importorskip(\"twisted\")\n\nfrom twisted.internet.defer import Deferred, succeed, fail\n\nfrom prometheus_async import tx\n\n\nclass TestTime(objec...
python
edit
1
1
apache-2.0
0257d01e53a314b176f3a3b97259b46a271a08be
hynek/prometheus_async
tests/test_tx.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\nimport subprocess\n\n\nclass HelloWorld(object):\n BUILD = r\"\"\"#!/bin/sh\nset -e\ncd $1\n\ncat > hello << EOF\n#!/bin/sh\necho Hello world!\nEOF\n\nchmod +x hello\n \"\"\"\n\n EXPECTED_OUTPUT = \"Hello...
python
edit
1
2
bsd-2-clause
7ef23761c64c1e1b1ac47c72a78d5109c36761d0
mwilliamson/whack
tests/testing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom oscar.core.loading import load_class\n\nfrom . import mixins\n\n\nProductCategoryView = load_class('catalogue.views', 'ProductCategoryView')\n\n\nclass FancyPageDetailView(mixins.OscarFancyPageMixin, ProductCategoryView):\n pass\n\n...
python
edit
1
0
bsd-3-clause
6290d72458a470947c5da651968cf20f8714c646
socradev/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages
fancypages/contrib/oscar_fancypages/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\n\nclass TestBuildError(TestCase):\n def test_push_message(self):\n self.fail()\n\n def test_format_as_single_string(self):\n self.faildoo()\n\n```\n\nApply this change: Put in first prope...
python
edit
1
1
mit
4146be648f04ed409eb82e43528bc700751ef03c
peterhoward42/qt-layout-gen
src/qtlayoutbuilder/builderror_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"django todo\"\"\"\n__version__ = '1.5.dev'\n\n__author__ = 'Scot Hacker'\n__email__ = '<EMAIL>'\n\n__url__ = 'https://github.com/shacker/django-todo'\n__license__ = 'BSD License'\n\n```\n\nApply this change: Bump version number for re...
python
edit
1
0
bsd-3-clause
d8444cec60f38baa75b89892dda6163bf63917af
jwiltshire/django-todo,shacker/django-todo,jwiltshire/django-todo,shacker/django-todo,jwiltshire/django-todo,shacker/django-todo
todo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom optparse import OptionParser\n\nfrom django.conf import settings\n\nif not settings.configured:\n settings.configure(\n DATABASES = {\n 'default': {\n 'ENGINE': 'dj...
python
edit
1
3
unlicense
51aaf9c19f92db4b3ad5d7aa646bf6ef8d5e62a6
bourivouh/django-celery-rpc,ttyS15/django-celery-rpc,tumb1er/django-celery-rpc
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef read(filename):\n \"\"\"\n Reads in a corestick file and returns a dictionary keyed by core_id.\n Layer interface depths are positive and are relative to the lake bottom.\n depths are returned in meters. Northing and Easting...
python
edit
1
6
bsd-3-clause
29f3bb4fc549f78771294f90f5168b20f9ea7b5e
twdb/sdi
sdi/corestick.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n{\n \"inbound\": [\n {\n \"cookie\": 1,\n \"match\": \n {\n \"tcp_dst\": 4321\n },\n \"action\": \n {\n \"fwd\": 0\n }\n ...
python
edit
1
0
apache-2.0
adf747998641b1aeb75feada25470aa2a072bd37
h2020-endeavour/endeavour,h2020-endeavour/endeavour
examples/test-mh/policies/participant_3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\n\nclass Data:\n def __init__(self, secs_since_epoch, depth_chart, temperature_chart, frame_path):\n # general settings\n self.width = 1296\n self.height = 972\n self.padding = 5\n self.fr...
python
edit
1
1
mit
f5728e24ba6dec2d2d7c2eff7888137e91469094
thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x
overlay/Data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = '1.6.5'\nrevision = ' development'\nmilestone = 'Yoitsu'\nrelease_number = '85'\nprojectURL = 'https://syncplay.pl/'\n\n```\n\nApply this change: Mark build 86 and v1.6.5 release" }, { "role": "assistant", "content": "...
python
edit
1
0
apache-2.0
b71f076bbb745764d6ed5724d494e878a8fbd785
Syncplay/syncplay,Syncplay/syncplay,alby128/syncplay,alby128/syncplay
syncplay/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport platform\nimport sys\n\nBASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = '17a0e24666d0198810752284690bc2d0d87094d7'\n\nARCH = {\n 'cygwin': '32bit',...
python
edit
2
1
mit
9f5ed14f24aecdd46699e84e13e9fa1f90cbf793
brave/muon,chriskdon/electron,Gerhut/electron,twolfson/electron,icattlecoder/electron,the-ress/electron,bruce/electron,soulteary/electron,nekuz0r/electron,tylergibson/electron,Zagorakiss/electron,tomashanacek/electron,chrisswk/electron,destan/electron,roadev/electron,simongregory/electron,gbn972/electron,jiaz/electron,...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 3285
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\n\nfrom icebergsdk.mixins.request_mixin import IcebergRequestBase\n\nlogger = logging.getLogger('icebergsdk.frontmodules')\n\nclass FrontModules(IcebergRequestBase):\n cache_key = \"icebergsdk:fron...
python
edit
1
5
mit
1713cf8553d7f21d1192ed58138ecf7875c4b181
izberg-marketplace/izberg-api-python,Iceberg-Marketplace/Iceberg-API-PYTHON
icebergsdk/front_modules.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom django.contrib.auth.views import redirect_to_login\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import Http404\nfrom django.views.generic import View\n\nfrom .utils import file_exists, get_di...
python
edit
1
8
apache-2.0
626345a10ee3d0aa90b7791e88c9b09544bdfa88
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
daiquiri/files/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import six\nfrom debug_toolbar_multilang.pseudo import STR_FORMAT_PATTERN, \\\n STR_FORMAT_NAMED_PATTERN\nfrom debug_toolbar_multilang.pseudo.pseudo_language import PseudoLanguage\n\n\nclass ExpanderPseudoLanguage(Pseud...
python
edit
3
3
mit
b5206de1d6a99cd4a22f1ef5681e7964a7289b2e
Matt3o12/django-debug-toolbar-multilang,Matt3o12/django-debug-toolbar-multilang
debug_toolbar_multilang/pseudo/expander_pseudo_language.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom ctypeslib.dynamic_module import include\nfrom ctypes import *\nimport logging\nlogging.basicConfig(level=logging.INFO)\n\nif os.name == \"nt\":\n _libc = CDLL(\"msvcrt\")\nelse:\n _libc = CDLL(None)\n\ninclude(\"\"\"\\...
python
edit
4
0
mit
c27010a3d5265d9eb783f627adca7cb0c25dcb9a
sugarmanz/ctypeslib
ctypeslib/test/stdio.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import annotations\nimport time\nfrom typing import Optional, Tuple, List, Type\n\nfrom . import User\nfrom .runners import Runner\n\n\nclass LoadTestShape:\n \"\"\"\n A simple load test shape class used to control the...
python
edit
1
1
mit
891e9e05f8c3fde75bb217d8d8132cdf6003e827
locustio/locust,locustio/locust,locustio/locust,locustio/locust
locust/shape.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponse\nfrom django.core.management import call_command\n\nfrom django.shortcuts impo...
python
edit
3
1
apache-2.0
4bdaf4d2e29da71a1bf00e1bfc5caad6d3647372
toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity
search/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUtility functions for dhcp2nest\n\"\"\"\nfrom queue import Queue\nfrom subprocess import Popen, PIPE\nfrom threading import Thread\n\n\ndef follow_file(fn, max_lines=100):\n \"\"\"\n Return a Queue that is fed lines (up to max...
python
edit
1
2
mit
5d0541f5b5b8cc18b2e3f86b237c01ed915d5c0a
jbalonso/dhcp2nest
dhcp2nest/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest topological fingerprints.\n\"\"\"\nimport unittest\n\nfrom rdkit import Chem\n\nfrom pande_gas.features import fingerprints as fp\n\n\nclass TestCircularFingerprint(unittest.TestCase):\n \"\"\"\n Tests for CircularFingerp...
python
edit
1
2
bsd-3-clause
cb75a7ad69b273a57d2b10378712388f179abca3
rbharath/pande-gas,rbharath/pande-gas
pande_gas/features/tests/test_fingerprints.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"class to convert datetime values\"\"\"\n\nimport datetime\n\nclass DatetimeConverter(object):\n \"\"\"stuff\"\"\"\n\n _EPOCH_0 = datetime.datetime(1970, 1, 1)\n\n def __init__(self):\n \"\"\"stuff\"\"\"\n\n pass...
python
edit
1
1
mit
0aa5741ce05dcd4926be9c74af18f6fe46f4aded
pantheon-systems/etl-framework
etl_framework/utilities/DatetimeConverter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRandomSampler\n-------------\n\nA random sampler that can be used for unit testing and debugging.\n\"\"\"\nimport numpy as np\n\nfrom dimod.core.sampler import Sampler\nfrom dimod.response import Response, SampleView\n\n__all__ = ['...
python
edit
1
3
apache-2.0
384c2f34fcdefd26a928254e70a9ed6d15ffd069
dwavesystems/dimod,dwavesystems/dimod
dimod/reference/samplers/random_sampler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom abstract import Abstract\n\n\n__all__ = ['Abstract']\n\n```\n\nApply this change: Load pygrapes.serializer.json.Json right inside pygrapes.serializer" }, { "role": "assistant", ...
python
edit
1
0
bsd-3-clause
07e780a27253c4108c96e232ffbb975e88d23f8d
michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes
src/pygrapes/serializer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.template.defaultfilters import slugify\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Fieldset, Submit\nfrom crispy_forms.bootstrap import FormActions\n\nfrom com...
python
edit
5
2
bsd-3-clause
51076b9d21679b1198931e2517afbf7c6d2e573a
michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition
src/competition/forms/team_forms.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\n\n__version__ = '0.24.0'\n__version_info__ = (0, 24, 0)\n\n```\n\nApply this change: Mark master as working towards 0.25.0" }, { ...
python
edit
1
0
mit
26bb374b00d667de00a080c4b32e102ac69a0e23
wbond/asn1crypto
asn1crypto/version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom server.models import *\n\n\nclass MachineGroupAdmin(admin.ModelAdmin):\n readonly_fields = ('key',)\n\n\nclass MachineAdmin(admin.ModelAdmin):\n list_display = ('hostname', 'serial')\n\n\nadmin.s...
python
edit
21
0
apache-2.0
1f0e5b7e65914ec5c3fb0a6617f72ea2f466bbdc
salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal
server/admin.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport sys\nimport json\n\nfor arg in sys.argv[1:]:\n with open(arg) as f:\n equajson = json.load(f)\n\n try:\n latex = equajson[\"markup-languages\"][\"LaTeX\"][0][\"markup\"]\n except KeyE...
python
edit
1
0
mit
cbd913af9013926ca7f08ab56023d7242e783698
nbeaver/equajson
ad-hoc-scripts/latex-adjust.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017-2018 Renata Hodovan, Akos Kiss.\n#\n# Licensed under the BSD 3-Clause License\n# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.\n# This file may not be copied, modified, or distributed except\n# accordin...
python
edit
1
2
bsd-3-clause
c52a959896c345b57fdd28e2ae8cbd75ab2e3c71
renatahodovan/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator
fuzzinator/call/file_reader_decorator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport re\nimport socket\nimport urllib\nfrom bs4 import BeautifulSoup\n\nlogger = logging.getLogger(__name__)\nWURSTBALL_RE = re.compile(r\"^https?://(www\\.)?wurstball\\.de/[0-9]+/\")\n\n\ndef default_handler(metadata):\n ...
python
edit
1
3
mit
badcdcc03517aaf705975676a5d37488b38c9738
horazont/xmpp-crowd
foomodules/link_harvester/common_handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.8.6'\n\n```\n\nApply this change: Increment patch version to 0.8.7" }, { "role": "assistant", "content": "\"\"\"yolk.\n\nA...
python
edit
1
0
bsd-3-clause
3219a925ecddbacb39e4adc484d94eaed6bddd0b
myint/yolk,myint/yolk
yolk/__init__.py
rejected_duplicate
Near-duplicate of sample 3058
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponse\nfrom django.template import RequestContext\nfrom django.shortcuts import render_to_response\nfrom django.contrib import messages\n\ntry:\n f...
python
edit
1
6
mit
ace54e86e9462b25acd1636e0e9905ba6decfe9b
django-admin-tools/django-admin-tools,django-admin-tools/django-admin-tools,django-admin-tools/django-admin-tools
admin_tools/dashboard/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport monasca_setup.detection\n\n\nclass Neutron(monasca_setup.detection.ServicePlugin):\n\n \"\"\"Detect Neutron daemons and setup configuration to monitor them.\n\n \"\"\"\n\n def __init__(self, template_dir, overwrite=True, arg...
python
edit
1
2
bsd-3-clause
ee31e6c0302c6840d522666b1f724d0ec429d562
sapcc/monasca-agent,sapcc/monasca-agent,sapcc/monasca-agent
monasca_setup/detection/plugins/neutron.py
rejected_duplicate
Near-duplicate of sample 1997
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import template\nfrom django.conf import settings\nfrom opps.articles.models import ArticleBox\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef get_articlebox(slug, channel_slug=None, te...
python
edit
1
4
mit
2393b066fbb0fc88d9e9a1918485cf57c40aecc2
jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps
opps/articles/templatetags/article_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2014 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 sys\n\nimport recipe_util # pylint: disable=F0401\n\n\n# This...
python
edit
1
2
bsd-3-clause
8769224d8dbe73e177d19012d54c9bb7e114a3fa
sarvex/depot-tools,fracting/depot_tools,sarvex/depot-tools,azunite/chrome_build,disigma/depot_tools,duongbaoduy/gtools,fracting/depot_tools,hsharsha/depot_tools,Midrya/chromium,hsharsha/depot_tools,ajohnson23/depot_tools,gcodetogit/depot_tools,npe9/depot_tools,mlufei/depot_tools,primiano/depot_tools,chinmaygarde/depot_...
recipes/webrtc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\nimport smtplib, time, threading, sys\nfrom email.mime.text import MIMEText\n\nfromaddr = sys.argv[0]\ntoaddr = sys.argv[1]\n\n\ndef createMessage(fromaddr, toaddr, subject, msgtxt):\n msg = MIMEText(msgtxt)\n ...
python
edit
4
2
bsd-3-clause
5c11731b445df04e1b4ec92df4ff6b7e6681915b
bobbynewmark/mailthrottler,bobbynewmark/mailthrottler
testMail.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chainer import cuda\nfrom chainer import function\n\n\nclass Copy(function.Function):\n\n \"\"\"Copy an input GPUArray onto another device.\"\"\"\n\n def __init__(self, out_device):\n self.out_device = out_device\n\n de...
python
edit
1
1
mit
6c32e39e2e51a80ebc9e31e88e22cc4aa39f7466
chainer/chainer,sinhrks/chainer,ronekko/chainer,ktnyt/chainer,chainer/chainer,jnishi/chainer,niboshi/chainer,tkerola/chainer,elviswf/chainer,tscohen/chainer,muupan/chainer,keisuke-umezawa/chainer,Kaisuke5/chainer,woodshop/chainer,jnishi/chainer,keisuke-umezawa/chainer,tigerneil/chainer,cupy/cupy,niboshi/chainer,chainer...
chainer/functions/copy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function, unicode_literals\nimport pytest\nfrom wamopacker.process import run_command, ProcessException\nimport os\nimport uuid\n\n\ndef test_run_command():\n ...
python
edit
1
1
mit
0a9e3fb387c61f2c7cb32502f5c50eaa5b950169
wamonite/packermate
tests/test_process.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nVarious usefull tags\n\"\"\"\nfrom django import template\n\nregister = template.Library()\n\n@register.filter(name='split', is_safe=True)\ndef split_string(value, arg=None):\n \"\"\"\n A simple string...
python
edit
1
1
mit
8f9dc9a241515f9cab633f33b9d2243f76df55bd
emencia/emencia_paste_djangocms_3,emencia/emencia_paste_djangocms_3,emencia/emencia_paste_djangocms_3,emencia/emencia_paste_djangocms_3
emencia_paste_djangocms_3/django_buildout/project/utils/templatetags/utils_addons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bloop.engine import Engine, ObjectsNotFound, ConstraintViolation\nfrom bloop.column import Column, GlobalSecondaryIndex, LocalSecondaryIndex\nfrom bloop.types import (\n String, Float, Integer, Binary, StringSet, FloatSet,\n Inte...
python
edit
1
0
mit
109fc84cb307083f6a01317bb5b5bea0578088d3
numberoverzero/bloop,numberoverzero/bloop
bloop/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import walk, sep, chdir, pardir\nfrom os.path import split, join, abspath\nfrom glob import glob\n\n# System path separator (usually slash or backslash)\nsepd = {\"sep\": sep}\n\n# Files having at least one of these in their path wi...
python
edit
3
7
bsd-3-clause
6fbd752b1343c2e5085c3d060dbc7cc11a839728
toolforger/sympy,atsao72/sympy,lindsayad/sympy,fperez/sympy,abhiii5459/sympy,chaffra/sympy,abhiii5459/sympy,farhaanbukhsh/sympy,wanglongqi/sympy,bukzor/sympy,ga7g08/sympy,sahmed95/sympy,sunny94/temp,Shaswat27/sympy,Titan-C/sympy,lidavidm/sympy,hargup/sympy,ryanGT/sympy,Curious72/sympy,mcdaniel67/sympy,emon10005/sympy,r...
sympy/utilities/tests/test_code_quality.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import ListView, DateDetailView\nfrom django.shortcuts import get_object_or_404\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom .models import Category, Post\n\n\nclass PostListView(ListV...
python
edit
1
1
bsd-3-clause
f01222f021f277805492e3f539609f6b64be0b7e
blancltd/blanc-basic-news
blanc_basic_news/news/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .core import *\n\n__all__ = ['OutlookAccount', 'Message', 'Contact', 'Folder']\n__version__ = '1.0.0'\n__release__ = '1.0.0'\n\n```\n\nApply this change: Package development version of upcoming v1 release for testing." }, { "ro...
python
edit
6
0
mit
db37b195ea47cd18969ad482e1dae301903da092
JensAstrup/pyOutlook
pyOutlook/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nimport pygame\nfrom scenes import director\nfrom scenes import intro_scene\n\npygame.init()\n\n\ndef main():\n game_director = director.Director()\n scene = intro_scene.IntroScene(game_director)\n game_...
python
edit
1
1
mit
e79c90db5dcda56ff9b2b154659984db9c6f7663
juangallostra/TicTacToe
src/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n# default_app_config was deprecated in Django 3.2. Maybe set it only when detected django version is older?\ndefault_app_config = \"modernrpc.apps.ModernRpcConfig\"\n\n# Package version is now stored in pyproject.toml onl...
python
edit
1
0
mit
bd2c0efa6b0205ff0d24cf335f65f755f18566f2
alorence/django-modern-rpc,alorence/django-modern-rpc
modernrpc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas\n\nfrom sharepa.helpers import pretty_print\nfrom sharepa.helpers import source_counts\n\n\ndef test_pretty_print():\n some_stuff = '{\"Dusty\": \"Rhodes\"}'\n pretty_print(some_stuff)\n\n\ndef test_source_counts():\n ...
python
edit
1
2
mit
fd6c7386cfdaa5fb97a428b323fc1f9b17f9f02c
CenterForOpenScience/sharepa,fabianvf/sharepa,samanehsan/sharepa,erinspace/sharepa
tests/test_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 0xc0170\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.org/...
python
edit
1
2
apache-2.0
7dd228d7eaad6b1f37ff3c4d954aebe0ffa99170
project-generator/project_generator_definitions,0xc0170/project_generator_definitions,ohagendorf/project_generator_definitions
tests/test_targets/test_targets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sc2\nfrom sc2 import run_game, maps, Race, Difficulty\nfrom sc2.player import Bot, Computer\n\nclass WorkerRushBot(sc2.BotAI):\n async def on_step(self, state, iteration):\n if iteration == 0:\n for probe in self...
python
edit
1
3
mit
bc5d678937e69fe00e206b6a80c9a2f6dfb1a3a2
Dentosal/python-sc2
examples/worker_rush.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ConfigParser\nfrom common.application import Application\nfrom keystonemiddleware.auth_token import filter_factory as auth_filter_factory\n\nclass KeystoneApplication(Application):\n\n \"\"\"\n An Application which uses Keyston...
python
edit
1
3
apache-2.0
a6a2ee870840730f99ad475e02956c49fe2e7ed3
NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api,NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api
common/authapp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\nfrom linepy import *\r\n\r\nclient = LineClient()\r\n#client = LineClient(authToken='AUTHTOKEN')\r\n\r\nclient.log(\"Auth Token : \" + str(client.authToken))\r\n\r\n# Initialize LineChannel with LineClient\r\n# Th...
python
edit
4
0
bsd-3-clause
271bb9de8f0f3674b1f6f47bc3519f1297c87abf
fadhiilrachman/line-py
examples/linechannel.py
rejected_lint
Too many lint violations: 4
true