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\n# csv2map.py -- Convert .csv into a .map format\n# Description of MAP format: http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#map\n#\n# <EMAIL>\n\nimport sys\nimport argparse\n\ndef main():\n parser = argparse.ArgumentParser(desc...
python
edit
3
2
mit
a28f6a45f37d906a9f9901d46d683c3ca5406da4
chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan
code/csv2map.py
rejected_duplicate
Near-duplicate of sample 5086
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\nimport logging\nimport logging.config\n\n\ndef setup_logging(log_path, settings_path=\"logging.json\", default_level=logging.INFO):\n \"\"\"Setup logging configuration\"\"\"\n path = settings_path\n if os.pa...
python
edit
1
2
mit
1c0d42889b721cf68deb199711d8ae7700c40b66
soccermetrics/marcotti-mls
marcottimls/tools/logsetup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport smtplib\n\n\ndef send_email(msg):\n # Send the message via our own SMTP server.\n with smtplib.SMTP_SSL('smtp.gmail.com', 465) as s:\n # s.starttls()\n s.set_debuglevel(2)\n s.send_message(msg)\n\n```\n\nAp...
python
edit
1
1
mit
863b12e503559b24de29407cd674d432bdcbbfc0
StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit
cs251tk/referee/send_email.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django_fsm\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('iaas', '0008_add_instance_restart...
python
edit
3
0
mit
75225c176135b6d17c8f10ea67dabb4b0fc02505
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/iaas/migrations/0009_add_min_ram_and_disk_to_image.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom been.core import DirectorySource, source_registry\n\nclass Markdown(DirectorySource):\n kind = 'markdown'\n def process_event(self, event):\n lines = event['content'].splitlines()\n event['title'] = lines[0]\n ...
python
edit
1
1
bsd-3-clause
44ed4ceffcbf95ed42e4bdebcc87a7137a97de50
chromakode/been
been/source/markdown.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Build system doesn't approve of empty files\n\n\ngit-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6616 e27351fd-9f3e-4f54-a53b-843176b1656c" }, { "role": "assistant", "content": "##\n# Copyright (c) 2005-2007 Apple Inc. All r...
python
new_file
1
0
apache-2.0
b1f06fc602f2d787b9d564a99d8c92f731ab104c
trevor/calendarserver,trevor/calendarserver,trevor/calendarserver
twext/internet/test/__init__.py
rejected_duplicate
Near-duplicate of sample 3094
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cherrypy\nfrom mako.lookup import TemplateLookup\n\n\nclass Tool(cherrypy.Tool):\n _lookups = {}\n\n def __init__(self):\n cherrypy.Tool.__init__(self, 'before_handler',\n self.callable,\n ...
python
edit
1
4
mit
a91a81c16a27d72cdc41de322130e97889657561
marbaloo/marbaloo_mako
marbaloo_mako/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function, division\n\n\ndef command_btc(bot, user, channel, args):\n \"\"\"Display BTC exchange rates\"\"\"\n\n r = bot.get_url(\"http://bitcoincharts.com/t/wei...
python
edit
1
1
bsd-3-clause
0223b6fc332bdbc8a641832ebd06b79969b65853
rnyberg/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,huqa/pyfibot,aapa/pyfibot,huqa/pyfibot,rnyberg/pyfibot,EArmour/pyfibot,lepinkainen/pyfibot,aapa/pyfibot
pyfibot/modules/module_btc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom .mws import MWS, MWSError\nfrom .apis import Feeds, Finances, InboundShipments, Inventory, MerchantFulfillment,\\\n OffAmazonPayments, Orders, Outbound...
python
edit
1
0
unlicense
0868bbd0e445cb39217351cd13d2c3f7a173416c
GriceTurrble/python-amazon-mws,Bobspadger/python-amazon-mws
mws/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\n\n\ndef json_api_exception_handler(exc, context):\n \"\"\" Custom exception handler that returns errors object as an array \"\"\"\n\n # Import in...
python
edit
1
9
apache-2.0
496fc83101155bd0cd2fb4256e2878007aec8eaa
asanfilippo7/osf.io,emetsger/osf.io,rdhyee/osf.io,cosenal/osf.io,haoyuchen1992/osf.io,haoyuchen1992/osf.io,DanielSBrown/osf.io,doublebits/osf.io,mluke93/osf.io,amyshi188/osf.io,monikagrabowska/osf.io,doublebits/osf.io,icereval/osf.io,sloria/osf.io,pattisdr/osf.io,ZobairAlijan/osf.io,adlius/osf.io,hmoco/osf.io,Johnetord...
api/base/exceptions.py
rejected_duplicate
Near-duplicate of sample 1714
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport logging\nfrom optparse import OptionParser\nfrom coverage import coverage\n\nfrom tests.config import configure\n\nlogging.disable(logging.CRITICAL)\n\n\ndef run_tests(options, *test_args):\n fro...
python
edit
1
3
bsd-3-clause
f1fcce8f0c2022948fb310268a7769d9c9ef04ad
michaelkuty/django-oscar,WillisXChen/django-oscar,lijoantony/django-oscar,Bogh/django-oscar,sasha0/django-oscar,okfish/django-oscar,nickpack/django-oscar,rocopartners/django-oscar,django-oscar/django-oscar,WillisXChen/django-oscar,makielab/django-oscar,jinnykoo/wuyisj.com,WillisXChen/django-oscar,jinnykoo/wuyisj.com,nf...
runtests.py
rejected_duplicate
Near-duplicate of sample 5854
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2017 Stanford University\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
1
apache-2.0
90a94b1d511aa17f167d783992fe0f874ad529c1
StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion
examples/python_interop/python_interop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis is the only interface that you should ever need to get a **user** logged in, get\n**his/her** info and credentials, deserialize the credentials\nand access **his/her protected resources**.\n\n.. autosum...
python
edit
12
0
mit
07135d2e24eab7855c55c9213b0653dec23ccbcf
liorshahverdi/authomatic,authomatic/authomatic,kshitizanand/authomatic,artitj/authomatic,farcaz/authomatic,liorshahverdi/authomatic,scorphus/authomatic,leadbrick/authomatic,erasanimoulika/authomatic,c24b/authomatic,authomatic/authomatic,erasanimoulika/authomatic,dougchestnut/authomatic,scorphus/authomatic,vivek8943/aut...
authomatic/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nfrom mopidy import config, ext\n\n\n__version__ = '0.2.2'\n\n\nclass GMusicExtension(ext.Extension):\n\n dist_name = 'Mopidy-GMusic'\n ext_name = 'gmusic'\n version = __versio...
python
edit
1
1
apache-2.0
d873380a3ad382ac359ebf41f3f775f585b674f8
Tilley/mopidy-gmusic,jodal/mopidy-gmusic,mopidy/mopidy-gmusic,jaibot/mopidy-gmusic,hechtus/mopidy-gmusic,elrosti/mopidy-gmusic,jaapz/mopidy-gmusic
mopidy_gmusic/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom os.path import dirname, abspath\nimport sys\n\nfrom django.conf import settings\n\nif not settings.configured:\n from django import VERSION\n settings_dict = dict(\n INSTALLED_APPS=(\n '...
python
edit
1
3
mit
3c833053f6da71d1eed6d1a0720a1a8cb1997de7
extertioner/django-localeurl,gonnado/django-localeurl,carljm/django-localeurl
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scipy.ndimage as ndim\nfrom skimage.filters import gaussian\n\n\ndef patch_up_roi(roi, sigma=0.5):\n \"\"\"\n After being non-linearly transformed, ROIs tend to have holes in them.\n We perform a couple of computational geom...
python
edit
1
1
bsd-2-clause
0676485054c01abb41b95901c1af0af63fdcb650
yeatmanlab/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ,arokem/pyAFQ
AFQ/utils/volume.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random, os\n\nglobal adjectives, animals, rares\n\nwith open(os.path.join(os.path.dirname(__file__), 'adjectives.txt')) as f:\n adjectives = f.readlines()\n\nwith open(os.path.join(os.path.dirname(__file__), 'animals.txt')) as f:\...
python
edit
1
7
unlicense
a24fe6cb58439d295455116574463ebdaf621f2c
rotated8/mgsv_names
mgsv_names.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nolang.error import AppError\nfrom nolang.objects.root import W_Root\n\n\nclass W_ListObject(W_Root):\n def __init__(self, w_items):\n self._w_items = w_items\n\n def str(self, space):\n return '[' + ', '.join([spac...
python
edit
1
5
mit
04640beab352f8797d68c33f940e920d2ed9ca6b
fijal/quill
nolang/objects/list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nprint \"Let's practice everything.\"\nprint 'You\\'d need to know \\'bout escapes with \\\\ that do \\n newlines and \\t tabs.\"\n\npoem = \"\"\"\n\\t the lovely world\nwtih logic so firmly planted\ncannot discern \\n the needs of love\nnor...
python
edit
11
1
mit
11528044c054ac8f1d65c1b64c2e76fbe22dad20
jaredmanning/learning,jaredmanning/learning
lpthw/ex24.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport requests\nimport six\n\n\nclass SlackRequest(object):\n\n @staticmethod\n def do(token, request=\"?\", post_data=None, domain=\"slack.com\"):\n post_data = post_data or {}\n\n for k, v in six.iterit...
python
edit
1
5
mit
13f4373fc415faba717033f0e8b87a7c5cd83033
slackapi/python-slackclient,slackhq/python-slackclient,slackapi/python-slackclient,slackapi/python-slackclient
slackclient/_slackrequest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\ndef _is_serializable(value):\n try:\n json.dumps(value)\n return True\n except TypeError:\n return False\n\n\n_IGNORED_CUSTOM_PROPS = [\n '_RNA_UI',\n 'cycles',\n 'cycles_visibility',\n]\...
python
edit
1
6
apache-2.0
33903a72a48a6d36792cec0f1fb3a6999c04b486
Kupoman/blendergltf
blendergltf/exporters/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright © 2013 Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see LICENSE.txt for details)\n\n__version__ = '0.2.1.dev0'\n\n# ==================================================...
python
edit
1
0
mit
bfd1ef748e9d29cf4abccac03098d1d369e6be12
spyder-ide/spyder.memory_profiler
spyder_memory_profiler/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom unittest2 import TestCase\n\nfrom chef.api import ChefAPI\n\nTEST_ROOT = os.path.dirname(os.path.abspath(__file__))\n\ndef test_chef_api():\n return ChefAPI('https://api.opscode.com/organizations/pycheftest', os.path.jo...
python
edit
2
2
apache-2.0
9ca46da9d0cf8b5f4b4a6e9234d7089665df5e8b
jarosser06/pychef,dipakvwarade/pychef,coderanger/pychef,jarosser06/pychef,Scalr/pychef,dipakvwarade/pychef,cread/pychef,Scalr/pychef,coderanger/pychef,cread/pychef
chef/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import db\nfrom app.mod_auth.model import User\n\nclass Category(db.Document):\n # The name of the category.\n name = db.StringField(required = True)\n\nclass Entry(db.Document):\n # The amount of the entry.\n amount = ...
python
edit
1
0
mit
fc97832d0d96017ac71da125c3a7f29caceface6
Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault
app/mod_budget/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os, sys\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib'))\n\nimport glob, json\nimport numpy as np\n\nimport task_usage\n\ndef main(data_path, index_path):\n count = 0\n index = []...
python
edit
3
4
mit
094cb428316ac0fceb0178d5a507e746550f4509
learning-on-chip/google-cluster-prediction
bin/task_usage_index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .docker_compose import DockerBaseSettings\n\n\nclass CeleryDevSettings(DockerBaseSettings):\n pass\n\nCeleryDevSettings.load_settings(__name__)\n\n```\n\nApply this change: Use proper domain for AZURE_MEDIA_STORAGE_HOSTNAME\n\nWe ca...
python
edit
1
0
mit
86a992dc15482087773f1591752a667a6014ba5d
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
docker/settings/celery.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openprocurement.tender.core.adapters import TenderConfigurator\nfrom openprocurement.tender.openeu.models import Tender\nfrom openprocurement.tender.openua.constants import (\n TENDERING_EXTRA_PERIOD\n)\nfro...
python
edit
1
0
apache-2.0
ac14efc0a8facbfe2fe7288734c86b27eb9b2770
openprocurement/openprocurement.tender.openeu
openprocurement/tender/openeu/adapters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport sys, os\nimport nltk\n\nif len(sys.argv) < 2:\n print(\"Please supply a filename.\")\n sys.exit(1)\n\nfilename = sys.argv[1]\n\nwith open(filename, 'r') as f:\n data = f.read()\n\n# Break the input down...
python
edit
3
0
mit
81b5c5c29747d7f8622828c0036504a4a5023794
alexander-bauer/syllabus-summary
parse-demo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals, print_function\n\nimport json\nimport urllib2\n\n\nclass Box(object):\n \"\"\"Downloads and parses metainformation about a Vagrant box\"\"\"\n def __init__(self, publisher, name):\n \"\"...
python
edit
1
4
mit
b5e7cb7946d87fa39c2a006808a0c07975f9c4d4
lpancescu/atlas-lint
endymion/box.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom couchexport.export import export_raw\nfrom custom.fri.models import FRIMessageBankMessage, FRIRandomizedMessage, FRIExtraMessage\nfrom django.core.managem...
python
edit
1
4
bsd-3-clause
019bca440c46039954a6228bbd22f79a5449aecd
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/fri/management/commands/dump_fri_message_bank.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 django.apps import apps\nfrom rest_framework import viewsets\nfrom rest_framework import permissions\nfrom rest_framework_tracking.mixins import LoggingMixin\n\nfrom impact.mod...
python
edit
1
2
mit
be82f1beac54f46fe9458c3ca26b8e3b786bc9f5
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/views/general_view_set.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCortical networks correlation matrix\n====================================\n\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set(context=\"paper\", font=\"monospace\")\n\ndf = sns.load_dataset(\"brain_networks\"...
python
edit
1
0
bsd-3-clause
9a0f7e8b9da174008b33dd1d757b2e186b70e9f4
lukauskas/seaborn,mwaskom/seaborn,phobson/seaborn,parantapa/seaborn,drewokane/seaborn,cwu2011/seaborn,aashish24/seaborn,arokem/seaborn,bsipocz/seaborn,gef756/seaborn,mia1rab/seaborn,dimarkov/seaborn,muku42/seaborn,ebothmann/seaborn,petebachant/seaborn,anntzer/seaborn,lukauskas/seaborn,JWarmenhoven/seaborn,phobson/seabo...
examples/network_correlations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Console script for nyucal.\n\nSee click documentation at http://click.pocoo.org/\n\"\"\"\n\nimport io\n\nimport click\n\nfrom nyucal import nyucal\nimport requests\n\n\n@click.group()\ndef main(args=None):\n...
python
edit
4
2
mit
ac5ceee751b0c374ffcf1bd0e52ce085e8d7295c
nyumathclinic/nyucal,nyumathclinic/nyucal
nyucal/cli.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uuid import uuid4\n\n\n# The state key for saving the session id in the state\nLOGGER_STATE_KEY = \"SESSION_ID\"\nLOG_FMT = \"[{id}] {message}\"\n\n\ndef get_session_id(state):\n session_id = (\n \"UNKNOWN\"\n if state...
python
edit
1
2
apache-2.0
4979be89083fcdee5a9d4328ce6c9ac64d853b0b
SUNET/SATOSA,SUNET/SATOSA,its-dirg/SATOSA
src/satosa/logging_util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models, migrations\nfrom django.core.management import call_command\n\napp_name = 'api'\nfixture = model_name = 'PartOfSpeech'\n\n\ndef load_fixture(apps, schema_editor):\n call_command('loa...
python
edit
3
1
mit
82c86350f62aefa3b732d5273216b0cb937758db
LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search
site/api/migrations/0009_load_pos_fixture_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy as np\nimport scipy\nimport control\nfrom dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices\n\n\ndef compute_whipple_lqr_gain(velocity):\n _, A, B = benchma...
python
edit
3
2
bsd-2-clause
393a2f5f0ccfedc1c5ebd7de987c870419ca2d89
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
scripts/calculate_lqr_gain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hc2002.plugin as plugin\nimport hc2002.config as config\n\nplugin.register_for_resource(__name__, 'hc2002.resource.instance')\n\n_prefixes = ('availability-zone:', 'image:', 'kernel:', 'key:',\n 'load-balancers:', 'ramdisk:', ...
python
edit
3
7
apache-2.0
734891812ded9339180dc59f0d6e500b3d415512
biochimia/hc2000
hc2002/plugin/symbolic_values.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\nsetup(\n name='{{ cookiecutter.repo_name }}',\n version=\"0.0.0\",\n url='https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name',\n autho...
python
edit
1
0
bsd-3-clause
2518dbc9dde39b58bf2a6d33975960059f39e3b0
elbaschid/cc-django-app,elbaschid/cc-django-app
{{cookiecutter.repo_name}}/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\n\nfrom django.core.cache import cache\nfrom django.db import connection\n\n\ndef check_database():\n \"\"\"Check if the application can perform a dummy sql query\"\"\"\n cursor = connection.cursor()\n cursor.execute('S...
python
edit
1
1
mit
f2506c07caf66b3ad42f6f1c09325097edd2e169
mvantellingen/django-healthchecks
src/django_healthchecks/contrib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\nfrom rest_framework import test\n\n\nclass MockedSession(mock.MagicMock):\n auth_ref = 'AUTH_REF'\n\n\nclass BaseBackendTestCase(test.APITransactionTestCase):\n def setUp(self):\n self.session_patcher = mock.patch(...
python
edit
1
1
mit
bba433a582a96f5acd59eedb3286e284d81f431d
opennode/nodeconductor-openstack
src/nodeconductor_openstack/tests/test_backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n Generates a CSV containing approved hackers' resumes\n\"\"\"\n\nfrom hackfsu_com.views.generic import StreamedCsvView\nfrom hackfsu_com.util import acl, files\nfrom django.conf import settings\nfrom api.models import Hackathon, ...
python
edit
1
3
apache-2.0
fad97c21e2643e5df9759ebf260881b26e918d7c
andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com
api/api/views/hacker/get/csv/resume_links.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ndef add(new, previous=None):\n if previous is None:\n return new\n return previous + new\n\n\ndef collect(new, previous=None):\n if previous is None:\n return [new]\n return previous + [n...
python
edit
1
2
bsd-3-clause
1947acc37d4f45a6b1969edfe3f7f10065e647b2
hakkeroid/lcconcept
src/layeredconfig/strategy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom vendcrawler.scripts.vendpageparser import VendPageParser\n\nclass TestVendPageParserMethods(unittest.TestCase):\n\n def test_feed(self):\n with open('test_vendcrawler.html', 'r') as f:\n data = f...
python
edit
1
1
mit
219afd2350d2b3aecd6362a1bd7a68291d3021e1
josetaas/vendcrawler,josetaas/vendcrawler,josetaas/vendcrawler
tests/test_vendpageparser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uuid import UUID\nfrom scanner import Symbol\n\ndef tostr(value):\n if isinstance(value, Symbol):\n return str(value)\n elif isinstance(value, str):\n return '\"%s\"' % value\n elif isinstance(value, UUID):\n ...
python
edit
1
8
bsd-3-clause
efbab142afc824f9b2ba4968ffe102c20e0ad7c3
Perlence/rpp
rpp/encoder.py
rejected_duplicate
Near-duplicate of sample 1787
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Import json parsing library\nimport json\n\n# Import the necessary methods from \"twitter\" library\nfrom twitter import Twitter, OAuth, TwitterHTTPError, TwitterStream\n\n# Import \"ConfigParser\" library to load settings (\"configparser...
python
edit
4
0
mit
3b21631f8c0d3820359c1163e7e5340f153c3938
benhoyle/social-media-bot
twitter_bot.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport json\nimport sure # noqa\n\nimport moto.server as server\nfrom moto import mock_redshift\n\n'''\nTest the different server responses\n'''\n\n\n@mock_redshift\ndef test_describe_clusters():\...
python
edit
3
1
apache-2.0
6666351757c2c2083a88158a132f446112109b9d
heddle317/moto,kefo/moto,botify-labs/moto,kefo/moto,Affirm/moto,ZuluPro/moto,Affirm/moto,Brett55/moto,2rs2ts/moto,dbfr3qs/moto,dbfr3qs/moto,okomestudio/moto,heddle317/moto,heddle317/moto,ZuluPro/moto,okomestudio/moto,botify-labs/moto,whummer/moto,william-richard/moto,gjtempleton/moto,dbfr3qs/moto,heddle317/moto,rocky45...
tests/test_redshift/test_server.py
accepted
null
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 wagtail.wagtailadmin.edit_handlers import FieldPanel\nfrom wagtail.wagtailcore.models import Page\nfrom wagtail.wagtailimages.edit_handlers import I...
python
edit
1
1
mit
d63302f10bf9972680c189a25f995b713e72562f
pgovers/oscar-wagtail-demo,pgovers/oscar-wagtail-demo
demo/apps/catalogue/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set sample code to discord.py basic example" }, { "role": "assistant", "content": "import discord\nimport asyncio\n\nclient = discord.Client()\n\n@client.event\nasync def on_ready():\n print('Logged in as')\n print(client.u...
python
new_file
1
5
mit
c23553f48652ed3ed65e473c79732dddc6c5341b
TheTrain2000/async2rewrite
sample_code.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport flask_ssl_skeleton\n\n\nclass SkeletonTestCase(unittest.TestCase):\n\n def setUp(self):\n self.app = flask_ssl_skeleton.app\n self.app.secret_key = \"Unit secret\"\n self.client = self.app.tes...
python
edit
1
1
apache-2.0
6f1ece1571c0dafd386b27d8692433bf8b2180e7
krujos/flask_ssl_skeleton
test/flask_ssl_skeleton_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unicodedata \n\nfrom html.parser import HTMLParser\n\nclass HTMLStripper(HTMLParser):\n def __init__(self):\n super(HTMLStripper, self).__init__()\n self.reset()\n self.fed ...
python
edit
1
2
mit
393f65b78e5808c9d71b38a108cb85f6d31886c1
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
helpers/text.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom ConfigParser import SafeConfigParser\nfrom twython import Twython\n\n#These values are all pulled from a file called 'config.ini'\n#You can call yours myawesomebotconfig.ini or whatever else!\n#Just remember to...
python
edit
1
1
mit
f7059eb02ee93bdd0f998acde385a04ac91c63df
fmcorey/sparrow,fmcorey/sparrow
sparrow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\n\nfrom components.social.youtube.factories import ChannelFactory\nfrom components.social.youtube.models import Video\nfrom components.social.youtube.tasks import (fetch_all_videos,\n fetch_latest_v...
python
edit
1
2
apache-2.0
50b6778ae43b8945b2073630e351ab759b007a3e
hello-base/web,hello-base/web,hello-base/web,hello-base/web
tests/social/youtube/test_tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom flask import url_for\nfrom pytest_flask import fixtures\n\nfrom mdt_app.models import *\n\n@pytest.mark.usefixtures('client_class')\nclass TestIndex:\n\n def test_page_load(self):\n assert self.client.get(url...
python
edit
11
1
mit
4387a8a38664abe86f0ff9d531ab3ba937f9adf7
stefpiatek/mdt-flask-app,stefpiatek/mdt-flask-app
tests/unit/test_main_views.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import partial\n\nfrom .data import ActionResult\n\nclass BotAI(object):\n def _prepare_start(self, client, game_info, game_data):\n self._client = client\n self._game_info = game_info\n self._game_dat...
python
edit
1
1
mit
e50a3078c4feb8222e0f3b35ad19e9e9585d7ebd
Dentosal/python-sc2
sc2/bot_ai.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, boto, os\nfrom bucketeer import commit\n\nclass BuckeeterTest(unittest.TestCase):\n\n # Constants - TODO move to config file\n global existing_bucket, test_dir, test_file\n existing_bucket = 'bucket.exists'\n test_dir =...
python
edit
3
2
mit
c7f0534554236b7336cfb79b2ec2badb6780706e
mgarbacz/bucketeer
bucketeer/test/test_commit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Runs the PyExtTest project against all installed python instances.\"\"\"\nimport sys, subprocess, python_installations\n\nif __name__ == '__main__':\n num_failed_tests = 0\n for installation in python_installations.get_python_in...
python
edit
1
0
mit
209a0c8ab878d9f455d117314b8945cfdd367857
SeanCline/PyExt,SeanCline/PyExt,SeanCline/PyExt
test/scripts/run_all_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this fi...
python
edit
1
0
apache-2.0
aaafd23df800d41e4b16fd399015991b2e426dc5
gf53520/kafka,MyPureCloud/kafka,geeag/kafka,lindong28/kafka,geeag/kafka,Ishiihara/kafka,Ishiihara/kafka,lindong28/kafka,rhauch/kafka,geeag/kafka,noslowerdna/kafka,rhauch/kafka,MyPureCloud/kafka,mihbor/kafka,airbnb/kafka,eribeiro/kafka,eribeiro/kafka,mihbor/kafka,Esquive/kafka,airbnb/kafka,guozhangwang/kafka,apache/kafk...
tests/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request\nfrom werkzeug import secure_filename\nimport os\napp = Flask(__name__)\nUPLOAD_FOLDER = 'uploads/'\n\n@app.route(\"/\")\ndef hello():\n return \"Hello World!\"\n\n@app.route(\"/upload\", methods=['POST']...
python
edit
1
3
mit
fa936770448e896211b592b742eee350633804e7
spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api
server/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom yapsy import IPlugin\nfrom postprocessing import PostProcessedDataItem\n\n__author__ = '<EMAIL>'\n\n\nclass ValidatedDataItem(PostProcessedDataItem):\n \"\"\"\n Overrides the PostProcessedDataItem class to provide an indication t...
python
edit
1
1
mit
c3958b4aa7aca75f00f4de20e612f918a176ec96
slventures/jormungand
extraction/api/validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2\n\"\"\"Generate Ukulele song sheets with chords.\n\nInput files are in ChordPro-ish format, output files in PDF format.\n\"\"\"\n\nimport argparse\nimport sys\n\nfrom reportlab.lib import pagesizes\n\nimport chordpro\nimp...
python
edit
1
2
apache-2.0
93550cafa9ea38b663166cd5b1ae1fcf0e42f1d0
gnoack/ukechord,gnoack/ukechord
ukechord.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import static\nfrom django.contrib import admin\nfrom django.urls import path\n\nadmin.autodiscover()\n\nurlpatterns = [\n path('admin/', admin.site.urls),\n]\nurlpatterns += static...
python
edit
1
0
bsd-3-clause
bf82a1437d89f82d417b72cca6274dc35ac7d147
jonasundderwolf/django-localizedfields,jonasundderwolf/django-localizedfields
example/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.paginator import Paginator, EmptyPage, InvalidPage\nfrom django.contrib.syndication.views import add_domain\nfrom django.contrib.sites.models import get_current_site\n\n\ndef get_site_url(request, path):\n\n current_site...
python
edit
1
3
bsd-3-clause
a7a1d513003a65c5c9772ba75631247decff444d
uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam
utils/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nusage: %prog score_file out_file\n\"\"\"\n\nfrom __future__ import division\n\nimport sys\nimport psyco_full\nimport bx.wiggle\nfrom bx.binned_array import BinnedArray\nfrom fpconst import isNaN\nimport cook...
python
edit
2
6
mit
6d635a94121a9038c7c5b80b9851a086e69728b6
uhjish/bx-python,uhjish/bx-python,uhjish/bx-python
scripts/wiggle_to_binned_array.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom strip_comments import strip_comments\nimport re\n\n__all__ = [\"split_coq_file_contents\"]\n\ndef split_coq_file_contents(contents):\n \"\"\"Splits the contents of a coq file into multiple statements.\n\n This is done by finding ...
python
edit
1
5
mit
16c1352ecf8583615e482c431ec5183fdb718f67
JasonGross/coq-tools,JasonGross/coq-tools
split_file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\n\n\nclass EmailAddressManager(models.Manager):\n\n def add_email(self, user, email, **kwargs):\n confirm = kwargs.pop(\"confirm\", False)\n email_addr...
python
edit
1
3
mit
dc981dbd1b29d9586453f325f99b1c413c494800
gem/geonode-user-accounts,gem/geonode-user-accounts,gem/geonode-user-accounts
account/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFallback to callee definition when definition not found.\n- https://github.com/davidhalter/jedi/issues/131\n- https://github.com/davidhalter/jedi/pull/149\n\"\"\"\n\n#? isinstance\nisinstance(\n)\n\n#? isinstance\nisinstance(None,\n...
python
edit
1
0
mit
5f49fb8c7c0f9e7a05d4f9b730d7f3e872229d60
flurischt/jedi,WoLpH/jedi,mfussenegger/jedi,dwillmer/jedi,tjwei/jedi,jonashaag/jedi,jonashaag/jedi,tjwei/jedi,flurischt/jedi,dwillmer/jedi,mfussenegger/jedi,WoLpH/jedi
test/completion/definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport os\nimport subprocess\nimport sys\n\ntry:\n import classad\n import htcondor\nexcept ImportError:\n sys.exit(\"ERROR: Could not load HTCondor Python bindings. \"\n \"Ensure the 'htcondor' an...
python
edit
1
0
apache-2.0
e0de6546fb58af113d18cf7e836407e3f8a1a985
brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce
contrib/bosco/bosco-cluster-remote-hosts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n\"\"\"\nCreate a network where different switches are connected to\ndifferent controllers, by creating a custom Switch() subclass.\n\"\"\"\n\nfrom mininet.net import Mininet\nfrom mininet.node import OVSSwitch, Controll...
python
edit
1
1
bsd-3-clause
db134f36ae54ef135037d0c912068fc678df54cf
mininet/mininet,mininet/mininet,mininet/mininet
examples/controllers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"`appengine_config` gets loaded when starting a new application instance.\"\"\"\nimport vendor\n# insert `lib` as a site directory so our `main` module can load\n# third-party libraries, and override built-ins with newer\n# versions.\n...
python
edit
1
2
apache-2.0
a2b4b732c15c3cfefb345354bca8fc6de47d4820
dbs/schemaorg,vholland/schemaorg,schemaorg/schemaorg,vholland/schemaorg,tfrancart/schemaorg,schemaorg/schemaorg,unor/schemaorg,schemaorg/schemaorg,dbs/schemaorg,vholland/schemaorg,dbs/schemaorg,tfrancart/schemaorg,tfrancart/schemaorg,vholland/schemaorg,schemaorg/schemaorg,dbs/schemaorg,tfrancart/schemaorg,unor/schemaor...
appengine_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom django import forms\n\nfrom parler.forms import TranslatableModelForm\n\nfrom sortedm2m.forms import SortedMultipleChoiceField\n\nfrom .models import Category, Quest...
python
edit
1
1
bsd-3-clause
ded6f27721e54f2c7dab3016209927678d85b90d
czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq
aldryn_faq/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version_info__ = (0, 2, 3)\n__version__ = '%d.%d.%d' % __version_info__[:3]\n\n```\n\nApply this change: Switch to PEP 440 compliant version string and update to 0.3.dev0.\n\nUpdate to 0.3.dev0 since this is the...
python
edit
1
0
mit
80df385acb9f39d0a5f01dc41954b7035ecafb2d
coherence-project/UPnP-Inspector
upnp_inspector/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests for the application infrastructure\n\"\"\"\nfrom flask import json\nfrom nose.tools import assert_equal\n\nfrom .helpers import BaseApplicationTest\n\n\nclass TestApplication(BaseApplicationTest):\n def test_index(self):\n ...
python
edit
1
1
mit
9dab9c08c57ab0548beaa32765a2f064d2ec6544
alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api
tests/app/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\n\n\nfrom members import views\nadmin.autodiscover()\n\n\nurlpatt...
python
edit
1
0
mit
d9db4735a1c879e967af5fff30c8322ea3f5121a
Hackfmi/Diaphanum,Hackfmi/Diaphanum
hackfmi/urls.py
rejected_duplicate
Near-duplicate of sample 3683
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 DeepMind Technologies Limited\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
2
0
apache-2.0
ed6146566d57105af88855c6b8668b4f76e98dbf
deepmind/xmanager,deepmind/xmanager
xmanager/xm_local/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom feincms.module.page.models import Page\n\n\ndef add_page_if_missing(request):\n \"\"\"\n If this attribute exists, then a page object has been registered already\n by some other part of the code. We let it decide which page ob...
python
edit
1
3
bsd-3-clause
55bc355fc97eb5e034e86e7c55919d8cca0edb2b
matthiask/feincms2-content,mjl/feincms,feincms/feincms,joshuajonah/feincms,matthiask/feincms2-content,matthiask/feincms2-content,joshuajonah/feincms,matthiask/django-content-editor,michaelkuty/feincms,pjdelport/feincms,nickburlett/feincms,michaelkuty/feincms,michaelkuty/feincms,feincms/feincms,feincms/feincms,matthiask...
feincms/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sgfs import SGFS\n\nfrom sgactions.utils import notify\n\n\ndef run_create(**kwargs):\n _run(False, **kwargs)\n\ndef run_preview(**kwargs):\n _run(True, **kwargs)\n\ndef _run(dry_run, entity_type, selected_ids, **kwargs):\n \n...
python
edit
1
4
bsd-3-clause
52fddb061bf5f282da75df4462dd735d9fdc041a
westernx/sgfs,westernx/sgfs
sgfs/actions/create_structure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Standard packages\nimport sys\nimport argparse\n\n# Third-party packages\nfrom toil.job import Job\n\n# Package methods\nfrom ddb import configuration\nfrom ddb_ngsflow import pipeline\nfrom ddb_ngsflow.rna import...
python
edit
1
0
mit
e96c1e6fc5cc64ccc9e8ba8c91285ce4feb90a7c
dgaston/ddb-ngsflow-scripts,GastonLab/ddb-scripts,dgaston/ddb-scripts
workflow-RNA-Seq_Salmon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import assert_equals\nfrom openpassword.config import Config\n\nclass ConfigSpec:\n\n def it_sets_the_path_to_the_keychain(self):\n cfg = Config()\n cfg.set_path(\"path/to/keychain\")\n assert_equals(...
python
edit
3
1
mit
3b15911c669d072bee1a171696636162d23bd07e
openpassword/blimey,openpassword/blimey
spec/openpassword/config_spec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom framework import StoredObject, fields\n\n\nclass Guid(StoredObject):\n\n _id = fields.StringField()\n referent = fields.AbstractForeignField(backref='guid')\n\n _meta = {\n 'optimistic': True\n }\n\n\nclass GuidStore...
python
edit
1
3
apache-2.0
2a68505e36358900e045f74a8b2885486f6a302e
arpitar/osf.io,rdhyee/osf.io,lyndsysimon/osf.io,ZobairAlijan/osf.io,caseyrygt/osf.io,abought/osf.io,CenterForOpenScience/osf.io,asanfilippo7/osf.io,emetsger/osf.io,kwierman/osf.io,barbour-em/osf.io,icereval/osf.io,Johnetordoff/osf.io,jolene-esposito/osf.io,RomanZWang/osf.io,haoyuchen1992/osf.io,barbour-em/osf.io,binocu...
framework/guid/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ipaddr import IPNetwork\n\nfrom twisted.internet.protocol import Protocol\nfrom twisted.internet.address import IPv4Address\nfrom twisted.trial import unittest\n\nfrom ...test.support import DummyEvent\n\nfrom ..whitelist import Whitel...
python
edit
3
1
bsd-2-clause
21b022362a09c4e408b9375a38505975e8c7f965
jdswinbank/Comet,jdswinbank/Comet
comet/utility/test/test_whitelist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Makes a standard set of plots from Dakota output.\n# Mark Piper (<EMAIL>)\n\n# Note that these imports are from the installed version of dakota_utils.\nfrom dakota_utils.read import read_tabular\nfrom dakota_utils.p...
python
edit
1
0
mit
4921d58775faa65423fac321ef68f065b2499813
mcflugen/dakota-experiments,mdpiper/dakota-experiments,mdpiper/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments
experiments/hydrotrend-uq-1/plot_results.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=22\nbranch=\"master\"\ntimestamp=1376526477.22\n```\n\nApply this change: Tag commit for v0.0.23-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=23\nbranc...
python
edit
1
0
mit
766735563fe327363e87a103fd70f88a896bf9a8
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom webtest import TestApp\nimport dropshot\n\n\ndef test_create_player():\n app = TestApp(dropshot.app)\n\n params = {'username': 'chapmang',\n 'password': 'deadparrot',\n 'email': '<EMAIL>'}\n\n expecte...
python
edit
1
1
mit
40616138673205b3b4f3150a659ab02830b2bbc0
dropshot/dropshot-server
tests/test_player_creation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.core.urlresolvers import reverse\nfrom django.test import TestCase\nfrom django.test.client import Client\n\nfrom huxley.utils.test import TestCommittees\n\n\nclass CommitteeDetailGetTestCase(TestCase):\n def s...
python
edit
1
1
bsd-3-clause
c073131ac4b951affdac454824bb3eed913cd931
bmun/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,bmun/huxley,bmun/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,bmun/huxley,nathanielparke/huxley,nathanielparke/huxley,ctmunwebmaster/huxley
huxley/api/tests/committee.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n\"\"\"Setup information of demandlib.\n\"\"\"\n\nfrom setuptools import setup, find_packages\nimport os\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name=...
python
edit
1
1
mit
0e4b717389f032bef856d646afe0912a76519738
oemof/demandlib
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport os\n\nfrom sqlalchemy import create_engine, MetaData\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker, scoped_session\n\nclass SQLAlchemy(objec...
python
edit
4
2
mit
a263926614a2f9c0c5c41d19282db79ac5e79e7e
eXcomm/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,bountysource/www.gittip.com,MikeFair/www.gittip.com,eXcomm/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,bountysource/www.gittip.com,...
gittip/orm/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'katharine'\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nrequirements_path = os.path.join(os.path.dirname(__file__), 'requirements.txt')\n\nwith open(requirements_path) as requirements_file:\n requi...
python
edit
3
0
mit
9181085fb10b3c2281fbfbb69c9bb2b89a7990dd
pebble/pypkjs
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\\\nGrip\n----\n\nRender local readme files before sending off to Github.\n\n\nGrip is easy to set up\n``````````````````````\n\n::\n\n $ pip install grip\n $ cd myproject\n $ grip\n * Running on http://localhost:5000/\n\...
python
edit
1
1
mit
584e78390e61833cede3865ad205a51b561818e2
jbarreras/grip,joeyespo/grip,ssundarraj/grip,joeyespo/grip,mgoddard-pivotal/grip,ssundarraj/grip,mgoddard-pivotal/grip,jbarreras/grip
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(name='libmfrc522',\n description='A library for communicating with the MFRC522 RFID module',\n version='1.0',\n url='https://github.com/fmfi-svt-ga...
python
edit
1
0
mit
b78a5649104380499eba6f13d8da4c04ef50a66d
fmfi-svt-deadlock/libmfrc522.py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import find_packages, setup\nimport sys\n\n\nPY2 = sys.version_info[0] == 2\n\n# Get version\nwith open(os.path.join('tilezilla', 'version.py')) as f:\n for line in f:\n if line.find('__version__') >= 0:...
python
edit
1
0
bsd-3-clause
fc48e79059fd1ad667aa30690cb136c027fd9314
ceholden/landsat_tile,ceholden/landsat_tiles,ceholden/landsat_tile,ceholden/tilezilla,ceholden/landsat_tiles
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport os\nfrom setuptools import setup\n\nversion_txt = os.path.join(os.path.dirname(__file__), 'aghasher', 'version.txt')\nwith open(version_txt, 'r') as f:\n version = f.read().strip()\n\nsetup(\n author='Daniel Steinber...
python
edit
1
0
mit
aadd0dbfcd271120ddc02354d51ba111653d87f0
dstein64/PyAnchorGraphHasher
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'openarticlegauge',\n version = '0.0.1',\n packages = find_packages(),\n install_requires = [\n \"Flask==0.9\",\n \"Jinja2==2.6\",\n \"Werkzeug=...
python
edit
1
0
bsd-3-clause
158dc9e77a2f8ca6bd0a124b80f2dd10b5858731
CottageLabs/OpenArticleGauge,CottageLabs/OpenArticleGauge,CottageLabs/OpenArticleGauge
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.4'\n\nsetup(name='pam',\n version=version,\n description=\"PAM interface using ctypes\",\n long_description=\"\"\"\\\nAn interface to the Pluggable...
python
edit
5
0
mit
9e27d60ecd18a1b7bda8867cc1e064b5deec0370
rgbkrk/pamela
setup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFlask-Mustache\n--------------\n\nFlask mustache integration.\n\nLinks\n`````\n\n* `development version\n <http://github.com/ahri/flask-mustache>`_\n\n\"\"\"\nfrom setuptools import setup\n\nsetup(\n name='Flask-Mustache',\n ...
python
edit
1
0
mit
d420f45071ab7ad049c412b456fe890d94cd47bd
ahri/flask-mustache
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile:\n content = infile.read()\n return content\n\n\ns...
python
edit
1
1
apache-2.0
693a7ecb45758676c3689f0294741acfc31e8e7c
Bachmann1234/marshmallow-polyfield
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom app import settings\nfrom tests.integration.integration_test_case import IntegrationTestCase\n\n\nclass TestTimeout(IntegrationTestCase):\n\n def setUp(self):\n settings.EQ_SESSION_TIMEOUT_SECONDS = 1\n ...
python
edit
1
1
mit
548cfea821bf1b0b92ce09c54405554d264b5395
ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner
tests/integration/session/test_timeout.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom setuptools import setup\n\nextra = {}\nif sys.version_info >= (3,):\n extra['use_2to3'] = True\n\nsetup(name='marathon',\n version=\"0.2.8\",\n description='Marathon Client Library',\n long_description=\"\...
python
edit
1
0
mit
4685b04c3913450ef34f7e4e848d6021097fed21
elyast/marathon-python,burakbostancioglu/marathon-python,thefactory/marathon-python,Rob-Johnson/marathon-python,mattrobenolt/marathon-python,mattrobenolt/marathon-python,Carles-Figuerola/marathon-python,drewrobb/marathon-python,Rob-Johnson/marathon-python,thefactory/marathon-python,mesosphere/marathon-python,Yelp/marat...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport setuptools\n\n\nsetuptools.setup(\n name=\"jack-select\",\n version=\"0.1\",\n url=\"https://github.com/SpotlightKid/jack-select\",\n author=\"Christopher Arndt\",\n au...
python
edit
1
0
mit
5d8ca3498d794ab264377b1bc31f52fcd97210ba
SpotlightKid/jack-select,SpotlightKid/jack-select
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Category\nfrom .serializers import CategorySerializer\nfrom employees.models import Employee\nfrom django.core.urlresolvers import reverse\nfrom rest_framework import status\nfrom rest_framework.test import APITestCase\n...
python
edit
5
1
apache-2.0
36c2e7449b7817a66b60eaff4c8518ae6d4f4a01
belatrix/BackendAllStars
categories/tests.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=\"crust\",\n version=\"0.1\",\n\n description=\"Framework for Tastypie API Clients\",\n long_description=open(\"README.rst\").read(),\n url...
python
edit
1
0
bsd-2-clause
5a8963c7be6bb328346d21f2b4afdc7256c7cd96
dstufft/crust
setup.py
accepted
null
true