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\nfrom setuptools import setup, Extension\nimport numpy\n\nsetup (name = 'xfel', \\\n version = '1.0', \\\n packages = ['xfel',\n 'xfel.core',\n 'xfel.orientaton',\n 'xfel....
python
edit
4
0
mit
e30a87841eb00d496d1980b025e2b2458eeaa101
mmechelke/bayesian_xfel,mmechelke/bayesian_xfel
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name = \"wsgi-sslify\",\n description = \"WSGI middleware to force HTTPS.\",\n version = \"1.0.1\",\n author = \"Jacob Kaplan-Moss\",\n author_email = \"<EMAIL>\",\n url = \"https:/...
python
edit
1
0
bsd-3-clause
38ccfb87ba7f6f139dbb99ba5002a8abec8c40be
jacobian/wsgi-sslify
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport tempfile\n\nfrom twisted.trial import unittest\nfrom twisted.python import util\n\nfrom comet.icomet import IHandler\nfrom comet.handler import SpawnCommand\n\nSHELL = '/bin/sh'\n\nclass DummyEvent(object):\n ...
python
edit
1
2
bsd-2-clause
8d5e1aaf0a06eeeacafcf62a58f83a4c23fc59b7
jdswinbank/Comet,jdswinbank/Comet
comet/handler/test/test_spawn.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='zeit.care',\n version='0.2dev',\n author='Christian Zagrodnick, Ron Drongowski, Dominik Hoppe',\n author_email='<EMAIL>',\n url='http://trac.gocept.com/zeit',\n ...
python
edit
1
0
bsd-3-clause
993b8b23d70b133528a52bc91292735bb5668abe
ZeitOnline/zeit.care
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport cleaner\n\nclass TestTagRemoval():\n def test_span_removal(self):\n text = ('<span style=\"font-family: &quot;helvetica neue&quot; ,'\n '&quot;arial&quot; , &quot;helvetica&quot; , sans-serif;\">This i...
python
edit
3
1
mit
0261c895cb41f5caba42ae432b997fd3c941e96f
jamalmoir/blogger_html_cleaner
tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDefine all features to be extracted from the data\n\"\"\"\n\nfrom PIL import Image\nfrom PIL.ImageStat import Stat\n\nfrom skimage.feature import local_binary_pattern\n\n\nclass BaseFeatureExtractor(object):\n \"\"\" Basis for al...
python
edit
1
1
mit
d5de8224a0d67b74444a0ad7c755e3c7bc1c39a5
kpj/PyClass
features.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='jmbo-skeleton',\n version='0.6',\n description='Create a Jmbo project environment quickly. Includes a Jmbo demo application.',\n long_description = open('README.rst',...
python
edit
1
0
bsd-3-clause
11a1ce43d2246574c5b4090252cb6464385194f4
praekelt/jmbo-skeleton,praekelt/jmbo-skeleton,praekelt/jmbo-skeleton
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pprint import pprint, pformat\nimport datetime\nimport os\n\nfrom sgmock import Fixture\nfrom sgmock import TestCase\n\nif 'USE_SHOTGUN' in os.environ:\n from shotgun_api3 import ShotgunError, Fault\n import shotgun_api3_registry...
python
edit
10
1
bsd-3-clause
2314829d58b200570272332c89a85b4009a396bf
westernx/sgsession
tests/common.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport socket\n\n\nfrom orderbook import create_confirm\n\n\ndef send_msg(ip, port, message):\n sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n sock.connect((ip, port))\n try:\n sock.sendall(message)\...
python
edit
2
6
mit
fbf6fe6d6e5e3b9e9ea192eba7ef6b76b66ebf0a
Tribler/decentral-market
trade_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\n\nclass EnumView(APIView):\n permission_classes = []\n\n def get(self, *args, **kwargs):\n enums = self.enum_class.get_as_tuple_list()\n\...
python
edit
1
3
mit
a20ffb81801a5f96af47ccf4bf7fe0133e74102b
iktw/django-rest-enum-view
source/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass CivictechprojectsConfig(AppConfig):\n name = 'civictechprojects'\n\n def ready(self):\n # Remove any tags that aren't in the canonical tag list\n # TODO: Fix so this doesn't b...
python
edit
1
0
mit
c6e69e1cec4de30a2e56ec865c3043edc7bf39b5
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
civictechprojects/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# lockd client\n\nimport httplib\nimport json\n\nclass LockdClient(object):\n\n def __init__(self, host=\"127.0.0.1\", port=2080):\n self._host_port = \"%s:%s\" % (host, port)\n\n def is_locked(self, name):\n return self...
python
edit
3
3
mit
cb966e6623306ce4dfd96a5a286482489e28b9e9
divtxt/lockd,divtxt/lockd
pyclient/lockd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport transitions\n\nfrom panoptes.utils.logger import has_logger\n\n\n@has_logger\nclass PanState(transitions.State):\n\n \"\"\" Base class for PANOPTES transitions \"\"\"\n\n def __init__(self, *args, **kwargs):\n ...
python
edit
1
4
mit
07de3a41daf1a82cb45e63472212821b9f6c809f
joshwalawender/POCS,panoptes/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,panoptes/POCS,joshwalawender/POCS
panoptes/state_machine/states/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom datetime import datetime\n\n\ndef save_logs(groomer, test_description):\n divider = ('=' * 10 + '{}' + '=' * 10 + '\\n')\n test_log_path = 'tests/test_logs/{}.log'.format(test_description)\n with open(test_log_path,...
python
edit
1
3
bsd-3-clause
a8179d06885d72e49335263ef2633f3128a20ee7
CIRCL/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Rafiot/PyCIRCLean
tests/logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nonstdlib\n\ndef test_capture_output():\n import sys\n\n with nonstdlib.capture_output() as output:\n print('std', end='', file=sys.stdout)\n print('st', end='', file=sys.stderr)\n print('out', file=sys.std...
python
edit
1
1
mit
53be5c9c86d544567f8171baba58128b5ad0502a
kalekundert/nonstdlib,KenKundert/nonstdlib,KenKundert/nonstdlib,kalekundert/nonstdlib
tests/test_io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport sys\nimport os\n\nf = open(sys.argv[1])\nout = sys.argv[2]\ndata = json.load(f)\n\nfor key in data[\"files\"]:\n\tval = data[\"files\"][key]\n try:\n os.makedirs(out + \"/\" + os.path.dirname(key))\n ...
python
edit
4
0
mit
523df3d68af5c8fbd52e0f86a7201d9c39f50f54
sheenobu/nix-home,sheenobu/nix-home
lib/writeFiles.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add database helpers to test base" }, { "role": "assistant", "content": "from kitten import db\n\n\nclass MockDatabaseMixin(object):\n def setup_method(self, method):\n db.Base.metadata.create_all(db.engine)\n se...
python
new_file
1
1
mit
8bf8101bc755628e66da95734d30fe24e5d9a121
thiderman/network-kitten
test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom libs.upbeatbot import UpBeatBot\n\n\nclass TestUpbeatBot(unittest.TestCase):\n @classmethod\n def setUpClass(cls):\n cls.upbeat_bot = UpBeatBot()\n\n def test_chosen_animal_returned(self):\n tw...
python
edit
1
1
mit
43dce889a79b77445eebe0d0e15532b64e7728d5
nickdibari/UpBeatBot
tests/test_upbeatbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\ndef pytest_addoption(parser):\n parser.addoption(\"--travis\", action=\"store_true\", default=False,\n help=\"Only run tests marked for Travis\")\n\n\ndef pytest_configure(config):\n config.addin...
python
edit
2
3
mit
ee65b4ecd9a94598e1fa9fe2a8a25697c2480477
tkarna/cofs
test/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom dotenv import load_dotenv, find_dotenv\n\nload_dotenv(find_dotenv())\nOPS_KEY = os.environ['OPS_KEY']\nOPS_SECRET = os.environ['OPS_SECRET']\n\n```\n\nApply this change: Read twitter tokens from .e...
python
edit
1
0
mit
da2376744ec5b1823ea75f3cefbb0de0ac000c1b
nestauk/inet
tests/secrets.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\"\"\"\ntest_ttt\n----------------------------------\n\nTests for `ttt` module.\n\"\"\"\n\nimport unittest\n\nfrom ttt import ttt\n\n\nclass TestPat(unittest.TestCase):\n\n def setUp(self...
python
edit
1
1
isc
bf961cf69386404b03d46ebc3ab34b7da804f016
yerejm/ttt,yerejm/ttt
test/test_ttt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef merge(a, b):\n if len(a) * len(b) == 0:\n return a + b\n\n v = (a[0] < b[0] and a or b).pop(0)\n return [v] + merge(a, b)\n\n\ndef mergesort(list):\n if len(list) < 2:\n return list\n\n m = len(list) / 2\n ...
python
edit
1
4
unlicense
66fc59842fb85bb7b9d1434b7ba6d279c2f454df
davidgasquez/tip
tip/algorithms/sorting/mergesort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nmap\n\nclass HelperNmap:\n\n def __init__(self,args=\"\"):\n self.args = args\n\n def process(self):\n print \"Running Scan\"\n nm = nmap.PortScanner()\n nm.scan(hosts='173.255.243.189', arguments='-sV -p1-5000')\n ...
python
edit
3
6
apache-2.0
12b313ed0be7049335046a00844c378b0bed7064
JKO/nsearch,JKO/nsearch
helpernmap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_\nfrom mock import MagicMock, patch\n\nfrom pyolite.models.repository import Repository\n\n\nclass TestRepositoryModel(object):\n def test_it_should_be_possible_to_retrieve_by_name_a_repo(self):\n mocked_users ...
python
edit
1
1
bsd-2-clause
605340f9c18f1591846e0a9b5f9c983c940d80c9
PressLabs/pyolite,shawkinsl/pyolite
tests/models/test_repository.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# This file is part of tofbot, a friendly IRC bot.\n# You may redistribute it under the Simplified BSD License.\n# If we meet some day, and you think this stuff is worth it,\n# you can buy us a beer in return.\n#...
python
edit
3
5
bsd-2-clause
09dad7d36c6968fc50cf8f2c475608a66bd6571a
p0nce/tofbot,tofbot/tofbot,chmduquesne/tofbot,p0nce/tofbot,soulaklabs/tofbot,tofbot/tofbot,martinkirch/tofbot,martinkirch/tofbot,soulaklabs/tofbot
plugins/expand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport subprocess\nimport argparse\n\nparser = argparse.ArgumentParser(description=\"Tweet some Train Statuses!\")\nparser.add_argument(\"-s\", \"--station\", dest=\"station\", type=str, help=\"Station Short Code. E...
python
edit
3
4
mit
5da99ceeeec050b2732475ffca89a64d2d10f34e
dmiedema/train-500-status
trainTweet.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import BackendFactory, Backend\nfrom ..queue.sqs import SQSQueue\n\nclass SQSBackendFactory(BackendFactory):\n def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10):\n \"\"\"To allow backends to ...
python
edit
1
2
mit
2dc031aca46c02449eb85ee5149b75951e26e3b9
gamechanger/deferrable
deferrable/backend/sqs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nimport time\nfrom threading import Thread\nfrom .models import Pokemon\n\nlog = logging.getLogger(__name__)\nlog.setLevel(level=10)\n\n\nclass PokePoller(Thread):\n def __init__(self):\n Th...
python
edit
1
3
mit
66bc3ca0f9bd0e2b20d772e694c819b937a0c346
falau/pogom,falau/pogom,falau/pogom
pogom/pokeller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = (0, 2)\n\n\n# Make a couple frequently used things available right here.\nfrom bundle import Bundle\nfrom registry import register\n```\n\nApply this change: Increment to next dev version." }, { "role": "assistant", ...
python
edit
4
0
bsd-2-clause
34e211c2cc3021be7497eb48e68f557c56a2a1ea
scorphus/webassets,wijerasa/webassets,heynemann/webassets,wijerasa/webassets,heynemann/webassets,florianjacob/webassets,john2x/webassets,JDeuce/webassets,scorphus/webassets,glorpen/webassets,aconrad/webassets,JDeuce/webassets,aconrad/webassets,john2x/webassets,florianjacob/webassets,glorpen/webassets,glorpen/webassets,...
django_assets/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUdiskie automounter daemon.\n\"\"\"\n__all__ = ['AutoMounter']\n\nclass AutoMounter(object):\n \"\"\"\n Automatically mount newly added media.\n \"\"\"\n def __init__(self, mounter):\n self._mounter = mounter\n\n ...
python
edit
1
3
mit
6798df4657730484549fdeaa13578c2d7e36f4eb
pstray/udiskie,coldfix/udiskie,coldfix/udiskie,mathstuf/udiskie,khardix/udiskie,pstray/udiskie
udiskie/automount.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# tests.test_filter_refs_prefs\n# coding=utf-8\n\nfrom __future__ import unicode_literals\nimport nose.tools as nose\nimport yvs.filter_refs as yvs\nfrom tests.decorators import use_prefs\n\n\n@use_prefs({'language': 'en', 'version': 59})\n...
python
edit
1
1
mit
1c1ca68a41e56cb912a9ec9f81ab974324f9d2f4
caleb531/youversion-suggest,caleb531/youversion-suggest
tests/test_filter_refs_prefs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.5.2'\n\n```\n\nApply this change: Increment minor version to 0.6" }, { "role": "assistant", "content": "\"\"\"yolk\n\nAutho...
python
edit
1
0
bsd-3-clause
ef56181a5c42ab6dc9283822a9a6214f0a97475f
myint/yolk,myint/yolk
yolk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n This class holds all the necessary information required for a proposed route\n\"\"\"\nACCEPTABLE_MODES = set([\"driving\", \"walking\", \"bicycling\", \"transit\"])\n\nclass DirectionsRequest(object):\n\n\tdef __init__(self, mod...
python
edit
1
1
apache-2.0
207871f4f057d88f67bad0c371f880664dcee062
apranav19/pydirections
pydirections/route_requester.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"accounts app unittests for models\n\n\"\"\"\nfrom django.test import TestCase\nfrom django.contrib.auth import get_user_model\n\n\nTEST_EMAIL = 'newvisitor@example.com'\n\n\nclass UserModelTest(TestCase):\n \"\"\"Tests for password...
python
edit
1
1
mit
4a75d2b12fdaea392e3cf74eb1335b93c8aacdbd
randomic/aniauth-tdd,randomic/aniauth-tdd
accounts/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_support import TestFailed\nimport os, tempfile\nimport wave\n\ndef check(t, msg=None):\n if not t:\n raise TestFailed, msg\n\nnchannels = 2\nsampwidth = 2\nframerate = 8000\nnframes = 100\n\ntestfile = tempfile.mktemp()\...
python
edit
2
2
mit
2293539766043db129dc32634cedced7377eb9fe
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_wave.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"So...
python
edit
1
3
mit
1666f883e3f6a497971b484c9ba875df2f6693a2
SusannaMaria/beets,mathstuf/beets,mathstuf/beets,YetAnotherNerd/beets,lengtche/beets,LordSputnik/beets,shamangeorge/beets,ibmibmibm/beets,m-urban/beets,krig/beets,lightwang1/beets,shamangeorge/beets,MyTunesFreeMusic/privacy-policy,jcoady9/beets,SusannaMaria/beets,beetbox/beets,Andypsamp/CODfinalJUNIT,Andypsamp/CODfinal...
test/testall.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass MigrationHistory(models.Model):\n app_name = models.CharField(max_length=255)\n migration = models.CharField(max_length=255)\n applied = models.DateTimeField(blank=True)\n\n class Meta:\n ...
python
edit
1
2
apache-2.0
77a965f27f75a8a5268ad95538d6625cecb44bfa
matthiask/south,matthiask/south
south/models.py
rejected_duplicate
Near-duplicate of sample 5079
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom cinfony import rdk\nfrom cinfony.rdk import *\n\nclass Fingerprint(rdk.Fingerprint):\n @property\n def raw(self):\n return np.array(self.fp, dtype=bool)\n \nrdk.Fingerprint = Fingerprint\n\n```\n...
python
edit
2
3
bsd-3-clause
cfa77bed245d80d453f7b463ea35473bbc29cc50
mwojcikowski/opendrugdiscovery
toolkits/rdk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport StringIO\n\nimport shortuuid\nfrom boto.s3.connection import S3Connection\n\nfrom ga import settings\n\n\nconn = S3Connection(settings.AWS_KEY, settings.AWS_SECRET)\nbucket = conn.get_bucket(settings.AWS_BU...
python
edit
1
1
mit
9c12e2d6890a32d93ea6b2a9ae6f000d46182377
alexmic/great-again,alexmic/great-again
ga/image/store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport fileinput\n\ndef read_code():\n return ''.join([line for line in fileinput.input()])\n\nif __name__ == '__main__':\n code = read_code()\n print(code)\n\n```\n\nApply this change: Correct a reading of a code" }, { "ro...
python
edit
1
2
mit
4b26066a6f3b666ec107621334ddbcceec6a819a
thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro
micro/read_code.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.test import TestCase\n\nfrom unittest import skipIf\n\nfrom geotrek.core.factories import TrailFactory\nfrom geotrek.authent.factories import UserFactory\nfrom geotrek.core.forms import TrailFor...
python
edit
1
1
bsd-2-clause
686406781af00d93e4d70049499068037d72be74
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/core/tests/test_forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wtforms import Form, SubmitField, BooleanField, TextField, SelectField, \\\n PasswordField, IntegerField, FieldList, FormField, validators\n\n\nclass LoginForm(Form):\n username = TextField('Username', [validators.Required()])\n ...
python
edit
7
1
bsd-3-clause
4559e01646010e1ed260d77e612774778a0c1359
buckket/weltklang,buckket/weltklang,krautradio/PyRfK,krautradio/PyRfK,krautradio/PyRfK,buckket/weltklang,buckket/weltklang,krautradio/PyRfK
lib/rfk/site/forms/login.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on Feb 20, 2013\n\n@author: crisr\n'''\nimport xml.etree.ElementTree as ET\nimport os\nfrom Simulation import Simulation\n\ndebug = True\n\nif __name__ == '__main__':\n #open the XML\n try:\n inputFile = 'test.xml' #sys.ar...
python
edit
1
0
apache-2.0
1a90e2c7b9155f35ced7e8f51707a2d86ad3ca93
joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,idaholab/raven,joshua-cogliati-inl/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,joshua-cogliati-inl/raven
scripts/Driver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Project(object):\n \"\"\"Holds project configuration parameters, such as data directory.\"\"\"\n\n def __init__(self, data_directory):\n self.data_directory = data_directory\n\n```\n\nApply this change: Add from_configfil...
python
edit
1
1
mit
e6c774c13a01f2cbe09947c39c1dac7b4989bebc
gadomski/jason2
jason2/project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_\n\nfrom django.contrib.auth.models import User\nfrom django.test import TestCase\n\nfrom us_ignite.events.tests import fixtures\nfrom us_ignite.events.models import Event\nfrom us_ignite.profiles.tests.fixtures im...
python
edit
3
2
bsd-3-clause
4f8267c0d3bc24c60c1236fda4dc83ee975361c8
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/events/tests/managers_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n##\n# Location Types\n##\nclass World(models.Model):\n\tname = models.CharField(max_length=30)\n\thomes = models.ManyToManyField(Home)\n\t\nclass Home(models.Model):\n\tname = models.CharField(max_length=30)\...
python
edit
null
null
mit
d7a77380ad95e316efb73a7be485d9b882fd64e9
Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation
Core/models.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\n# Copyright (c) 2013, Theo Crevon\n# Copyright (c) 2013, Greg Leclercq\n#\n# See the file LICENSE for copying permission.\n\nclass SWFError(Exception):\n def __init__(self, message, raw_error, *args):\n ...
python
edit
1
3
mit
3d9bf8afd912ccb0d1df72353a9c306c59773007
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
swf/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Temperature into database\"\"\"\n\nimport glob\nfrom time import sleep\nimport urllib2\nimport urllib\n\nbase_dir = '/sys/bus/w1/devices/'\ndevice_folder = glob.glob(base_dir + '28*')[0]\ndevice_file = device_...
python
edit
2
0
mit
458688aa3a1ce901b2ffcf64497965484cea4e53
zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie
temperature_db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom time import sleep\nfrom monitor.camera import Camera\nfrom monitor.plotter_pygame import PyGamePlotter\n\n\ndef run(plotter, camera):\n\n while True:\n plotter.show(camera.get_image_data())\n sleep(1.0)\n\nif __name__ ...
python
edit
1
3
apache-2.0
58f982d01a7c47a12a7ae600c2ca17cb6c5c7ed9
nickbattam/picamon,nickbattam/picamon,nickbattam/picamon,nickbattam/picamon
monitor/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nReverse a string\n\n'''\n\ndef reverse_string_iterative(string):\n\tpass\n\ndef reverse_string_recursive(string):\n\tpass\n\ndef reverse_string_pythonic(string):\n\treturn string[::-1]\n```\n\nApply this change: Add iterative and recur...
python
edit
3
2
mit
2917f396f52eb042f2354f0a7e1d05dd59b819e3
ueg1990/aids
aids/strings/reverse_string.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport channels.log\nimport logging\nimport os\nimport sys\n\nPROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))\nsys.path.insert(0, PROJECT_ROOT)\n\n\ndef get_channels_logger(*args, **kwargs):...
python
edit
3
0
apache-2.0
8af5aaee0aad575c9f1039a2943aff986a501747
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
tests/manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport threading\nimport socket\nimport SocketServer\n\nfrom orderbook import asks, bids\n\n\nclass ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):\n\n def handle(self):\n try:\n while True:\n ...
python
edit
1
4
mit
f4695f43e9eae5740efc303374c892850dfea1a2
Tribler/decentral-market
trade_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pypyodbc\nimport csv\n\nconn = pypyodbc.connect(\"DSN=\")\ncur = conn.cursor()\n\ntables = []\n\ncur.tables(\"%\", \"\", \"\")\nfor row in cur.fetchall():\n tables.append(row[2])\n\nfor table in tables:\n cur.execute(\"select *...
python
edit
1
0
isc
8fd395e1085f0508da401186b09f7487b3f9ae64
wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts
odbc2csv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import bbn\nimport auspex.config\nfrom auspex.log import logger\nfrom QGL import *\nChannelLibrary()\n\ndef pulse_marker(marker_name, length = 100e-9):\n \"\"\" Utility to generate a square pulse on a APS2 marker. Used for instanc...
python
edit
7
1
apache-2.0
6a8fadc2d607adaf89e6ea15fca65136fac651c6
BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex
src/auspex/instruments/utils.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef git_file_path(view, git_path):\n if not git_path:\n return False\n full_file_path = view.file_name()\n git_path_to_file = full_file_path.replace(git_path,'')\n \n if git_path_to_file[0] == \"/\":\n git_path_to_...
python
edit
1
3
mit
11d9225871fa4980c7782a849c3ecd425edbe806
bradsokol/VcsGutter,biodamasceno/GitGutter,biodamasceno/GitGutter,bradsokol/VcsGutter,robfrawley/sublime-git-gutter,robfrawley/sublime-git-gutter,tushortz/GitGutter,akpersad/GitGutter,michaelhogg/GitGutter,robfrawley/sublime-git-gutter,biodamasceno/GitGutter,akpersad/GitGutter,biodamasceno/GitGutter,natecavanaugh/GitGu...
git_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.conf import settings\n\nfrom .utils import get_menu_from_apps\nfrom .. import defaults\nfrom ..menu import generate_menu\n\nregister = template.Library()\n\n\n@register.assignment_tag(takes_context=T...
python
edit
1
5
mit
239f24cc5dc5c0f25436ca1bfcfc536e30d62587
yamijuan/django-menu-generator,RADYConsultores/django-menu-generator
menu_generator/templatetags/menu_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport contextlib\nimport shutil\nimport tempfile\n\nimport numpy\n\nfrom chainer.utils import walker_alias # NOQA\n\n\n# import class and function\nfrom chainer.utils.conv import get_conv_outsize # NOQA\nfrom chainer.utils.conv import ge...
python
edit
1
4
mit
e98eeadb9d5906bf65efc7a17658ae498cfcf27d
ronekko/chainer,chainer/chainer,okuta/chainer,wkentaro/chainer,ktnyt/chainer,chainer/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,hvy/chainer,chainer/chainer,rezoo/chainer,keisuke-umezawa/chainer,anaruse/chainer,okuta/chainer,hvy/chainer,keisuke-umezawa/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,keis...
chainer/utils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport camoco as co\n\ndef remove(args):\n print(co.del_dataset(args.type,args.name,safe=args.force))\n\n```\n\nApply this change: Make stderr messages more interpretable" }, { "role": "assistant", "content": "import camoco a...
python
edit
1
1
mit
c126b7a6b060a30e5d5c698dfa3210786f169b92
schae234/Camoco,schae234/Camoco
camoco/cli/commands/remove.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache....
python
edit
1
0
apache-2.0
3d0adce620606e4d997946f6ad886dee0403a7dd
google-research/rlds,google-research/rlds
pip_package/rlds_version.py
rejected_duplicate
Near-duplicate of sample 3550
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\" Copy + Paste in OS X\n\"\"\"\n\n\nimport subprocess\nimport commands\n\nfrom .base import *\n\n\ndef copy(string):\n \"\"\"Copy given string into system clipboard.\"\"\"\n try:\n subprocess.Pop...
python
edit
9
2
mit
fab561da9c54e278e7762380bf043a2fe03e39da
solarce/xerox,kennethreitz/xerox
xerox/darwin.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the LICENSE.txt file for details.\nfrom __future...
python
edit
1
1
bsd-3-clause
81880206be25cddc5d47a249eae3975e5070c3f0
itziakos/haas,scalative/haas,sjagoe/haas,scalative/haas,sjagoe/haas,itziakos/haas
haas/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom jsonfield import JSONField\n\n\nclass Environment(models.Model):\n #user = models.ForeignKey(User, related_name='environments')\n name = models.CharField(...
python
edit
3
0
apache-2.0
325fed2ef774e708e96d1b123672e1be238d7d21
SmartInfrastructures/fuel-main-dev,nebril/fuel-web,dancn/fuel-main-dev,SergK/fuel-main,zhaochao/fuel-main,nebril/fuel-web,prmtl/fuel-web,zhaochao/fuel-main,eayunstack/fuel-web,nebril/fuel-web,SmartInfrastructures/fuel-main-dev,SmartInfrastructures/fuel-main-dev,teselkin/fuel-main,Fiware/ops.Fuel-main-dev,teselkin/fuel-...
nailgun/nailgun/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .views import (\n RealmView,\n RealmCorrectionsView,\n EntitySearchView,\n EntityListView,\n EntityDetailView,\n E...
python
edit
1
0
mit
7816cf0562435176a33add229942ac3ee8e7b94c
correctiv/django-yolodex,correctiv/django-yolodex,correctiv/django-yolodex
yolodex/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import output\nimport json\nimport sys\nimport urllib.parse\nimport http.client\n\n\ndef getRequest(id, conf):\n db = conf['db']\n headers = conf['headers']\n test = db[id]\n method = test['method'].upper()\n fullpath ...
python
edit
3
5
mit
567925c770f965c7440b13b63b11b5615bf3c141
manoelhc/restafari,manoelhc/restafari
src/connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pickle\nimport unittest\n\nfrom .. import utils\n\n\nclass TestCompressedCollection(unittest.TestCase):\n def test_collection_can_be_pickled_and_unpickled(self):\n original = utils.CompressedCollection()\n original.a...
python
edit
1
2
mit
23456a32038f13c6219b6af5ff9fff7e1daae242
abusesa/abusehelper
abusehelper/core/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nclass RegistrationForm(forms.Form):\n full_name = forms.CharField(max_length=100)\n email = forms.EmailField()\n password = forms.CharField(widget=forms.PasswordInput, max_length=100)\n\n```\n\nApply thi...
python
edit
2
2
apache-2.0
57810d41ac50284341c42217cfa6ea0917d10f21
umkay/zulip,jeffcao/zulip,hafeez3000/zulip,dawran6/zulip,RobotCaleb/zulip,bastianh/zulip,brockwhittaker/zulip,hustlzp/zulip,littledogboy/zulip,aliceriot/zulip,MariaFaBella85/zulip,m1ssou/zulip,Gabriel0402/zulip,JanzTam/zulip,bitemyapp/zulip,amyliu345/zulip,alliejones/zulip,hayderimran7/zulip,dwrpayne/zulip,bastianh/zul...
zephyr/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import Shipper\n\n\nclass FedEx(Shipper):\n shipper = 'FedEx'\n\n\nclass FedExExpress(FedEx):\n barcode_pattern = r'^\\d{34}$'\n\n @property\n def tracking_number(self):\n return self.barcode[20:].lstrip('0')\n...
python
edit
1
4
bsd-3-clause
a81f78385f8ec9a94d0d511805801d1f0a6f17ed
jbittel/drogher
drogher/shippers/fedex.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nstat-retriever by Team-95\nstat_retriever.py\n\"\"\"\n\nimport requests\n\ndef main():\n url = \"http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=\"\n \"&Country=&DateFrom=&DateTo=&Division=&DraftPic...
python
edit
3
1
mit
b7fcbc3a2117f00177ddd7a353eb6a4dee5bc777
Team-95/stat-retriever
stat_retriever.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning\nfrom .base_processor import BaseProcessor\n\n\nCONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'\nCONFIG_DEFAULT_MAPPEDATTRIBUTE = ''\n\n\nclass ScopeExtrac...
python
edit
1
9
apache-2.0
ce3249dea725d40d5e0916b344cdde53ab6d53dc
SUNET/SATOSA,SUNET/SATOSA,its-dirg/SATOSA
src/satosa/micro_services/processors/scope_extractor_processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom incuna_test_utils.testcases.urls import URLTestCase\n\nfrom .. import views\n\n\nclass TestCMSIndexURL(URLTestCase):\n \"\"\"Make sure that the CMSIndex view has a URL\"\"\"\n def test_url(self):\n self.assert_url_matches_...
python
edit
1
1
bsd-2-clause
8445d491030be7fb2fa1175140a4b022b2690425
meshy/django-conman,Ian-Foote/django-conman,meshy/django-conman
conman/cms/tests/test_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import generics\nfrom api.comments.serializers import CommentSerializer, CommentDetailSerializer\nfrom website.project.model import Comment\nfrom api.base.utils import get_object_or_error\n\n\nclass CommentMixin(object):...
python
edit
1
3
apache-2.0
23fa1c55ec9fcbc595260be1039a4b8481cb4f13
kch8qx/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,kch8qx/osf.io,ZobairAlijan/osf.io,acshi/osf.io,DanielSBrown/osf.io,GageGaskins/osf.io,icereval/osf.io,wearpants/osf.io,mfraezz/osf.io,acshi/osf.io,jnayak1/osf.io,crcresearch/osf.io,danielneis/osf.io,brandonPurvis/osf.io,samanehsan/osf.io,samanehsan/osf.io,SS...
api/comments/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom itertools import chain\nimport string\nfrom cymbology.alphanum import CHAR_MAP\nfrom cymbology.codes import CINS_CODES\nfrom cymbology.exceptions import CountryCodeError\nfrom cymbology.luhn import _luhnify\nfrom cymbology.validation i...
python
edit
1
2
bsd-2-clause
3986476071b1c8d2808c02a6885643c509e64456
pmart123/cymbology,pmart123/security_id
cymbology/identifiers/cusip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib import admin\n\nfrom geotrek.feedback import models as feedback_models\n\nif 'modeltranslation' in settings.INSTALLED_APPS:\n from modeltranslation.admin import TabbedTranslationAdmin...
python
edit
1
3
bsd-2-clause
10aab1c427a82b4cfef6b07ae1103260e14ca322
makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/feedback/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport telegram\n\nfrom game.api import auth\n\nMAX_SCORE = 999999\n\n\nclass ScoreUpdater:\n def __init(self, bot: telegram.Bot):\n self.bot = bot\n\n def set_score(self, data, score):\n data = auth.decode(data)\n ...
python
edit
1
3
apache-2.0
f4b35615f772f695e5f87e11ecec7a07e751425d
alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games
bot/game/score.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom typing import Any, Sequence\n\nfrom django.contrib.auth import get_user_model\nfrom factory import Faker, post_generation\nfrom factory.django import DjangoModelFactory\n\n\nclass UserFactory(DjangoModelFactory):\n\n username = Fake...
python
edit
1
2
bsd-3-clause
b7c95f6eed786000278f5719fbf4ac037af20e50
pydanny/cookiecutter-django,pydanny/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-dja...
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010 Peter Teichman\n\nimport re\n\nclass MegaHALTokenizer:\n def split(self, phrase):\n if len(phrase) == 0:\n return []\n\n # add ending punctuation if it is missing\n if phrase[-1] not i...
python
edit
1
3
mit
a94a8f0e5c773995da710bb8e90839c7b697db96
LeMagnesium/cobe,meska/cobe,wodim/cobe-ng,wodim/cobe-ng,LeMagnesium/cobe,pteichman/cobe,tiagochiavericosta/cobe,pteichman/cobe,meska/cobe,DarkMio/cobe,tiagochiavericosta/cobe,DarkMio/cobe
cobe/tokenizer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom notification.models import Notice\n\n\ndef notification(request):\n if request.user.is_authenticated():\n return {\n \"notice_unseen_count\": Notice.objects.unseen_count_for(request.user, on_site=True),\n }\...
python
edit
1
2
mit
d7c4f0471271d104c0ff3500033e425547ca6c27
affan2/django-notification,affan2/django-notification
notification/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport arrayfire\nimport pytest\n\nbackends = arrayfire.library.get_available_backends()\n# do not use opencl backend, it's kinda broken\n#backends = [x for x in backends if x != 'opencl']\n\n# This will set the different backends before ea...
python
edit
1
1
bsd-2-clause
7b681bfd34a24dc15b219dd355db2557914b7b49
daurer/afnumpy,FilipeMaia/afnumpy
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Person(object):\n def __init__(self, person_type, person_name, person_surname=\"\", wants_accommodation=\"N\"):\n self.person_name = person_name\n self.person_surname = person_surname\n self.person_type = perso...
python
edit
1
1
mit
e9709abadb2daa1a0752fa12b8e017074f0fb098
peterpaints/room-allocator
classes/person.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\n\nfrom epo_ops.middlewares import Dogpile, Throttler\nfrom epo_ops.middlewares.throttle.storages import sqlite\nfrom inet.sources.ops import OpsClient\nfrom secrets import OPS_KEY, OPS_SECRET\n\n\ndef...
python
edit
1
1
mit
c291d032f7b6fba4fcc28ce8495b482d3e93406b
nestauk/inet
tests/test_ops.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Typer, build great CLIs. Easy to code. Based on Python type hints.\"\"\"\n\n__version__ = \"0.0.4\"\n\nfrom click.exceptions import ( # noqa\n Abort,\n BadArgumentUsage,\n BadOptionUsage,\n BadParameter,\n ClickExcepti...
python
edit
1
0
mit
858f993ceffb497bee12457d1d4102339af410a4
tiangolo/typer,tiangolo/typer
typer/__init__.py
rejected_duplicate
Near-duplicate of sample 1138
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add ranking data to participants table\n\nRevision ID: 451d4bb125cb\nRevises: 49be2190c22d\nCreate Date: 2017-11-10 13:57:37.807238+00:00\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\nfrom sqlalchemy.dialects import mysq...
python
edit
1
1
mit
32b35f49c525d6b527de325ecc4837ab7c18b5ad
HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteCh...
apiserver/alembic/versions/201711101357_451d4bb125cb_add_ranking_data_to_participants_table.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom pkg_resources import get_distribution, DistributionNotFound\n\n\ndef check(request):\n package_name = settings.HEARTBEAT.get('package_name')\...
python
edit
1
3
mit
2833e2296cff6a52ab75c2c88563e81372902035
pbs/django-heartbeat
src/heartbeat/checkers/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig as BaseAppConfig\nfrom django.utils.importlib import import_module\n\n\nclass AppConfig(BaseAppConfig):\n\n name = \"conf_site\"\n\n def ready(self):\n import_module(\"conf_site.receivers\")\n\...
python
edit
1
1
mit
8d43061490c32b204505382ec7b77c18ddc32d9d
pydata/conf_site,pydata/conf_site,pydata/conf_site
conf_site/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\n\n\nclass EntityForm:\n def __init__(self):\n self._score = 0.\n self.forms = defaultdict(float)\n\n def add_form(self, score, normal_form):\n self._score += score\n sel...
python
edit
1
2
mit
e771eeb4595197ae4c147f617c4cf7e5825f279c
Lol4t0/named-objects-extractor
object_extractor/named_object.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom katagawa.kg import Katagawa\n\nfrom schema.config import Guild\n\n\nclass Config:\n def __init__(self, bot):\n dsn = f'postgresql://beattie:passwd@localhost/config'\n self.db = Katagawa(dsn)\n self.bot = bot\n ...
python
edit
3
2
mit
c6427c035b9d1d38618ebfed33f729e3d10f270d
BeatButton/beattie,BeatButton/beattie-bot
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport romanesco\nfrom . import pyspark_executor, spark\n\nSC_KEY = '_romanesco_spark_context'\n\n\ndef setup_pyspark_task(event):\n \"\"\"\n This is executed before a task execution. If it is a pyspark task, we\n create...
python
edit
1
3
apache-2.0
e0607c27cf990f893d837af5717de684bb62aa63
Kitware/romanesco,girder/girder_worker,girder/girder_worker,Kitware/romanesco,girder/girder_worker,Kitware/romanesco,Kitware/romanesco
plugins/spark/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nThis example shows how to validate addresses. Note that the validation\nclass can handle up to 100 addresses for validation.\n\"\"\"\nimport logging\nimport binascii\nfrom example_config import CONFIG_OBJ\nfro...
python
edit
2
0
bsd-3-clause
dbda7d542c2f9353a57b63b7508afbf9bc2397cd
gtaylor/python-fedex,gtaylor/python-fedex,python-fedex-devs/python-fedex,AxiaCore/python-fedex,obr/python-fedex,python-fedex-devs/python-fedex,python-fedex-devs/python-fedex,obr/python-fedex,gtaylor/python-fedex,gtaylor/python-fedex,python-fedex-devs/python-fedex,AxiaCore/python-fedex
examples/address_validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport django\nfrom django.conf import settings\nfrom django.core.management import call_command\n\n\nsettings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
1
0
mit
7080057c9abc6e455222e057315055b3e9965cc9
wylee/django-perms
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) Ivan Kravets <<EMAIL>>\n# See LICENSE for details.\n\nfrom subprocess import check_output, CalledProcessError\nfrom urllib import unquote\n\n\ndef application(env, start_response):\n status = \"200 OK\"\n response = \"...
python
edit
1
5
apache-2.0
4dbc42b0516578d59b315b1ac1fa6ccf3e262f1e
platformio/platformio-web,orgkhnargh/platformio-web,orgkhnargh/platformio-web,orgkhnargh/platformio-web,platformio/platformio-web
seo/escaped_fragment/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nLogging\n=======\n\"\"\"\nimport logging\n\nimport colorlog\n\n\ndef init_logger(level, printout=True):\n \"\"\"\n Initialize app logger to configure its level/handler/formatter/etc..\n\n Todo:\n * A mean to raise cl...
python
edit
1
2
mit
b986b437495b4406936b2a139e4e027f6275c9eb
sveetch/boussole
boussole/logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BaseStore(object):\n\n def set(self, key, value):\n raise NotImplementedError\n\n def get(self, key):\n raise NotImplementedError\n\n\nclass InMemoryStore(object):\n\n def __init__(self, *args, **kwargs):\n ...
python
edit
1
1
bsd-2-clause
16ea4f3ca1622604fd79e22b4b674d1dd9e11779
crateio/carrier
conveyor/store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nconfig_dir = os.path.dirname(os.path.abspath(__file__))\n\n# Destination of built packages.\nPKG_REPO = '/tmp/'\n\n```\n\nApply this change: Make it work out of the box on the build-server and locally" }, { "role": "ass...
python
edit
1
0
mit
fd061738d025b5371c1415a1f5466bcf5f6476b7
paylogic/py2deb,paylogic/py2deb
py2deb/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import (\n StringField, PasswordField, BooleanField, SubmitField,\n ValidationError,\n)\nfrom wtforms.validators import (\n InputRequired, Length, Email, Regexp, EqualTo,\n)\n\nfrom app.mode...
python
edit
3
2
mit
b6a2ba81c9ddd642cfa271cab809a5c2511f7204
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
app/auth/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey\nfrom sqlalchemy.orm import relationship\nfrom sqlalchemy.ext.hybrid import hybrid_property, hybrid_method\n\nfrom .base import Bas...
python
edit
4
1
apache-2.0
7fa074929301d610bdba6186267eb0659aed9dd8
joostsijm/Supremacy1914,joostsijm/Supremacy1914
python/app/models/game.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\nimport re\nimport unittest.mock\n\n# Default to turning off all but critical logging messages\nlogging.basicConfig(level=logging.CRITICAL)\n\ndef mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True...
python
edit
1
2
unlicense
58544043b8dee4e55bad0be5d889a40c0ae88960
HXLStandard/libhxl-python,HXLStandard/libhxl-python
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture\ndef event_loop():\n print(\"in event_loop\")\n try:\n import asyncio\n\n import uvloop\n\n asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())\n except ImportError:\n ...
python
edit
1
2
mit
00f1ff26fcd7d0398d057eee2c7c6f6b2002e959
kura/blackhole,kura/blackhole
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest.mock import MagicMock\nimport pytest\nfrom rocketchat_API.rocketchat import RocketChat\n\n\n@pytest.fixture(scope=\"session\")\ndef rocket():\n _rocket = RocketChat()\n\n return _rocket\n\n\n@pytest.fixture(scope=\"sessi...
python
edit
1
1
mit
2f2b64321a54c93a109c0b65866d724227db9399
jadolg/rocketchat_API
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom socket import socket, AF_INET, SOCK_DGRAM\n\ndef create_udp_server_socket(endpoint):\n skt = socket(AF_INET, SOCK_DGRAM)\n skt.bind(endpoint)\n return skt\n\nif __name__ == '__main...
python
edit
2
1
mit
39acab842be6a82d687d4edf6c1d29e7bf293fae
tmacam/remote_logging_cpp,tmacam/remote_logging_cpp
udp_logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# type: ignore\n\n\"\"\"Shared fixture functions.\"\"\"\nimport pathlib\nimport pytest # pylint: disable=E0401\nimport spacy # pylint: disable=E0401\nfrom spacy.language import Language # p...
python
edit
1
1
apache-2.0
dcebceec83c31fc9b99cb5e232ae066ee229c3bf
ceteri/pytextrank,ceteri/pytextrank
tests/conftest.py
accepted
null
true