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\nclass Exercise(object):\n\n name = None\n title = None\n\n def __init__(self, workshop):\n self.workshop = workshop\n\n def get_name(self):\n return self.name\n\n def get_title(self):\n return self.title\...
python
edit
1
1
mit
e1b36955d2a4e3eb4f36d75b4393cd510e3ddcab
pyschool/story
workshopper/exercises.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRole tests\n\"\"\"\n\nfrom testinfra.utils.ansible_runner import AnsibleRunner\n\ntestinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')\n\n\ndef test_packages(host):\n \"\"\"\n Check if packages are i...
python
edit
1
4
mit
13a698e9ca9c46e31fa369af811a68e705571aca
infOpen/ansible-role-locales
tests/test_installation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.java_vm import autoclass, JavaException\nfrom .scala_utils import get_python_json\n\nclass EidosReader(object):\n \"\"\"Reader object keeping an instance of the Eidos reader as a singleton.\n\n This allows the Eidos reader ...
python
edit
3
2
bsd-2-clause
b02c5736a6a0875da7e7feeaa433f4870d1f4bca
sorgerlab/belpy,bgyori/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,johnbachman/indra,johnbachman/indra,bgyori/indra,pvtodorov/indra
indra/sources/eidos/eidos_reader.py
rejected_duplicate
Near-duplicate of sample 13431
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import Flask\nfrom contextlib import closing\nimport os, psycopg2\n\nDB_SCHEMA= \"\"\"\nDROP TABLE IF EXISTS entries;\nCREATE TABLE entries (\n id serial PRIMARY KEY,\n title VARCHAR (127) NOT NULL,...
python
edit
1
4
mit
7892e34e31ebfe7d3aba27bf147b6c669b428c07
charlieRode/learning_journal
journal.py
rejected_duplicate
Near-duplicate of sample 4472
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef migrate_user(self):\n \"\"\"\n Migrate to latest schema version.\n \"\"\"\n\n migrate_1_to_2(self)\n migrate_2_to_3(self)\n\ndef migrate_1_to_2(self):\n \"\"\"\n Migrate from schema 1 to schema 2.\n \"\"\"\n\n ...
python
edit
1
3
mit
e12eb10d699fce8e0081acc44025035f703b4dc5
cdorer/crits,DukeOfHazard/crits,korrosivesec/crits,Lambdanaut/crits,DukeOfHazard/crits,jinverar/crits,jinverar/crits,jhuapl-marti/marti,korrosivesec/crits,Magicked/crits,kaoscoach/crits,blaquee/crits,kaoscoach/crits,blaquee/crits,ckane/crits,HardlyHaki/crits,Magicked/crits,cdorer/crits,korrosivesec/crits,cfossace/crits...
crits/core/user_migrate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\n\ndef index(request):\n if not request.user.is_authenticated():\n return render(request, 'account/index.html')\n\n else:\n return render(request, 'account/user_home.html')\n\n```\n\...
python
edit
1
2
mit
0cb3aa5947b5c5da802c05ae16bc138441c2c921
lockhawksp/beethoven,lockhawksp/beethoven
accounts/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Script to print list of all crowdin language codes for project.\"\"\"\n\nfrom crowdin_bot import api\n\nNS_DICT = {\n 'ns': \"urn:oasis:names:tc:xliff:document:1.2\"\n}\n\ndef get_project_languages():\n \"\"\"Get list of crowdin...
python
edit
1
3
mit
faa0e5fd214151e8b0bb8fb18772807aa020c4bf
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_languages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSetuptools is released using 'jaraco.packaging.release'. To make a release,\ninstall jaraco.packaging and run 'python -m jaraco.packaging.release'\n\"\"\"\n\nimport os\nimport subprocess\n\nimport pkg_resources\n\npkg_resources.requ...
python
edit
1
1
mit
65d8715705e07dc7f091e2da47a7ada923c6cfbb
pypa/setuptools,pypa/setuptools,pypa/setuptools
release.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis abstracts some of the functionality provided by django-taggit in order\nto normalize the tags provided by the users.\n\"\"\"\n\nfrom taggit import managers as taggit_managers\n\n\ndef _normalize_tag(t):\n if isinstance(t, un...
python
edit
2
3
bsd-3-clause
f34d0d43311e51bcb04c5cbdf5bb31b7a8093feb
pysv/djep,pysv/djep,EuroPython/djep,pysv/djep,pysv/djep,pysv/djep,EuroPython/djep,EuroPython/djep,EuroPython/djep
pyconde/tagging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python2.7\n\"\"\"Avoid some boilerplate rpy2 usage code with helpers.\n\nMostly I wrote this so that I can use xyplot without having\nto remember a lot of details.\n\n\"\"\"\n\nimport click\nfrom rpy2.robjects import Formula...
python
edit
2
2
mit
ae3d94fbc9a53df6bbeb0fedf6bb660ba6cd4b40
ecashin/rpy2_helpers
rpy2_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom resource_management import *\nimport os\n\ndef create_hdfs_dir(path, owner, perms):\n Execute('hadoop fs -mkdir -p '+path, user='hdfs')\n Execute('hadoop fs -chown ' + owner + ' ' + path, user='hdfs')\n Execute('hadoop fs -chmod ' +...
python
edit
2
2
apache-2.0
70fb3744c07d14e5796e62992775cc97046f60ce
cdapio/cdap-ambari-service,cdapio/cdap-ambari-service
package/scripts/ambari_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This package will contain the spiders of your Scrapy project\n#\n# Please refer to the documentation for information on how to create and manage\n# your spiders.\n\n```\n\nApply this change: Add a scaffold for spiders to crawl annotations...
python
edit
1
1
mit
f09f33a6ddf0cf397838068e9cc3bc82464bf699
paopow/LabelMeCrawler
labelme/labelme/spiders/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass IRCLevel:\n \"\"\" Enum class (Not really) for userlevels. \"\"\"\n user = 0\n voice = 1\n hop = 2\n op = 3\n aop = 4\n sop = 5\n\n\ndef get_userlevels(nick):\n \"\"\" Return the userlevels in a list from a nic...
python
edit
1
0
mit
6a754b4a52619f84346a1cc89148884cefb3bc78
Motoko11/MotoBot
motobot/irc_level.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Network switch drivers for the HaaS.\n\nThis package provides HaaS drivers for various network switches. The\nfunctions in the top-level module should not be used; they only exist\nas a place to document the interface shared by all of...
python
edit
1
1
apache-2.0
2be69ba584b76134fc055ea17b476ce32ce5bf1e
meng-sun/hil,henn/haas,kylehogan/hil,henn/hil,henn/hil_sahil,henn/hil,kylehogan/hil,SahilTikale/haas,lokI8/haas,CCI-MOC/haas,meng-sun/hil,apoorvemohan/haas,kylehogan/haas,SahilTikale/switchHaaS,apoorvemohan/haas,henn/hil_sahil
haas/drivers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app.readers import tsv as tsvreader\n\n\ndef filter_psms(psms, confkey, conflvl, lower_is_better):\n for psm in psms:\n if passes_filter(psm, conflvl, confkey, lower_is_better):\n yield psm\n\n\ndef passes_filter(p...
python
edit
3
3
mit
82ba04d609c80fd2bf8034cf38654d10bb72aca5
glormph/msstitch
src/app/actions/psmtable/filter_confidence.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport guv\n\nguv.monkey_patch()\nimport guv.server\nimport logging\nimport time\n\nfrom util import create_example\nimport logger\n\nif not hasattr(time, 'perf_counter'):\n time.perf_counter = time.clock\n\nlogger.configure()\nlog = log...
python
edit
1
2
mit
2781d26ecd6440a97e168f3b6a51c96eae25c004
veegee/guv,veegee/guv
examples/guv_simple_http_response.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n\nMODULE_REGEX = r\"^[_a-zA-Z][_a-zA-Z0-9]*$\"\nENVIRON_REGEX = r\"^[_a-zA-Z][_a-zA-Z0-9]*$\"\nPYTHONVERSION_REGEX = r\"^(3)\\.[6-9]$\"\n\nmodule_name = \"{{ cookiecutter.project_slug}}\"\n\nif not re.match(MODULE_REGEX, module...
python
edit
3
0
bsd-3-clause
bc2246e8efa3a8d196c95ceb6d028f3b655b70c5
hmgaudecker/econ-project-templates,hmgaudecker/econ-project-templates,hmgaudecker/econ-project-templates
hooks/pre_gen_project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_auth_ldap.backend import LDAPBackend\n\n\nclass LDAPBackendWrapper(LDAPBackend):\n # def authenticate(self, identification, password, **kwargs):\n # return super(LDAPBackendWrapper, self).authenticate(identification, p...
python
edit
1
3
bsd-3-clause
ac725f0d96cfe6ef989d3377e5e7ed9e339fe7e5
weijia/djangoautoconf,weijia/djangoautoconf
djangoautoconf/auth/ldap_backend_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pymongo import MongoClient\nfrom splinter import Browser\n\nfrom features.support.support import Api\n\n\nclass SplinterClient(object):\n\n def __init__(self, database_name):\n self.database_name = database_name\n self...
python
edit
1
1
mit
4c4bfbce3658fdac1e774a9aa2037fb1c466e21d
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
features/support/splinter_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA print function that pretty prints SymPy objects.\n\n:moduleauthor: Brian Granger\n\nUsage\n=====\n\nTo use this extension, execute:\n\n %load_ext sympy.interactive.ipythonprinting\n\nOnce the extension is loaded, SymPy Basic ob...
python
edit
1
4
bsd-3-clause
7e44e92e574efe110546a9d3a5e4807fa74fec6e
moble/sympy,jaimahajan1997/sympy,pbrady/sympy,yukoba/sympy,cccfran/sympy,asm666/sympy,kaushik94/sympy,jbbskinny/sympy,garvitr/sympy,lindsayad/sympy,dqnykamp/sympy,oliverlee/sympy,abloomston/sympy,dqnykamp/sympy,grevutiu-gabriel/sympy,hrashk/sympy,maniteja123/sympy,liangjiaxing/sympy,rahuldan/sympy,Designist/sympy,debug...
sympy/interactive/ipythonprinting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import db\n\n\nclass Base(db.Model):\n\n __abstract__ = True\n\n id = db.Column(db.Integer, primary_key=True)\n created_at = db.Column(db.DateTime, default=db.func.current_timestamp())\n updated_at = db.Column(db.DateTi...
python
edit
1
1
mit
5c928ea4c3f45cb32f7209a2c63a1c010d5860e0
mdsrosa/routes_api_python
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pylint: disable=W0401\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db.backends.oracle.base import *\nfrom django.db.backends.oracle.base import DatabaseWrapper as DjDatabaseWrapper\n\nimport cx_Oracle\n\n\nclass D...
python
edit
2
4
bsd-2-clause
9d1dc2ef7db2f883e05286edd3865acfdadc19be
JohnPapps/django-oracle-drcp
django-oracle-drcp/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom tastypie.api import Api\nfrom tracker.api import UserResource, TaskResource, WorkSessionResource\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib import ...
python
edit
1
0
mit
83ca7677ac77d55f9ba978f2988b18faa9e74424
GeneralMaximus/secondhand
secondhand/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test.client import RequestFactory\nfrom mock import Mock\nfrom unittest2 import TestCase\n\nfrom .helpers import RequestPatchMixin\nfrom .test_views import TestProxy\n\n\nclass ResponseConstructionTest(TestCase, RequestPatchMixi...
python
edit
1
1
mit
7a0ed88e1775429ce283cc315cc05ea3dbde229f
thomasw/djproxy
tests/response_construction_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport json\n\nimport requests\nfrom django.conf import settings\n\nfrom mesoshttp.acs import DCOSServiceAuth\n\nDCOS_AUTH = None\nDCOS_VERIFY = True\nif set...
python
edit
1
1
apache-2.0
1b093c116ff7fa926caa166c835fb3add4bf0036
ngageoint/scale,ngageoint/scale,ngageoint/scale,ngageoint/scale
scale/util/dcos.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom registration.forms import RegistrationFormUniqueEmail\n\nclass RegistrationUserForm(RegistrationFormUniqueEmail):\n\n class Meta:\n model = User\n fields = (\"email\")\n\n```\n\nApply this change: Add preferences form ...
python
edit
3
0
mit
edec252d9a050ead0084280f9772f05a2a3d7608
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport romanesco\nimport unittest\n\n\nclass TestSwiftMode(unittest.TestCase):\n def testSwiftMode(self):\n task = {\n 'mode': 'swift',\n 'script': \"\"\"\ntype file;\n\napp (file out) echo_app (string s)\n{\...
python
edit
1
2
apache-2.0
3b21be6f0711163fdb6f1cf99514fae04f395b62
girder/girder_worker,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,girder/girder_worker,Kitware/romanesco,girder/girder_worker
romanesco/plugins/swift/tests/swift_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['CloneableMeta']\n\n\ndef attach_new_init_method(cls):\n \"\"\"\n Replace the existing cls.__init__() method with a new one which\n also initialises the _clones attribute to an empty list.\n \"\"\"\n\n orig_init = ...
python
edit
1
1
mit
78deb7cc734bd5eaca9678bd61fa164699f21121
maxalbert/tohu
tohu/cloning.py
rejected_duplicate
Near-duplicate of sample 11935
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\n\nimport re, sys, markdown, requests, bs4 as BeautifulSoup\n\nreload(sys)\nsys.setdefaultencoding('utf8')\n\ndef check_url(url):\n try:\n return bool(requests.head(url, allow_redirects=True))\n except ...
python
edit
1
4
unlicense
06f10e09f5b1c5766815b6e7eb219b4e33082709
ligurio/free-software-testing-books
check_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom jacquard.odm import Session\nfrom jacquard.buckets import Bucket\nfrom jacquard.buckets.constants import NUM_BUCKETS\n\n\n@pytest.mark.parametrize('divisor', (\n 2,\n 3,\n 4,\n 5,\n 6,\n 10,\n 100,...
python
edit
1
1
mit
f2fd224b5e3c8cb4a919e082c47c603d4469a564
prophile/jacquard,prophile/jacquard
jacquard/buckets/tests/test_bucket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.shortcuts import render, redirect\nfrom django.template import Context\nfrom django.http import HttpResponse\nfrom django.core.servers.basehttp import FileWrapper\n\nfrom chemtools.extractor import CORES, RGROUPS, A...
python
edit
1
2
mit
c5ff897355fb7fce5022127bcae756e8c68dc864
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
data/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport os\nimport pytest\nfrom mock import patch\nfrom decouple import AutoConfig\n\n\ndef test_autoconfig_env():\n config = AutoConfig()\n path = os.path.join(os.getcwd(), 'autoconfig', 'env', 'project')\n with pa...
python
edit
1
1
mit
e6026134e02f516cc84e499494205efa0ad7441f
mrkschan/python-decouple,flaviohenriqu/python-decouple,henriquebastos/django-decouple,liukaijv/python-decouple,henriquebastos/python-decouple
tests/test_autoconfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport time\nfrom random import shuffle\nfrom FairDistributor import FairDistributor\n\n\ndef main():\n # User input for the number of targets and objects.\n number_of_targets = int(sys.argv[1])\n number_of_objects = in...
python
edit
1
4
mit
ec884c9db173f093d1398de54d00f1c36f22d8e4
Hackathonners/vania
examples/random_valid_test_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\nimport os\nimport hashlib\n\n\n\nwith open('media_urls.txt','r') as f:\n for url in f:\n \timagename = os.path.basename(url)\n \tm = hashlib.md5(url).hexdigest()\n \tif '.jpg' in url:\n \t\tshortname = m + '.j...
python
edit
null
null
mit
198a941c8c71802b72c33f5ef89d1d4d46e52eac
mixbe/kerstkaart2013,mixbe/kerstkaart2013
scripts/fetch_all_urls_to_disk.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom genes.mac.traits import is_osx\n\nfrom genes.brew import brew\n\n\ndef main():\n if is_osx():\n brew.install()\n\n```\n\nApply this change: Change the brew instruction. kinda dumb" }, { "role": "assistant", "conte...
python
edit
1
2
mit
a55bd9116114b546c06685e413209ab4279aaef5
hatchery/genepool,hatchery/Genepool2
genes/terraform/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Module for handling server and client versions\"\"\"\n\nSERVER_VERSION = '0.1.0'\nCLIENT_VERSIONS = ['0.5.0']\n\n\ndef validate(request):\n for acceptable_version in CLIENT_VERSIONS:\n if request.user_agent.string == 'ToF/' ...
python
edit
1
3
mit
6c0be372323393bdd8f7c734f7cf5f6e5f14a1a2
P1X-in/Tanks-of-Freedom-Server
tof_server/versioning.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport logging\nimport time\nfrom kafka.client import KafkaClient\nfrom kafka.consumer import SimpleConsumer\n\n\nclass KafkaReader(object):\n def __init__(self, host, port, group, topic, reconnect_wait_time=2)...
python
edit
1
3
apache-2.0
6e535ccc43a090112ba140ff0eca533eed9c9935
mre/kafka-influxdb,mre/kafka-influxdb
kafka_influxdb/reader/kafka_reader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.admin import register\n\nfrom falmer.events.models import Event\n\n\n@register(Event)\nclass EventModelAdmin(admin.ModelAdmin):\n pass\n\n```\n\nApply this change: Improve list displa...
python
edit
1
0
mit
5b616f5b3d605b1831d4ca8ca0a9be561f399a89
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/events/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport doj.monkey.django_utils_functional_lazy\nimport doj.monkey.django_http_response_streaminghttpresponse\nimport doj.monkey.inspect_getcallargs\n\n\ndef install_monkey_patches():\n doj.monkey.django_utils_f...
python
edit
1
2
bsd-3-clause
25e2c37bb9dc17f0c10ae744b1554b94c4e5a7ff
beachmachine/django-jython
doj/monkey/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom allauth.account.models import EmailAddress\nfrom allauth.socialaccount.providers.base import ProviderAccount\nfrom allauth.socialaccount.providers.oauth2.provider import OAuth2Provider\n\n\nclass KakaoAccount(ProviderAccount):\n @pr...
python
edit
1
2
mit
db7e0e2ddff42081bc46002c656611ce5a5ba7b5
pennersr/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,bittner/django-allauth,bittner/django-allauth,lukeburden/django-allauth,pennersr/django-allauth,bittner/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth
allauth/socialaccount/providers/kakao/provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom solver import Solver\nimport numpy as np\n\n\nclass RidgeRegression(Solver):\n \"\"\"\n Analytically performs ridge regression, where coefficients are regularized by learning rate alpha. This constrains\n coefficients and can ...
python
edit
1
2
mit
1c1c7dd151b3b7894fff74b31c15bded4ac4dc96
nathanntg/lin-train,nathanntg/lin-train
lintrain/solvers/ridgeregression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.http import HttpResponseRedirect\nfrom django.core.urlresolvers import reverse\nfrom news.models import Article, Event\nfrom door.models import DoorStatus\nfrom datetime import datetime\nfrom...
python
edit
1
2
mit
109018326b317a160e0ba555b23b7b4401f44ed3
hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website
website/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nimport unittest\nimport subprocess\nimport time\n\ncmd = 'python -m pretenders.server.server --host 127.0.0.1 --port 50000'\n\np = subprocess.Popen(cmd)\ntime.sleep(2)\n\nsys.path.append(os.path.abspath(os.path.join(o...
python
edit
1
0
mit
49fc55369d4755148d3db58c593d0b6f4d60582d
ucoin-io/cutecoin,ucoin-io/cutecoin,ucoin-io/cutecoin
run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bcbio.ngsalign.bowtie2 import filter_multimappers\nimport bcbio.pipeline.datadict as dd\n\ndef clean_chipseq_alignment(data):\n aligner = dd.get_aligner(data)\n data[\"raw_bam\"] = dd.get_work_bam(data)\n if aligner:\n ...
python
edit
3
2
mit
5fef3e5a5425ab71abb4c3b8a36a2273c9947b2e
biocyberman/bcbio-nextgen,biocyberman/bcbio-nextgen,chapmanb/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,brainstorm/bcbio-nextgen,a113n/bcbio-nextgen,lbeltrame/bcbio-nextgen,biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,chapmanb/bcbio-nextgen,a113n/bcbio-nextgen,lbeltrame/bcbio-nextgen,brain...
bcbio/chipseq/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom piper.utils import DotDict\nfrom piper.utils import dynamic_load\n\nimport pytest\n\n\nclass TestDotDict(object):\n def test_get_nonexistant_raises_keyerror(self):\n with pytest.raises(KeyError):\n dd = DotDict({})...
python
edit
1
1
mit
924766a6b56aba3a462600a70e5f4b7b322c677e
thiderman/piper
test/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom ..target import Target\n\nclass LocalFile(Target):\n def __init__(self, path):\n self._path = path\n super(LocalFile, self).__init__()\n if self.exists():\n self._memory['timestamp'] = os.p...
python
edit
1
4
mit
f8b4f4a2c5a7f529816f78344509a3536a0f3254
ibab/datapipe
datapipe/targets/filesystem.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, BIGINT, String, Integer\n\nfrom meetup_facebook_bot.models.base import Base\n\n\nclass Speaker(Base):\n __tablename__ = 'speakers'\n id = Column(Integer, primary_key=True, autoincrement=True)\n page_s...
python
edit
1
1
mit
23450c05921ecadedc03a273804e8e6ddaa5439a
Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot
meetup_facebook_bot/models/speaker.py
rejected_duplicate
Near-duplicate of sample 11450
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A collection of common git actions.\"\"\"\n\nfrom subprocess import check_output, PIPE, Popen, STDOUT\n\n\ndef is_valid_reference(reference):\n \"\"\"Determines if a reference is valid.\n\n :param str reference: name of the refe...
python
edit
3
2
mit
cbb6f7495123f1745284d0b098dcfaae0b31c5f3
Brickstertwo/git-commands
bin/commands/utils/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom io import StringIO\n\nfrom django.core.management import call_command\nfrom django.test import TestCase\nfrom django.utils import timezone\n\nfrom geotrek.feedback.models import Report\nfrom geotrek.feedback.factories import ReportFact...
python
edit
1
1
bsd-2-clause
7bb93bfdf2b75ba8df0983d058854a1d00d75c16
makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin
geotrek/feedback/tests/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass BigForeignKey(models.ForeignKey):\n def db_type(self, connection):\n \"\"\" Adds support for foreign keys to big integers as primary keys.\n \"\"\"\n presumed_type = super().db...
python
edit
1
3
mit
0722b517f5b5b9a84b7521b6b7d350cbc6537948
uranusjr/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,uranusjr/pycontw2016,pycontw/pycontw2016,uranusjr/pycontw2016,uranusjr/pycontw2016
src/core/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"Zendesk\"\n\nimport json\nimport requests\nfrom flask import current_app\n\n\nTICKETS_URL = 'https://ministryofjustice.zendesk.com/api/v2/tickets.json'\n\n\ndef create_ticket(payload):\n \"Create a new Zendesk ...
python
edit
1
1
mit
ef9d7cbbd79078e494faed730318a18f995f3a78
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/libs/zendesk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _\nfrom django import forms\nfrom models import ExcelImportTask\nfrom django.forms import ModelForm\n\n\nclass ExcelFormatTranslateForm(forms.Form):\n # title = forms.CharField(max_le...
python
edit
1
0
bsd-3-clause
0515f71d861529262aada1ad416c626277e11d9e
weijia/django-excel-to-model,weijia/django-excel-to-model
django_excel_to_model/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\"\n\n__init__.py\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__docformat__ = 'restructuredtext'\n__version__ = '0.5'\n\n```\n\nApply this change: Increment patch version to 0.5.1" }, { "role":...
python
edit
1
0
bsd-3-clause
2eb9220ee2043c2355682cab9094c8cd201bc2f7
myint/yolk,myint/yolk
yolk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\ndef configure(app):\n @app.before_first_request\n def initialize():\n print \"Called only once, when the first request comes in\"\n\n```\n\nApply this change: Create channel homepage if not exists in before...
python
edit
2
2
mit
e6fcb5122b7132e03257ac5c883f5e44ccdd1ef5
fdumpling/quokka,lnick/quokka,CoolCloud/quokka,Ckai1991/quokka,felipevolpone/quokka,romulocollopy/quokka,cbeloni/quokka,ChengChiongWah/quokka,cbeloni/quokka,CoolCloud/quokka,romulocollopy/quokka,fdumpling/quokka,fdumpling/quokka,maurobaraldi/quokka,maurobaraldi/quokka,Ckai1991/quokka,lnick/quokka,ChengChiongWah/quokka,...
quokka/ext/before_request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom chatterbot_corpus import corpus\n\n\nclass CorpusUtilsTestCase(TestCase):\n \"\"\"\n This test case is designed to make sure that all\n corpus data adheres to a few general rules.\n \"\"\"\n\n...
python
edit
1
5
bsd-3-clause
cf626539192ff60a0c2ffd06c61fb35f2d8861a1
gunthercox/chatterbot-corpus
tests/test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.16.3\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\...
python
edit
1
0
mit
b8f604e11270b889bafc38709814df4e1bb961dd
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\n\nfrom threading import Thread\n\nfrom coinotomy.config.config import STORAGE_CLASS, STORAGE_DIRECTORY, WATCHERS\n\n\nlog = logging.getLogger(\"main\")\nlogging.basicConfig(filename=os.path.join(STORAGE_DIRECTORY,...
python
edit
1
3
mit
7158d44eaf764b8140675bbe7b8e2bea857edd25
sDessens/coinotomy
coinotomy/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport abc\nfrom collections import namedtuple\n\n\nKey = namedtuple('Key', ['x', 'y'])\n\n\nclass Keyboard(metaclass=abc.ABCMeta):\n def __init__(self):\n pass\n\n @abc.abstractproperty\n def keys(self):\n \"\"\" Ret...
python
edit
1
1
mit
266968b5f5188c526506782a47ea03aa3d32bf7a
Cyanogenoid/kb-project
kb/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nimport pytest\nfrom hypothesis_auto import auto_pytest_magic\n\nfrom isort import main\n\nauto_pytest_magic(main.sort_imports)\n\n\ndef test_is_python_file():\n assert main.is_python_file(\"file.py\")\n assert...
python
edit
1
1
mit
876ff2e147aaa751d2ab2f5423b30fcfcc02fba9
PyCQA/isort,PyCQA/isort
tests/test_main.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#\n# Capture calibration chessboard\n#\n\n# External dependencies\nimport time\nimport cv2\nimport Calibration\n\n# Calibration pattern size\npattern_size = ( 9, 6 )\n# Get the camera\ncamer...
python
edit
1
0
mit
10d09367111d610e82344e9616aab98815bf9397
microy/RobotVision,microy/RobotVision
capture_chessboard.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom operator import attrgetter\nfrom .base_NEW import TohuUltraBaseGenerator\n\n__all__ = ['ExtractAttribute']\n\nlogger = logging.getLogger('tohu')\n\n\nclass ExtractAttribute(TohuUltraBaseGenerator):\n \"\"\"\n Gene...
python
edit
1
1
mit
6ad448568acc130118d382b29a2ea1930f738a3f
maxalbert/tohu
tohu/derived_generators_NEW.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom app import app, webhooks\n\n@webhooks.hook(app.config.get('GITLAB_HOOK'), handler='gitlab')\nclass Gitlab:\n def issue(self, data):\n pass\n\n...
python
edit
1
1
apache-2.0
030a786db1c0602125bfe4093c6a5709b0202858
pipex/gitbot,pipex/gitbot,pipex/gitbot
app/hooks/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n tests.test_unit\n ~~~~~~~~~~~~~~~\n\n Module dedicated to testing the unit utility functions.\n\n :copyright: 2015 by Lantz Authors, see AUTHORS for more details.\n :license: BSD, see LICENSE...
python
edit
1
1
bsd-3-clause
de97d95d7746cbbf6c2c53a660553ce56d294288
MatthieuDartiailh/lantz_core
tests/test_unit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _ # noqa\n\nfrom horizon import exceptions\nfrom openstack_dashboard import api\n\n\ndef get_interfaces_data(self):\n try:\n router_id = self.kwargs['router_id']\n rout...
python
edit
1
5
apache-2.0
21f152589550c1c168a856798690b9cf957653db
dreamhost/akanda-horizon,dreamhost/akanda-horizon
akanda/horizon/routers/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport logging\n\nfrom django.core.exceptions import PermissionDenied\nfrom tastypie.resources import ModelResource, ALL\nfrom tastypie.authorization import Authorization\n\nfrom apps.authentication.models import ...
python
edit
3
2
mit
db7d56453e09981c3a3d57deb9ad3460ac086857
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
apps/api/rfid/user.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 = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = '56984fa0e4c3c745652510f342c0fb2724d846c2'\n\nARCH = {\n 'cygwin': '32bit'...
python
edit
1
0
mit
e7825da0f8467717aac9857bbc046d946aa2ce66
astoilkov/electron,tylergibson/electron,yalexx/electron,bruce/electron,stevekinney/electron,kikong/electron,beni55/electron,nagyistoce/electron-atom-shell,GoooIce/electron,xiruibing/electron,timruffles/electron,thomsonreuters/electron,thomsonreuters/electron,gabrielPeart/electron,stevemao/electron,baiwyc119/electron,jc...
script/lib/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport NGrams\n\n\nclass TestNGrams(unittest.TestCase):\n def test_unigrams(self):\n sentence = 'this is a random piece of text'\n ngram_list = NGrams.generate_ngrams(sentence, 1)\n self.assertEqual(...
python
edit
1
1
bsd-2-clause
8d339d610b57b40534af2a8d7cdbdaec041a995a
ambidextrousTx/RNLTK
test/TestNGrams.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.conf import settings\nimport uuid\n\n\nfrom django.db import models\n\nclass Tviit(models.Model):\n uuid = models.CharField(unique=True, max_length=40, default=uuid.uuid4().int, editab...
python
edit
3
1
mit
c1e17f9501fb9afc69f9fba288fa9e4cfac262e2
DeWaster/Tviserrys,DeWaster/Tviserrys
tviit/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"ArgumentParser with Italian translation.\"\"\"\n\nimport argparse\nimport sys\n\n\ndef _callable(obj):\n return hasattr(obj, '__call__') or hasattr(obj, '__bases__')\n\n\nclass ArgParser(argparse.ArgumentParser):\n def __init__(...
python
edit
1
9
mit
0243b5d468593edda6c207aaa124e8911a824751
claudio-unipv/pvcheck,claudio-unipv/pvcheck
src/argparser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nScatterplot with marginal ticks\n===============================\n\n_thumb: .68, .32\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set(style=\"white\", color_codes=True)\n\n# Generate a ran...
python
edit
1
0
bsd-3-clause
99580712595402cc84db3eed37e913b18cae1703
mwaskom/seaborn,arokem/seaborn,anntzer/seaborn,mwaskom/seaborn,anntzer/seaborn,arokem/seaborn
examples/marginal_ticks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom openerp import models, fields\n'''\nThis module create model of Course\n'''\n\n\nclass Course(models.Model):\n '''\n this class model of Course\n '''\n _name = 'openacademy.course' # Model odoo name\n\n name = fields.Ch...
python
edit
1
3
apache-2.0
314ba088f0c2cb8e47da22a8841127a17e4e222d
GavyMG/openacademy-proyect
openacademy/model/openacademy_course.py
rejected_duplicate
Near-duplicate of sample 1190
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module provides plugins for basic duplicate code detection.\"\"\"\n\nfrom hairball.plugins import HairballPlugin\n\nclass DuplicateChecks(HairballPlugin):\n\n \"\"\"Plugin that keeps track of which scripts have been \n used...
python
edit
2
5
bsd-2-clause
bad66654ee2a2688a4931dc88c617ea962c8cdf4
thsunmy/hairball,jemole/hairball,ucsb-cs-education/hairball,thsunmy/hairball,jemole/hairball,ucsb-cs-education/hairball
hairball/plugins/duplicate.py
rejected_duplicate
Near-duplicate of sample 652
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.cache import cache\n\n\ndef cache_get_key(*args, **kwargs):\n \"\"\"Get the cache key for storage\"\"\"\n import hashlib\n serialise = []\n for arg in args:\n serialise.append(str(arg))\n for key,arg i...
python
edit
1
4
mit
d48a15c9585dfdb4441a0ca58041d064defe19b2
daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban
libs/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\n\nimport os\nimport os.path\nimport unittest\n\n\nclass CommandTestCase(unittest.TestCase):\n\n def setUp(self):\n self.project_data = {\n 'code_search': {'csearchindex': 'test_csearchindex'},\n 'folders': ...
python
edit
1
2
mit
4612f10a8d4dcd0ec7133b12411387c74becbdb7
pope/SublimeYetAnotherCodeSearch,pope/SublimeYetAnotherCodeSearch
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom docutils.core import publish_string\nimport coffeescript\nfrom scss import Scss\nfrom stylus import Stylus\n\nfrom .util import as_unicode\n\n\n\ndef rst_to_html(source):\n # This code was taken from http://wiki.python.org/moin/ReSt...
python
edit
1
1
mit
654219bf00dc4a029d9e42779c3ad2d552948596
kxxoling/Plim
plim/extensions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for running TopoFlow components in CMI.\"\"\"\nimport os\n\n\ndef locate_topoflow(cache_dir):\n for x in os.listdir(cache_dir):\n if x.startswith('topoflow'):\n return x\n\n\nroot_dir = '/home/csdms/wmt/topo...
python
edit
1
3
mit
ae74abbe809332a68c3e68f7ad19e0b1b2259f0f
Elchin/topoflow-cmi-testing,mdpiper/topoflow-cmi-testing
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom rest_framework.test import APIClient\nfrom rest_framework import status\nfrom rest_framework.test import APITestCase\n\nfrom hs_core.hydroshare.utils import get_resource_types\n\n\nclass TestResourceTypes(APITestCase):\n...
python
edit
1
2
bsd-3-clause
5346741d0d5360cdf776252dcbe400ff839ab9fc
FescueFungiShare/hydroshare,hydroshare/hydroshare,FescueFungiShare/hydroshare,hydroshare/hydroshare,ResearchSoftwareInstitute/MyHPOM,ResearchSoftwareInstitute/MyHPOM,FescueFungiShare/hydroshare,ResearchSoftwareInstitute/MyHPOM,RENCI/xDCIShare,RENCI/xDCIShare,FescueFungiShare/hydroshare,hydroshare/hydroshare,hydroshare/...
hs_core/tests/api/rest/test_resource_types.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom app import data_api_client\n\nfrom flask import abort, render_template\nfrom ...helpers.buyers_helpers import get_framework_and_lot\nfrom ...main import main\n\n\n@main....
python
edit
3
1
mit
8a645abd1880fdac72e36f7366ae81fa13bf78ae
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-di...
app/main/views/digital_outcomes_and_specialists.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mpi4py import MPI\n\nimport pytest\n\nfrom devito import Grid, Function, Distributor\n\n\n@pytest.mark.parallel(nprocs=2)\ndef test_hello_mpi():\n size = MPI.COMM_WORLD.Get_size()\n rank = MPI.COMM_WORLD.Get_rank()\n name = MP...
python
edit
1
1
mit
993c4c98fb9529946669b4d13e6c5a9ff4ab3f67
opesci/devito,opesci/devito
tests/test_mpi.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 models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('twitter', '0013_user_favorites'),\n ]\n\n oper...
python
edit
1
0
mit
8f0fb4c39e8c6fcfc4ee507933e935028e213ba9
philgyford/django-ditto,philgyford/django-ditto,philgyford/django-ditto
ditto/twitter/migrations/0014_auto_20150819_1342.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flexmock import flexmock\nfrom flask.ext.storage import MockStorage\nfrom flask_uploads import init\n\ncreated_objects = []\nadded_objects = []\ndeleted_objects = []\ncommitted_objects = []\n\n\nclass MockModel(object):\n def __init...
python
edit
1
2
mit
311549ce2dd126063b5e0b1e3476cbae78a4d6d5
FelixLoether/flask-uploads,FelixLoether/flask-image-upload-thing
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request, make_response\nimport json\n\nfrom themint import app\nfrom themint.service import message_service\n\n@app.route('/', methods=['GET'])\ndef index():\n return \"Mint OK\"\n\n\n# TODO remove <title_number> below,...
python
edit
1
3
mit
64a3526448b0e025bd75062a93d24c0072cbbf43
LandRegistry/mint-alpha,LandRegistry/mint-alpha
themint/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport msgpack\n\n\nclass Message(object):\n def __init__(self, message_type, data, node_id):\n self.type = message_type\n self.data = data\n self.node_id = node_id\n\n def serialize(self):\n return msgpack...
python
edit
1
1
mit
670a72728ea7462972f3578b62cf33c5740187c2
mbeacom/locust,mbeacom/locust,locustio/locust,mbeacom/locust,locustio/locust,mbeacom/locust,locustio/locust,locustio/locust
locust/rpc/protocol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nfrom django.shortcuts import render_to_response\n\n\ndef home_page(request):\n return render_to_r...
python
edit
1
1
apache-2.0
776c1dbda3871c2b94d849ea59db25f93bb59525
lliss/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,lliss/model-my-watershed,lliss/model-my-watershed,kdeloach/model-my-watershed,project-icp/bee-pollinator-app,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,lliss/model-my-watershed,WikiWa...
src/mmw/apps/water_balance/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .request_test import test_app\n\n\ndef test_200_for_normal_response_validation():\n settings = {\n 'pyramid_swagger.schema_directory': 'tests/sample_schemas/good_app/',\n 'pyramid_swagger.enable_swagger_spec_validation...
python
edit
1
1
bsd-3-clause
0286a26fc19b0474a45ecd4a8a6d0bb1e6afab02
prat0318/pyramid_swagger,analogue/pyramid_swagger,striglia/pyramid_swagger,brianthelion/pyramid_swagger,striglia/pyramid_swagger
tests/acceptance/response_test.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 models, migrations\n\nfrom query.operations import engine_specific\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('quer...
python
edit
3
0
apache-2.0
828215d3de3ddd2febdd190de067b0f6e5c2e9e1
UUDigitalHumanitieslab/texcavator,UUDigitalHumanitieslab/texcavator,UUDigitalHumanitieslab/texcavator
query/migrations/0017_auto_20160224_1306.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Remove all the .pyc and .pyo files under ../Lib.\n\ndef deltree(root):\n import os\n def rm(path):\n os.unlink(path)\n npyc = npyo = 0\n dirs = [root]\n while dirs:\n dir = dirs.pop()\n for short in os....
python
edit
2
6
mit
fb2f66adf5ba60d2cda934ef27125ce84057367e
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
PCbuild/rmpyc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pip._internal.vcs.mercurial import Mercurial\nfrom tests.lib import _create_test_package\n\n\ndef test_get_repository_root(script):\n version_pkg_path = _create_test_package(script, vcs=\"hg\")\n tests_path = version_pkg_path.joi...
python
edit
1
1
mit
d301cbeb4e6f248ed137a9d1a6b6f39558231cc3
pradyunsg/pip,pfmoore/pip,pradyunsg/pip,pypa/pip,pfmoore/pip,pypa/pip,sbidoul/pip,sbidoul/pip
tests/functional/test_vcs_mercurial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport xlrd\nfrom django.core.management.base import BaseCommand, CommandError\n\nclass Command(BaseCommand):\n \"\"\"\n \"\"\"\n args = \"<filename>\"\n help = \"Parses an excel document of OLCC price data.\"\n\n ...
python
edit
7
7
mit
3f54454c2eec9378d7bef836f37967c044f88faa
twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc
django_olcc/olcc/management/commands/olccimport.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\n\nimp...
python
edit
4
3
apache-2.0
27ab3ad3d1ce869baec85264b840da49ff43f82f
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft
scripts/sync_exceeded_traffic_limits.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom project.settings_common import *\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\n# CACHE\nfrom memcacheify import memcacheify\n\nCACHES = memcacheify()\n\nMIDDLEWARE_CLASSES += (\n 'django.middleware.cache.UpdateCacheMiddleware',\n '...
python
edit
5
0
mit
3e0b91b310afb64589e934a18fd75e767b75e43f
AxisPhilly/lobbying.ph-django,AxisPhilly/lobbying.ph-django,AxisPhilly/lobbying.ph-django
project/settings_prod.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# coding=utf8\n\nfrom flask import Flask\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker, scoped_session\n\nimport model\nimport defaults\nfrom views.frontend import frontend, oid\n\ndef...
python
edit
1
1
mit
52b0833fb597f7a6e9de4d5da768bb2bc8f5f012
mbr/dope,mbr/dope
dope/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Attribute prefix for allowing dotlookups when keys conflict with dict\n# attributes.\nPREFIX = '_bd_'\n\n\nclass BetterDict(dict):\n def __init__(self, *args, **kwargs):\n # Prefix that will be appended to keys for dot lookups t...
python
edit
1
7
mit
7c1886cf8751281e1b41e80341a045b46c2c38f5
thomasw/querylist,zoidbergwill/querylist
querylist/betterdict.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\nurlpatterns = patterns('django_dowser.views',\n url(r'^trace/(?P<typename>[\\.\\-\\w]+)(/(?P<objid>\\d+))?$', 'trace'),\n url(r'^tree/(?P<typename>[\\.\\-\\w]+)/(?P<objid>\\d+)$', 'tree'),\n ...
python
edit
7
0
mit
7669a43b1dcf097434942bea64e05a29c32f9717
munhitsu/django-dowser,munhitsu/django-dowser
django_dowser/urls.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport sys\nfrom collections import namedtuple\n\nfrom .client import Elasticsearch\n\n__all__ = ('Elasticsearch',)\n\n\n__version__ = '0.1.0a'\n\nversion = __version__ + ' , Python ' + sys.version\n\n\nVersionInfo = namedtuple('...
python
edit
1
3
apache-2.0
a82067a5484133233ccf7037e5c277eaaa5318fa
aio-libs/aioes
aioes/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport compas\nimport math\nimport numpy\n\n\ndef pytest_ignore_collect(path):\n if \"rhino\" in str(path):\n return True\n\n if \"blender\" in str(path):\n return True\n\n if \"ghpython\" in str(path):...
python
edit
1
6
mit
dd248a14a40dea03458985640571bccf9b38b030
compas-dev/compas
conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nUnit test.\n\nEach file in tests/ is for each main package.\n\"\"\"\nimport sys\nimport unittest\n\nsys.path.append(\"../pythainlp\")\n\nloader = unittest.TestLoader()\ntestSuite = loader.discover(\"tests\")...
python
edit
1
0
apache-2.0
ee32b2e48acd47f1f1ff96482abf20f3d1818fc4
PyThaiNLP/pythainlp
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"normal {{ normal }} normal {fo.__add__!s}\"\n\n\n\" : source.python, string.quoted.double.python\nnormal : source.python, string.quoted.double.python\n{{ : constant.character.format.python, source.python, str...
python
edit
null
null
mit
93c914a0537ee0665e5139e8a8a8bc9508a25dd7
MagicStack/MagicPython,MagicStack/MagicPython,MagicStack/MagicPython
test/strings/format2.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = '1.7.0'\nrevision = ' development'\nmilestone = 'Yoitsu'\nrelease_number = '101'\nprojectURL = 'https://syncplay.pl/'\n\n```\n\nApply this change: Mark as 1.7.0 beta 1" }, { "role": "assistant", "content": "version = '...
python
edit
1
0
apache-2.0
cff0f979abc4bf9bfb24b9cd70c447a2bc838501
Syncplay/syncplay,Syncplay/syncplay
syncplay/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom .views import SpaCmsPageDetailApiView\n\nurlpatterns = [\n url(r'^(?P<language_code>[\\w-]+)/pages/$', SpaCmsPageDetailApiView.as_view(), name='cms_page_detail_home'),\n url(r'^(?P<language_cod...
python
edit
1
0
mit
4a4dbfd142e2f8fca3e82d7790ace4ed88bb0b3f
dreipol/djangocms-spa,dreipol/djangocms-spa
djangocms_spa/urls.py
accepted
null
true