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 semver\nimport virtool.github\n\n\ndef format_hmm_release(updated, release, installed):\n # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release\n # has not changed and `Non...
python
edit
1
5
mit
4a476e31d16273afc99abed408efba37936af620
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
virtool/hmm/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport logging.config\nimport logging.handlers\nimport six\nimport sys\n\nfrom ..utils import from_human_readable\n\n\ndef configure(config):\n format = config.get('format', None)\n datefmt = config.get('datefmt', None...
python
edit
3
3
mit
76c4a59070ef1e8562cc30bd28ac88ff82636d9c
rollforbugs/cscslackbot,rollforbugs/cscslackbot
cscslackbot/logconfig/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as f:\n readme = f.read()\n\nwith open('LICENSE') as f:\n license = f.read()\n\nsetup(\n name='nickITAPI',\n version='0.1.1',\n ...
python
edit
1
0
mit
220013558f83523113ca58381a6b6d283178e3be
cthit/nickIT,cthit/nickIT,cthit/nickIT
flask-app/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2011 OpenStack Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# ...
python
edit
1
1
apache-2.0
8b0e39eec8a82fd3f5a424ec75678426b2bf523e
alex8866/cinder,alex8866/cinder
cinder/version.py
rejected_duplicate
Near-duplicate of sample 22765
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Car(object):\n condition = \"new\"\n def __init__(self, model, color, mpg):\n self.model = model\n self.color = color\n self.mpg = mpg\n\n def display_car(self):\n print \"This is a %s %s with %s M...
python
edit
4
1
apache-2.0
93873f19a651b786f2413b073a9372dae7bb67a9
haozai309/hello_python
codecademy/Car.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Insert school data\n\nRevision ID: 13f089849099\nRevises: 3cea1b2cfa\nCreate Date: 2013-05-05 22:58:35.938292\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '13f089849099'\ndown_revision = '3cea1b2cfa'\n\n\nfrom os....
python
edit
1
2
apache-2.0
eb72c1fbd0b6764853d63ecc6f73e4281b34d411
teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr
alembic/versions/13f089849099_insert_school_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport os\nimport subprocess\nimport config\n\nNAME=\"init\"\nHELP=\"give git issues\"\n\ndef execute(args):\n\t# Check to see if the .ghi directories have already been created\n\t# If it doesn't exist, create it.\...
python
edit
2
3
apache-2.0
f4f4d799409e4869276b84f032e60cdf516fcaf6
lorneliechty/ghi,lorneliechty/ghi
src/subcmds/init.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup, Tag\nimport requests\n\nclass YahooGameLog:\n def __init__(self, player_id):\n page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/')\n self.soup = BeautifulSoup...
python
edit
1
3
mit
57773d37b20285eba15cc78f4de4e3e344097624
arosenberg01/asdata
game-log.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DiffAgentBase(object):\n diff = []\n noise_reduction = []\n latest_observation = 0\n current_prediction = []\n name = ''\n behaviour = None\n working_behaviour_size = 2\n\n def __init__(self, experience, knowle...
python
edit
1
6
apache-2.0
128a0ae97e86d6dec6c149a7d3f8bccd7f8c499d
sergiuionescu/gym-agents
agents/DiffAgentBase.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport sys\nfrom urllib.parse import urlparse\n\nfrom .v5_client import LuminosoClient, get_token_filename\nfrom .v5_constants import URL_BASE\n\n\ndef main():\n default_domain_base = urlparse(URL_BASE).netloc...
python
edit
3
2
mit
37defc61f5722a8e988386cb4eed883f2205feb5
LuminosoInsight/luminoso-api-client-python
luminoso_api/save_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 IBM Corporation\n# All rights reserved\n\n# This is the main application.\n# It should check for existing UDP socket to negotiate socket listen takeover\n# It will have three paths into it:\n# -Unix domain socket\n# -TL...
python
edit
8
2
apache-2.0
44c8098906375020b6d6b894601c356bd0fbd586
xcat2/confluent,michaelfardu/thinkconfluent,xcat2/confluent,michaelfardu/thinkconfluent,jjohnson42/confluent,jufm/confluent,xcat2/confluent,chenglch/confluent,xcat2/confluent,chenglch/confluent,whowutwut/confluent,jufm/confluent,jjohnson42/confluent,jufm/confluent,chenglch/confluent,jufm/confluent,whowutwut/confluent,x...
confluent/main.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\n\nclass TestCase(object):\n \"\"\"\n Add assetion methods for HTTP Requests to TestCase\n \"\"\"\n\n def assertRequest(self, method=\"GET\", url=\"\", status_code=200,\n contains=None, **kwargs):\n ...
python
edit
7
8
mit
8382ee65c87c5eee976d4488ef91bdd5f801c06b
bramwelt/apitestcase
apitestcase/testcase.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nRULES = 'B3/S23'\nWIDTH = 1280\nHEIGHT = 720\nCELL_SIZE = 8\nDENSITY = .5\n\n```\n\nApply this change: Make the default cell size larger." }, { "role": "assistant", "content": "RULES = 'B3/S23'\nWIDTH = 1280\nHEIGHT = 720\nCELL_...
python
edit
1
0
bsd-2-clause
25cf672fa4a743b3c4cb198e5fdf19bd40991f35
lig/life
life/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.contrib import auth\n\nurlpatterns = patterns('members.views',\n url(r'^login/$', 'login', name='login'),\n url(r'^logout/$', 'logout', name='logout'),\n url(r'^search/(?P<nam...
python
edit
3
0
mit
cdefb1fdb304939b35f8c881662fa220a57573dc
Hackfmi/Diaphanum,Hackfmi/Diaphanum
members/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nGroups AMI datasets by pointing direction,\nthen dumps them in JSON format.\n\"\"\"\n\nimport ami\nimport json\n\nami_rootdir = '/opt/ami'\n\nr = ami.Reduce(ami_rootdir)\nnamed_groups = r.group_pointings()\njson.dump(named_groups, o...
python
edit
2
2
bsd-3-clause
6e61c41a24e35e66d941b67945f135392b27397d
timstaley/drive-ami
list_ami_datasets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\nimport logging\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractUser as DjangoAbstractUser\n\nlogger = logging.getLogger(__name__)\n\n\nclass AbstractUser(DjangoAbstractUser):\n uuid = models.UUI...
python
edit
1
3
bsd-2-clause
6d5a37ef127f2b1822645fcad6636880e92d5489
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
helusers/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nclass Generator:\n def run(self, sourcedir, outputdir):\n sourcedir = os.path.normpath(sourcedir)\n outputdir = os.path.normpath(outputdir)\n prefix = len(sourcedir)+len(os.path.sep)\n for root, d...
python
edit
1
5
mit
f9d63b418f69c77b01f9bed1d05fecdf8c028e7e
kevinbeaty/mvw
mvw/generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils.module_loading import import_by_path\n\nBACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND',\n 'celery_progress.backends.CeleryBackend')\n\n\ndef get_backend():\n ret...
python
edit
1
1
bsd-3-clause
931024e081d380a5f754920c7992b359ce2cd2de
annaisystems/django-celery-progress,annaisystems/django-celery-progress,annaisystems/django-celery-progress
celery_progress/__init__.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 django.conf import settings\nfrom django.utils import translation\n\nfrom cms.models import Title\nfrom staticgen.staticgen_pool import staticgen_pool\nfrom staticge...
python
edit
1
2
bsd-3-clause
31c360fbdb3aa1393715e53ec4dfd86e59d68249
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# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\nimport pytest\nfrom pytablewriter import set_log_level, set_logger\n\n\nlogbook = pytest.importor...
python
edit
2
1
mit
b982fcd13400e6e05c4b711f034f360bdbdbe07d
thombashi/pytablewriter
test/test_logger.py
rejected_duplicate
Near-duplicate of sample 22579
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nParadrop command line utility.\n\nEnvironment Variables:\n PDSERVER_URL Paradrop controller URL [default: https://paradrop.org].\n\"\"\"\nimport os\n\nimport click\n\nfrom . import chute\nfrom . import device\nfrom . import ro...
python
edit
1
1
apache-2.0
b6b9c6f3f8faaade428d044f93acd25edade075d
ParadropLabs/Paradrop,ParadropLabs/Paradrop,ParadropLabs/Paradrop
tools/pdtools/pdtools/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport unittest\nparentDir = os.path.join(os.path.dirname(__file__), \"../\")\nsys.path.insert(0, parentDir)\n\nfrom oxyfloat import OxyFloat\n\nclass DataTest(unittest.TestCase):\n def set...
python
edit
1
2
mit
d546d6901859a5fee8a16ffea6df560ecbb1e280
biofloat/biofloat,MBARIMike/biofloat,biofloat/biofloat,MBARIMike/biofloat,MBARIMike/oxyfloat,MBARIMike/oxyfloat
tests/unit_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse, HttpResponseServerError\nfrom django.template import RequestContext, loader\nfrom django.conf import settings\n\nfrom maintenancemode.http import HttpResponseTemporaryUnavailable\n\nimport logging\nlogg...
python
edit
3
4
mit
215401f586a6960c4165debf698f3a95c75a178b
bueda/django-comrade
comrade/views/simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom unittest import TestCase\n\nfrom stylo.shape import Ellipse, Circle, Rectangle, Square\nfrom stylo.testing.shape import BaseShapeTest\n\n\n@pytest.mark.shape\nclass TestEllipse(TestCase, BaseShapeTest):\n \"\"\"Tests ...
python
edit
1
1
mit
39f44c926eb16f2cd57fa344318bce652b158a3a
alcarney/stylo,alcarney/stylo
tests/shape/test_basic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Output class. \n\nRepresents a widget that can be used to display output within the widget area.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom .widget import ...
python
edit
3
1
bsd-3-clause
18cbf5c9b357dc2941fd268b87a65649a086ab01
ipython/ipython,ipython/ipython
IPython/html/widgets/widget_output.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"dasem.\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom .fullmonty import Word2Vec\n\n\n__all__ = ['Word2Vec']\n\n```\n\nApply this change: Change for style checking warning" }, { "role": "assistant", "content": "\"...
python
edit
1
0
apache-2.0
f768173dab101e8333766cd11f33599397c682d0
fnielsen/dasem,fnielsen/dasem
dasem/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ctypes\r\nfrom ctypes import WinDLL, byref, WinError\r\nfrom ctypes.wintypes import MSG\r\n_user32 = WinDLL(\"user32\")\r\n\r\nGetMessage = _user32.GetMessageA\r\nGetMessage.argtypes = [\r\n ctypes.c_void_p,\r\n ctypes.c_void_p...
python
edit
1
5
mit
80347266377f01932fe8277c7a12ce87663b9018
denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes
comtypes/messageloop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nACTION_CREATE = 0\nACTION_VIEW = 1\nACTION_UPDATE = 2\nACTION_DELETE = 3\nACTIONS = {\n ACTION_CREATE: 'Create',\n ACTION_VIEW: 'View',\n ACTION_UPDATE: 'Update',\n ACTION_DELETE: 'Delete',\n}\n\nLEVEL_GUEST = 0\nLEVEL_USER = ...
python
edit
1
0
bsd-3-clause
58d739f8c229967b53655376a01c1e3af6034ae1
drkitty/cyder,akeym/cyder,OSU-Net/cyder,zeeman/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,zeeman/cyder,OSU-Net/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,akeym/cyder,drkitty/cyder
cyder/base/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nSQL_PORT = 15000\nJSON_RPC_PORT = 15598\nHTTP_PORT = 15597\nJSON_PUBSUB_PORT = 15596\n\n```\n\nApply this change: Add missing constant for ssl listener." }, { "role": "assistant", "content": "\nSQL_PORT = 15000\nJSON_RPC_PORT ...
python
edit
1
0
apache-2.0
c326becad43949999d151cd1e10fcb75f9d2b148
MediaMath/qasino,MediaMath/qasino
lib/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\ndef main():\n input_json = json.load(open(\"photo_id_to_business_id.json\"))\n \n # print the header of output csv file\n print 'photo_id,business_id,label'\n \n # for each entry in input json file print one...
python
edit
3
2
mit
618909832a9df101d240c737786e28c761c76912
aysent/yelp-photo-explorer
json2csv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport MySQLdb\n\n\ndef connection():\n conn = MySQLdb.connect(host=\"localhost\",\n user=\"root\",\n passwd=\"gichin124\",\n db=\"tripmeal\")\n c = conn.cu...
python
edit
2
1
mit
611165bccb307611945f7a44ecb8f66cf4381da6
DanielAndreasen/TripMeal,DanielAndreasen/TripMeal
dbconnect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
25628ca0b7065e8682f45b8e03e5f80a569c520d
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nimport pytest\n\nfrom fsspec import AbstractFileSystem\nfrom fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS\n\nTEST_FILE = 'file'\n\n\n@pytest.mark.parametrize(\"fs\", ['local'], indirect=[\"fs\"])\nde...
python
edit
1
3
bsd-3-clause
d0c8968766a06e8c426e75edddb9c6ce88d080a0
fsspec/filesystem_spec,intake/filesystem_spec,fsspec/filesystem_spec
fsspec/implementations/tests/test_common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef test_ensure_authority(manager_transaction):\n authority1 = manager_transaction.ensure_authority(\n name='Test Authority',\n rank=0,\n cardinality=1234\n )\n assert authority1.name == 'Test Authority'\n a...
python
edit
1
1
mit
80e5af1599303cd012a348c7d5503bdfca433ce2
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
tests/test_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport RPi.GPIO as gpio\nimport time\n\n#use board numbering on the pi\n\ngpio.setmode(gpio.BOARD)\n\ngpio.setup(40, gpio.OUT)\ngpio.setup(38, gpio.OUT)\n\n#true and 1 are the same\ngpio.output(40, True)\ngpio.output(38, 1)\n\nwhile True:\n...
python
edit
1
0
mit
4a838a3e1df1f832a013b3e8a18e5474b06d0f9a
emgreen33/easy_bake,emgreen33/easy_bake
easy_bake.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport _pybinding\nfrom scipy.sparse import csr_matrix as _csrmatrix\n\n\nclass Model(_pybinding.Model):\n def __init__(self, *params):\n super().__init__()\n self.add(*params)\n\n def add(self, *params):\n for pa...
python
edit
1
4
bsd-2-clause
f542b05f9a344c6a39b6ed3b163deddc3086be26
MAndelkovic/pybinding,dean0x7d/pybinding,dean0x7d/pybinding,MAndelkovic/pybinding,MAndelkovic/pybinding,dean0x7d/pybinding
pybinding/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom decimal import Decimal\nfrom django.http import HttpResponse\nfrom django.utils import simplejson\n\ndef decimal_format(value, min_decimal_places=0):\n decimal_tuple = value.as_tuple()\n have_decimal_places = -decimal_tuple.expon...
python
edit
1
5
bsd-3-clause
0b1d2a43e4f9858bcb9d9bf9edf3dfae417f133d
taedori81/satchless,fusionbox/satchless,fusionbox/satchless,fusionbox/satchless
satchless/util/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport ijson\n\n\nclass TimeSeriesJSON:\n\n def __init__(self, f=None, fn=None, tag='item'):\n \"\"\"\n :param f: file object (_io.TextIOWrapper)\n :param fn: file name as a string\n :param tag: t...
python
edit
1
4
apache-2.0
874816497e7a9bd0e091a62a9e9b33ae832eb130
jeongmincha/pyjsonts
pyjsonts/time_series_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef init(name, data_format_class, data_format_options, handler_class,\n handler_options):\n transport_class_name = '%sTransport' % name.title()\n transport_module = __import__('devicehive.transports.%s_transport' % name,\n ...
python
edit
1
1
apache-2.0
aa8117c288fc45743554450448178c47246b088f
devicehive/devicehive-python
devicehive/transport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\n\nfrom os import path\n\n\n_plugin_name = \"Git Conflict Resolver\"\n_icon_folder = path.join(_plugin_name, \"gutter\")\n_icons = {\n \"ours\": \"ours\",\n \"ancestor\": \"ancestor\",\n \"theirs\": \"theirs\"\n}\n\n...
python
edit
1
2
mit
17080ab6511d045b0bc27b3c04102fbcefa5c330
Zeeker/sublime-GitConflictResolver,Zeeker/sublime-GitConflictResolver
modules/icons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport json\nimport sys\n\ndef parse_args(argv):\n parser = argparse.ArgumentParser(\"Test\")\n parser.add_argument(\"--port\", \"-p\", type=int, default=8080, help=\"Specify the port recordpeeker runs on\"...
python
edit
4
2
mit
5cf8f3326b6995a871df7f2b61b25ff529216103
jonchang/recordpeeker
recordpeeker/command_line.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#-*- coding: utf-8 -*-\n\"\"\" This script is the launcher of the daemon.\n\"\"\"\n\nimport sys\nimport threading\n\nfrom core.daemonargs import parse_arguments\nfrom core.message import set_default_repeat\nfrom core...
python
edit
1
1
mit
145b40c1b855b9f40eddf4682f4361112e459323
juliendelplanque/lcddaemon
lcddaemon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport discord\nfrom modules.botModule import BotModule\n\nclass Karma(BotModule):\n name = 'karma'\n\n description = 'Monitors messages for reactions and adds karma accordingly.'\n\n help_text = 'This module has no cal...
python
edit
3
2
mit
f3875b1d9aed5f847b11846a27f7652e4c548b6c
suclearnub/scubot
modules/karma.py
rejected_duplicate
Near-duplicate of sample 20111
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .helpers import BaseApplicationTest, BaseAPIClientMixin\n\n\nclass DataAPIClientMixin(BaseAPIClientMixin):\n data_api_client_patch_path = 'app.main.views.marketplace.data_api_client'\n\n\nclass TestApplication(DataAPIClientMixin, Ba...
python
edit
1
1
mit
c66427aae7e251450ccb241ebbd0663127e1f6c1
alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend
tests/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport bpy\nimport bpy.utils.previews\nfrom .. import util\n\nasset_previews = bpy.utils.previews.new()\n\ndef load_previews(lib, start=0):\n global asset_previews\n enum_items = []\n\n lib_dir = presets_library = util.g...
python
edit
4
4
mit
c2a3d8621e01d453da0043f5fe9afeba0a064224
prman-pixar/RenderManForBlender,adminradio/RenderManForBlender,prman-pixar/RenderManForBlender
presets/icons.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom paver.easy import *\n\n@task\ndef release_unix():\n sh('python setup.py clean')\n sh('rm -f h5py_config.pickle')\n sh('python setup.py build --hdf5-version=1.8.4 --mpi=no')\n sh('python setup.py test')\n sh('python setup...
python
edit
18
2
bsd-3-clause
7bcc78cd428fa6d76c11b2f19886ec5e798411c6
h5py/h5py,h5py/h5py,h5py/h5py
pavement.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom jsk_data import download_data\n\n\ndef main():\n PKG = 'jsk_apc2016_common'\n\n download_data(\n pkg_name=PKG,\n path='trained_data/vgg16_96000.chainermodel',\n url='https://drive.goo...
python
edit
1
1
bsd-3-clause
0298ace270749a6de89595a5bb566739dc63b16e
pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc
jsk_apc2016_common/scripts/install_trained_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nThis module defines the Eliot log events emitted by the API implementation.\n\"\"\"\n\n__all__ = [\n \"JSON_REQUEST\",\n \"REQUEST\",\n ]\n\nfrom eliot import ...
python
edit
2
0
apache-2.0
48ee32acb12519dc644dce5b4f95d285a3176242
Azulinho/flocker,lukemarsden/flocker,mbrukman/flocker,agonzalezro/flocker,achanda/flocker,Azulinho/flocker,1d4Nf6/flocker,runcom/flocker,LaynePeng/flocker,moypray/flocker,lukemarsden/flocker,achanda/flocker,wallnerryan/flocker-profiles,AndyHuu/flocker,Azulinho/flocker,runcom/flocker,1d4Nf6/flocker,adamtheturtle/flocker...
flocker/restapi/_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nLoading and using trained models from tensorflow\n\"\"\"\nimport tensorflow as tf\n\nclass Graph():\n \"\"\" Loading and running isolated tf graph \"\"\"\n def __init__(self, loc):\n self.graph ...
python
edit
1
1
mit
fd6cc34c682c773273bcdd9d09d2f7f2e4d91700
Breta01/handwriting-ocr
ocr/tfhelpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom square_grid import SquareGrid\n\nclass TestSquareGrid(unittest.TestCase):\n def setUp(self):\n a = [0] * 3\n b = [1] * 3\n c = [2] * 3\n self.matrix= [a,b,c]\n self.good_grid = Squ...
python
edit
4
1
mit
3e81a2bfd026475b9ab0548c3127aa102066707d
noisebridge/PythonClass,razzius/PyClassLessons,PyClass/PyClassLessons,PyClass/PyClassLessons,noisebridge/PythonClass,razzius/PyClassLessons,noisebridge/PythonClass,razzius/PyClassLessons,noisebridge/PythonClass,PyClass/PyClassLessons,razzius/PyClassLessons
guest-talks/20170828-oo-intro/exercises/test_square_grid.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This is the agent which currently takes the action with highest immediate reward.\"\"\"\n\nimport env\nimport time\nenv.make(\"pygame\")\n\nfor episode in range(10):\n env.reset()\n episode_reward = 0\n for t in range(100):\n...
python
edit
1
0
mit
cd8fe432077bdd65122189dd9191d7a5b8788e48
danieloconell/Louis
reinforcement-learning/play.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\n\nfrom experiments.models import Experiment\nfrom spawner import scheduler\nfrom spawner.utils.constants import ExperimentLifeCycle\n\n\nclass Command(BaseCommand):\n def handle(self, *args...
python
edit
1
2
apache-2.0
b57be89c94d050dd1e5f4279f91170982b00cc2e
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/clusters/management/commands/clean_experiments.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport statsd\nimport decimal\n\n\nclass Gauge(statsd.Client):\n '''Class to implement a statsd gauge\n\n '''\n\n def send(self, subname, value):\n '''Send the data to statsd via self.connection\n\n :keyword subname: ...
python
edit
1
1
bsd-3-clause
7938589c950b9b36d215aa85224c931a080c104e
wolph/python-statsd
statsd/gauge.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n# Create your models here.\nclass GlobalSettings(models.Model):\n\tDOMAIN_NAME = 'FQDN'\n\tFORCE_HTTPS = 'HTTPS'\n\tADMIN_MAIL = 'ADM_MAIL'\n\tADMIN_NAME = 'ADM_NAME'\n\n\tKEY_CHOICES = (\n\t\t(DOMAIN_NAME,...
python
edit
1
0
mit
c9ca005e8129c784e108bb77719f201e110433f1
kuboschek/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay
settings/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 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\n\"\"\"Entry point for the dartium buildbots.\n...
python
edit
1
5
bsd-3-clause
9e62292ed25860a2e376c5d98c8ff7762bc1346b
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/slave/chromium/dart_buildbot_run.py
rejected_duplicate
Near-duplicate of sample 850
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom apis.betterself.v1.events.serializers import SupplementEventSerializer\nfrom apis.betterself.v1.utils.views import BaseGenericListCreateAPIViewV1\nfrom events.models import SupplementEvent\n\n\nclass SupplementEventView(BaseGenericList...
python
edit
1
2
mit
9883a1ac995816160a35fd66107a576289062123
jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself
apis/betterself/v1/events/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom djangae.contrib.gauth.common.backends import BaseAppEngineUserAPIBackend\n\n\nclass AppEngineUserAPIBackend(BaseAppEngineUserAPIBackend):\n pass\n\n```\n\nApply this change: Fix bad import on gauth_sql" }, { "role": "assista...
python
edit
1
0
bsd-3-clause
65b71b6352f07a0ca9a2fdbbbb4f7156b59f59b7
grzes/djangae,grzes/djangae,potatolondon/djangae,grzes/djangae,potatolondon/djangae
djangae/contrib/gauth_sql/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n sieve_eratosthenes.py\n\n Implementation of the Sieve of Eratosthenes algorithm.\n\n Depth First Search Overview:\n ------------------------\n Is a simple, ancient algorithm for finding all prime numbers \n up to ...
python
edit
2
5
bsd-3-clause
10009f8a19b417359d41a5e83ff5083e6862b891
rexshihaoren/algorithms,stphivos/algorithms
algorithms/math/sieve_eratosthenes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use only md5 to hash passwords when running tests" }, { "role": "assistant", "content": "# These settings will always be overriding for all test runs\n\nEMAIL_FROM_ADDRESS = '<EMAIL>'\n\nPASSWORD_HASHERS = (\n 'django.contrib....
python
new_file
1
0
bsd-3-clause
9d14c70b68eb1b00b8b6826ee6fc2e58fb4a0ab6
peterbe/airmozilla,ehsan/airmozilla,lcamacho/airmozilla,anu7495/airmozilla,anu7495/airmozilla,anu7495/airmozilla,blossomica/airmozilla,lcamacho/airmozilla,EricSekyere/airmozilla,Nolski/airmozilla,tannishk/airmozilla,ehsan/airmozilla,blossomica/airmozilla,anjalymehla/airmozilla,ehsan/airmozilla,zofuthan/airmozilla,chiri...
settings_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom subprocess import Popen, STDOUT, PIPE\n\npwd = os.path.dirname(__file__)\n\ndef setup(): \n os.putenv('PWD', pwd)\n os.chdir(pwd)\n\ndef test_run():\n proc = Popen([pwd + '/../../src/openmc'...
python
edit
3
3
mit
f83a2dd996ad8f1f0807e4ef877df52d62a4ce45
wbinventor/openmc,shenqicang/openmc,sxds/opemmc,shikhar413/openmc,liangjg/openmc,smharper/openmc,walshjon/openmc,kellyrowland/openmc,amandalund/openmc,samuelshaner/openmc,johnnyliu27/openmc,bhermanmit/cdash,bhermanmit/openmc,mit-crpg/openmc,keadyk/openmc_mg_prepush,smharper/openmc,johnnyliu27/openmc,shenqicang/openmc,a...
tests/test_particle_restart/test_particle_restart.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utilities for asyncio-friendly file handling.\"\"\"\nfrom .threadpool import open\n\n__version__ = \"0.7.0dev0\"\n\n__all__ = [\"open\"]\n\n```\n\nApply this change: Add files via upload Rebase" }, { "role": "assistant", "...
python
edit
1
0
apache-2.0
a397f781751536f07e41644f8331990f5e0e8803
Tinche/aiofiles
aiofiles/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWindows platform support for running the application as a detached process.\n\n\"\"\"\nimport subprocess\nimport sys\n\nDETACHED_PROCESS = 8\n\n\nclass Daemon(object):\n \"\"\"Daemonize the helper application, putting it in a for...
python
edit
4
1
bsd-3-clause
0b8aa961cb8aa6646aa1b660f6f669cf82492225
dave-shawley/helper,gmr/helper,gmr/helper
helper/windows.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom client import slack_client as sc\n\nfor user in sc.api_call(\"users.list\")[\"members\"]:\n print(user[\"name\"], user[\"id\"])\n\n```\n\nApply this change: Add a bit more info into the examp...
python
edit
1
3
mit
5e7daffadbd523e1d2a457d10977b1c8a2880d9d
erynofwales/ubot2,aerickson/python-rtmbot,jammons/python-rtmbot,slackhq/python-rtmbot,ChihChengLiang/python-rtmbot,erynofwales/ubot2
docs/example-plugins/directAPIcall.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Defines the model 'layer' for PyTips.\"\"\"\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\nfrom __future__ import division\n\n\nfrom sq...
python
edit
1
2
isc
52c78b7498f52d26cd5dc2ea27c6c0f2dc6db117
gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips
pytips/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom go.vumitools.conversation.definition import (\n ConversationDefinitionBase, ConversationAction)\n\n\nclass ViewLogsAction(ConversationAction):\n action_name = 'view_logs'\n action_display_name = 'View Sandbox Logs'\n redire...
python
edit
1
1
bsd-3-clause
91c3eb57ea3b2cd12654cbd6925a681d3450e77e
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/apps/jsbox/definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Queue import Empty\n\nfrom redis import Redis\nfrom ghettoq.backends.base import BaseBackend\n\nDEFAULT_PORT = 6379\nDEFAULT_DB = 0\n\n\nclass RedisBackend(BaseBackend):\n\n def __init__(self, host=None, port=None, user=None, passwo...
python
edit
1
6
bsd-3-clause
17fd955a3b4abe5ca751ea05e0cdb30429a9ce04
ask/ghettoq
ghettoq/backends/pyredis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from urllib.request import urlopen\nexcept ImportError:\n from urllib import urlopen\nimport datetime\nimport multiprocessing\n\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\nfrom django.contri...
python
edit
4
5
mit
5eb1fe63bdbf0e6ce4832d70d9971e62c231c7b8
theju/urlscript
core/management/commands/run_urlscript.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2008 rPath, Inc.\n#\n# This program is distributed under the terms of the Common Public License,\n# version 1.0. A copy of this license should have been distributed with this\n# source file in a file called LICENSE. If it...
python
edit
1
2
apache-2.0
74e9c87f4a6ad9ad6458a1e297460220c587b197
fedora-conary/rbuild,sassoftware/rbuild,fedora-conary/rbuild,sassoftware/rbuild
rbuild/client.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 match_bid, offers, asks\n\nmessages = []\n\n\nclass ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):\n\n def handle(self):\n try...
python
edit
1
4
mit
63814839642e593e35f8afaf68fc6724b69075b5
Tribler/decentral-market
trade_server.py
rejected_duplicate
Near-duplicate of sample 12288
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom uuidfield import UUIDField\n\nfrom keybar.utils.crypto import encrypt, get_salt\n\n\nclass Entry(models.Model):\n id = UUIDField(auto=True, prima...
python
edit
1
2
bsd-3-clause
8b2cb51c8913737c524e1b922aeb02c07bfb2afc
keybar/keybar
src/keybar/models/entry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\ndef shift(string, key, decipher=False):\n return ''.join(\n chr((ord(c.upper())-65+key*(1-2*decipher)) % 26+65+32*c.islower())\n if c.isalpha() else c for c in string)\n\nif __name__ == '__main__':\n...
python
edit
1
2
mit
cfc95643733244275e605a8ff0c00d4861067a13
TotempaaltJ/tiniest-code,TotempaaltJ/tiniest-code
character_shift/character_shift.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django.conf.global_settings as DEFAULT_SETTINGS\n\n\nSECRET_KEY = 'highlightjsisawesome'\n\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n },\n}\n\nINSTALLED_APPS ...
python
edit
1
0
mit
4727991d29bc888611b6eaa403456524785b6338
MounirMesselmeni/django-highlightjs
highlightjs/testsettings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport abc\n\nfrom typing import Any\n\nfrom aiohttp import web\n\nfrom il2fb.ds.airbridge import json\n\n\nclass RESTResponse(web.Response, abc.ABC):\n detail = None\n\n @property\n @abc.abstractmethod\n def ...
python
edit
1
5
mit
87eac064f56c8a617c6aa2412345bb12352432ca
IL2HorusTeam/il2fb-ds-airbridge
il2fb/ds/airbridge/api/http/responses/rest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom spotpy import objectivefunctions as of\nimport numpy as np\n\n#https://docs.python.org/3/library/unittest.html\n\nclass TestObjectiveFunctions(unittest.TestCase):\n\n # How many digits to match in case of floating p...
python
edit
1
2
mit
97e3309a66c5d84489df4a384552e5b5d75643ea
bees4ever/spotpy,thouska/spotpy,thouska/spotpy,bees4ever/spotpy,thouska/spotpy,bees4ever/spotpy
spotpy/unittests/test_objectivefunctions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n#\n\n\"\"\"\nFile for running tests programmatically.\n\"\"\"\n\n# Third party imports\nimport pytest\n\n\ndef main():\n ...
python
edit
1
2
mit
91e80dbaba20a914737fa64b0b35cf315bc79f0a
spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom qtpy import QtPrintSupport\n\n\ndef test_qtprintsupport():\n \"\"\"Test the qtpy.QtPrintSupport namespace\"\"\"\n assert QtPrintSupport.QAbstractPrintDialog is not None\n assert QtPrintSupport.QPageSetupDialog i...
python
edit
1
1
mit
16dd533f32b3efdbbe9c2f7c6e5e3f42fe6c6b1d
spyder-ide/qtpy
qtpy/tests/test_qtprintsupport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# MIT License\n# Copyright (c) 2017 MassChallenge, Inc.\n\nfrom impact.v1.views.base_list_view import BaseListView\nfrom impact.v1.views.post_mixin import PostMixin\nfrom impact.v1.helpers import CriterionOptionSpecHelper\n\n\nclass Criteri...
python
edit
1
0
mit
8394011dc2cd0a6fe682c435b8e09f8accb1311f
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/v1/views/criterion_option_spec_list_view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport re\nfrom collections import defaultdict\n\nauthors_by_locale = defaultdict(set)\n\nfile_listing = subprocess.Popen('find ../wagtail -iname *.po', shell=True, stdout=subprocess.PIPE)\n\nfor file_listing_line in file...
python
edit
2
0
bsd-3-clause
3129d72151d81d8745a8e81ab4940dcd56a67b66
zerolab/wagtail,thenewguy/wagtail,timorieber/wagtail,kaedroho/wagtail,kurtrwall/wagtail,nilnvoid/wagtail,nutztherookie/wagtail,kurtw/wagtail,nimasmi/wagtail,torchbox/wagtail,zerolab/wagtail,timorieber/wagtail,FlipperPA/wagtail,rsalmaso/wagtail,zerolab/wagtail,kaedroho/wagtail,mixxorz/wagtail,mikedingjan/wagtail,rsalmas...
scripts/get-translator-credits.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pyaavso.formats.visual import VisualFormatReader\n\nfrom .models import Observatio...
python
edit
3
4
mit
1632b64372f2f38a6c43b000ace631d183278375
zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net
observations/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'admiral0'\n\nfrom . import *\nfrom .Exceptions import JsonNotValid\nimport argparse\nimport os.path as path\n\n\ndef is_mod_repo(x):\n if path.isdir(x):\n return x\n raise argparse.ArgumentTypeError(x + ' is not a...
python
edit
5
4
bsd-2-clause
a9cf757a0a8dc0bf558492676b1bfb5d630a78c1
admiral0/AntaniRepos
ModRepository/Util.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport blinkypattern\n\nclass Solid(blinkypattern.BlinkyPattern):\n def __init__(self, blinkytape, solid_color):\n super(Solid, self).__init__(blinkytape)\n self._pixels = [solid_color] * self._blinkytape.pixel_count\n\n ...
python
edit
1
1
mit
a92121cfdbb94d36d021fb8d1386031829ee86a2
jonspeicher/blinkyfun
patterns/solid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens...
python
edit
1
0
apache-2.0
c974f7ed5f63278c24165d626e9e5dd63f18f7ae
renyi533/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,aldian/tensorflow,jhseu/tensorflow,renyi533/tensorflow,sarvex/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,tensorflow/tensorflow,aldian/tensorflo...
tensorflow/python/debug/lib/op_callbacks_common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom ..dark_model import dark_temp_scale\n\ndef test_dark_temp_scale():\n scale = dark_temp_scale(-10., -14)\n assert np.allclose(scale, 0.70)\n\n scale = dark_temp_scale(-10., -14, scale_4c=2.0)\n assert sca...
python
edit
1
5
bsd-2-clause
c0ce65ccd7db7e7f34e9d6172f7179cf9ee16ef2
sot/chandra_aca,sot/chandra_aca
chandra_aca/tests/test_dark_scale.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socket\nimport sys\nimport time\n\nSERVER_HOST = 'localhost'\nSERVER_PORT = 40404\n\nsockets = []\nmsg = b'first message'\n\nfor i in range(20):\n sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n sock.connect((SERVER_...
python
edit
3
0
unlicense
7c847513155b1bdc29c04a10dbfd2efd669d1507
eliben/python3-samples
async/spam_echo_clients.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\n\ndef validate_options(options, attributes):\n fields = {}\n\n for name, option in options.items():\n field_type = option.get('type', '')\n\n if field_type == 'string':\n ...
python
edit
1
10
mit
296b343699a2a37c661937f60d854f6fd4e53e69
opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/common/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom onadata.apps.fsforms.models import FInstance\n\n\nclass Command(BaseCommand):\n help = 'Set version in FInstance for given user'\n \n def add_arguments(self, parser):\n ...
python
edit
1
9
bsd-2-clause
8ffc8cabd5a2ba20997337c101018f3c25faef4e
awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat
onadata/apps/fsforms/management/commands/save_version_in_finstance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test the utility function from spectral.\"\"\"\n\nimport numpy as np\nfrom numpy.testing import assert_equal\n\nfrom neurodsp.spectral.utils import *\n\n#################################################################################...
python
edit
5
1
apache-2.0
d369b2ba967643d16c58fbad0be5b3a24785f602
voytekresearch/neurodsp
neurodsp/tests/test_spectral_utils.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n# See LICENSE.txt for licensing terms\r\n#$HeadURL$\r\n#$LastChangedDate$\r\n#$LastChangedRevision$\r\n\r\nimport shlex\r\n\r\nfrom reportlab.platypus import Spacer\r\n\r\nfrom flowables import *\r\n\r\n\r\ndef pa...
python
edit
5
6
mit
fcd2328549dcec2986e3b972f1a8bcfb0cf2e21b
pombreda/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf
rst2pdf/utils.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom junit_xml import TestSuite, TestCase\n\n\nclass JunitFormatter(object):\n\n def __init__(self, project_cfg, project_result):\n \"\"\"Initialize the stuff\"\"\"\n self.testcases = {\n str(item[\"...
python
edit
4
4
mit
28d5e53da8a92985fa9b1b4a532467dd343cc4b5
apiwatcher/apilisk
apilisk/junit_formatter.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.test import TestCase\nimport factory\n\nfrom .models import Profile\n\n\nclass UserFactory(factory.Factory):\n FACTORY_FOR = User\n first_name = factory.Sequence(lambda n: 'Firs...
python
edit
1
2
bsd-2-clause
1fce663e37823d985d00d1700aba5e067157b789
incuna/django-extensible-profiles
profiles/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models import Case\nfrom django.db.models import IntegerField\nfrom django.db.models import Value\nfrom django.db.models import When\nfrom django.template import RequestContext\nfrom django.template.response import TemplateRe...
python
edit
3
1
mit
98f4ca1cdf5b5f68a3d8e785ec50756653444843
pyvec/cz.pycon.org-2016,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2017
pyconcz_2016/speakers/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef main():\n pass\n\nif __name__ == '__main__':\n main()\n\n\n```\n\nApply this change: Make it possible to load questions" }, { "role": "assistant", "content": "from __future__ import with_statement\nimport yaml\n\ndef l...
python
edit
1
1
mit
19ce6528a722deec9f0080c229c329e15b843614
bebraw/pyqa
src/pyqa.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom pyproj import Proj, transform\n\n# London bounding box\nN = 51.691874116909894\nE = 0.3340155643740321\nS = 51.28676016315085\nW = -0.5103750689005356\n\nosgb36 = Proj(init='epsg:27700')\nwgs84 = Proj(init='epsg:432...
python
edit
2
0
mit
697bf0c23786794e35b0b9f72c878bb762d296b9
urschrei/lonlat_bng,urschrei/rust_bng,urschrei/lonlat_bng,urschrei/rust_bng,urschrei/lonlat_bng
benches/cprofile_pyproj.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add templates\n\nRevision ID: 2b0edcfa57b4\nRevises: 24be36b8c67\nCreate Date: 2015-11-24 17:50:13.280722\n\n\"\"\"\n\nimport sqlalchemy as sa\nfrom alembic import op\n\n\n# revision identifiers, used by Alembic.\nrevision = '2b0edcfa...
python
edit
3
1
bsd-3-clause
9bd044297e1ef0f6383e39f376eec92885897406
Net-ng/kansha,bcroq/kansha,bcroq/kansha,Net-ng/kansha,Net-ng/kansha,bcroq/kansha,Net-ng/kansha,bcroq/kansha
kansha/alembic/versions/2b0edcfa57b4_add_templates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nLoad a neural network model from a data frame\n\"\"\"\n\nimport pickle\n\nimport numpy as np\nimport pandas as pd\nfrom lasagne import nonlinearities\nfrom lasagne.layers import DenseLayer\nfrom lasagne.laye...
python
edit
2
1
bsd-3-clause
5ac1dce80d0bfe4c52a2de5de4beefe235b8ad66
BeckResearchLab/USP-inhibition,pearlphilip/USP-inhibition
post_process.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport hashlib\nfrom getpass import getpass\nimport sys\nfrom Cryptodome.Cipher import AES\n\n_PY3 = sys.version_info[0] > 2\nif _PY3:\n raw_input = input\n\npassphrase = ...
python
edit
null
null
mit
e7724935ce4d07cd28a231c5e849be2a123a5502
cranklin/crankycoin
tools/encrypt.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Testing reading DICOM files\n\n\"\"\"\n\nimport numpy as np\n\nfrom .. import dicomreaders as didr\n\nfrom .test_dicomwrappers import (EXPECTED_AFFINE,\n DATA)\n\nfrom nose.tools import assert_true, as...
python
edit
5
1
bsd-3-clause
ead5a941efd8b8a41b81f679ad3e6c98e2248409
FrancoisRheaultUS/dipy,sinkpoint/dipy,StongeEtienne/dipy,samuelstjean/dipy,rfdougherty/dipy,demianw/dipy,samuelstjean/dipy,JohnGriffiths/dipy,mdesco/dipy,rfdougherty/dipy,maurozucchelli/dipy,demianw/dipy,jyeatman/dipy,oesteban/dipy,beni55/dipy,StongeEtienne/dipy,mdesco/dipy,matthieudumont/dipy,FrancoisRheaultUS/dipy,jy...
dipy/io/tests/test_dicomreaders.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, print_function\n\nimport datetime\n\nimport timeline\n\nfrom collections import *\n\ndef describe( data ):\n if len(data) == 0:\n print( \"Dataset empty.\" )\n return\n\n print( \"Entries...
python
edit
8
4
mit
5fc393a96cb580b7c4ec617cdc33f1e9ccbbb1c6
HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core
core/descriptives.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"FW records\n\n\"\"\"\n\nclass FWInfo(object):\n \"\"\"Object to hold device-reported SPI flash table\"\"\"\n\n def __str__(self):\n return \"%s | %s | %s | %s | %s\" % (self.slot, self.type, self.offset,\n ...
python
edit
1
6
bsd-3-clause
6e9e6c0fbba6b1f6e97c40181ec58c55e4980995
Cynerva/pyipmi,emaadmanzoor/pyipmi
pyipmi/fw.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\"\nCartoDB Spatial Analysis Python Library\nSee:\nhttps://github.com/CartoDB/crankshaft\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='crankshaft',\n\n version='0.0.0',\n\n description='CartoDB Spat...
python
edit
1
0
bsd-3-clause
c870f68c77652a11f8401bbbb981797694174288
CartoDB/crankshaft,CartoDB/crankshaft
src/py/crankshaft/setup.py
accepted
null
true