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 pork.data import Data\n\nfrom mock import Mock, patch, mock_open\nfrom StringIO import StringIO\n\npatch.TEST_PREFIX = 'it'\n\nclass TestData:\n def it_loads_json_data_from_file(self):\n with patch(\"__builtin__.open\", mock_...
python
edit
5
1
mit
5a2ff00b3574c8fb187fd87fcda3f79f7dd43b3c
jimmycuadra/pork,jimmycuadra/pork
tests/data_test.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\n\n# Check that we are in an activated virtual environment\ntry:\n import os\n virtual_env = os.environ['VIRTUAL_ENV']\nexcept KeyError:\n print(\"It doesn't look like you are in an activated v...
python
edit
1
0
mit
8c637c0f70908a00713014ef2d2ff72e3d5a81dc
mpirnat/django-tutorial-v2
prerequisites.py
rejected_duplicate
Near-duplicate of sample 1840
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version__ = '$Id$'\n\nfrom pywikibot import family\n\n# The wikidata family\n\nclass Family(family.WikimediaFamily):\n def __init__(self):\n super(Family, self).__init__()\n self.name = 'wikida...
python
edit
1
3
mit
12780b68aff0da1c123f3516fc6a020cfddb327d
legoktm/pywikipedia-rewrite
pywikibot/families/wikidata_family.py
rejected_duplicate
Near-duplicate of sample 13847
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom theora import Ogg\nfrom numpy import concatenate, zeros_like\nfrom scipy.misc import toimage\n\nf = open(\"video.ogv\")\no = Ogg(f)\nY, Cb, Cr = o.test()\nCb2 = zeros_like(Y)\nfor i in range(Cb2.shape[0]):\n ...
python
edit
3
0
bsd-3-clause
d53152aedff7777be771124a91ba325f75398739
certik/python-theora,certik/python-theora
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n # # #### ##### # # ##### # # # #\n # # # # # ## ## # # # ## # #\n ### #### #### # # # # # # # # #####\n # # # # # # # # ## # # #\n...
python
edit
3
1
bsd-2-clause
b09424edf37989c3868eb63badfc65897d41f410
glasnost/kremlin,glasnost/kremlin,glasnost/kremlin
kremlin/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport logging\nimport time\nimport unittest\n\nfrom telemetry import dec...
python
edit
1
2
bsd-3-clause
e8775f0f64bcae6b0789df6d4a2a5aca9f5cf4ac
catapult-project/catapult-csm,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/c...
telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor_unittest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport subprocess\nimport time\nimport glob\nimport unittest\n\nclass ZxSpecTestCase(unittest.TestCase):\n def setUp(self):\n clean()\n\n def tearDown(self):\n clean()\n\n def test_zx...
python
edit
1
3
mit
abce02dc1a30b869300eee36b29d5e61320d64c5
rhargreaves/zx-spec
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAbstract optimizer defining the API of optimizer implementations.\n\"\"\"\nfrom __future__ import division, print_function, with_statement\n\nfrom abc import abstractmethod, ABCMeta # Abstract Base Class\n\n\nclass BaseOptimizer(ob...
python
edit
1
1
bsd-3-clause
262cdf05ae4f53e1eab184e23791daa4d6422c51
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
orges/optimizer/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass RepeatTracker(object):\n def __init__(self):\n self.repeater_map = {}\n\n def __setitem__(self, key, value):\n try:\n self.repeater_map[key].index = value\n except KeyError, e:\n self.repeater_map[key] = Repeater(...
python
edit
3
2
bsd-3-clause
253ea73b37b9295ef0e31c2f1b1bdc7922cb6da5
nicksay/spitfire,spt/spitfire,spt/spitfire,spt/spitfire,nicksay/spitfire,nicksay/spitfire,youtube/spitfire,spt/spitfire,youtube/spitfire,youtube/spitfire,nicksay/spitfire,youtube/spitfire
spitfire/runtime/repeater.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nfrom spanky.cli import pass_context\n\n\n@click.command('users', short_help='creates users base on /etc/spanky/users')\n@pass_context\ndef cli(ctx):\n config = ctx.config.load('users.yml')\n\n```\n\nApply this change: Use t...
python
edit
1
1
bsd-3-clause
664c0924ca3a5ba58d0205c2fd733e6ad2e4f5dd
pglbutt/spanky,pglbutt/spanky,pglbutt/spanky
spanky/commands/cmd_users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .models import Contact\n\n\nclass ContactForm(forms.ModelForm):\n class Meta:\n exclude = (\"created_on\",)\n model = Contact\n\n\ncl...
python
edit
1
2
bsd-3-clause
982557f5ad850fb4126bea4adb65aef16291fbd6
PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari
core/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom panoptes_client.panoptes import PanoptesObject, LinkResolver\n\n\nclass User(PanoptesObject):\n _api_slug = 'users'\n _link_slug = 'users'\n _edit_attributes = ()\n\nLinkResolver.register(User)\nLinkResolver.register(User, 'ow...
python
edit
1
1
apache-2.0
7e98ecd888dba1f5e19b4e1a2f3f9aebd7756c5c
zooniverse/panoptes-python-client
panoptes_client/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2015 Hewlett-Packard Development Company, L.P.\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...
python
edit
1
0
apache-2.0
c244f074615765ba26874c2dba820a95984686bb
stackforge/cue,stackforge/cue,openstack/cue,stackforge/cue,openstack/cue,openstack/cue
os_tasklib/neutron/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom .pagarme import Pagarme\nfrom .exceptions import *\n\n```\n\nApply this change: Set global stats for pagarme-python" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n__version__ = '2.0.0...
python
edit
4
0
mit
192ba8b2bfa138662cd25f3502fd376187ca3e73
pbassut/pagarme-python,mbodock/pagarme-python,pagarme/pagarme-python,aroncds/pagarme-python,reginaldojunior/pagarme-python
pagarme/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport argparse\nimport struct\nimport sys\n\n###############\n### CLASSES ###\n###############\nclass MyParser(argparse.ArgumentParser):\n def error(self, message):\n sys.stderr.write('error: %s\\n' % message...
python
edit
5
2
apache-2.0
2abe71aaf9357bed719dc5e1118ee4fe49c4101e
justinccdev/jjvm
jjvm.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django import forms\n\nfrom .models import Post, Album, Link\n\nfrom opps.core.widgets import OppsEditor\n\n\nclass PostAdminForm(forms.ModelForm):\n class Meta:\n model = Post\...
python
edit
1
0
mit
a7e0d9633f23e25841298d8406dafdfdb664857a
YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps
opps/articles/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef detselect(detector_object, suffix=\"_stats_total1\"):\n \"\"\"Switch the active detector and set some internal state\"\"\"\n gs.DETS =[detector_object]\n gs.PLOT_Y = detector_object.name + suffix\n gs.TABLE_COLS = [gs.PLOT...
python
edit
25
4
bsd-2-clause
ec0bcd5981cb9349b3cdaa570f843f49650bedd1
NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd
profile_collection/startup/99-bluesky.py
rejected_lint
Too many lint violations: 25
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2020 Google LLC. 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
1
apache-2.0
4ec22f8a0fdd549967e3a30096867b87bc458dde
tensorflow/cloud,tensorflow/cloud
tensorflow_cloud/python/tests/integration/call_run_on_script_with_keras_ctl_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework import routers\nimport views\n\nrouter = routers.DefaultRouter()\nrouter.register(r'schedule', views.ScheduleViewSet)\nrouter.register(r'messageset', views.MessageSetViewSet)\nr...
python
edit
1
0
bsd-3-clause
16bf1a3b096159604928cdcc99cab671347bb244
praekelt/django-messaging-contentstore,praekelt/django-messaging-contentstore
contentstore/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\n\nfrom apscheduler.schedulers.blocking import BlockingScheduler\nfrom raven.base import Client as RavenClient\n\nimport warner\nimport archiver\nimport announcer\nimport flagger\n\n\nraven_client = RavenClient()\n...
python
edit
1
5
apache-2.0
b738e428838e038e88fe78db9680e37c72a88497
royrapoport/destalinator,randsleadershipslack/destalinator,randsleadershipslack/destalinator,TheConnMan/destalinator,royrapoport/destalinator,TheConnMan/destalinator
scheduler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis API can be used to send text messages to any Threema user, and to\nreceive incoming messages and delivery receipts.\n\nThere are two main modes of operation:\n\n* Basic mode (server-based encryption)\n - The server handles a...
python
edit
1
0
mit
c74fc42de3f052ac83342ed33afb2865080c8d67
threema-ch/threema-msgapi-sdk-python,lgrahl/threema-msgapi-sdk-python
threema/gateway/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n\nclass Graph(object):\n \"\"\"A class for a simple graph data structure.\"\"\"\n def __init__(self):\n self.nodes = {}\n\n def __repr__(self):\n pass\n\n def nodes(self):...
python
edit
1
3
mit
6b971de14fbd987286b02bf6e469a1fbb7ad8695
jay-tyler/data-structures,jonathanstallings/data-structures
graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nTests for the file state\n'''\n# Import python libs\nimport os\n#\n# Import salt libs\nfrom saltunittest import TestLoader, TextTestRunner\nimport integration\nfrom integration import TestDaemon\n\n\nclass CMDTest(integration.ModuleCas...
python
edit
1
1
apache-2.0
e767d25a5e6c088cac6465ce95706e77149f39ef
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/states/cmd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\npip.vendor is for vendoring dependencies of pip to prevent needing pip to\ndepend on something external.\n\nFiles inside of pip.vendor should be considered immutable and should only be\nupdated to versions from upstream.\n\"\"\"\nfr...
python
edit
1
0
mit
f350de4b748c8a6e8368a8d4500be92ad14b78c3
minrk/pip,harrisonfeng/pip,tdsmith/pip,xavfernandez/pip,caosmo/pip,zenlambda/pip,haridsv/pip,Carreau/pip,pjdelport/pip,habnabit/pip,alex/pip,davidovich/pip,luzfcb/pip,alex/pip,jamezpolley/pip,pradyunsg/pip,mujiansu/pip,natefoo/pip,sigmavirus24/pip,luzfcb/pip,patricklaw/pip,h4ck3rm1k3/pip,James-Firth/pip,ChristopherHoga...
pip/vendor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012-2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 18.7.0\n\n\nfrom . import AWSObject\...
python
edit
9
0
bsd-2-clause
397e185ae225613969ecff11e1cfed1e642daca0
cloudtools/troposphere,cloudtools/troposphere
troposphere/codeartifact.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport os\n\nfrom django.core import checks\nfrom django.conf import settings\n\nre_url = re.compile(r'\\shref=\"(?P<url>/[^\"]*)\"')\n\n@checks.register()\ndef hardcoded_urls(app_configs, **kwargs):\n for x in settings.TEMPLA...
python
edit
1
6
mit
a26a57e44bbca6bbb5c7078c724552aaf5a6dda4
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
takeyourmeds/utils/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport os\n\nfrom Scripts.common import get_ini_conf, write_ini_conf\n\nif __name__ == \"__main__\":\n\n # Python 2 compatibility\n if sys.version_info.major > 2:\n raw_input = input\n\n conf...
python
edit
3
0
mit
348cff3fef4c1bcbbb091ddae9ac407179e08011
tobspr/P3DModuleBuilder,tobspr/P3DModuleBuilder,tobspr/P3DModuleBuilder
build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport docutils\n\nclass SectNumFolder(docutils.nodes.SparseNodeVisitor):\n def __init__(self, document):\n docutils.nodes.SparseNodeVisitor.__init__(self, document)\n self.sectnums = {}\n\n def visit_generated(self, nod...
python
edit
1
2
mit
0ac9f362906e6d55d10d4c6ee1e0ce1f288821ee
rst2pdf/rst2pdf,rst2pdf/rst2pdf
rst2pdf/sectnumlinks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This file is free software under the GPLv3 license\"\"\"\nimport sys\nimport os\nimport shutil\n\nimport renpy\n\nfrom modloader.modinfo import get_mods\n\n\ndef remove_mod(mod_name):\n \"\"\"Remove a mod from the game and reload.\...
python
edit
2
2
mit
3365064f885230020fa7671af2d158d5d46e2e80
AWSW-Modding/AWSW-Modtools
modloader/modconfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom elasticsearch_dsl import Search, Index\nfrom elasticsearch_dsl.query import MultiMatch, Match, Q, MoreLikeThis\nfrom elasticsearch_dsl.connections import get_connection, connections\nfrom .documents import LetterDocument\n\n\ndef seria...
python
edit
8
1
mit
35d80ac6af0a546f138f6db31511e9dade7aae8e
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/es_search/queries.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom app import create_app\nfrom flask.ext.script import Manager\n\napplication = create_app(os.getenv('FLASH_CONFIG') or 'default')\nmanager = Manager(application)\n\nif __name__ == '__main__':\n mana...
python
edit
1
0
mit
20288a2e41c43cde37b14c63d4d0733bffe2dd69
mtekel/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace...
application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport unittest\n\nfrom asninja.parser import AtmelStudioProject\nfrom asninja.toolchains.atmel_studio import *\n\n\nclass TestAtmelStudioGccToolchain(unittest.TestCase):\n def test_constructor(self):\n tc = AtmelStudi...
python
edit
5
1
mit
4d1a50b1765cd5da46ac9633b3c91eb5e0a72f3d
alunegov/AtmelStudioToNinja
tests/toolchains/test_atmel_studio.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport requests\n\n\nclass HttpClient(object):\n \"\"\"A HTTP client using requests\"\"\"\n\n default_options = dict(verify=False, allow_redirects=False)\n\n def __init__(self, chunk_size=1024 * 24, session...
python
edit
1
6
mit
aa12f94327060fb0a34a050e0811a5adbd1c0b2a
gawel/WSGIProxy2
wsgiproxy/requests_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" This file provide some utility functions for Arch Linux specific rules.\"\"\"\nimport subprocess\nfrom .. import utils\n\n\n@utils.memoize\ndef get_pkgfile(command):\n \"\"\" Gets the packages that provide the given command using ...
python
edit
1
4
mit
5f6c55d8399c63893b8e5b4a432349e14cd5331d
nvbn/thefuck,mlk/thefuck,SimenB/thefuck,Clpsplug/thefuck,scorphus/thefuck,nvbn/thefuck,scorphus/thefuck,Clpsplug/thefuck,mlk/thefuck,SimenB/thefuck
thefuck/specific/archlinux.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Plot.py -- Plotting function for Ginga FITS viewer.\n#\n# Eric Jeschke (<EMAIL>)\n#\n# Copyright (c) Eric R. Jeschke. All rights reserved.\n# This is open-source software licensed under a BSD license.\n# Please see the file LICENSE.t...
python
edit
6
1
bsd-3-clause
b175b8a68cd98aa00326747aa66038f9692d8704
rupak0577/ginga,eteq/ginga,eteq/ginga,naojsoft/ginga,stscieisenhamer/ginga,eteq/ginga,Cadair/ginga,sosey/ginga,rajul/ginga,ejeschke/ginga,naojsoft/ginga,pllim/ginga,rajul/ginga,Cadair/ginga,rajul/ginga,Cadair/ginga,sosey/ginga,sosey/ginga,stscieisenhamer/ginga,pllim/ginga,rupak0577/ginga,pllim/ginga,rupak0577/ginga,eje...
ginga/qtw/Plot.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Bump version as instructed by bamboo." }, { "role": "assistant", "content": "#-*- coding: utf-8 -*-\n# version string following pep-0396 and pep-0386\n__version__ = '0.9pbs.24' # pragma: nocover\n" } ]
python
new_file
1
0
bsd-3-clause
b594c8fd213989e52b08f7bab7f4bf53b8772f3a
pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer
filer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom shutil import rmtree\n\nfrom .click import secho\nfrom pip.utils.appdirs import user_cache_dir\n\n# The user_cache_dir helper comes straight from pip itself\nCACHE_DIR = user_cache_dir('prequ')\n\n# NOTE\n# We used to store ...
python
edit
1
0
bsd-2-clause
79d78e477e8cf64e7d4cd86470df3c251f6d8376
suutari-ai/prequ,suutari/prequ,suutari/prequ
prequ/locations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom hodor import db\nfrom sqlalchemy import inspect\n\n\nclass Challenges(db.Model):\n __tablename__= 'challenges'\n\n #Data variables for each Challenges\n chalid=db.Column(db.String(32), primary_key=Tr...
python
edit
3
1
mit
71513ce192b62f36e1d19e8e90188b79153d5e7c
hodorsec/hodor-backend
hodor/models/challenges.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport flask\nimport sys\n\nclass Flask(flask.Flask):\n\n def __init__(self, *args, **kwargs):\n super(Flask, self).__init__(*args, **kwargs)\n # Set error handlers\n self.register_error_handler(500, self.internal_...
python
edit
2
2
apache-2.0
7dd683be3df9d8e6ad9c67baa19dbaf5663bdd64
Matir/pwnableweb,Matir/pwnableweb,Matir/pwnableweb,Matir/pwnableweb
pwnableapp/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport abc\n\nimport sqlite3\n\nimport Config\n\nclass Db(object):\n\n __metaclass__ = abc.ABCMeta\n\n def __init__(self):\n self._connection = self.connect()\n \n @abc.abstractmethod\n def connect(self, config_file = ...
python
edit
1
3
mit
e85e94d901560cd176883b3522cf0a961759732c
vjuranek/e-broker-client
db/Db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport copy\n\n\nclass SigOptException(Exception):\n pass\n\n\nclass ApiException(SigOptException):\n def __init__(self, body, status_code):\n self.message = body.get('message', None) if body is not None else None\n self._body = bod...
python
edit
1
3
mit
bf2c3e8553c0cbf0ab863efe1459a1da11b99355
sigopt/sigopt-python,sigopt/sigopt-python
sigopt/exception.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nimport sys \nimport numpy as np\nfrom random import randrange, choice\nimport matplotlib.pyplot as plt\nfrom matplotlib import patches, path\nimport scipy.stats\n''...
python
edit
2
3
mit
72115876305387bcbc79f5bd6dff69e7ad0cbf8e
nhhillis/SADModels
Models/LogNormal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport re\nfrom htmlentitydefs import name2codepoint\n\n# From http://wiki.python.org/moin/EscapingHtml\n\n_HTMLENT_CODEPOINT_RE = re.compile('&({0}|#\\d+);'.format(\n '|'.join(name2codepoint.keys())))\n\ndef recodeText(text):\n ...
python
edit
3
3
bsd-3-clause
47c0feaf96969d65e8f3e3652903cc20b353103d
olix0r/vtwt
vtwt/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['long']\n\n\nif hasattr(__builtins__, 'long'):\n long = long\nelse:\n class long(int):\n pass\n\n```\n\nApply this change: Fix bug encoding long type in python 2.x" }, { "role": "assistant", "content": "_...
python
edit
1
0
bsd-3-clause
40bb2b8aaff899f847211273f6631547b6bac978
cyrusmg/python-hessian,cyrusmg/python-hessian,cyrusmg/python-hessian
pyhessian/data_types.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plotly as py\nimport plotly.graph_objs as go\nfrom sys import argv\n\nimport names\nfrom csvparser import parse\n\ndata_file = argv[1]\nraw_data = parse(data_file)\n\nsleep_durations = []\nnap_durations = []\nfor date, rests in raw_d...
python
edit
1
0
mit
bbc0bd975b78d88b8a3a9372f08c343bb1dd5d21
f-jiang/sleep-pattern-grapher
hours_slept_time_series.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom docutils import nodes\n\n\n# Issue type list (keys) + color values\nISSUE_TYPES = {\n 'bug': 'A04040',\n 'feature': '40A056',\n 'support': '4070A0',\n}\n\n\nclass Issue(nodes.Element):\n @property\n def type(self):\n ...
python
edit
1
5
bsd-2-clause
b35b8935b8f7f429e93c2989add837cc3a1bf1ef
bitprophet/releases
releases/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os\nimport sqlite3\nimport sys\nimport time\n\ndb = sqlite3.connect('/var/lib/zon-api/data.db')\n\nif len(sys.argv) < 3:\n print('Usage: %s \"Firstname Lastname\" email@example.com' % sys.argv[0])\n print('...
python
edit
2
0
bsd-3-clause
2aa19e8b039b202ea3cf59e4ce95d8f16f4bc284
ZeitOnline/content-api,ZeitOnline/content-api
generate-key.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import partial\n\nfrom graphene.types.resolver import default_resolver\nfrom graphql import ResolveInfo\n\n\ndef should_trace(info: ResolveInfo) -> bool:\n if info.field_name not in info.parent_type.fields:\n return...
python
edit
1
5
bsd-3-clause
211091ed92e8bafcac1e9b1c523d392b609fca73
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/core/tracing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os\n\n\nvirtenv = os.path.join(os.environ.get('OPENSHIFT_PYTHON_DIR', '.'), 'virtenv')\nvirtualenv = os.path.join(virtenv, 'bin/activate_this.py')\ntry:\n exec_namespace = dict(__file__=virtualenv)\n with o...
python
edit
1
0
mit
657b9cd09b3d4c7c07f53bc8f2d995d3b08b63c5
avinassh/slackipy,avinassh/slackipy,avinassh/slackipy
wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom zeit.solr import query\nimport zeit.content.article.article\nimport zeit.content.infobox.infobox\nimport zeit.cms.admin.browser.admin\n\n\nclass VolumeAdminForm(zeit.cms.admin.browser.admin.EditFormCI):\n\n ...
python
edit
3
1
bsd-3-clause
0e26572466bbee071adb62cdb716e5d377774166
ZeitOnline/zeit.content.volume,ZeitOnline/zeit.content.volume
src/zeit/content/volume/browser/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\n\nfrom rwt import deps\n\n\ndef test_entry_points():\n\t\"\"\"\n\tEnsure entry points are visible after making packages visible\n\t\"\"\"\n\twith deps.on_sys_path('jaraco.mongodb'):\n\t\teps = pkg_resources.iter_entry_...
python
edit
1
1
mit
62a20e28a5f0bc9b6a9eab67891c875562337c94
jaraco/rwt
rwt/tests/test_deps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Country(models.Model):\n name = models.TextField()\n iso_code = models.CharField(max_length=2, unique=True)\n\n def __unicode__(self):\n return self.name\n\nclass Artist(models.Model):\n...
python
edit
1
1
mit
b172c997ef6b295b0367afb381ab818a254ce59b
6/GeoDJ,6/GeoDJ
geodj/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\n# Import python libs\nfrom StringIO import StringIO\n\n# Import salt libs\nfrom salt.exceptions import SaltRenderError\nimport salt.utils.templates\n\n\ndef render(template_file, env='', sls='', arg...
python
edit
5
4
apache-2.0
f1afc32efaf0df2a2f8a0b474dc367c1eba8681d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/renderers/jinja.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom typing import Optional, List\n\nfrom jobs.base.job import Job\n\n# If on a K8s cluster then use the K8s-based sessions\n# otherwise use the subsprocess-based session\nif \"KUBERNETES_SERVICE_HOST\" in os.environ:\n from ....
python
edit
1
0
apache-2.0
3706700e4725d23752269c2e833adfa736d0ce96
stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub
worker/jobs/session/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . file_transfer import * # NOQA\n#from . node import * # NOQA\nfrom . message import * # NOQA\nfrom . file_handshake import * # NOQA\nfrom . queued_file_transfer import * # NOQA\nfrom . process_transfers import * # NOQA\nfrom . b...
python
edit
2
0
mit
316a17402aca8ca99a90f151de7535a1033b3e24
Storj/storjnode
tests/network/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n__about__ = {}\n\nwith open(\"warehouse/__about__.py\") as fp:\n exec(fp, None, __about__)\n\nsetup(\n name=__about__[\"__title__\"],\n version=__about__[\"__ver...
python
edit
1
0
bsd-2-clause
2acca2ea2ae2dc86d4b09ce21c88d578bbea6ea3
davidfischer/warehouse
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nUsed to manage the outputter system. This package is the modular system used\nfor managing outputters.\n'''\n\nimport salt.loader\n\ndef display_output(data, out, opts=None):\n '''\n Print the passed data using the desired output...
python
edit
1
3
apache-2.0
d27b2d71a0e5f834d4758c67fa6e8ed342001a88
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/output/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['AddressBook']\n\n\nclass AddressBook(object):\n pass\n```\n\nApply this change: Add persons storage and `add_person` method to `AddressBook` class" }, { "role": "assistant", "content": "__all__ = ['AddressBook']\n...
python
edit
1
1
mit
83c0e33db27bc2b9aa7e06e125230e6c159439bb
dizpers/python-address-book-assignment
address_book/address_book.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport versioneer\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='domain-event-broker',\n version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(),\n description='Send and receive domain events via...
python
edit
1
0
mit
e0883db2bfe5b32bdd73f44a9288fa8483bca08c
AbletonAG/domain-events
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSouth-specific signals\n\"\"\"\n\nfrom django.dispatch import Signal\nfrom django.conf import settings\n\n# Sent at the start of the migration of an app\npre_migrate = Signal(providing_args=[\"app\"])\n\n# Sent after each successful...
python
edit
3
0
apache-2.0
ff36ab7972220940a8e4d5396b591cd02c045380
RaD/django-south,philipn/django-south,philipn/django-south,RaD/django-south,nimnull/django-south,RaD/django-south,nimnull/django-south
south/signals.py
rejected_duplicate
Near-duplicate of sample 9923
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pywurfl.algorithms import DeviceNotFound\n\nfrom django.http import Http404\n\nfrom molly.utils.views import BaseView\nfrom molly.utils.breadcrumbs import NullBreadcrumb\n\nfrom molly.wurfl.vsm import vsa\nfrom molly.wurfl import devic...
python
edit
1
8
apache-2.0
c39faa36f2f81198ed9aaaf7e43096a454feaa0e
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
molly/molly/wurfl/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\n\nfrom flask import request, redirect, abort\nfrom flask.ext.security import current_user\n\nclass RBACMixin(object):\n \"\"\" Role-based access control for views. \"\"\"\n\n # if False, we don't require authentication ...
python
edit
1
6
apache-2.0
57eaefa2f85522b7b9e596779df3d5dc2763e295
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
backend/rbac.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef compare_vectors(x, y):\n for x_i, y_i in zip(x, y):\n comparison = _compare(x_i, y_i)\n if comparison == 0:\n continue\n else:\n return comparison\n return 0\n\n\ndef _compare(x, y):\n ...
python
edit
1
7
bsd-3-clause
c677df5f5f39afbf3aef3ceb1e83f3a97fb53f6b
markovianhq/bonspy
bonspy/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom enigma import Enigma, Umkehrwalze, Walzen\n\n\nclass EnigmaTestCase(unittest.TestCase):\n def setUp(self):\n # Rotors go from right to left, so I reverse the tuple to make Rotor\n # I be the leftmost...
python
edit
1
1
mit
8b399d6ede630b785b51fb9e32fda811328e163e
ranisalt/enigma
test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [ISSUES] Add basic issue view, list, create." }, { "role": "assistant", "content": "# Python Imports\nimport datetime\nimport md5\nimport os\n\n# Django Imports\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom dj...
python
new_file
20
3
bsd-3-clause
fafedf1cfdcd6c6b06dd4093a44db7429bd553eb
clsdaniel/iridium
issues/views.py
rejected_lint
Too many lint violations: 20
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom expects import *\n\nfrom pygametemplate import Game\n\nimport datetime\n\n\nclass TestGame(Game):\n \"\"\"An altered Game class for testing purposes.\"\"\"\n def __init__(self, resolution):\n super(TestGame, self).__init__...
python
edit
4
1
mit
e1a54c7d08f33601e48aec485ac72d9d81730186
AndyDeany/pygame-template
spec/helper.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scipy.linalg as la\nimport numpy as np\n\n\nfrom py_bh_tsne import _TSNE as TSNE\n\n\ndef fast_tsne(data, pca_d=50, d=2, perplexity=30., theta=0.5):\n \"\"\"\n Run Barnes-Hut T-SNE on _data_.\n\n @param data The data...
python
edit
1
2
bsd-3-clause
6dd04ed490c49c85bf91db2cb0bf2bed82b5967b
pryvkin10x/tsne,douglasbagnall/py_bh_tsne,douglasbagnall/py_bh_tsne,pryvkin10x/tsne,pryvkin10x/tsne
fasttsne/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n__author__ = 'mjwtom'\n\nimport os\n\nos.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9')\nos.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs ki...
python
edit
1
0
apache-2.0
28baf3a2568f8e1b67a19740ecd7ccfc90d36514
mjwtom/swift,mjwtom/swift
swift/dedupe/killall.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nModule to allow quick configuration.\n\"\"\"\nfrom six.moves import configparser\nfrom six import StringIO\nimport pkg_resources\n\nimport logging.config\n\ndef configure(mode, disable_existing_loggers=False...
python
edit
1
3
mit
9cca5d4ce1c5097e48e55ad3a48b09a01cc0aa6b
alexrudy/lumberjack
lumberjack/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hashlib import sha1\nfrom tempfile import TemporaryFile\nfrom contextlib import contextmanager\n\nfrom penchy.compat import unittest, nested, update_hasher\n\n\nclass NestedTest(unittest.TestCase):\n def test_reraising_exception(sel...
python
edit
1
1
mit
fb41f01360423d176864a4846d0e769d4df03978
fhirschmann/penchy,fhirschmann/penchy
penchy/tests/test_compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# :WORKAROUND: http://bugs.python.org/issue15881#msg170215\nimport multiprocessing\nfrom setuptools import setup\n\nsetup(\n name='mangopi',\n author='Jiawei Li',\n version='0.1.0',\n description='A manga ...
python
edit
3
0
mit
ad2b8e6978d5bb2acdb72fdb60c31ecbcb84351f
jiaweihli/mangopi
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport zipfile\nimport cPickle\nimport numpy as np\n\n\"\"\"\n track_obj: {\n frames: 1 by n numpy array,\n anchors: 1 by n numpy array,\n features: m by n numpy array,\n scores: c by ...
python
edit
4
5
mit
36d8243712b5be7f7f7449abcd9640024cee0f19
myfavouritekk/TPN
src/tpn/data_io.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.utils.html import format_html\nfrom django.utils.translation import ugettext_lazy as _\nfrom . models import Meal\nimport os\n\nclass MealAdmin(admin.ModelAdmin):\n def file(self):\n c...
python
edit
1
1
mit
a1fda2708065890b5596e19c3fe628cb9800f5f9
ntrrgc/lasana,ntrrgc/lasana,ntrrgc/lasana
admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nfrom . import commands\n\nVALID_ARGS = ('init', 'compile', 'serve')\n\ndef create_options():\n \"Add options to tornado\"\n \n parser = argparse.ArgumentParser(\n 'Staitrator - Static multilingual site a...
python
edit
4
1
mit
0c6825ce8b5d1e3b15505c5bcac847c6a57a782e
MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator
statirator/main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='cstypo',\n version='0.1.1',\n author='Juda Kaleta',\n author_email='<EMAIL>',\n packages=['cstypo', 'cstypo.templatetags', 'cstypo.tests'],\n scripts=['bin/cstypo'],\n ...
python
edit
1
0
mit
e192a0d29c0b082458bf0a6f37df86978bfa0032
yetty/cstypo
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#from distribute_setup import use_setuptools\n#use_setuptools()\n\nfrom setuptools import setup, find_packages\nfrom os.path import dirname, join\n\nhere = dirname(__file__)\nsetup(\n name='btchip-python',\n version='0.1.28',\n aut...
python
edit
1
0
apache-2.0
a5a81a3fd3c4a6df1c77ec5380b7f04d854ff529
LedgerHQ/btchip-python,LedgerHQ/btchip-python,LedgerHQ/btchip-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: iso-8859-1 -*-\n\nfrom setuptools import setup\n\nsetup(\n name = 'TracMasterTickets',\n version = '2.1.1',\n packages = ['mastertickets'],\n package_data = { 'mastertickets': ['templates/*.h...
python
edit
1
0
bsd-3-clause
b1fc016fa56ffc801659f6ba2d807694529cfa57
SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin
setup.py
rejected_duplicate
Near-duplicate of sample 14178
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport re\nfrom setuptools import setup, find_packages\nimport sys\nimport warnings\n\ndynamic_requires = []\n\nversion = 0.9\n\nsetup(\n name='anthemav',\n version=0.9,\n author='David McNett',\n author...
python
edit
5
0
mit
d71f9a1696da6f7aad54cbc7710101e4159a82c9
nugget/python-anthemav
setup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='restea',\n packages=['restea', 'restea.adapters'],\n version='0.3.2',\n description='Simple RESTful server toolkit',\n author='Walery Jadlowski',\n author_email='<EMAIL>',\n...
python
edit
1
0
mit
4d19a3236aa450733e4355ec8fb08a4eb8bffb75
kkszysiu/restea,bodbdigr/restea
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCopyright 2020 Ronald J. Nowling\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apach...
python
edit
1
0
apache-2.0
d851a16318aa8d8055c7bd9643af6401b11b5fed
rnowling/aranyani,rnowling/asaph,rnowling/asaph
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom sky_area import __version__ as version\n\nsetup(\n name='skyarea',\n packages=['sky_area'],\n scripts=['bin/run_sky_area'],\n version=version,\n description='Compute credible regions on the ...
python
edit
1
0
mit
8b718b63ef2978554a6f663488d5d6eaa6b2e917
lpsinger/skyarea,farr/skyarea
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='Fulfil-Shop',\n version='0.1dev',\n packages=['shop'],\n license='BSD',\n include_package_data=True,\n zip_safe=False,\n long_description=open('README.rst').read(),\n in...
python
edit
1
0
bsd-3-clause
5b18412ffd0d1521f9817d422bc337afa9b03d6c
joeirimpan/shop,joeirimpan/shop,joeirimpan/shop
setup.py
rejected_duplicate
Near-duplicate of sample 1267
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# (C) Copyright Digital Catapult Limited 2016\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nVERSION = \"0.0.1\"\n\nsetup(name=\"file_translate\",\n ve...
python
edit
1
0
mit
321c61e7ed57ef8058a68ef12770e139db839fe2
catapultbamboo/file_translate
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name=\"sbd\",\n version=\"0.1\",\n description=\"Iridium Short Burst Data DirectIP handling\",\n author=\"Pete Gadomski\",\n author_email=\"<EMAIL>\",\n ...
python
edit
1
0
mit
d0163cb608b299733ad47111f0ef6b982d1a9a1c
gadomski/sbd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='django-mptt',\n description='''Utilities for implementing Modified Preorder Tree Traversal\n with your Django Models and working with tree...
python
edit
1
0
mit
2fac8c3e64406cc955ef0a8c39b2070d4517e374
matthiask/django-mptt,emilhdiaz/django-mptt,emilhdiaz/django-mptt,emilhdiaz/django-mptt,matthiask/django-mptt,matthiask/django-mptt,matthiask/django-mptt,emilhdiaz/django-mptt
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\n# very convoluted way of reading version from the module without importing it\nversion = (\n [l for l in open('flask_injector.py') if ...
python
edit
1
0
bsd-3-clause
45e7718d5992218ef09b993fc70ede11103d3bb8
alecthomas/flask_injector
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.1'\n\nsetup(name='cc.license',\n version=version,\n description=\"License selection based on ccREL-based metadata.\",\n classifiers=[],\n keywor...
python
edit
4
0
mit
f47888830b7fcc4afb77361c45d2253c2bb03876
creativecommons/cc.license,creativecommons/cc.license
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(\n\tname='nipype-pbs-workflows',\n version='1.0',\n author='https://www.ctsi.ufl.edu/research/study-development/informatics-consulting/',\n author_email='<EMAIL>',\n description='Neuroimag...
python
edit
1
0
bsd-3-clause
a5f9abc3f2de2bca89a5c3e5c35a8d7e223be4dd
ctsit/nipype-pbs-workflows
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport re\nfrom invoke import task\n\n\ndef get_version():\n return re.search(r\"\"\"__version__\\s+=\\s+(?P<quote>['\"])(?P<version>.+?)(?P=quote)\"\"\", open('aiodns/__init__.py').read()).group('version')\n\n\n@task\ndef release(c):\...
python
edit
1
1
mit
b668e1ab2c2fbd973f3bf8865db79f0a7b37141f
saghul/aiodns
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nlong_description = (\n open('README.rst').read()\n + '\\n' +\n open('CHANGES.txt').read())\n\nsetup(\n name='more.forwarded',\n version='0.3.dev0',\n description=\"Forwarded h...
python
edit
1
0
bsd-3-clause
7d62e82bae98c4e7469b27cb4dfdc0c5bd96c819
morepath/more.forwarded
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom django.template.defaultfilters import slugify\nfrom factory import DjangoModelFactory, lazy_attribute\nfrom random import randint\nfrom .models import Author\nfrom .models import Book\n\n\nclass UserFactory(DjangoModel...
python
edit
1
1
apache-2.0
4291d80377e970e02fb95afa6f9f85246cb9c498
kitconcept/robotframework-djangolibrary
DjangoLibrary/tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nfrom mopidy import ext, config\nfrom mopidy.exceptions import ExtensionError\n\n\n__version__ = '1.0.18'\n__url__ = 'https://github.com/mopidy/mopidy-soundcloud'\n\n\nclass SoundCloudE...
python
edit
1
3
mit
32ddc769bffed640e83e99e2657f20bbb3ef5e38
mopidy/mopidy-soundcloud,yakumaa/mopidy-soundcloud
mopidy_soundcloud/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom llvm import *\nfrom llvm.core import *\nfrom llvm.ee import *\n\nimport logging\n\ntp_int = Type.int(64)\ntp_float = Type.float()\ndef py_type_to_llvm(tp):\n if tp == int:\n return tp_int\n elif tp == float:\n retur...
python
edit
10
3
apache-2.0
a75e2b6c42ded44202e1fef53047c325566466f0
squisher/stella,squisher/stella,squisher/stella,squisher/stella
stella/llvm.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport selenium.webdriver as webdriver\nimport bs4 as bs\nimport pyisbn\nimport re\n\ndef paytm(isbn):\n\tif len(isbn) == 10:\n\t\tp_link = 'https://paytm.com/shop/search/?q='+pyisbn.Isbn10(isbn).convert(code='978')+'&sort_price=1'\n\telse:...
python
edit
3
5
mit
be6143f06df194150683eceafa63bb2ea5f33d05
GingerNinja23/bookbargain
paytm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\nimport logging\n\nfrom bitshares.aio.amount import Amount\n\nlog = logging.getLogger(\"grapheneapi\")\nlog.setLevel(logging.DEBUG)\n\n\n@pytest.mark.asyncio\nasync def test_aio_amount(bitshares):\n ...
python
edit
1
1
mit
dcbac0f33df07a61dbe4586f116a6f986a2211c6
xeroc/python-bitshares
tests/testnet/aio/test_amount.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim:fileencoding=utf-8 ai ts=4 sts=4 et sw=4\n\"\"\"Tests for wafer.user.models\"\"\"\n\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\n\nimport sys\nPY2 = sys.version_info[0] ==...
python
edit
3
1
isc
4f5fe3002f3244f5ce6b90303def86c1763c8afb
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/users/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\nfrom contextlib import redirect_stderr, redirect_stdout\nfrom io import StringIO\nfrom os.path import devnull\nfrom subprocess import check_call\nfrom sys import version\n\nfrom pytest import fixture, raises\n\nfro...
python
edit
1
2
mit
ed2dc3478691592cb38a1f1923a39bed4bcf423c
yanqd0/csft
tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport notify2\nimport Rates\n\n\ndef notify():\n\n icon_path = \"/home/dushyant/Desktop/Github/Crypto-Notifier/logo.jpg\"\n\n cryptocurrencies = [\"bitcoin\",\n \"ethereum\",\n \"litecoin...
python
edit
2
2
mit
6e48c8e6d85d196a90c56ebb7b73b3d61f2fef55
dushyantRathore/Crypto-Notifier
cryptonotifier/Main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n@pytest.mark.parametrize(\"name, linked_to\", [\n (\"/home/wicksy/vagrant/Vagrantfile\", \"/git/wicksy/configfiles/vagrant/Vagrantfile\"),\n (\"/home/wicksy/.vimrc\", \"/git/wicksy/configfiles/dotfiles/.vimrc\"),\n (\"/h...
python
edit
1
1
mit
6f80a7e5f8dea031db1c7cc676f8c96faf5fc458
wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build
test/test_links.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .tabulate import _text_type\n\ndef pad(field, total, char=u\" \"):\n return field + (char * (total - len(field)))\n\ndef expanded_table(rows, headers):\n header_len = max([len(x) for x in headers])\n max_row_len = 0\n resul...
python
edit
1
8
bsd-3-clause
8b7fa42c7cd080f7faebbfaf782fa639104cb96a
dbcli/pgcli,w4ngyi/pgcli,darikg/pgcli,koljonen/pgcli,d33tah/pgcli,koljonen/pgcli,d33tah/pgcli,w4ngyi/pgcli,darikg/pgcli,dbcli/pgcli
pgcli/packages/expanded.py
accepted
null
true