messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os,sys\r\n\r\n#General vars\r\nCURDIR=os.path.dirname(os.path.abspath(__file__))\r\nTOPDIR=os.path.dirname(CURDIR)\r\nDOWNLOAD_DIR=TOPDIR+'\\\\downloads'\r\n\r\n#Default vars\r\nPY_VER='Python27'\r\nBIN_DIR=TOPDIR+'\\\\bin'\r\nPY_DIR...
python
edit
1
0
mit
42a4d5959524875fd39c190f6119eb06a97eabf2
lpinner/metageta
build/setenv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport pymongo\n\nconnection = pymongo.MongoClient(\"mongodb://localhost\")\ndb = connection.vcf_explorer\n\nimport database\nimport parse_vcf\nimport filter_vcf\nimport query\n\n```\n\nApply this change: Set mongodb settings using config...
python
edit
6
0
mit
8cc8f9a1535a2361c27e9411f9163ecd2a9958d5
CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer
utils/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 DeepMind Technologies Limited.\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
1
apache-2.0
3a3997b19966560b828efb1699ee29a58cacbfc8
deepmind/spriteworld
spriteworld/configs/cobra/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef jsonapi_exception_handler(exc, context):\n \"\"\"\n Custom exception handler that nests detail inside errors.\n \"\"\"\n from rest_framework.views import exception_handler\n response = exception_handler(exc, context)\n\...
python
edit
1
3
apache-2.0
7375c41b1d9bd5ca153df80705ae1887e6f2e70b
RomanZWang/osf.io,felliott/osf.io,cosenal/osf.io,caseyrollins/osf.io,aaxelb/osf.io,aaxelb/osf.io,ckc6cz/osf.io,zamattiac/osf.io,emetsger/osf.io,ZobairAlijan/osf.io,monikagrabowska/osf.io,petermalcolm/osf.io,mfraezz/osf.io,crcresearch/osf.io,MerlinZhang/osf.io,mluke93/osf.io,hmoco/osf.io,emetsger/osf.io,felliott/osf.io,...
api/base/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib2\n\n#Database settings\ndatabase_connect = \"dbname='ridprod'\"\nkv1_database_connect = \"dbname='kv1tmp'\"\niff_database_connect = \"dbname='ifftmp'\"\npool_generation_enabled = True\n\n#NDOVLoket settings\nndovloket_url = \"...
python
edit
1
0
bsd-2-clause
87753b0bff057b61879e2dbcc4dceba7aec95451
bliksemlabs/bliksemintegration,bliksemlabs/bliksemintegration
settings/const.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport os\n\nfrom mopidy.models import Playlist, Track\nfrom mopidy.backends.gstreamer import GStreamerBackend\n\nfrom tests.backends.base import (BasePlaybackControllerTest,\n BaseCurrentPla...
python
edit
3
0
apache-2.0
c535c22884dbb0df227d4ad142e4d4515415ca29
dbrgn/mopidy,jcass77/mopidy,woutervanwijk/mopidy,jcass77/mopidy,tkem/mopidy,kingosticks/mopidy,ali/mopidy,diandiankan/mopidy,hkariti/mopidy,bacontext/mopidy,rawdlite/mopidy,jcass77/mopidy,bacontext/mopidy,pacificIT/mopidy,ZenithDK/mopidy,adamcik/mopidy,mopidy/mopidy,dbrgn/mopidy,mokieyue/mopidy,hkariti/mopidy,woutervan...
tests/backends/gstreamer_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#coding:utf-8\nimport sys\nfrom distutils.core import setup\n\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n user_options = [('pytest-args=', 'a', \"Arguments to pass to py.test\")]\n\n def ...
python
edit
1
1
mit
729c1b3f798c7dafa3b8d528aa9bdf123f3068b1
ffcalculator/fantasydata-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport glob\n\n__all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+\"/*.py\")]\n\n\nclass InvalidConfigException(Exception):\n pass\n\nclass PluginMount(type):\n def __...
python
edit
1
3
bsd-3-clause
270e222301cf8c61e7632b366fba349552356928
vtcsec/wargame-scorer
services/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom japronto import Application\nfrom services.articles import ArticleService\nfrom mongoengine import *\n\narticle_service = ArticleService()\n\ndef index(req):\n\t\"\"\"\n\tThe main index\n\t\"\"\"\n\treturn req.Response(text='You reach...
python
edit
3
1
mit
7cda2fe25dd65b3120f177d331088ce7733d1c6c
azzuwan/PyApiServerExample
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom versions.software.utils import get_command_stderr, get_soup, \\\n get_text_between\n\n\ndef name():\n \"\"\"Return the precise name for the software.\"\"\"\n return 'Zulu OpenJDK'\n\n\ndef installed_version():\n ...
python
edit
1
8
mit
b0814b95ea854f7b3f0b9db48ae9beee078c2a30
mchung94/latest-versions
versions/software/openjdk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom .base import FunctionalTest\n\n\nclass LayoutStylingTest(FunctionalTest):\n\n def test_bootstrap_links_loaded_successfully(self):\n self.browser.get(self.live_server_url)\n\n self.assertIn(\n \"...
python
edit
1
6
bsd-3-clause
6941d9048a8c630244bb48100864872b35a1a307
andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop
tests/functional/test_layout_and_styling.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport lxml.etree as ET\nimport argparse\nimport pkg_resources\n\n\ndef convert(inxml):\n\n dom = ET.parse(inxml)\n xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform',\n ...
python
edit
1
1
mit
e4e38ecd09b4c96e5b801b1bc9f7a943934c6485
cwacek/cobertura-clover-transform
cobertura_clover_transform/converter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\n\nclass Termite:\n def __init__(self, label, color):\n self.label = label\n self.color = color\n self.trail = []\n self.tracker = None\n\n def to_csv(self):\n wi...
python
edit
3
2
mit
e7942afdc1e93aec57e4e02d862a91eab9b5c0cb
dmrib/trackingtermites
trackingtermites/termite.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2015-2016 Regents of the University of California\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 Li...
python
edit
1
0
apache-2.0
76cf350b4ca48455e9ae7d6288d992389a8ec0b5
BD2KGenomics/slugflow,BD2KGenomics/slugflow
src/toil/provisioners/azure/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# test1.py\n# Ronald L. Rivest and Karim Husayn Karimi\n# August 17, 2017\n# Routine to experiment with scipy.optimize.minimize\n\nimport scipy.optimize\nfrom scipy.stats import norm\n\n# function to minimize:\ndef g(xy):\n (x,y) = xy\n ...
python
edit
1
1
mit
975a5010e97b11b9b6f00923c87268dd883b1cfa
ron-rivest/2017-bayes-audit,ron-rivest/2017-bayes-audit
2017-code/opt/test1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Data sources\ndatabase(\n thermoLibraries = ['primaryThermoLibrary'],\n reactionLibraries = [],\n seedMechanisms = [],\n kineticsDepositories = ['training'],\n kineticsFamilies = ['!Intra_Disproportionation','!Substitution_...
python
edit
11
0
mit
adfbd9b192316bc527259a1c0a01db0a8dbd5f3e
nyee/RMG-Py,faribas/RMG-Py,enochd/RMG-Py,faribas/RMG-Py,comocheng/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,chatelak/RMG-Py,enochd/RMG-Py,nyee/RMG-Py,KEHANG/RMG-Py,KEHANG/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py
examples/rmg/liquid_phase/input.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom .load_data_from_file import load_data_from_file\nfrom .get_old_dict_values import get_old_dict_values\nfrom .log import log\nfrom .paths import make_course_path\n\n\ndef load_previous(course_path):\n\ttry:\n\t\tprior_dat...
python
edit
1
7
mit
d40fa3554847a239f90a7f7edec8efbf30c753f0
StoDevX/course-data-tools,StoDevX/course-data-tools
scripts/lib/check_for_course_revisions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tempfile, os\n\nimport nose.tools as nt\n\nip = get_ipython()\nip.magic('load_ext storemagic')\n\ndef test_store_restore():\n ip.user_ns['foo'] = 78\n ip.magic('alias bar echo \"hello\"')\n tmpd = tempfile.mkdtemp()\n ip....
python
edit
2
2
bsd-3-clause
6220c36f046b2b504cc2ebbbc04a34c4d826564d
ipython/ipython,ipython/ipython
IPython/extensions/tests/test_storemagic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nclass Config(object):\n \"\"\"Parent configuration class.\"\"\"\n DEBUG = False\n CSRF_ENABLED = True\n SECRET_KEY = os.getenv('SECRET_KEY')\n SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')\n\n\nclass Deve...
python
edit
1
0
mit
df1e5be22cd4c7cb95952c4419defeab0eb284a4
Alweezy/cp2-bucketlist-api,Alweezy/cp2-bucketlist-api,Alweezy/cp2-bucketlist-api
instance/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom threading import Thread\nglobal exit_flag\nexit_flag = False\ndef g():\n i = 1\n while not exit_flag:\n i = (i + 1) % 100000000\n if i % 100000 == 0: print(\"f making progress: {0}\".format(i))\n\ndef f():\n g()\...
python
edit
1
3
apache-2.0
ce12cd0f56997dc6d33a9e4e7c13df27d05a133b
zooba/PTVS,zooba/PTVS,huguesv/PTVS,int19h/PTVS,huguesv/PTVS,huguesv/PTVS,Microsoft/PTVS,int19h/PTVS,zooba/PTVS,int19h/PTVS,int19h/PTVS,huguesv/PTVS,Microsoft/PTVS,int19h/PTVS,Microsoft/PTVS,zooba/PTVS,Microsoft/PTVS,int19h/PTVS,Microsoft/PTVS,zooba/PTVS,huguesv/PTVS,zooba/PTVS,Microsoft/PTVS,huguesv/PTVS
Python/Tests/TestData/DebuggerProject/ThreadJoin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom chalice.cli.filewatch import stat\n\n\nclass FakeOSUtils(object):\n def __init__(self):\n self.initial_scan = True\n\n def walk(self, rootdir):\n yield 'rootdir', [], ['bad-file', 'baz']\n if sel...
python
edit
1
3
apache-2.0
87d2e511b0fedd2a09610c35337336d443a756a4
awslabs/chalice
tests/unit/cli/filewatch/test_stat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom metakernel.tests.utils import (get_kernel, get_log_text, \n clear_log_text, EvalKernel)\nimport os\n\ndef test_download_magic():\n kernel = get_kernel(EvalKernel)\n kernel.do_execute(\"%downlo...
python
edit
1
3
bsd-3-clause
46d274401080d47f3a9974c6ee80f2f3b9c0c8b0
Calysto/metakernel
metakernel/magics/tests/test_download_magic.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Bump minor point version to 0.1.1" }, { "role": "assistant", "content": "_author__ = 'Liav Koren'\n__email__ = '<EMAIL>'\n__version__ = '0.1.1'\n" } ]
python
new_file
1
0
apache-2.0
749650a56347dad48bb2eabff139646ecf5c98d0
liavkoren/feedbot
feedbot/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Setup script for the pyparsing module distribution.\"\"\"\r\nfrom distutils.core import setup\n\nfrom pyparsing import __version__\r\n\r\nsetup(# Distribution meta-data\r\n name = \"pyparsing\",\n versio...
python
edit
1
0
mit
5476145559e0e47dac47b41dd4bfdb9fd41bfe29
5monkeys/pyparsing
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport functools\n\nfrom scrapi.base import XMLHarvester\nfrom scrapi.linter import RawDocument\n\nfrom .utils import get_leaves\nfrom .utils import TEST_SCHEMA, TEST_NAMESPACES, TEST_XML_DOC\n\n\n...
python
edit
2
4
apache-2.0
01c0dd4d34e61df589b3dd9ee3c5f8b96cf5486b
CenterForOpenScience/scrapi,jeffreyliu3230/scrapi,fabianvf/scrapi,felliott/scrapi,erinspace/scrapi,icereval/scrapi,mehanig/scrapi,ostwald/scrapi,erinspace/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,fabianvf/scrapi,felliott/scrapi
tests/test_transformer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nparser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis')\nparser.add_argument('-v', '--version', action='version', version='0.1.0')\n\nsubparsers = parser.add_subparsers(help='commands')\n\n# ...
python
edit
2
0
mit
cf8621affe1e654bf5ec391d80f260cbce83445b
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research
cli/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n\"\"\"TODO: Maybe add a docstring containing a long description\n\n This would double as something we could put int the `long_description`\n parameter for `setup` and it would squelch some complaints pylint has o...
python
edit
1
0
mit
8629221d23cf4fe8a447b12930fdee4801cd82f9
oemof/demandlib
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is an example of the control structures.\n\"\"\"\n\n\nresult = \"\"\nour_number = 21\n\n\ndef test_number(answer):\n\n answer = int(answer)\n\n if answer == our_number:\n return \"got it right\"\n elif answer > ...
python
edit
2
3
mit
f90fac30454537ec0727371ffc54bde4a1e2f78d
razzius/PyClassLessons,razzius/PyClassLessons,razzius/PyClassLessons,razzius/PyClassLessons,PyClass/PyClassLessons,noisebridge/PythonClass,noisebridge/PythonClass,noisebridge/PythonClass,PyClass/PyClassLessons,noisebridge/PythonClass,PyClass/PyClassLessons
5_control_statements_and_exceptions_hierarchy/guess-a-number-ex.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(\n name = 'qless-py',\n version = '0.10.0',\n description = 'Redis-based Queue Management',\n long_description = '''\n...
python
edit
1
0
mit
0fa23851cbe33ba0d3bddb8367d7089545de6847
seomoz/qless-py,seomoz/qless-py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom bakery.management.commands.publish import Command as BaseCommand\n\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **options):\n # When in BIGBUILD_BRANCH_BUILD don't delete becaus...
python
edit
1
2
mit
158a2ffd17cf59a87092581dc0ce40cf0b82aa85
datadesk/django-bigbuild,datadesk/django-bigbuild,datadesk/django-bigbuild
bigbuild/management/commands/publish.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Gridded:\n\n _grid_obj_classes = []\n _grids_loaded = False\n\n @classmethod\n def _load_grid_objs(cls):\n from pkg_resources import working_set\n for ep in working_set.iter_entry_points('gridded.grid_objects...
python
edit
1
4
mit
939c5fd069fafbe353fc9a209d2bd376e8d9bbd6
pyoceans/gridded
gridded/gridded.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass OSFError(Exception):\n \"\"\"Base class for exceptions raised by the Osf application\"\"\"\n pass\n\n\nclass NodeError(OSFError):\n \"\"\"Raised when an action cannot be performed on a Node model\"\"\"\n pass\n\n\nclass No...
python
edit
1
0
apache-2.0
ef048131d586812c2d73edd6297dfae4305b6074
alexschiller/osf.io,amyshi188/osf.io,felliott/osf.io,cwisecarver/osf.io,ckc6cz/osf.io,TomBaxter/osf.io,emetsger/osf.io,HalcyonChimera/osf.io,caneruguz/osf.io,RomanZWang/osf.io,doublebits/osf.io,adlius/osf.io,ticklemepierce/osf.io,danielneis/osf.io,samchrisinger/osf.io,baylee-d/osf.io,sloria/osf.io,asanfilippo7/osf.io,R...
website/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pagerduty_events_api.pagerduty_incident import PagerdutyIncident\nfrom pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient\n\n\nclass PagerdutyService:\n def __init__(self, key):\n self.__service_key = key\n...
python
edit
3
1
mit
211b7b28e2d8c7ed0e0f67bea1a1a68b520a53b1
BlasiusVonSzerencsi/pagerduty-events-api
pagerduty_events_api/pagerduty_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom pystructures.linked_lists import LinkedList, Node\n\n\nclass TestNode(TestCase):\n def test_value(self):\n \"\"\" A simple test to check the Node's value \"\"\"\n node = Node(10)\n ...
python
edit
1
2
mit
61bbd4e8fc0712fe56614481173eb86d409eb8d7
apranav19/pystructures
tests/test_linked_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import app\nfrom flask import make_response\n\n@app.route('/')\n@app.route('/index')\ndef index():\n return make_response(open(app.root_path + '/templates/index.html').read())\n```\n\nApply this change: Set up mock data for inde...
python
edit
1
1
apache-2.0
da22196a8167a57c5edf39578ceece4efd8cfd63
happyraul/tv
app/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom thinglang.runner import run\n\n\ndef test_function_calls():\n assert run(\"\"\"\nthing Program\n does start\n number n = 1\n number m = 2\n Output.write(\"before n=\", n, \" m=\", m)\n self.say_hello()...
python
edit
1
1
mit
a4f41648cd0318694d551b067309539df475c2d7
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
tests/test_function_calls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nRewrite exceptions that are thrown and caught locally to jumps.\n\"\"\"\n\nfrom numba2.compiler import excmodel\nfrom pykit.optimizations import local_exceptions\n\ndef rewrite_local_exceptions(func, env):...
python
edit
1
8
bsd-2-clause
0f1cb413503034cbc1e2deddd8327ad1946201fe
flypy/flypy,flypy/flypy
numba2/compiler/optimizations/throwing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET...
python
edit
5
0
mit
60d71f0f6dc9de01442c304978ee7966319a5049
davidjrichardson/uwcs-zarya,davidjrichardson/uwcs-zarya
zarya/settings/dev.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\nfrom . import views\n\n\nTOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}'\n '-[0-9a-z]{12})')\n\nurlpatterns = patterns(\n '',\n url(r'^%s/$' % ...
python
edit
1
0
bsd-3-clause
2762599917362bc621e84a17ae922588ad4296ae
laosunhust/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,HyperManTT/ECommerceSaleor,hongquan/saleor,KenMutemi/saleor,josesanch/saleor,rodrigozn/CW-Shop,Drekscott/Motlaesaleor,laosunhust/saleor,KenMutemi/saleor,KenMutemi/saleor,taedori81/saleor,paweltin/saleor,rchav/vinerack,avorio/saleor,itbabu/saleor...
saleor/order/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.db.models import Sum\n\n\nclass User(models.Model):\n name = models.CharField(max_length=254, unique=True)\n create_date = models.DateTimeField(auto_now_add=True)\n active = models.BooleanF...
python
edit
1
2
mit
4d73eb2a7e06e1e2607a2abfae1063b9969e70a0
Don42/strichliste-django,hackerspace-bootstrap/strichliste-django
strichliste/strichliste/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport doctest\nimport glob\nimport pkg_resources\n\ntry:\n pkg_resources.require('OWSLib')\nexcept (ImportError, pkg_resources.DistributionNotFound):\n pass\n\ntestfiles = glob.glob('*.txt')\n\nfor file in testfiles: \n doctest.te...
python
edit
2
3
bsd-3-clause
5c1f9b0a70fe47bbfa7d3813a47e2da81cd81506
sabman/OWSLib,monoid/owslib,monoid/owslib
tests/runalldoctests.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\"\"\"Config file for the cleaning - plotting and notebook process\"\"\"\n\n\nclass CleaningConfig:\n\n # Unprocessed dataset\n raw_data = './dataset/raw_results-survey245554.csv'\n ...
python
edit
1
0
bsd-3-clause
d198b8d92ec42f8e5fc995f59c8776044b8950e8
softwaresaved/international-survey
analysis/data_process/uk_2017/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom staticgen.staticgen_pool import staticgen_pool\nfrom staticgen.staticgen_views import StaticgenView\n\n\nclass StaicgenDemoStaticViews(StaticgenView):\n\n def ite...
python
edit
1
2
bsd-3-clause
2d9fce5715b2d7d5b920d2e77212f076e9ebd1be
mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo
staticgen_demo/staticgen_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport numpy as np\nfrom numpy.testing import assert_array_almost_equal\nfrom scipy import stats\nimport pytest\n\nfrom pmdarima.preprocessing import LogEndogTransformer\nfrom pmdarima.preprocessing import BoxCoxE...
python
edit
5
1
mit
17d2d4eaf58011ceb33a4d5944253578c2b5edd1
alkaline-ml/pmdarima,tgsmith61591/pyramid,tgsmith61591/pyramid,alkaline-ml/pmdarima,alkaline-ml/pmdarima,tgsmith61591/pyramid
pmdarima/preprocessing/endog/tests/test_log.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014-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...
python
edit
1
3
apache-2.0
bb3d2927437a51d8144ec398085876bc3dedb5f6
sarahmarshy/project_generator,ohagendorf/project_generator,0xc0170/project_generator,project-generator/project_generator
project_generator/commands/clean.py
rejected_duplicate
Near-duplicate of sample 2431
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sequana.viz import Volcano\n\ndef test1():\n import numpy as np\n fc = np.random.randn(1000)\n pvalue = np.random.randn(1000)\n v = Volcano(fc, -np.log10(pvalue**2), pvalue_threshold=3)\n v.plot()\n v.plot(logy=True)\...
python
edit
1
1
bsd-3-clause
f12beb5d2fbdc72c12f473c5cac04716f4893666
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/viz/test_volcano.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pygal\n\n\ndef horizontal_bar(sorted_streaks, sort_attrib):\n \"\"\"\n Render a horizontal bar chart of streaks.\n\n Values have already been sorted by sort_attrib.\n \"\"\"\n users = [user for user, _ in sorted_streak...
python
edit
1
5
mit
8ad4850941e299d9dad02cac0e300dc2021b81be
jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-commit-streak,supermitch/streak-podium,supermitch/streak-podium,jollyra/hubot-streak-podium
streak-podium/render.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom brew.parsers import JSONDataLoader\n\n\nclass TestJSONDataLoader(unittest.TestCase):\n\n def setUp(self):\n self.parser = JSONDataLoader('./')\n\n def test_format_name(self):\n name_list = [('pale...
python
edit
1
2
mit
ca430300c08f78b7c2de4153e08c1645996f85b7
chrisgilmerproj/brewday,chrisgilmerproj/brewday
tests/test_parsers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport yaml\n\ndef config():\n my_dir = os.path.dirname(__file__)\n config_file = os.path.join(my_dir, '../../lib/shared_config.yml')\n\n with open(config_file, 'r') as f:\n return yaml.load(f.read())\n\ndef log_c...
python
edit
1
1
mit
e050864d333e4b332a21671cb5f08f2ffd9172fe
ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot
pipeline/archivebot/shared_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .csr import skeleton_to_csgraph, branch_statistics, summarise\n\n__all__ = ['skeleton_to_csgraph',\n 'branch_statistics',\n 'summarise']\n```\n\nApply this change: Add version info to package init" }, { "rol...
python
edit
1
0
bsd-3-clause
668a5240c29047d86fe9451f3078bb163bea0db9
jni/skan
skan/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom mock import patch, MagicMock\n\nfrom open_folder import *\n\ndef test_folder_exists():\n with patch('subprocess.check_call', MagicMock(return_value=\"NOOP\")):\n result = open_folder(\".\")\n assert resu...
python
edit
8
1
mit
9051fc68b2c542f7a201a969340b1f1f5d0f660c
golliher/dg-tickler-file
test_openfolder.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI script run on Heroku using gunicorn.\nExposes the app and configures it to use Heroku environment vars.\n\"\"\"\nimport os\nfrom suddendev import create_app, socketio\n\napp = create_app()\n\nif __name__ == '__main__':\n app...
python
edit
3
0
mit
12914961c0c2851dd720e84ff811389b1cd936dd
SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev
wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nGenerate sample olfactory model stimulus.\n\"\"\"\n\nimport numpy as np\nimport h5py\n\nosn_num = 1375\n\ndt = 1e-4 # time step\nOt = 2000 # number of data point during reset period\nRt = 1000 # number of da...
python
edit
1
0
bsd-3-clause
89e3d4ae0a7be5baef6354324b2e7f8623564c94
cerrno/neurokernel
examples/olfaction/data/gen_olf_input.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nMake me some salt!\n'''\n# Import python libs\nimport os\nimport optparse\n# Import salt libs\nimport salt.master\nimport salt.minion\nimport salt.utils\n\nclass Master(object):\n '''\n Creates a master server\n '''\n\n\nclass...
python
edit
3
1
apache-2.0
cc7f93d93cb2d7e4aed0329ce41785e419b07a92
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wordgraph.points import Point\nimport wordgraph\n\nEPOCH_START = 1407109280\n\ndef time_values(values, start=EPOCH_START, increment=1):\n datapoints = []\n for index, value in enumerate(values):\n datapoints.append(Point(x...
python
edit
1
3
apache-2.0
2f56d481c05e28a4434a038a356f521b4ea5cbca
tleeuwenburg/wordgraph,tleeuwenburg/wordgraph
tests/test_simple_features.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\n\n__all__ = [\"palplot\", \"dogplot\"]\n\n\ndef palplot(pal, size=1):\n \"\"\"Plot the values in a color palette as a horiz...
python
edit
1
2
bsd-3-clause
2fec4b3ffa1619f81088383c9f565b51f6171fd6
arokem/seaborn,mwaskom/seaborn,anntzer/seaborn,arokem/seaborn,mwaskom/seaborn,anntzer/seaborn
seaborn/miscplot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport time\nfrom django.contrib.staticfiles.testing import StaticLiveServerTestCase\n\nfrom django.conf import settings\nfrom selenium import webdriver\n\n\n# could use Chrome, Firefox, etc... here\nBROWSER = os.envi...
python
edit
1
2
apache-2.0
8cdd7a89ad6115b80ae57ed6cbb0d41abce09816
Flamacue/pretix,Flamacue/pretix,lab2112/pretix,Unicorn-rzl/pretix,Unicorn-rzl/pretix,Flamacue/pretix,akuks/pretix,akuks/pretix,awg24/pretix,awg24/pretix,akuks/pretix,awg24/pretix,lab2112/pretix,lab2112/pretix,awg24/pretix,akuks/pretix,Unicorn-rzl/pretix,Flamacue/pretix,Unicorn-rzl/pretix,lab2112/pretix
src/tests/base/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Central place for package metadata.\"\"\"\n\n# NOTE: We use __title__ instead of simply __name__ since the latter would\n# interfere with a global variable __name__ denoting object's name.\n__title__ = 'resolwe-bio'\n__summary__...
python
edit
1
0
apache-2.0
e907c7de622c54556df10155caddbb05c8235d19
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
resolwe_bio/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2021 CERN\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the MIT License; see the\n# LICENSE file for more details.\n\nfrom indico.core.ce...
python
edit
1
1
mit
d0ce6af2bb893904e8a3e36dd725707bd6d9f201
ThiefMaster/indico,ThiefMaster/indico,DirkHoffmann/indico,pferreir/indico,indico/indico,pferreir/indico,indico/indico,indico/indico,pferreir/indico,pferreir/indico,DirkHoffmann/indico,DirkHoffmann/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,ThiefMaster/indico
indico/modules/attachments/tasks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some :tiger2:s for `graph_objs_tools.py`." }, { "role": "assistant", "content": "from __future__ import absolute_import\n\nfrom unittest import TestCase\n\nfrom plotly.graph_objs import graph_objs as go\nfrom plotly.graph_obj...
python
new_file
1
2
mit
45b3fc7babfbd922bdb174e5156f54c567a66de4
plotly/plotly.py,plotly/python-api,plotly/plotly.py,plotly/python-api,plotly/plotly.py,plotly/python-api
plotly/tests/test_core/test_graph_objs/test_graph_objs_tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\nimport os, subprocess\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\nsubprocess.call([ 'python',\n os.path.join('..', 'venus', 'planet.py'),\n 'planet.ini' ])\nsubprocess.cal...
python
edit
1
0
mit
aee8d2911c3f19a9b748f21ae82592d823e0c57e
kzys/planet-tempura
update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport StringIO\nimport os\n\n\nclass shell(object):\n\n def __enter__(self):\n self.stdin = StringIO.StringIO()\n return self\n\n def __exit__(self, type, value, traceback):\n os.execl('/usr/bin/bash', 'bash', '-...
python
edit
1
1
mit
1d839a0207058bd08de4be9a821337c9bdb1bcf8
silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock
rock/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models import Sum\r\nfrom django.views.generic import TemplateView\r\nfrom djofx.forms import OFXForm\r\nfrom djofx.views.base import PageTitleMixin, UserRequiredMixin\r\nfrom djofx import models\r\n\r\n\r\nclass HomePageView...
python
edit
1
2
mit
bfc7e08ba70ba0e3acb9e4cc69b70c816845b6cb
dominicrodger/djofx,dominicrodger/djofx,dominicrodger/djofx
djofx/views/home.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nimport track\n\napp = flask.flask(__name__)\n\n@app.route(\"/\")\ndef root():\n\treturn \"{} by {} - {}\"\n\n```\n\nApply this change: Fix track import for package" }, { "role": "assistant", "content": "import flas...
python
edit
3
1
mit
dd0ba5d4486983bd2c498efc46e7b3aa244935e8
ollien/playserver,ollien/playserver,ollien/playserver
playserver/webserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom pymessenger.user_profile import UserProfileApi\nfrom test_env import *\n\nupa = UserProfileApi(PAGE_ACCESS_TOKEN, app_secret=APP_SECRET)\n\ndef test_fields_blank():\n user_profile = upa.get(TEST_USER_ID)\n assert u...
python
edit
3
1
mit
7a37e3afa29410636c75408bc649e70c519e07f1
karlinnolabs/pymessenger,Cretezy/pymessenger2,davidchua/pymessenger
test/user_profile_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import SEEK_SET\nfrom random import choice, seed\nfrom string import ascii_uppercase, digits\n\nimport fastavro\nfrom fastavro.compat import BytesIO\n\nletters = ascii_uppercase + digits\nid_size = 100\n\nseed('str_py3') # Repeatab...
python
edit
1
2
mit
c1785e0713a5af6b849baaa1b314a13ac777f3f5
e-heller/fastavro,e-heller/fastavro
tests/test_str_py3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_script import Manager\nfrom redash import models\n\nmanager = Manager(help=\"Organization management commands.\")\n\n\n@manager.option('domains', help=\"comma separated list of domains to allow\")\ndef set_google_apps_domains(dom...
python
edit
5
3
bsd-2-clause
4d5d4665f2b46e12618b7762246d84884447e99e
pubnative/redash,pubnative/redash,pubnative/redash,pubnative/redash,pubnative/redash
redash/cli/organization.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# vim: ai ts=4 sts=4 et sw=4\n\n\nclass Backend(object):\n \n def log(self, level, message):\n self.router.log(level, message)\n\n def start(self):\n raise NotImplementedError\n \n def sto...
python
edit
1
1
bsd-3-clause
c23cd25247974abc85c66451737f4de8d8b19d1b
dimagi/rapidsms,ehealthafrica-ci/rapidsms,eHealthAfrica/rapidsms,ken-muturi/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,unicefuganda/edtrac,catalpainternational/rapidsms,eHealthAfrica/rapidsms,ken-muturi/rapidsms,ken-muturi/rapidsms,lsgunth/rapidsms,unicefuganda/edtrac,lsgunth/rapidsms,ehealthafrica-ci/rapi...
lib/rapidsms/backends/backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom glob import glob\nimport imp\nimport logging\nimport os\nimport subprocess\n\nimport mock\n\nfrom setuptools import setup as _setup\n\nfrom vdt.versionplugin.wheel.shared import parse_version_extra_args\nfrom vdt.versionplugin.wheel.ut...
python
edit
1
2
bsd-3-clause
22230205402f7de77049da9c0f716d4fdc3099c3
devopsconsulting/vdt.versionplugin.wheel
vdt/versionplugin/wheel/package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.conf import settings\nfrom django.db import connections\nfrom django.db.models.query import QuerySet\n\nfrom model_utils.managers import PassThroughManager\n\n\nclass FuzzyCountQuerySet(QuerySet):\n\n def count(self):\n ...
python
edit
null
null
bsd-2-clause
aeac11d889695f17aab3b972b64101eaefd322f2
stephenmcd/django-postgres-fuzzycount
fuzzycount.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom .ir import TranslatableTextNode\n\n\ndef gettext(s):\n return s\n\n\ndef extract(fileobj, keyw...
python
edit
1
6
mit
1c32b17bd4c85165f91fbb188b22471a296c6176
ollyc/kajiki,ollyc/kajiki,ollyc/kajiki
kajiki/i18n.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A pytest plugin for using pyfakefs as a fixture\n\nWhen pyfakefs is installed, the \"fs\" fixture becomes available.\n\n:Usage:\n\ndef my_fakefs_test(fs):\n fs.create_file('/var/data/xx1.txt')\n assert os.path.exists('/var/data/...
python
edit
1
1
apache-2.0
eaf74f092e73dcb832d624d9f19e9eaee5fbc244
mrbean-bremen/pyfakefs,pytest-dev/pyfakefs,mrbean-bremen/pyfakefs,jmcgeheeiv/pyfakefs
pyfakefs/pytest_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom panoptes_client.panoptes import PanoptesObject, LinkResolver\n\n\nclass User(PanoptesObject):\n _api_slug = 'users'\n _link_slug = 'users'\n _edit_attributes ...
python
edit
1
1
apache-2.0
b46727a6bf8c1d85e0f9f8828954440bc489f247
zooniverse/panoptes-python-client
panoptes_client/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Power Digit Sum\n\n2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.\n\nWhat is the sum of the digits of the number 21000?\n\"\"\"\nassert sum(int(x) for x in str(2 ** 1000)) == 1366\n\n```\n\nApply this change: Remove...
python
edit
1
0
mit
d3751ef64869ad37f8802eca933e0995773175a8
the-gigi/project-euler,the-gigi/project-euler,the-gigi/project-euler
16/016_power_digit_sum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nEC2_INSTANCE_TYPES = [\n 't2.micro',\n 't2.small',\n 't2.medium',\n 't2.large'\n]\n\nRDS_INSTANCE_TYPES = [\n 'db.t2.micro',\n 'db.t2.small',\n 'db.t2.medium',\n 'db.t2.large'\n]\n\nALLOW_ALL_CIDR = '0.0.0.0/0'\nVPC_...
python
edit
1
0
apache-2.0
0022726e9f2d122ff84eb19ed2807649ab96f931
azavea/raster-foundry,aaronxsu/raster-foundry,kdeloach/raster-foundry,kdeloach/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry,kdeloach/raster-foundry,raster-foundry/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,kdeloach/raster-foundry,kdeloa...
deployment/cfn/utils/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nNODE_VERSION = 'v0.11.10'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'b27290717c08f8c6a58067d3c3725d68b4e6a2e5'\n\n```\n\nApply this change: Update li...
python
edit
1
0
mit
c56480fd8905332e54649dac0ade95c825e8ba23
cos2004/electron,rajatsingla28/electron,bobwol/electron,tonyganch/electron,gbn972/electron,deed02392/electron,natgolov/electron,felixrieseberg/electron,bright-sparks/electron,adcentury/electron,jhen0409/electron,soulteary/electron,pandoraui/electron,subblue/electron,matiasinsaurralde/electron,jlord/electron,rreimann/el...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 1583
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"info services.\"\"\"\nfrom info.models import Article, News, Column\n\n\ndef get_column_object(uid):\n \"\"\"Get column object.\"\"\"\n try:\n obj = Column.objects.get(uid=uid)\n except Column.DoesNotExist:\n ob...
python
edit
1
2
mit
4636c9394138534fc39cc5bdac373b97919ffd01
istommao/codingcatweb,istommao/codingcatweb,istommao/codingcatweb
server/info/services.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\r\nCreated on 2 сент. 2016 г.\r\n\r\n@author: garet\r\n'''\r\n\r\n\r\nclass BaseSpider():\r\n \r\n def __init__(self):\r\n pass\r\n\r\n def AddUrls(self, urls):\r\n pass\r\n\r\n def Routing(self, url):\r\n ...
python
edit
1
3
bsd-3-clause
a9f55a57559a6647c451d38893624be4109be23b
SaltusVita/ReoGrab
Spiders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nNODE_VERSION = 'v0.11.10'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'aa4874a6bcc51fdd87ca7ae0928514ce83645988'\n\n```\n\nApply this change: Update li...
python
edit
1
0
mit
6833865ff35d451a8215803b9fa74cd57167ed82
trankmichael/electron,gabrielPeart/electron,felixrieseberg/electron,seanchas116/electron,bitemyapp/electron,xfstudio/electron,leolujuyi/electron,pombredanne/electron,astoilkov/electron,gabriel/electron,mubassirhayat/electron,smczk/electron,Jacobichou/electron,medixdev/electron,yalexx/electron,natgolov/electron,rsvip/el...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 1583
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFuzz tests an object after the default construction to make sure it does not crash lldb.\n\"\"\"\n\nimport sys\nimport lldb\n\ndef fuzz_obj(obj):\n obj.GetName()\n obj.GetByteSize()\n #obj.GetEncoding(5)\n obj.GetNumberC...
python
edit
3
1
apache-2.0
88f699690a48bc9e204c561443a53ca03dcf1ae6
llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb
test/python_api/default-constructor/sb_type.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyQuantuccia import quantuccia\n\ndef test_get_holiday_date():\n \"\"\" At the moment the only thing this function\n can do is return NULL.\n \"\"\"\n assert(quantuccia.get_holiday_date() is None)\n\n```\n\nApply this c...
python
edit
1
1
bsd-3-clause
15db7def176572a667299cc30102c076b589620d
jwg4/pyQuantuccia,jwg4/pyQuantuccia
pyQuantuccia/tests/test_get_holiday_date.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nfrom os import environ\nfrom unittest import TestCase\n\n\nclass DownloadTests(TestCase):\n def test_denies_unknown_client(self):\n with self._given_clients('{\"client1\": \"id1\"}') as downl...
python
edit
1
1
apache-2.0
acce959e4885a52ba4a80beaed41a56aac63844e
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
tests/opwen_email_server/api/test_client_read.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport pytest\n\n\nclass ServerMixin:\n @pytest.fixture\n def get_storage_args(self, item_type, slow_create_collection):\n if item_type == \"VTODO\":\n # Fastmail has non-standard support for TODOs\n ...
python
edit
1
4
mit
2eff8e08e1e16463e526503db46ae5c21138d776
untitaker/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer
tests/storage/servers/fastmail/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openprocurement.api.utils import get_now\n\n\ndef request_get_now(request):\n return get_now()\n\n```\n\nApply this change: Add function to convert fraction to decimal" }, { "role": "assistant", ...
python
edit
1
1
apache-2.0
e35767544e7c6b4461e511eaad42c047abcbe911
openprocurement/openprocurement.tender.esco
openprocurement/tender/esco/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n##\n# Copyright (c) 2011 Sprymix Inc.\n# All rights reserved.\n#\n# See LICENSE for details.\n##\n\n\n\"\"\"Default Sphinx configuration file for metamagic projects\"\"\"\n\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo',\n ...
python
edit
1
0
apache-2.0
e07db6a58217baf555b424d66f8996ec4bc7a02f
edgedb/edgedb,edgedb/edgedb,edgedb/edgedb
edgedb/lang/common/doc/sphinx/default_conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = False\n\ntry:\n from .local import *\nexcept ImportError:\n pass\n\n```\n\nApply this change: Disable Wagtail update check in prod" }, { "role": "assistant", "content": "from .base import *\n...
python
edit
3
0
mit
6c4081f6c1fde79e9f14da98f0d670a8bdef8e13
thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline
pipeline/settings/production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 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\nclass Channel(object):\n def __init__(self, name, branch, position, cate...
python
edit
1
1
bsd-3-clause
d595f953a8993afd94f1616fbf815afe0b85a646
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/master/factory/dart/channels.py
rejected_duplicate
Near-duplicate of sample 3077
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"django-c5filemanager setup file.\n\nTHIS SOFTWARE IS UNDER BSD LICENSE.\nCopyright (c) 2010 Daniele Tricoli <<EMAIL>>\n\nRead LICENSE for more informations.\n\"\"\"\nimport os\n\nfrom setuptools import setup, ...
python
edit
1
1
bsd-3-clause
119a1de0f495ee84d8354b75c05659f3d5a8b367
eriol/django-c5filemanager
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# mode: run\n# tag: generator\n\nimport cython\nimport sys\n\n\ndef test_generator_frame_cycle():\n \"\"\"\n >>> test_generator_frame_cycle()\n (\"I'm done\",)\n \"\"\"\n testit = []\n def whoo():\n try:\n ...
python
edit
1
6
apache-2.0
c872b9991ec1a80d03906cebfb43e71335ba9c26
cython/cython,cython/cython,da-woods/cython,scoder/cython,cython/cython,scoder/cython,scoder/cython,cython/cython,da-woods/cython,da-woods/cython,scoder/cython,da-woods/cython
tests/run/generator_frame_cycle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\nclass Queue(object):\n \"\"\"Queue class.\"\"\"\n def __init__(self):\n self.items = []\n\n def is_empty(sel...
python
edit
1
1
bsd-2-clause
7d82f3accce0cf174fd7cf176d5c289ffc791647
bowen0701/algorithms_data_structures
ds_queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Shared utility functions\"\"\"\n\nfrom django.template.defaultfilters import slugify as django_slugify\n\ndef slugify(value):\n \"\"\"\n Normalizes string, converts to lowercase, removes non-alpha characters,\n converts space...
python
edit
1
1
mit
0a69133e44810dd0469555f62ec49eba120e6ecc
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
apps/storybase/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_calendar import CalendarTest\n\nfrom qual.calendars import EnglishHistoricalCalendar\n\nclass TestHistoricalCalendar(object):\n def setUp(self):\n self.calendar = self.calendar_type()\n\n def test_before_switch(self):...
python
edit
1
2
apache-2.0
0336651c6538d756eb40babe086975a0f7fcabd6
jwg4/qual,jwg4/calexicon
qual/tests/test_historical_calendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom ldapdb import escape_ldap_filter\nimport ldap\n\n\ndef authenticate(dn,pwd,ldap_conf_key):\n # Setup connection\n ldap_conf = settings.LDAPCONFS[ldap_conf_key]\n server = ldap_conf['server']\n...
python
edit
3
4
mit
4467ffe669eec09bab16f4e5a3256ed333c5d3d5
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
rcamp/lib/ldap_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pymks import MKSRegressionModel\nimport numpy as np\n\n\ndef test():\n Nbin = 2\n Nspace = 81\n Nsample = 400\n\n def filter(x):\n return np.where(x < 10,\n np.exp(-abs(x)) * np.cos(x * np.pi),...
python
edit
1
1
mit
19faa280c924254b960a8b9fcb716017e51db09f
davidbrough1/pymks,XinyiGong/pymks,awhite40/pymks,davidbrough1/pymks,fredhohman/pymks
pymks/tests/test_mksRegressionModel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom motobot.irc_bot import IRCBot, IRCLevel\nimport desubot\nimport threading\n\ndef worker():\n desubot.bot.run()\n\ndef main():\n desubot.bot.load_plugins('plugins')\n desubot.bot.join('#Moto-chan')\n \n thread = threading...
python
edit
3
4
mit
34a2b3a93bd96643d74fcb3c8d2f8db52d18253f
Motoko11/MotoBot
desubot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import json\n\nfrom . import return_json_from_response, validate_v0\nfrom tests import create_authorization_header\n\n\ndef _post_notification(client, template, url, to):\n data = {\n 'to': to,\n 'template': str(...
python
edit
1
1
mit
5cd0507e99d8f78597d225266ec09f6588308396
alphagov/notifications-api,alphagov/notifications-api
tests/app/public_contracts/test_POST_notification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Upserts Organization records with data from Salesforce Accounts.\n\"\"\"\nimport logging\nimport os\n\nfrom django.core.management.base import BaseCommand\n\nimport iss.salesforce\nimport iss.utils\n\n\nlogger =...
python
edit
1
3
mit
b1bd07038b0c6a6d801e686372996b3478c71af9
AASHE/iss
iss/management/commands/upsert_iss_organizations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob, json, os, readline, sys\n\ndef complete_filename(text, state):\n return (glob.glob(text+'*')+[None])[state]\n\nclass PlayoffSettings:\n\n def __init__(self):\n self.interactive = False\n self.settings_file =...
python
edit
4
3
bsd-2-clause
022f2cc6d067769a6c8e56601c0238aac69ec9ab
emkael/jfrteamy-playoff,emkael/jfrteamy-playoff
jfr_playoff/settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext.commands import Bot\nimport json\n\nclient = Bot(\"~\", game=discord.Game(name=\"~help\"))\n\n@client.event\nasync def on_ready():\n print('We have logged in as {0.user}'.format(client))\n\n@client.comman...
python
edit
1
2
mit
916a02a609af6dc125b0a82215adb94858f4d597
HarkonenBade/yutu
yutu.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom angr.state_plugins.plugin import SimStatePlugin\nfrom angr.storage.file import SimFileStream\n\n\nclass SimPreconstrainedFileStream(SimFileStream):\n def __init__(self, name, preconstraining_handler=None, **kwargs):\n super...
python
edit
1
2
bsd-2-clause
678532961cbc676fb3b82fa58185b281a8a4a7b3
shellphish/rex,shellphish/rex
rex/preconstrained_file_stream.py
accepted
null
true