messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nSECRET_KEY = \"h_ekayhzss(0lzsacd5cat7d=pu#51sh3w&uqn&#3#tz26vuq4\"\n\nDATABASES = {\"default\": {\"ENGINE\": \"django.db.backends.sqlite3\", \"NAME\": \":memory:\"}}\n\nINSTALLED_APPS = [\n \"django.contrib.sites\",\n \"...
python
edit
3
0
mit
70a97ab38d2b30652c41d1e058ef4447fdd54863
adamcharnock/django-tz-detect,adamcharnock/django-tz-detect,adamcharnock/django-tz-detect
test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_importers.management.commands import BaseDemocracyCountsCsvImporter\n\n\nclass Command(BaseDemocracyCountsCsvImporter):\n council_id = \"GOS\"\n addresses_name = \"2022-05-05/2022-03-07T15:47:28.644792/2022 Borough of Gospor...
python
edit
1
2
bsd-3-clause
a31103d5001c7c6ebebddd25f9d1bb4ed0e0c2e9
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_importers/management/commands/import_gosport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom intercom.client import Client\nfrom django.conf import settings\nfrom celery import shared_task\n\n\nintercom = Client(personal_access_token=settings.INTERCOM_ACCESS_TOKEN)\n\n\n@shared_task\ndef intercom_event(event_name, created_at, ...
python
edit
1
1
apache-2.0
c3838132d3a4622ab4c9660f574e8219ac5e164b
raccoongang/socraticqs2,raccoongang/socraticqs2,cjlee112/socraticqs2,raccoongang/socraticqs2,cjlee112/socraticqs2,cjlee112/socraticqs2,raccoongang/socraticqs2,cjlee112/socraticqs2
mysite/core/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sh import cp, rm\nimport sh\nimport os\n\nSURSA_CPP = 'main.cpp'\nPROBLEMA = 'coliziune'\n\ncp('../' + SURSA_CPP, '.')\nos.system('g++ ' + SURSA_CPP)\n\nfor i in range(1, 11):\n print 'Testul ', i\n cp(PROBLEMA + str(i) + '.in', PROB...
python
edit
3
0
mit
85748ff761ef1373a9828829a447c7b83db246de
palcu/rotopcoder,palcu/rotopcoder
coliziune/teste/generate_ok.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom defuzz import Defuzzer\n\n\ndef test_it():\n dfz = Defuzzer()\n assert dfz.defuzz((1, 2)) == (1, 2)\n assert dfz.defuzz((1, 3)) == (1, 3)\n assert dfz.defuzz((1.00000001, 2)) == (1, 2)\n assert dfz.defuzz((1, 2, 3, 4, 5)...
python
edit
3
6
apache-2.0
702217fee6e332b3d08902bb67f0725626f0c88d
nedbat/zellij
test_defuzz.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Raise warning when python version is < 3.5" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport sys\n\nif sys.version_info < (3, 5):\n import warnings\n warnings.warn(\n 'N...
python
new_file
1
0
mit
12209289ebbdd5d7b93e6eb671582a36bec1d6c2
miyakogi/wdom,miyakogi/wdom,miyakogi/wdom
wdom/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add container for global configurations" }, { "role": "assistant", "content": "\"\"\"Run bcbio-nextgen installations inside of virtual machines\nand containers.\n\"\"\"\n\n\nclass Config(object):\n\n \"\"\"Container for global...
python
new_file
1
3
mit
c9868c56ca2aa4e5cfe2c9bad595b4d46d3a0137
alexandrucoman/bcbio-nextgen-vm,alexandrucoman/bcbio-nextgen-vm
bcbiovm/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# --------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license ...
python
edit
1
0
mit
8d5658ac5fa12381797b8c5f5fcd7f010aa3af0d
Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python
azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nPARENT_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')\nsys.path.append(PARENT_PATH)\n\nfrom antlr4 import FileStream, CommonTokenStream, ParseTreeWalker\n\nfrom tailor.listeners.mainlistener i...
python
edit
1
1
mit
34d895499f9e2a9fe35937ad511fc1adbfd8c12d
sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor
tailor/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\n\napp = Flask(__name__)\napp.config.from_pyfile('settings.cfg')\napp.secret_key = os.urandom(128)\n\nfrom scoring_engine.web.views import welcome, scoreboard, overview, services, admin, auth, profile, a...
python
edit
1
0
mit
27d40996f0912a1b9b16afa0884f10b1504acce2
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
scoring_engine/web/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module is not meant to be imported directly.\nIts purpose is to patch the TohuBaseGenerator class\nso that its special methods __add__, __mul__ etc.\nsupport other generators as arguments.\n\"\"\"\n\nfrom operator import add, m...
python
edit
1
2
mit
2f7551b953bb225b68880cdeec87236ea6453b12
maxalbert/tohu
tohu/v6/set_special_methods.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\"Change conclusion dropdowns options in control assessment\n\nRevision ID: 29dca3ce0556\nRevises: 2d8a46b1e4a4\nCreate Date: 2015-09-11 13:18:18.269109\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '29dca3ce0556'\...
python
edit
4
1
apache-2.0
494bfbd5f189cb0f61eecc7e86df53fb9f9a8203
NejcZupec/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,hyperNURb/ggrc-core,NejcZupec/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,edofic/ggrc-core,hasanalom/ggrc-core,andrei-karalionak/ggrc-core,j...
src/ggrc/migrations/versions/20150911131818_29dca3ce0556_change_conclusion_dropdowns_options_in_.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import VERSION as DJANGO_VERSION\nfrom django import template\nfrom django.conf import settings\nif DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:\n from django.core.urlresolvers import reverse\nelse:\n from django.url...
python
edit
1
6
bsd-3-clause
cae249ff553083e3546e26b08779baf6abc69a69
valerymelou/django-active-link
active_link/templatetags/active_link_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"\nDeploys the website to a target directory supplied as an argument.\n\"\"\"\n\nimport json\nimport os\nimport sys\n\ndef iterate_over(dict_or_list, result):\n \"\"\"\n Iterates recursively over nested ...
python
edit
1
7
bsd-3-clause
a22b1019b8bcea2f6bdaf90635165d8d8968dee1
Tom94/tev,Tom94/tev,Tom94/tev,Tom94/tev
scripts/parse-include-paths.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA filter which can perform many types of text-to-HTML conversion.\n\n\"\"\"\n\nfrom django.template import Library\nfrom template_utils.markup import markup_filter\n\ndef apply_markup(value):\n \"\"\"\n Applies text-to-HTML co...
python
edit
1
2
bsd-3-clause
1d0c6389cc7d67acb5123555568d83f17f6b0ff0
dongpoliu/django-template-utils
templatetags/generic_markup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom pizzaplace.models import PizzaPlace\nfrom django.core.validators import RegexValidator\nfrom meetup.services.meetup_api_lookup_agent import MeetupApiLookupAgent\nfrom django.core.exceptions import Validati...
python
edit
1
2
mit
2036b054a57cade23e513877e1dff9455c3d74c7
nicole-a-tesla/meetup.pizza,nicole-a-tesla/meetup.pizza
meetup/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\n#\n# Build the entire ISAAC Project\n#\n#\n#\n\nimport subprocess\nimport os\nimport sys\n\nprojects = ['va-ochre',\n\t\t\t'va-isaac-metadata',\n\t\t\t'va-isaac-mojo',\n\t\t\t'va-newtons-cradle',\n\t\t\t'va-logic',\n\t\t...
python
edit
3
1
apache-2.0
abd7987e698e9102a7d737f3b32296d703ae0a7c
Apelon-VA/va-isaac-docs
scripts/buildAll.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCopyright (c) 2017, Jairus Martin.\n\nDistributed under the terms of the MIT License.\n\nThe full license is in the file COPYING.txt, distributed with this software.\n\nCreated on May 20, 2017\n\n@author: jrm\n'''\nfrom atom.api import...
python
edit
5
0
mit
62d7924f6f5097845a21408e975cae1dfff01c1c
codelv/enaml-native,codelv/enaml-native,codelv/enaml-native,codelv/enaml-native
android/app/src/main/assets/python/enamlnative/widgets/analog_clock.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom common.util.generator import get_random_id\n\n\nclass Student(models.Model):\n # ToDo: Make username unique\n username = models.CharField(max_length=7)\n magic_id = models.CharField(max_length=8...
python
edit
1
2
mit
aeafebbb2bb5ddf4e2d2ddd47cd16d8ed515ac1b
martinzlocha/mad,martinzlocha/mad,martinzlocha/mad
portal/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport glob\nimport re\n\nNEW_VERSION = sys.argv[1]\n\nwith open('VERSION') as f:\n VERSION=f.read()\n \n\nprint NEW_VERSION\nprint VERSION\n\ndef set_assemblyinfo_version(version):\n\n aLineRe = \"AssemblyVersion|Assem...
python
edit
5
5
mit
634f718aa4fe4052a8dc9be1f82078ebcd2338df
psistats/windows-client,psistats/windows-client,psistats/windows-client
build-release.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'jloeffler'\n\ndef list_projects():\n\n return {}\n\ndef list_contributors():\n\n return {}\n\n```\n\nApply this change: Return one project for testing" }, { "role": "assistant", "content": "__author__ = 'jloe...
python
edit
5
3
apache-2.0
00a7f13ac2dbbd7449fd0ce260a21448c67b73e9
marky-mark/catwatch,AlexanderYastrebov/catwatch,AlexanderYastrebov/catwatch,marky-mark/catwatch,AlexanderYastrebov/catwatch,marky-mark/catwatch,AlexanderYastrebov/catwatch,marky-mark/catwatch
birdwatch/api.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom spacy.en import English\n\nimport pytest\n\n@pytest.mark.models\ndef test_vec(EN):\n hype = EN.vocab['hype']\n assert hype.orth_ == 'hype'\n assert 0.08 >= hype.vector[0] > 0.07\n\n\n...
python
edit
3
1
mit
f38eb25fe13320297baad173c8e6d6ac7cfb9542
oroszgy/spaCy.hu,recognai/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,banglakit/spaCy,explosion/spaCy,explosion/spaCy,raphael0202/spaCy,banglakit/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,banglakit/spaCy,explosion/spaCy,a...
spacy/tests/tokens/test_vec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport etcd3.etcdrpc as etcdrpc\nfrom etcd3.client import Etcd3Client\nfrom etcd3.client import Transactions\nfrom etcd3.client import client\nfrom etcd3.members import Member\n\n__author__ = 'Louis...
python
edit
2
0
apache-2.0
e81c56e1f3b682e0cfffa40851aed817be3b1812
kragniz/python-etcd3
etcd3/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom app_data import AppDataContainer, app_registry\nfrom cms.apphook_pool import apphook_pool\nfrom django.core.urlresolvers import resolve\n\n\ndef get_app_instance(request):\n \"\"\"\n Returns a tuple conta...
python
edit
1
4
bsd-3-clause
692f13b9dbe994baf44bf42384e956608b94fede
aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config
aldryn_apphooks_config/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport hashlib\nimport base64\n\ndef generate_key():\n key = hashlib.sha224(str(random.getrandbits(256))).digest()\n key = base64.b64encode(key, \n random.choice(['rA','aZ','gQ','hH','hG','aR','DD']))\n ke...
python
edit
2
4
mit
b800f746e73634fe04a9a1ec45ef62dd7528f219
bueda/django-comrade
comrade/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Copyright 2018-2022 Polyaxon, Inc.\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 a...
python
edit
1
2
apache-2.0
0563882d0d1bfdf4e64a65bcd91e8d6d4ab6ed8f
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
core/polyaxon/polypod/compiler/lineage/artifacts_collector.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = \", \".join([\"Shyue Ping Ong\", \"Anubhav Jain\", \"Geoffroy Hautier\",\n \"William Davidson Richard\", \"Stephen Dacek\",\n \"Sai Jayaraman\", \"Michael Kocher\", \"Dan Gunter\",\...
python
edit
14
0
mit
829ad434f42b457294d44108b26c6880cd0e4c36
dongsenfo/pymatgen,Bismarrck/pymatgen,czhengsci/pymatgen,fraricci/pymatgen,blondegeek/pymatgen,johnson1228/pymatgen,montoyjh/pymatgen,richardtran415/pymatgen,vorwerkc/pymatgen,fraricci/pymatgen,tallakahath/pymatgen,mbkumar/pymatgen,davidwaroquiers/pymatgen,ndardenne/pymatgen,montoyjh/pymatgen,xhqu1981/pymatgen,vorwerkc...
pymatgen/__init__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Plot to test logscale\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport mpld3\n\n\ndef create_plot():\n fig = plt.figure()\n fig.subplots_adjust(hspace=0.4, wspace=0.4)\n\n ax1 = fig.add_subplot(2, 2, 1)\n ...
python
edit
3
2
bsd-3-clause
36d3c2f81ea39968bc58bab172e6bf035147ae3c
mpld3/mpld3,jakevdp/mpld3,jakevdp/mpld3,mpld3/mpld3
mpld3/test_plots/test_logscale.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom robber import expect\nfrom robber.matchers.contain import Contain\n\nclass TestAbove(unittest.TestCase):\n def test_matches(self):\n expect(Contain({'key': 'value'}, 'key').matches()) == True\n expect(...
python
edit
1
1
mit
93be15b7f74673247eeabc208fd56cc6cb735e43
vesln/robber.py,taoenator/robber.py
tests/matchers/test_contain.py
rejected_duplicate
Near-duplicate of sample 9908
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport time\nfrom slackclient import SlackClient\nimport mh_python as mh\nimport argparse\nimport random\n\n\ndef main():\n parser = argparse.ArgumentParser(\n description=\"Slack chatbot usi...
python
edit
1
9
mit
5d1fe61d152d2c5544982322a9f156809ea267f0
Spferical/slack-megahal,Spferical/matrix-chatbot,Spferical/matrix-chatbot,Spferical/matrix-megahal
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom functools import partial\n\nfrom elfi.wrapper import Wrapper\n\nclass Test_wrapper():\n\n def test_echo_exec_arg(self):\n command = \"echo {0}\"\n wrapper = Wrapper(command, post=int)\n ret =...
python
edit
1
1
bsd-3-clause
c1508d51a90db1ebf3c0278c777ff3169e0d13f9
lintusj1/elfi,elfi-dev/elfi,lintusj1/elfi,HIIT/elfi,elfi-dev/elfi
tests/unit/test_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re, math\nfrom collections import Counter\nimport itertools\n\nfrom sentimental import sentimental\n\n\nclass SentimentAnalyzer():\n\n _sentimental = sentimental.Sentimental(max_ngrams=2)\n path = sentimental.Sentimental.get_da...
python
edit
1
7
mit
90655c89fcf56af06a69f8110a9f7154294ca11c
ErikGartner/ghostdoc-ritter
ritter/analytics/sentiment_analyzer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2017 Google Inc.\n#\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport os\nimport subprocess\nimport sys\n\nskslc = sys.argv[1]\nclangForma...
python
edit
1
0
bsd-3-clause
152dfbb9fc5ca5fe5c859fea5ba4a25a31f3ff13
google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/pla...
gn/compile_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# importing modules/ libraries\nimport pandas as pd\nimport random\n\n# create sample of order products train data\nn = 1384617\ns = round(0.1 * n)\nskip = sorted(random.sample(range(1,n), n-s))\norder_products__train_sample_df = pd.read_cs...
python
edit
1
0
mit
6ee083f5b5a190f30f4916698c57c7ee1c2225fe
rjegankumar/instacart_prediction_model
create_sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rctk.widgets.control import Control, remote_attribute\n\nfrom rctk.task import Task\nfrom rctk.event import Changable, Submittable\n\nclass Text(Control, Changable, Submittable):\n name = \"text\"\n\n value = remote_attribute('va...
python
edit
3
2
bsd-2-clause
365da65390a0c2093fbbc5681c72cbfbd73ae78f
rctk/rctk,rctk/rctk
rctk/widgets/text.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom createCollection import createCollectionFile\nfrom ObjectFactories.ItemFactory import ItemFactory\nfrom DataObjects.Collection import Collection\nimport datetime, json, os.path, argparse\n\nCONST_COLLECTIONS_NAME = 'collections'\n\ndef...
python
edit
6
3
apache-2.0
3fb56e434182e5b28dcad0c547b0326ebe5be352
AmosGarner/PyInventory
main.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport argparse\nimport asyncio\nimport logging\nimport sys\nfrom pathlib import Path\nfrom MoMMI.logsetup import setup_logs\n\n# Do this BEFORE we import master, because it does a lot of event loop stuff.\nif sys.pl...
python
edit
1
4
mit
acc3888ef55d7df22df08b16cc746186fc1a75c7
PJB3005/MoMMI,PJB3005/MoMMI,PJB3005/MoMMI
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nfrom .models import GalleryPlugin\n\n\nclass ImagesiftPlugin(CMSPluginBase):\n...
python
edit
2
6
bsd-3-clause
adee7a2530d22d1242f89cddc84795efd1d02653
topiaruss/cmsplugin-imagesift,topiaruss/cmsplugin-imagesift,topiaruss/cmsplugin-imagesift
imagesift/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom ANN import ANN\nfrom random import seed as srand, randint\nfrom time import time\n\nsrand(time())\n\n# Test data for a XOR gate\ntestData = [\n [0.1, 0.1, 0.9],\n [0.1, 0.9, 0.9],\n [0.9, 0.1, 0.9],\n ...
python
edit
1
0
mit
a9c1cc5517f2e32c812cf041359a64fea9af9bad
JoshuaBrockschmidt/ideal_ANN
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport h5py\nfrom glue.core import Data\n\n\ndef read_step_to_data(filename, step_id=0):\n \"\"\"\n Given a filename and a step ID, read in the data into a new Data object.\n \"\"\"\n\n f = h5py.File(filename, 'r')\n\...
python
edit
1
4
bsd-2-clause
969aed7046e4965962e8ed5daa9c557baffc48bc
glue-viz/glue-h5part
glue_h5part/io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom createCollection import createCollection\nfrom ObjectFactories.ItemFactory import ItemFactory\nfrom DataObjects.Collection import Collection\nimport datetime\nimport json\n\ndef main():\n #createCollection('agarner','books')\n ...
python
edit
3
2
apache-2.0
8f14126e36e7f5c15431cd7541762e485c3f8169
AmosGarner/PyInventory
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom elasticsearch import Elasticsearch\n\nfrom scrapi import settings\nfrom scrapi.processing.base import BaseProcessor\n\nes = Elasticsearch(\n settings.ELASTIC_URI,\n request_timeout=settings.ELASTIC_TIMEOUT\n)\n\...
python
edit
1
3
apache-2.0
62b7b01fe9a1d87692e97a6a75b52d542f8a43be
fabianvf/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,mehanig/scrapi,felliott/scrapi,ostwald/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,jeffreyliu3230/scrapi,alexgarciac/scrapi
scrapi/processing/elastic_search.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bluesky.run_engine import RunEngine\nfrom bluesky.tests.utils import setup_test_run_engine\nfrom bluesky.examples import simple_scan, motor\n\n\nRE = setup_test_run_engine()\n\n\ndef test_custom_metadata():\n def assert_lion(name, d...
python
edit
3
1
bsd-3-clause
ba4ea2169a13d61d30c94e89db512a34bc0fe3b5
ericdill/bluesky,ericdill/bluesky
bluesky/tests/test_documents.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\r\ntry:\r\n import wpilib\r\nexcept ImportError:\r\n from pyfrc import wpilib\r\n \r\n# import components here\r\nfrom components import drive, intake, catapult\r\n\r\nclass MyRobot(wpilib.SimpleRobot):\r\n def __init__ (self):...
python
edit
12
3
bsd-3-clause
d63509e0d68a1dceabbbcf58432a92f7a4cbfd77
frc1418/2014
robot/robot/src/autonomous/main.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom disco.test import TestCase, TestJob\nfrom disco.core import Job\nimport disco\nimport threading\nimport BaseHTTPServer\n\n\ndef map(line, params):\n for word in line.split():\n yield word, 1\n\ndef reduce(iter, params):\n ...
python
edit
4
2
bsd-3-clause
0460404bb7f3e9a9f6ece1c4a141b16fced6f741
pombredanne/disco,simudream/disco,ErikDubbelboer/disco,beni55/disco,discoproject/disco,ErikDubbelboer/disco,oldmantaiter/disco,simudream/disco,oldmantaiter/disco,seabirdzh/disco,seabirdzh/disco,seabirdzh/disco,discoproject/disco,ktkt2009/disco,discoproject/disco,ktkt2009/disco,beni55/disco,ErikDubbelboer/disco,pombreda...
tests/test_chunked_http.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\n(dir, filename) = os.path.split(os.path.abspath(sys.argv[0]))\nprint(dir)\nfilenames = os.listdir(dir)\nfor file in filenames:\n print(file)\n\nprint('*****************************************************')\nupdi...
python
edit
1
0
mit
aca1b138350434c9afb08f31164269cd58de1d2d
jiangtianyu2009/PiSoftCake
YouKnowShit/CheckFile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-*- encoding: utf-8 -*-\n\nimport base\n\nclass SnippetParser(base.SnippetParserBase):\n def strip_template(self, template, normalize, collapse):\n if template.name.matches('unité'):\n return ' '.join(map(unicode, temp...
python
edit
5
7
mit
4021d27a7bd15a396b637beb57c10fc95936cb3f
Stryn/citationhunt,jhsoby/citationhunt,Stryn/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,Stryn/citationhunt
snippet_parser/fr.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom time import time\nimport numpy as np\nfrom skan.vendored import thresholding as th\n\n\nclass Timer:\n def __init__(self):\n self.interval = 0\n\n def __enter__(self):\n self.t0 = time()\n return self\n\n ...
python
edit
1
1
bsd-3-clause
878c14e04327f2f9d2d4acd22de21ed23b0cfb9a
jni/skan
skan/test/test_vendored_correlate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.wtf import Form\nfrom wtforms import validators\n\nfrom dmutils.forms import StripWhitespaceStringField\n\n\nclass EmailAddressForm(Form):\n email_address = StripWhitespaceStringField('Email address', validators=[\n ...
python
edit
1
2
mit
1f527bd99a35cf6396e6300369719b3f5f5490ff
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
app/main/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport sys\n\nADMINS = (\n (\"Mike\", \"<EMAIL>\"),\n)\n\nEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n\nif \"test\" in sys.argv:\n DATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.bac...
python
edit
1
0
mit
425a06b852b5abfbbd46cd82065daff9b8bf9f51
mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections
ehriportal/devel_settings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove Individual as a book_type - it doesn’t really add anything. AMAAS-639." }, { "role": "assistant", "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nBOOK_TYPES = {'Counterpa...
python
new_file
1
0
apache-2.0
98ba687e67c8d5a17560bed59f42dbe8e3fb0cf6
amaas-fintech/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python
amaascore/books/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUser-facing interface to all dimensionality reduction algorithms\n\"\"\"\n\ndef smushplot(data, smusher):\n if isinstance(smusher, str):\n # Need to get appropriate smusher from sklearn given the string\n pass\n ...
python
edit
1
2
bsd-3-clause
4650b6730d925c4a5fde34ec4c2f9058763ab58b
olgabot/cupcake
cupcake/smush.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2018-06-20 12:37\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('wo...
python
edit
1
0
apache-2.0
fc7c08aecf9d247e54db70ae14c999902d6f6bfa
toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity
workflow/migrations/0024_auto_20180620_0537.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom subprocess import call\n\nURL = 'http://microdash.herokuapp.com/FOG/'\nOUTPUT_FILE = '/mnt/us/weather/weather-script-output.png'\n\n\ndef clear_screen():\n call('/usr/sbin/eips -c', shell=True)\n\n\ndef get_im...
python
edit
1
3
bsd-3-clause
9c6ad90f20354ca47a2fc56cc0d7ff6ebfc613d3
alfredo/microdash,alfredo/microdash
weather/weather-display.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is a very basic usage example of the JSONCodeEdit.\n\nThe interface is minimalist, it will open a test file. You can open other\ndocuments by pressing Ctrl+O\n\"\"\"\nimport logging\nimport os\nimport random\nimport sys\nfrom p...
python
edit
1
2
mit
c1189bf7c24068fda9871436a705b70fd016dfd5
pyQode/pyqode.json,pyQode/pyqode.json
examples/json_editor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'mcsquaredjr'\n\nimport os\n\nnode_file = os.environ[\"NODES\"]\ncad_file = os.environ[\"CAD\"]\nprocs_per_nod = os.environ[\"PROCS_PER_NODE\"]\n\n\ndef my_lines(ip):\n with open(cad_file, \"r\") as cad:\n lines = []\...
python
edit
1
3
apache-2.0
446738f7615711766952205558fee7ce85ca3a3b
SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC
MS1/ddp-erlang-style/dna_lib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ingestors.base import Ingestor\nfrom ingestors.support.temp import TempFileSupport\nfrom ingestors.support.shell import ShellSupport\nfrom ingestors.support.ole import OLESupport\nfrom ingestors.directory import DirectoryIngestor\n\n\n...
python
edit
1
3
mit
9e785ef701e4c9d04924eff0ffc9c8d50fa267f6
alephdata/ingestors
ingestors/email/outlookpst.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Execute files of Python code.\"\"\"\n\nimport imp, os, sys\n\ndef run_python_file(filename, args):\n \"\"\"Run a python file as if it were the main program on the command line.\n \n `filename` is the path to the file to execu...
python
edit
null
null
apache-2.0
da75222fa286588394da7f689d47bd53716ffaa1
blueyed/coveragepy,nedbat/coveragepy,larsbutler/coveragepy,blueyed/coveragepy,7WebPages/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,larsbutler/coveragepy,hugovk/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,hugovk/coveragepy,blueyed/coveragepy,7...
coverage/execfile.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Provides info about a particular server.\n\"\"\"\n\nfrom usage import usage\n\nimport restclient\nimport simplejson\nimport subprocess\nimport sys\n\nfrom uuid import uuid1\n\nclas...
python
edit
2
7
apache-2.0
a6785b6ec546ba31f52420fcf55f4f45b00926ca
membase/membase-cli,couchbaselabs/couchbase-cli,couchbaselabs/couchbase-cli,couchbase/couchbase-cli,membase/membase-cli,couchbase/couchbase-cli,membase/membase-cli,couchbaselabs/couchbase-cli
info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n talkoohakemisto.settings.production\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n This module contains application settings specific to a production\n environment running on Heroku.\n\"\"\"\n\nimpor...
python
edit
2
0
mit
936b20a61fc48960cb21a8ad1c81ca1303151776
talkoopaiva/talkoohakemisto-api
talkoohakemisto/settings/production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Add keep as an option in fetches\n\nRevision ID: 3f6994568962\nRevises: 2335c80a6bc3\nCreate Date: 2017-02-02 22:31:00.719703\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '3f6994568962'\ndown_revision = '2335c80a...
python
edit
1
1
mit
f6013aa29fddf9883f8f0bea4b7733718b9d8846
kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io
core/admin/migrations/versions/3f6994568962_.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.classy import FlaskView\n\n\nclass AnalyserView(FlaskView):\n def get(self):\n return \"awesome\"\n\n```\n\nApply this change: Add more joy using decorators" }, { "role": "assistant", "content": "from flask.ex...
python
edit
1
1
apache-2.0
a75ff3a9d9b86ea71fbc582641ea943c282bfe2d
vtemian/kruncher
analyser/api.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\n\"\"\"Determine the generator format\"\"\"\nfrom collections import ChainMap\n\nDEFAULT_FORMAT = {\n 'domain': 'example.com',\n 'app': '{repo}{project}',\n 'dns_elb': '{repo}.{project}.{env}.{domain}',\n 'dns_instance': '{repo}{...
python
edit
1
1
apache-2.0
43d283cb4cb01ec919f9129571a51594e699fcf5
gogoair/gogo-utils
src/gogoutils/formats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef parse_app_page(response):\n # Should always be able to grab a title\n title = response.xpath('//div[@class = \"panel panel-default panel-gameinfo\"]/div[@class = \"panel-heading\"]/text()').extract()[0].strip()\n # Parse times ...
python
edit
1
3
mit
b4c292374175b8623a232bed47e8fa0bef60680b
SingingTree/AStatsScraper,SingingTree/AStatsScraper
astatsscraper/parsing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#coding=utf-8\nfrom __future__ import absolute_import\n\n\nfrom fabric.api import local, run, sudo, task\nfrom fabric.contrib.console import confirm\nfrom fabric.state import env\nfrom fabric.context_managers import cd, lcd, hide, settings\...
python
edit
8
5
apache-2.0
402c010b6ab4673ae3b5c684b8e0c155ec98b172
dongweiming/gentle
gentle/gt/operations.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ModelType(object):\n \"\"\"\n Enums for the differnet model types\n DO NOT CHANGE EXISTING ONES\n \"\"\"\n\n EVENT = 0\n TEAM = 1\n MATCH = 2\n EVENT_TEAM = 3\n DISTRICT = 4\n AWARD = 5\n MEDIA = 6\n\n...
python
edit
1
0
mit
8b1d878aff4168d74437d3ba0cfaf8307e7c377d
josephbisch/the-blue-alliance,verycumbersome/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,josephbisch/the-blue-alliance,the-blue-alliance/the-blue-alliance,synth3tk/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,bvisness/the-blue-alli...
consts/model_type.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Dependency injector.\"\"\"\n\nfrom .catalog import AbstractCatalog\nfrom .catalog import override\n\nfrom .providers import Provider\nfrom .providers import Delegate\nfrom .providers import Factory\nfrom .providers import Singleton\nf...
python
edit
3
0
bsd-3-clause
4fb3a127706d7ff7ead0d2d8b698183905d85d4e
ets-labs/python-dependency-injector,ets-labs/dependency_injector,rmk135/dependency_injector,rmk135/objects
dependency_injector/__init__.py
rejected_duplicate
Near-duplicate of sample 660
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cv2\n\nWINDOW_NAME = 'hello'\n\ndef global_on_mouse(event, x, y, unknown, lego_player):\n lego_player.on_mouse(event, x, y)\n\nclass LegoPlayer(object):\n def __init__(self):\n self.rect = []\n\n cv2.namedWindow(W...
python
edit
2
4
mit
b61bf7dbdb26b6ff3e76f10173ffb94a76cd4f4e
superquadratic/beat-bricks
lego.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom djangoautoconf.django_utils import retrieve_param\nfrom django.utils import timezone\nfrom provider.oauth2.backends import AccessTokenBackend\nfrom provider.oauth2.models import AccessToken\nfrom django.http import HttpResponse, HttpRe...
python
edit
5
3
bsd-3-clause
50bdb59f7629b60d6aa6c9f3f21b447f00476b19
weijia/webmanager,weijia/webmanager,weijia/webmanager
webmanager/views_oauth2.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2011 VMware, Inc.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Licen...
python
edit
1
2
apache-2.0
96884e4c35b89cb1f63a6249c9c24e27894a3752
stackforge/tacker,zeinsteinz/tacker,stackforge/tacker,openstack/tacker,openstack/tacker,openstack/tacker,zeinsteinz/tacker
tacker/db/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nfrom flask_oauthlib.client import OAuth\n\nfrom config import config\n\ndb = SQLAlchemy()\noauth = OAuth()\nlm = LoginManager()\nlm.logi...
python
edit
1
1
mit
c43fbdf1c0a4e976297f9fa75f97a2cfe4a0bee3
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport emission.core.wrapper.wrapperbase as ecwb\nimport emission.core.wrapper.motionactivity as ecwm\n\n# Used for various metrics such as count, distance, mean speed calorie consumption,\n# median speed calorie consumption...
python
edit
3
1
bsd-3-clause
f97d30c16de2b0e57a3ffb96c803bcafc3b0dca7
yw374cornell/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-s...
emission/core/wrapper/modestattimesummary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom openpassword.exceptions import InvalidPasswordException\n\n\nclass Keychain:\n\n def __init__(self, encryption_key):\n self.encryption_key = encryption_key\n self._locked = True\n\n def unlock(self, password):\n ...
python
edit
1
2
mit
3b0432edc1a9e55e6e7da5955a1ecbeea8000371
openpassword/blimey,openpassword/blimey
openpassword/keychain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport platform\n\n\nclass OSXDodger(object):\n allowed_version = \"10.12.1\"\n\n def __init__(self, applications_dir):\n self.app_dir = applications_dir\n\n def load_applications(self):\n \"\"\"\n Read all app...
python
edit
1
3
mit
cc838a311e891294da10ca7465782d71e622b5ef
yoda-yoda/osx-dock-dodger,denisKaranja/osx-dock-dodger
dodge.py
rejected_duplicate
Near-duplicate of sample 6817
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom datetime import datetime\n\nfrom snapshottest.django import TestCase\n\n\ndef api_client_get(url):\n return {\n 'url': url,\n }\n\n\nclass TestDemo(TestCase):\n\n def test_api_me(self):\n now = d...
python
edit
1
1
mit
e4a3d3c273a1b7e26e9fdcf7f8da060bf127f27e
syrusakbary/snapshottest
examples/django_project/django_project/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import *\nimport os, shutil\n\nimport logging\nlogger = logging.getLogger(__name__)\n\nimport sys\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))\nfrom qipipe.registration import ants\n\n# The ...
python
edit
5
2
bsd-2-clause
c1d906da71571552de92f028c91b3fc2ec2d28de
ohsu-qin/qipipe
test/unit/registration/test_ants.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Write the benchmarking functions here.\n# See \"Writing benchmarks\" in the asv docs for more information.\nimport os.path as osp\nimport numpy as np\nfrom tempfile import TemporaryDirectory\nimport h5py\n\nclass TimeSuite:\n \"\"\"\n ...
python
edit
3
2
bsd-3-clause
967f9363872ff64847e4b93a7c1ea75869eaabd9
h5py/h5py,h5py/h5py,h5py/h5py
benchmarks/benchmarks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This script launches all of the processes necessary to train a\ndeep Q-network on an ALE game.\n\nUsage:\n\nale_run.py [--glue_port GLUE_PORT]\n\nAll unrecognized command line arguments will be passed on to\nrl_glue_ale_agent.py\n\"\"...
python
edit
1
0
bsd-3-clause
79a2f5ddc1d6d05dca0d44ee6586b2d8809ee1c0
r0k3/deep_q_rl,aaannndddyyy/deep_q_rl,davidsj/deep_q_rl,spragunr/deep_q_rl,gogobebe2/deep_q_rl,aaannndddyyy/deep_q_rl,omnivert/deep_q_rl,npow/deep_q_rl,vvw/deep_q_rl,codeaudit/deep_q_rl,alito/deep_q_rl,jleni/deep_q_rl,peterzcc/deep_q_rl,davidsj/deep_q_rl,spragunr/deep_q_rl,codeaudit/deep_q_rl,udibr/deep_q_rl,udibr/deep...
deep_q_rl/ale_run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Import non-standard modules\nimport json\n\n\ndef definition(word):\n '''This function returns the available definitions(s) of the input'''\n return data[word]\n\n\n# Load dictionary data from data.json to python dictionary\ndata = ...
python
edit
1
1
mit
18a133cc3b56fdc1a5185bf3da3bed001e1b5c64
jojenreed/Python-CLI-Dictionary
dictionary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom celery.signals import setup_logging\nimport orchestrator.logger\n\n__version__ = '0.3.10'\n__author__ = 'sukrit'\n\norchestrator.logger.init_logging()\nsetup_logging.connect(orchestrator.logger.i...
python
edit
1
0
mit
e1da1e7e8fedd288e9ac3a41b529c5bfe3e0612b
totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator
orchestrator/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.utils.crypto import get_random_string\n\nimport pytest\nfrom cms import api\nfrom cms.page_rendering import render_page\nfrom form_designer.contrib.cms_plugins...
python
edit
1
1
bsd-3-clause
7613fc5c3ef1cc552d39e5fde533e8f9af7cc931
kcsry/django-form-designer,andersinno/django-form-designer-ai,kcsry/django-form-designer,andersinno/django-form-designer,andersinno/django-form-designer-ai,andersinno/django-form-designer
form_designer/tests/test_cms_plugin.py
rejected_duplicate
Near-duplicate of sample 7114
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Basic checks for the server API.\"\"\"\nfrom behave import then, when\nfrom urllib.parse import urljoin\n\nimport requests\n\nfrom src.authorization_tokens import authorization\nfrom src.parsing import parse_token_clause\n\n\ndef post...
python
edit
5
2
apache-2.0
413c0b7f2df43543fd360bca1a9a6b9de4f6f5e8
tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common
integration-tests/features/steps/user_intent.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import current_app\n\n\ndef list_routes():\n \"\"\"List URLs of all application routes.\"\"\"\n for rule in sorted(current_app.url_map.iter_rules(), key=lambda r: r.rule):\n print(\"{:10} {}\".format(\", \".join(rule...
python
edit
1
2
mit
39a1212508c27a5c21f8b027fef3fb409a28657f
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
app/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport socket\n\nfrom mock import patch\n\nfrom sentry.metrics.datadog import DatadogMetricsBackend\nfrom sentry.testutils import TestCase\n\n\nclass DatadogMetricsBackendTest(TestCase):\n def se...
python
edit
1
1
bsd-3-clause
a8af7cd7918322615a342c2fd662f394866da55f
pauloschilling/sentry,pauloschilling/sentry,pauloschilling/sentry
tests/sentry/metrics/test_datadog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom itest_utils import wait_for_marathon\nfrom itest_utils import print_container_logs\n\n\ndef before_all(context):\n wait_for_marathon()\n\n\ndef after_scenario(context, scenario):\n \"\"\"If a marathon client object...
python
edit
3
7
apache-2.0
8b16084a4fe72a369ada80969f6b728abf611d8f
somic/paasta,gstarnberger/paasta,Yelp/paasta,gstarnberger/paasta,somic/paasta,Yelp/paasta
marathon_itests/environment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom .framework import DestructiveYubikeyTestCase, exactly_one_yubikey_present\nfrom yubikit.core.otp import OtpConnection\nfrom yubikit.core.fido import FidoConnection\nfrom yubikit.core.smartcard import SmartCardConnect...
python
edit
1
3
bsd-2-clause
1ef1851e508295f6d4bf01289591f42c21656df7
Yubico/yubikey-manager,Yubico/yubikey-manager
test/on_yubikey/test_interfaces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom aids.stack.stack import Stack\n\nclass StackTestCase(unittest.TestCase):\n '''\n Unit tests for the Stack data structure\n\n '''\n \n def setUp(self):\n\tpass\n\n def test_stack_initialization(self):\n...
python
edit
9
1
mit
7c117c4555fdf30b3d98a453c7e28245dca0c9b9
ueg1990/aids
tests/test_stack/test_stack.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# dials.util.__init__.py\n#\n# Copyright (C) 2013 Diamond Light Source\n#\n# Author: James Parkhurst\n#\n# This code is distributed under the BSD license, a copy of which is\n# included in the root directory of...
python
edit
1
4
bsd-3-clause
86446c6d1b0b8583562e0fccf1745e95ce7003c2
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
util/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom shapely.geometry import shape\n\n# this is mid way along the High Line in NYC, which is a huge long\n# \"building\". we should be clipping it to a buffer of 3x the tile\n# dimensions.\n# http://www.openstreetmap.org/way/37054313\nwith ...
python
edit
2
0
mit
300cbd3ff4d0e5021892f7c9940635695cb017a3
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/197-clip-buildings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
2
apache-2.0
5188861fb873ea301eb5ec386f1df65c0707e146
openstack/python-openstacksdk,dtroyer/python-openstacksdk,mtougeron/python-openstacksdk,briancurtin/python-openstacksdk,dudymas/python-openstacksdk,briancurtin/python-openstacksdk,dudymas/python-openstacksdk,openstack/python-openstacksdk,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,mtougeron/python-openst...
openstack/tests/functional/object/v1/test_container.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest as unittest\nfrom syntax import Syntax\nfrom jscodegen import CodeGenerator\n\n\ndef add_cases(generator):\n def class_decorator(cls):\n \"\"\"Add tests to `cls` generated by `generator()`.\"\"\"\n for f, to...
python
edit
1
2
mit
a7867806a6bd3abfd6bf2bcac6c490965be000e2
ksons/jscodegen.py
tests/test_completeness.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .tuner import Hyperband\nimport unittest\n\n\nclass HyperbandTestCase(unittest.TestCase):\n def test_run(self):\n observed_ns = []\n observed_rs = []\n observed_cs = []\n def _get(n):\n observe...
python
edit
1
2
mit
3aa7dd8d1247fe9d426049c8b09db0a5b1af9067
learning-on-chip/google-cluster-prediction
prediction/test_tuner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\nimport sys\nimport argparse\nfrom deepharvest.deepharvest_nuxeo import DeepHarvestNuxeo\n\n\ndef main(argv=None):\n\n parser = argparse.ArgumentParser(\n description='Print count of...
python
edit
7
5
bsd-3-clause
c50d9efe011417162ab6e99e19973dcde6b3ddfa
barbarahui/nuxeo-calisphere,barbarahui/nuxeo-calisphere
utils/get_collection_object_count.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport glob\nimport shutil\nfrom subprocess import call\n\n# If vtk python module is not available, we can't run track.py so skip this\n# test\ncwd = os.getcwd()\ntry:\n import vtk\nexcept ...
python
edit
4
0
mit
6b84688c1b5a7f2e8c9e5007455b88cbaa845e9f
mjlong/openmc,wbinventor/openmc,bhermanmit/openmc,wbinventor/openmc,johnnyliu27/openmc,paulromano/openmc,mjlong/openmc,smharper/openmc,lilulu/openmc,johnnyliu27/openmc,amandalund/openmc,samuelshaner/openmc,mit-crpg/openmc,shikhar413/openmc,johnnyliu27/openmc,mit-crpg/openmc,liangjg/openmc,kellyrowland/openmc,amandalund...
tests/test_track_output/results.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import getcwd\nfrom sys import path as ppath\nppath.insert(1,getcwd()+'/modules') # TODO: win32 compatibilite (python path)\n\nimport unittest\nfrom lifegame.test.LifeGameTestSuite import LifeGameTestSuite\nfrom tests.TestSuite impo...
python
edit
1
0
apache-2.0
14ef0cc78c327c67a2acdb68915d427e4babdd4b
buxx/synergine
run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python2.7\n\nimport sys\n\nfrom datetime import date\nfrom main import app\nfrom upload_s3 import set_metadata\nfrom flask_frozen import Freezer\n\n# cron is called with 3 arguments, should only run in the first week of mon...
python
edit
1
0
apache-2.0
ae593fd5de74a123b5064ef2e018b4955dc9e6c9
vprnet/dorothys-list,vprnet/dorothys-list,vprnet/dorothys-list
runserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n The top level of the APL Read-Evaluate-Print loop\n\n UNDER DEVELOPMENT\n\n This version adds a dummy evaluate routine.\n\"\"\"\n\nimport sys\n\n# ------------------------------\n\ndef evaluate(expression):\n \"\"\"...
python
edit
1
8
apache-2.0
85cb348dab356386362fe7657dee3e31aa1f92bf
NewForester/apl-py,NewForester/apl-py
rep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# File: grains.py\n# Purpose: Write a program that calculates the number of grains of wheat\n# on a chessboard given that the number on each square doubles.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Dat...
python
edit
1
3
mit
aa3134912af3e57362310eb486d0f4e1d8660d0c
amalshehu/exercism-python
grains/grains.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sys import argv\n\nfrom examples.connect4.connect4 import Connect4Network\n\n\nif __name__ == '__main__':\n if argv[1] == 'connect4':\n Connect4Network().play()\n\n```\n\nApply this change: Check length of argv before accessi...
python
edit
1
0
mit
574fba0650e4c68b7a31533207c26d8d57ed49c2
tysonzero/py-ann
run.py
accepted
null
true