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 pygal\n\n\ndef horizontal_bar(sorted_streaks, sort_attrib):\n \"\"\"\n Render a horizontal bar chart of streaks.\n\n Values have already been sorted by sort_attrib.\n \"\"\"\n users = [user for user, _ in sorted_streak...
python
edit
1
5
mit
2352f18400d5b4b36052e04804bd04e32b000cc4
jollyra/hubot-commit-streak,supermitch/streak-podium,supermitch/streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-streak-podium,jollyra/hubot-streak-podium
streak-podium/render.py
rejected_duplicate
Near-duplicate of sample 3123
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pygametemplate import Game\n\n\nclass ExampleGame(Game):\n\n def logic(self):\n pass\n\n def draw(self):\n pass\n\n def quit(self):\n pass\n\n```\n\nApply this change: Remove now unnecessary quit() method ...
python
edit
1
1
mit
9dc90727df23e655e5c921ca84cb98b7d5ae5eb2
AndyDeany/pygame-template
example_game.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import connection\n\nfrom ..tasks import raven\n\n\n@raven\ndef update_feed(feed_url, use_etags=True):\n from .models import UniqueFeed\n UniqueFeed.objects.update_feed(feed_url, use_et...
python
edit
1
3
bsd-3-clause
428c62ed4b10ba5714e2a0b718cd3f52e0376bc1
rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,rmoorman/feedhq,rmoorman/feedhq,vincentbernat/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq,feedhq/feedhq,feedhq/feedhq,vincentbernat/feedhq,vincentbernat/feedhq,rmoorman/feedhq,vincentbernat/feedhq
feedhq/feeds/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test bijection class.\"\"\"\nimport pytest\n\nfrom collections_extended.bijection import bijection\n\n\ndef test_bijection():\n\t\"\"\"General tests for bijection.\"\"\"\n\tb = bijection()\n\tassert len(b) == 0\n\tb['a'] = 1\n\tassert...
python
edit
1
1
apache-2.0
022bbf819b3c4a14ade4100102d251eceb84c637
mlenzen/collections-extended
tests/test_bijection.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
e02dabde2ea898847ec61cc966e29a52e27f71cd
techhat/libcloud,ninefold/libcloud,smaffulli/libcloud,wrigri/libcloud,lochiiconnectivity/libcloud,lochiiconnectivity/libcloud,Kami/libcloud,StackPointCloud/libcloud,schaubl/libcloud,mistio/libcloud,briancurtin/libcloud,briancurtin/libcloud,Cloud-Elasticity-Services/as-libcloud,SecurityCompass/libcloud,wrigri/libcloud,s...
example_storage.py
rejected_duplicate
Near-duplicate of sample 15777
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nskipif_markers\n--------------\n\nContains pytest skipif markers to be used in the suite.\n\"\"\"\n\nimport pytest\nimport os\n\n\ntry:\n os.environ[u'TRAVIS']\nexcept KeyError:\n...
python
edit
1
0
bsd-3-clause
08331a081713f880d5eca4fb7b18f4c61e360132
hackebrot/cookiecutter,michaeljoseph/cookiecutter,willingc/cookiecutter,stevepiercy/cookiecutter,pjbull/cookiecutter,stevepiercy/cookiecutter,audreyr/cookiecutter,terryjbates/cookiecutter,luzfcb/cookiecutter,dajose/cookiecutter,dajose/cookiecutter,michaeljoseph/cookiecutter,Springerle/cookiecutter,terryjbates/cookiecut...
tests/skipif_markers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nDEBUG = True\nASSETS_DEBUG = True\n\n# GRANO_HOST = 'http://localhost:5000'\n# GRANO_APIKEY = '7a65f180d7b898822'\n# GRANO_PROJECT = 'kompromatron_C'\n\nGRANO_HOST = os.environ.get('GRANO_HOST', 'http://beta.grano.cc/')\nGRANO_...
python
edit
1
0
mit
746df42ff459c52690a5cf8c786a6d91edee7151
pudo/kompromatron,pudo/kompromatron
heroku_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom distutils.command.install import *\nfrom distutils.command.install import install as old_install\n\nclass install(old_install):\n\n def finalize_options (self):\n old_install.finalize_options(self)\n self.install_lib...
python
edit
4
5
bsd-3-clause
c65c9fafbdd96f20c7a87ce88ff594edcd490b49
chadnetzer/numpy-gaurdro,illume/numpy3k,illume/numpy3k,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,illume/numpy3k,efiring/numpy-work,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,Ade...
numpy/distutils/command/install.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pathlib import Path\n\nfrom django import template\nfrom django.template.defaultfilters import stringfilter\n\nregister = template.Library()\n\n\n@register.filter\n@stringfilter\ndef filename(path):\n \"\"\"Removes traceback lines f...
python
edit
1
1
bsd-3-clause
7f9a31a03e68e1d9dc6f420c6aa157e657da4157
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
apps/core/templatetags/files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom cab.models import Language, Snippet, SnippetFlag\n\n\nclass LanguageAdmin(admin.ModelAdmin):\n prepopulated_fields = {'slug': ['name']}\n\n\nclass SnippetAdmin(admin.ModelAdmin):\n list_display...
python
edit
1
2
bsd-3-clause
64dbe1d931edd38b4d731db18408e337d39e42c3
django/djangosnippets.org,django/djangosnippets.org,django/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org
cab/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\n\"\"\"Test whether given Newick/NHX trees are valid for ProPhyle.\n\nAuthor: Karel Brinda <<EMAIL>>\n\nLicence: MIT\n\nExample:\n\n\t$ prophyle_validate_tree.py ~/prophyle/bacteria.nw ~/prophyle/viruses.nw\n\"\"\"...
python
edit
1
4
mit
903f958fbdfc0f7a2f0e1d863907488f9a88cad3
karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle
prophyle/prophyle_validate_tree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nInstall the packages you have listed in the requirements file you input as\nfirst argument.\n\"\"\"\n\nfrom __future__ import (absolute_import, division, print_function, \n unicode_lit...
python
edit
1
6
bsd-3-clause
cb2cafc809481748ec64aa8ef9bfa3cc29660a6d
Neurita/darwin
install_deps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom thing import PiThing\n\n\n# Instantiate a PiThing\npi_thing = PiThing()\n\n# Get the current switch state\nswitch = pi_thing.read_switch()\nprint('Switch: {0}'.format(switch))\n\n```\n\nApply this change: Add b...
python
edit
3
0
mit
52c359c1348b9c21f7c47917d024d7c161652b43
beepscore/pi_thing,beepscore/pi_thing,beepscore/pi_thing
webapp/thing_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/lice...
python
edit
1
3
apache-2.0
d360d4e5af09c5c194db783c4344aef10367b7f3
mandre/kolla,intel-onp/kolla,mandre/kolla,GalenMa/kolla,openstack/kolla,stackforge/kolla,coolsvap/kolla,openstack/kolla,stackforge/kolla,dardelean/kolla-ansible,dardelean/kolla-ansible,dardelean/kolla-ansible,mrangana/kolla,rahulunair/kolla,nihilifer/kolla,intel-onp/kolla,rahulunair/kolla,nihilifer/kolla,mrangana/kolla...
kolla/cmd/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport json\nfrom os import scandir\nfrom os.path import (\n join as path_join,\n basename as to_basename,\n splitext,\n exists\n)\n\nimport ptt_core\nl = ptt_core.l\n\n\n_TARGETS_DIR_PATH = 'targets'\...
python
edit
7
3
mit
61fe996f79e34ac3f5be15213bfa2c16eccfa3ee
moskytw/mining-news
ptt_preproc_target.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n(lambda _, __, ___, ____, _____, ______, _______, ________:\n getattr(\n __import__(True.__class__.__name__[_] + [].__class__.__name__[__]),\n ().__class__.__eq__.__class__.__name__[:__] +\n (...
python
edit
2
0
mit
2c652df7f7ec93ecad0eb23094f12c6acd86256c
natemara/super-important-project,natemara/super-important-project
python/hello.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef update_read_tracking(topic, user):\n tracking = user.readtracking\n\n #if last_read > last_read - don't check topics\n if tracking.last_read and tracking.last_read > (topic.last_post.updated or\n ...
python
edit
2
7
bsd-3-clause
7872abf00b24a504fccba576b13ecdd140e0135f
ttyS15/pybbm,onecue/pybbm,katsko/pybbm,katsko/pybbm,wengole/pybbm,wengole/pybbm,webu/pybbm,acamposruiz/quecoins,springmerchant/pybbm,NEERAJIITKGP/pybbm,webu/pybbm,concentricsky/pybbm,skolsuper/pybbm,hovel/pybbm,NEERAJIITKGP/pybbm,hovel/pybbm,webu/pybbm,artfinder/pybbm,onecue/pybbm,katsko/pybbm,ttyS15/pybbm,wengole/pybb...
pybb/read_tracking.py
rejected_duplicate
Near-duplicate of sample 3539
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nfrom typing import BinaryIO, ClassVar\n\nfrom ..term import Term, TermData\nfrom ..relationship import Relationship, RelationshipData\nfrom ._fastobo import FastoboSerializer\nfrom .base import BaseSerializer\n\n\nclass OboSerial...
python
edit
6
12
mit
dc54aad6813f5ef1828f4706d87eab9f91af1c5a
althonos/pronto
pronto/serializers/obo.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\n\n\n# USEFUL FUNCTIONS FOR FLUENT CONTENTS #############################################################\n\n# Fluent Contents Helper Functions #####################################...
python
edit
1
2
mit
5d448435477ce94273051b8351275d8c18838b8b
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/utils/fluent_contents.py
rejected_duplicate
Near-duplicate of sample 12994
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\n\nDOIT_CONFIG = {'default_tasks': []}\n\nCITEULIKE_GROUP = 19073\nBIBFILE = 'docs/pyfssa.bib'\n\n\ndef task_download_bib():\n \"\"\"Download bibliography from CiteULike group\"\"\"\n\n return {\n 'actions': [' '...
python
edit
1
1
isc
8c2db8786a0dd08c7ca039f491260f9407eb946c
andsor/pyfssa,andsor/pyfssa
dodo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.conf.urls import *\nfrom django.contrib.auth.decorators import user_passes_test\n\n\nfrom .forms import ProtocolForm, TopicFormSet\n\n\ndef can_add_protocols(user):\n return user.is_authen...
python
edit
3
4
mit
8e3b686b413af1340ba1641b65d237791704e117
Hackfmi/Diaphanum,Hackfmi/Diaphanum
protocols/views.py
rejected_duplicate
Near-duplicate of sample 15653
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n'''\nHubble Nova plugin for FreeBSD pkgng audit\n\n:maintainer: HubbleStack\n:maturity: 20160421\n:platform: FreeBSD\n:requires: SaltStack\n'''\nfrom __future__ import absolute_import\nimport logging\n\nlog = logg...
python
edit
3
5
apache-2.0
ead2f795480ae7e671c93550e55cf9e106b2f306
HubbleStack/Nova,avb76/Nova,SaltyCharles/Nova,cedwards/Nova
hubblestack_nova/pkgng_audit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nif __name__ == '__main__':\n from NeuroIO import NeuroIO\n from PreProcess import PreProcess\n from Cluster import Cluster\n\n neuroread = NeuroIO(r\"C:\\Users\\USERNAME\\Downloads\\Brainbow-demo.tif\")\n img_data = neuroread...
python
edit
2
0
apache-2.0
aee26ebb12ddcc410ad1b0eccf8fd740c6b9b39a
aluo-x/GRIDFIRE
demo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport sanic\n\nimport raven\nimport raven_aiohttp\nfrom raven.handlers.logging import SentryHandler\n\n\nclass SanicSentry:\n def __init__(self, app=None):\n self.app = None\n self.handler = None\n ...
python
edit
1
2
mit
47d329691e11ea332c17931ca40a822de788acfb
serathius/sanic-sentry
sanic_sentry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mock import patch\n\nfrom ...testcases import DustyIntegrationTestCase\nfrom ...fixtures import busybox_single_app_bundle_fixture\n\nclass TestSyncCLI(DustyIntegrationTestCase):\n def setUp(self):\n super(TestSyncCLI, self).s...
python
edit
1
2
mit
49645ca7f579e5499f21e2192d16f4eed1271e82
gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty
tests/integration/cli/sync_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom TSL2561 import TSL2561\nfrom MCP9808 import MCP9808\nimport time\n\ndef main():\n tsl = TSL2561(debug=0)\n mcp = MCP9808(debug=0)\n #tsl.set_gain(16)\n while True:\n full = tsl.read_full()\n ir = tsl.read_IR()...
python
edit
1
2
mit
a52c1669a843e8afcf629de819e8144d6832bc7b
liffiton/ATLeS,liffiton/ATLeS,liffiton/ATLeS,liffiton/ATLeS
sensors_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom thinglang.lexer.symbols import LexicalGroupEnd\nfrom thinglang.lexer.symbols.base import LexicalIdentifier\nfrom thinglang.lexer.symbols.functions import LexicalDeclarationConstructor\nfrom thinglang.parser.tokens import DefinitionPair...
python
edit
3
3
mit
2643562c03f057d91a325492e4561ce7676dc6b6
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/tokens/classes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nfrom .tokenizer_exceptions import TOKENIZER_EXCEPTIONS\nfrom .norm_exceptions import NORM_EXCEPTIONS\nfrom .stop_words import STOP_WORDS\nfrom .lex_attrs import LEX_ATTRS\nfrom .mor...
python
edit
1
0
mit
d86b537a3820b23d66b5a8d52d15ae5d11c2b34b
explosion/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spa...
spacy/lang/da/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom example import app\n\n\napp.debug = False\n\nSECRET_KEY = 'random-secret-key'\nSESSION_COOKIE_NAME = 'psa_session'\nDEBUG = False\nSQLALCHEMY_DATABASE_URI = 'sqlite:///test.db'\nDEBUG_TB_INTERCEPT_REDIRECTS = False\nSESSION_PROTECTION ...
python
edit
1
0
bsd-3-clause
62ea03ce0de1a0ddc0879416a93ebc82ec30ecdd
henocdz/python-social-auth,iruga090/python-social-auth,muhammad-ammar/python-social-auth,nirmalvp/python-social-auth,merutak/python-social-auth,barseghyanartur/python-social-auth,alrusdi/python-social-auth,mrwags/python-social-auth,msampathkumar/python-social-auth,cjltsod/python-social-auth,mrwags/python-social-auth,cm...
examples/flask_example/example/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\n'''\ndata_dir = os.path.join(\n os.path.split(\n os.path.split(os.path.dirname(__file__))[0])[0], 'data')\n'''\ndata_dir = os.path.join(os.environ['PORTER'], 'data')\n\n\ndef read_and_parse_json(data_type...
python
edit
1
2
mit
2a9406968552de04c5b3fdd5796dc3693af08a07
Tactique/game_engine,Tactique/game_engine
src/engine/file_loader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport salt.exceptions\nimport subprocess\n\ndef build_site(name, output=\"/srv/www\"):\n # /srv/salt/_states/pelican.py\n # Generates static site with pelican -o $output $name\n # Sorry.\n # -- Jadon Bennett, 2015\n\n ret = ...
python
edit
8
2
mit
0c593e993cb8fb4ea6b3031454ac359efa6aaf5c
lvl1/salt-formulas
states-pelican.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add new exception for malformed captions" }, { "role": "assistant", "content": "\n\nclass MalformedFileError(Exception):\n \"\"\"Error raised when the file is not well formatted\"\"\"\n\n\nclass MalformedCaptionError(Exception...
python
new_file
1
0
mit
4530325e460d38086201573d85a9ae95fc877a4c
glut23/webvtt-py,sampattuzzi/webvtt-py
webvtt/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport luigi\nimport sciluigi as sl\nimport os\n\nTESTFILE_PATH = '/tmp/test.out'\n\nclass TestTask(sl.Task):\n\n def out_data(self):\n return sl.TargetInfo(self, TESTFILE_PATH)\n\n def run(self):\n with self.out_data()....
python
edit
1
1
mit
7d9c4a9f173b856e92e5586d1b961d876fb212a4
pharmbio/sciluigi,pharmbio/sciluigi,samuell/sciluigi
test/dependencies_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom apscheduler.schedulers.blocking import BlockingScheduler\nimport logging\nimport warner\nimport archiver\nimport announcer\nimport flagger\nimport os\n\nlogging.basicConfig()\nsched = BlockingScheduler()\n\n@sched.scheduled_job(\"cron\...
python
edit
1
3
apache-2.0
321258a01b735d432fcc103e17c7eb3031c6153f
randsleadershipslack/destalinator,TheConnMan/destalinator,royrapoport/destalinator,underarmour/destalinator,royrapoport/destalinator,TheConnMan/destalinator,randsleadershipslack/destalinator
scheduler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport pytest\nfrom steamfiles import acf\n\ntest_file_name = 'tests/test_data/appmanifest_202970.acf'\n\n\n@pytest.yield_fixture\ndef acf_data():\n with open(test_file_name, 'rt') as f:\n yield f.read()\n\n\n@pytest.ma...
python
edit
1
1
mit
a7e1b1961d14306f16c97e66982f4aef5b203e0a
leovp/steamfiles
tests/test_acf.py
rejected_duplicate
Near-duplicate of sample 14654
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\"\"\"\n\nimport os\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\n\n\nSECRET_KEY = 'hrzeqwz0@nps2#ns3_qkqz*#5=)1bxcdwa*h__hta0f1bqr2e!'\nDEBUG = True\nTEMPLATE_DEBUG = True\nALLOWED_HOSTS = []\n\nTEMPLATE_DIRS = (\"tests/t...
python
edit
1
0
mit
da281daf8f83b745dd128b0270dd26d80c952b9e
alisaifee/djlimiter,alisaifee/djlimiter
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom test_project.settings import *\n\nDATABASES['mongo'] = {\n 'ENGINE' : 'django_mongodb_engine',\n 'NAME' : 'mutant',\n 'OPTIONS': {\n 'OPERATIONS': {\n 'save' : {'safe' : True},\n }\n }\n}\n\nSOUTH_DATABASE_ADAPTERS = {...
python
edit
6
0
mit
6eff3cc2fba257e685dadbb19dda8aa667cb799c
charettes/django-mutant
tests/mongodb_settings.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ConfigParser\nConfig = ConfigParser.ConfigParser()\n\nimport os\nprint os.getcwd()\ntry:\n Config.read('/opt/monstr/current.cfg')\nexcept Exception as e:\n print 'WARNING! Configuration is missing. Using test_conf.cfg'\n Con...
python
edit
3
3
apache-2.0
96469afbd9d01b0e4f43e93a0edfd3dc84bfa2f3
tier-one-monitoring/monstr,tier-one-monitoring/monstr
Monstr/Core/Config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\n\n\n_undefined = object()\n\n\ndef validator(f):\n @functools.wraps(f)\n def wrapper(value=_undefined, **kwargs):\n required = kwargs.pop('required', True)\n\n def validate(value_):\n if valu...
python
edit
1
3
apache-2.0
7f109dc3e5b1d7ecacc6810aaee456359c70ad40
JOIVY/validation
validation/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\r\n SmartAPI Web Server Entry Point\r\n\r\n > python index.py\r\n\r\n\"\"\"\r\n\r\nimport os.path\r\n\r\nfrom tornado.ioloop import IOLoop, PeriodicCallback\r\nfrom utils.api_monitor import update_uptime_status\r\nfrom util...
python
edit
1
2
mit
77dbd2dc061e70a414dcd509a79bdb54491274aa
Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI
src/index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDatabase Emulator for the teammetrics project\nTemporarily the data is generated by accessing data available at http://blend.debian.org/liststats\n\n\"\"\"\nimport urllib2\nimport logging\n\ndef extractMetrics(team, metric):\n\t\"\"...
python
edit
3
4
mit
cee60151acf606a4e22a92c51066b7fb720f35a3
swvist/debmetrics,swvist/debmetrics
application/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\n\"\"\"kcm.\n\nUsage:\n kcm (-h | --help)\n kcm --version\n kcm (init | describe | reconcile) [--conf-dir=<dir>]\n kcm isolate [--conf-dir=<dir>] --pool=<pool> <command> [-- <args> ...]\n\nOptions:\n -h --help...
python
edit
1
3
apache-2.0
5c6f6b63450651b2860e960a4fb16c787537d3ed
Intel-Corp/CPU-Manager-for-Kubernetes,Intel-Corp/CPU-Manager-for-Kubernetes,Intel-Corp/CPU-Manager-for-Kubernetes
kcm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.\n#\n\nimport subprocess\n\n\nclass CassandraManager(object):\n def __init__(self, cassandra_repair_logdir):\n self.cassandra_repair_logdir = cassandra_repair_logd...
python
edit
1
1
apache-2.0
612810cd1acbffe925a74e005e766b09349d2606
eonpatapon/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-...
src/nodemgr/database_nodemgr/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nimport random\nimport string\nimport sys\n\ndef main():\n # Set defaults\n default_length = 10\n default_seed = None\n default_population = string.ascii_letters + string.digits + '!%+=....
python
edit
1
2
unlicense
7ef287f2bb7a783146d5360eb9729aa4e273f7d9
sloede/passgen
passgen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom PIL import ImageDraw\n\n\ndef render(animation, out, scale=8):\n images = [render_frame(colors, scale=scale) for colors in animation]\n save_gif(out, *images)\n\ndef render_frame(colors, scale=8):\n led_count ...
python
edit
1
2
apache-2.0
5c7b33574550d37454b4362fa0896a4dad6e98d1
gnoack/aesthetic
aesthetic/output/gif.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 The Swarming Authors. All rights reserved.\n# Use of this source code is governed by the Apache v2.0 license that can be\n# found in the LICENSE file.\n\n\"\"\"Helper functions for working with the Machine Provider.\"\"\"\n...
python
edit
1
1
apache-2.0
cb0c7ba021a3896e7ad726178bc686775829de34
luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py
appengine/components/components/machine_provider/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nfrom operator import itemgetter\n\nimport monoidal_tables as mt\nfrom monoidal_tables import renderers\n\n\nif __name__ == '__main__':\n table = (mt.integer('X', itemget...
python
edit
1
0
bsd-3-clause
4fe55df3bb668a2eafdb65a3a31ad27ffa5dc3c2
lubomir/monoidal-tables
pytable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom telegrambot.bot_views.generic.responses import TextResponse, KeyboardResponse\nfrom telegram import ParseMode\nimport sys\nimport traceback\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass TemplateCommandView(object):...
python
edit
1
4
bsd-3-clause
85feafe002dfdce67cc4b29125f656e55867d088
jlmadurga/django-telegram-bot,jlmadurga/django-telegram-bot
telegrambot/bot_views/generic/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\nfrom breach.models import Target\n\n\nclass TargetForm(ModelForm):\n class Meta:\n model = Target\n fields = (\n 'name',\n 'endpoint',\n 'prefix',\n ...
python
edit
1
0
mit
444e1951950e77f2b0e35d2921026bcadff6881b
dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,esara...
backend/breach/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\nfrom breach.models import Target, Victim\n\n\nclass TargetForm(ModelForm):\n class Meta:\n model = Target\n fields = (\n 'name',\n 'endpoint',\n 'prefix',...
python
edit
1
0
mit
fe2ce4e21530daffacbd654790a161019dd2de83
dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dionyziz/rupture,dim...
backend/breach/forms.py
rejected_duplicate
Near-duplicate of sample 19871
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport blinkycolor\nimport serial\n\nclass BlinkyTape(object):\n def __init__(self, port, baud_rate = 115200, pixel_count = 60):\n self._serial = serial.Serial(port, baud_rate)\n self._pixel_count = pixel_count\n sel...
python
edit
1
2
mit
d4398d068d4fdf6364869cd01237f53438e2674c
jonspeicher/blinkyfun
blinkylib/blinkytape.py
rejected_duplicate
Near-duplicate of sample 656
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..hub_proxy import SAMPHubProxy\nfrom ..hub import SAMPHubServer\nfrom ..client import SAMPClient\n\n\nclass TestHubProxy(object):\n\n def setup_method(self, method):\n\n self.hub = SAMPHubServer(web_profile=False)\n s...
python
edit
3
3
bsd-3-clause
800ffecbed76f306806642546ed949153c8414c3
saimn/astropy,DougBurke/astropy,joergdietrich/astropy,AustereCuriosity/astropy,lpsinger/astropy,lpsinger/astropy,tbabej/astropy,kelle/astropy,tbabej/astropy,mhvk/astropy,kelle/astropy,dhomeier/astropy,larrybradley/astropy,DougBurke/astropy,larrybradley/astropy,joergdietrich/astropy,dhomeier/astropy,stargaser/astropy,as...
astropy/vo/samp/tests/test_hub_proxy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\n\n\nclass IoHandler(object):\n def __init__(self, in_out_pairs, read_all):\n self._handlers = [\n OutputHandler(file_in, file_out)\n for file_in, file_out\n in in_out_pairs\n ...
python
edit
1
4
bsd-2-clause
5723dbbf2dbebf349c61a00ee4ea665b4009bd18
mwilliamson/spur.py
spur/io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.util.jobqueue\n~~~~~~~~~~~~~~~~~~~~\n\nAn asynchronously processed job queue based on Redis_ and RQ_.\n\n.. _Redis: http://redis.io/\n.. _RQ: http://python-rq.org/\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: M...
python
edit
1
1
bsd-3-clause
9a5aee262b5a89e5a22e9e1390e23898a5373627
homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
byceps/util/jobqueue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urlparse\n\nimport celery\nimport requests\nfrom celery.utils.log import get_task_logger\nfrom django.conf import settings\n\nfrom framework.tasks import app as celery_app\nfrom framework.tasks.utils import logged\n\nlogger = get_tas...
python
edit
1
4
apache-2.0
41139b20b78550982ee8242c18e24ad81e2d13ae
emetsger/osf.io,Nesiehr/osf.io,wearpants/osf.io,amyshi188/osf.io,caseyrollins/osf.io,GageGaskins/osf.io,Nesiehr/osf.io,caneruguz/osf.io,brianjgeiger/osf.io,jnayak1/osf.io,CenterForOpenScience/osf.io,abought/osf.io,amyshi188/osf.io,CenterForOpenScience/osf.io,samchrisinger/osf.io,adlius/osf.io,sloria/osf.io,brandonPurvi...
api/caching/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport codecs\nfrom string import Template\n\nimport os\n\nimport networkx as nx\nfrom networkx.readwrite import json_graph\n\n\npath = os.path.dirname(os.path.abspath(__file__))\n\ndef create_network(data):\n\n G = nx.DiGraph()\n\n f...
python
edit
1
5
mit
4a125d2455e1c31043c66835c60cc0e55f9990e9
HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core
core/network.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pymongo import MongoClient\nimport json\nimport sys\nfrom emission.core.get_database import get_db, get_section_db\nfrom emission.tests import common\n\ndef purgeData(userName):\n Sections=get_section_db()\n common.purgeData(Sections...
python
edit
2
1
bsd-3-clause
97645cf2d1dec9b59f30a460de7f142d1f6bc01b
e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server
bin/purge_database_json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add table manger to handle and commit changes to the table" }, { "role": "assistant", "content": "from networktables import NetworkTables \n\nTABLE_NAME = 'ImageProc'\nDO_WORK_NAME = 'calculate'\nHORIZONTAL_DATA_NAME = 'horizonta...
python
new_file
1
2
mit
0bd7c3ff4bbfe6571dbb615c7bd625ab968bfd19
codeinvain/object_detection,codeinvain/object_detection
app/communication.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom http import server\nfrom socketserver import TCPServer\nimport os\n\n\nclass Server:\n def __init__(self, own_config, config, builder):\n self.directory = config.folders['output']\n self.port = own_config['port']\n ...
python
edit
1
2
mit
13b387af53edcce78f95adc2ad96e87bb6df75e6
cknv/beetle-preview
beetle_preview/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# test_update_language_list\n\nfrom __future__ import unicode_literals\n\nimport json\nimport os\nimport os.path\n\nimport nose.tools as nose\n\nimport yvs.shared as yvs\nimport utilities.add_language as add_lang\nfrom tests.test_add_langua...
python
edit
1
3
mit
8653f2c0e63fecd5617dfa063878c846ddafcf97
caleb531/youversion-suggest,caleb531/youversion-suggest
tests/test_add_language/test_update_language_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom .table import Column, Table, TableColumns, Row, MaskedColumn\nfrom .np_utils import TableMergeError\nfrom .operations import join, hstack, vstack\n\n# Import routines tha...
python
edit
16
0
bsd-3-clause
7805dbadd44c262223ae02d358aa251b4df5d0b0
bsipocz/astropy,StuartLittlefair/astropy,joergdietrich/astropy,saimn/astropy,stargaser/astropy,larrybradley/astropy,lpsinger/astropy,pllim/astropy,funbaker/astropy,mhvk/astropy,joergdietrich/astropy,AustereCuriosity/astropy,funbaker/astropy,pllim/astropy,larrybradley/astropy,mhvk/astropy,AustereCuriosity/astropy,pllim/...
astropy/table/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Copyright 2016 The Meson development team\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...
python
edit
1
5
apache-2.0
3f62fb788beea1ac32d514d549fdaeaaae0f3292
ernestask/meson,aaronp24/meson,rhd/meson,mesonbuild/meson,centricular/meson,mesonbuild/meson,wberrier/meson,rhd/meson,mesonbuild/meson,fmuellner/meson,trhd/meson,mesonbuild/meson,MathieuDuponchelle/meson,centricular/meson,centricular/meson,QuLogic/meson,jeandet/meson,trhd/meson,MathieuDuponchelle/meson,thiblahute/meson...
mesonbuild/scripts/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tadtool.tad as tad\nimport tadtool.plot as tp\n\n# load regions data set\nregions = tad.HicRegionFileReader().regions(\"chr12_20-35Mb_regions.bed\")\n\n# load matrix\nmatrix = tad.HicMatrixFileReader().matrix(\"chr12_20-35Mb.matrix.t...
python
edit
1
0
mit
a32270be3ef07fa4a8289374d779ec44f834834c
vaquerizaslab/tadtool
examples/chr12_plot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Version module.\n\n Allows to define the version number uniquely.\n\"\"\"\n\n__version__ = \"0.5dev\"\n\n```\n\nApply this change: Set the version number for the v0.5 release" }, { "role": "assistant", "content": "\"\"...
python
edit
1
0
bsd-3-clause
d8d38a24b6f6e12e2ee1a54d5a8900bd240aea18
alexis-mignon/python-flickr-api,bryndin/tornado-flickr-api,alexis-mignon/python-flickr-api
flickr_api/_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport traceback\nfrom functools import wraps\n\nfrom hokusai.lib.common import print_red, get_verbosity\nfrom hokusai.lib.exceptions import CalledProcessError, HokusaiError\nfrom hokusai.lib.config import config\n\nd...
python
edit
1
11
mit
a6955a9bc3471b74f801bb8b64c6e816dda7551a
izakp/hokusai
hokusai/lib/command.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom influxdb import InfluxDBClient\nfrom influxdb import SeriesHelper\n\nfrom . import config\n\n# expects Cozify devices type json data\ndef getMultisensorData(data):\n out = []\n for device in data:\n state=da...
python
edit
3
6
mit
357af01554cca6197d07a4a408c02921e70a14eb
Artanicus/python-cozify,Artanicus/python-cozify
cozify/multisensor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"antimarkdown.handlers -- Element handlers for converting HTML Elements/subtrees to Markdown text.\n\"\"\"\nfrom collections import deque\n\nfrom antimarkdown import nodes\n\n\ndef render(*domtrees):\n if no...
python
edit
2
5
mit
2f5095c7020a1b6906981e75491007ce72ec5aac
Crossway/antimarkdown,Crossway/antimarkdown
antimarkdown/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nSimple utility to display BSON files.\n\"\"\"\n\nimport sys\nimport errno\nfrom bson.json_util import dumps\nimport bson_lazy\n\nusage = '''\nUsage: %s FILE... [OPTIONS]\n\nOptions:\n --pretty Pretty print J...
python
edit
3
9
mit
3d943c113c244f4b285c2493004de48b754fd8d8
ShinNoNoir/bson_lazy
bin/bson2json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url, include\nimport djangae.contrib.mappers.urls\n\nurlpatterns = patterns('djangae.views',\n url(r'^start$', 'start'),\n url(r'^start$', 'stop'),\n url(r'^warmup$', 'warmup'),\n url(r'^qu...
python
edit
1
0
bsd-3-clause
ff716f1cf4b523e37e667b29693757a3f32b1cd5
grzes/djangae,kirberich/djangae,potatolondon/djangae,kirberich/djangae,kirberich/djangae,grzes/djangae,asendecka/djangae,asendecka/djangae,asendecka/djangae,potatolondon/djangae,grzes/djangae
djangae/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\nclass Database(dict):\n \"\"\"Holds a dict that contains all the information about the users in a channel\"\"\"\n def __init__(self, irc):\n super(Database, self).__init__(json.load(open(\"userdb.json\")))\n ...
python
edit
1
4
mit
b191a78d847167616dc38756c9fb450e5eb95c70
wolfy1339/Python-IRC-Bot
utils/database.py
rejected_duplicate
Near-duplicate of sample 4375
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nBase-classes for reconstruction models and reconstruction fits.\n\nAll the models in the reconst module follow the same template: a Model object\nis used to represent the abstract properties of the model, that are independent\nof ...
python
edit
1
1
bsd-3-clause
8f4d9c69f3f39fadda35329e22a378b6cdc1f829
FrancoisRheaultUS/dipy,nilgoyyou/dipy,nilgoyyou/dipy,FrancoisRheaultUS/dipy
dipy/reconst/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\n\nif __name__ == \"__main__\":\n input = sys.argv[1]\n output = sys.argv[2]\n processor = fix_changeline_budget_titles().process(input,output,[])\n\nclass fix_changeline_budget_titles(object):\n\n de...
python
edit
2
5
mit
cb20f8d81832aafb2ec6f70f135b0a027b14dc91
omerbartal/open-budget-data,omerbartal/open-budget-data,OpenBudget/open-budget-data,OpenBudget/open-budget-data
processors/fix_changeline_budget_titles.py
rejected_duplicate
Near-duplicate of sample 957
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom appconf import AppConf\nfrom django.conf import settings\n\n\nclass DjExperimentAppConf(AppConf):\n DATA_DIR = \"./\"\n SEPARATOR = \".\"\n OUTPUT_PREFIX = \"\"\n OUTPUT_SUFFIX = \".nc\"\n CELERY_BROKER_URL = 'amqp://gue...
python
edit
1
0
mit
2fc45a6a0e2ba1efe06b4282234cf13c0ccd5b7d
francbartoli/dj-experiment,francbartoli/dj-experiment
dj_experiment/conf.py
rejected_duplicate
Near-duplicate of sample 19520
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, send_file\napp = Flask(__name__)\n\n@app.route(\"/hello\")\ndef hello():\n return \"Hello World from Flask in a uWSGI Nginx Docker container with \\\n Python 3.6 (from the example template)\"\n\n@app.route(\"...
python
edit
2
2
apache-2.0
a1e786bdba7dcf688211e0039313bf63e572cfe2
tiangolo/uwsgi-nginx-flask-docker,tiangolo/uwsgi-nginx-flask-docker,tiangolo/uwsgi-nginx-flask-docker
example-flask-python3.6-index/app/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cupy\n\n\ndef as_strided(x, shape=None, strides=None):\n \"\"\"\n Create a view into the array with the given shape and strides.\n .. warning:: This function has to be used with extreme care, see notes.\n\n Parameters\n ...
python
edit
1
3
mit
5965b991bade7c75b3be5db32db791bbc1cf04b7
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
cupy/lib/stride_tricks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sklearn.cross_validation as cv\nfrom sklearn import tree\nimport pandas as py\nimport numpy as np\n\n\n```\n\nApply this change: Add parsing to enable vectors" }, { "role": "assistant", "content": "import sklearn.cross_va...
python
edit
5
5
mit
9473dec555f59a8f70bfd70bd6568bbcb8827f78
peixian/Ultralisk,peixian/Ultralisk,peixian/Ultralisk
glaive/glaive.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (c) 2012, Jeroen Hoekx <<EMAIL>>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundat...
python
edit
1
1
mit
8cf268441e82da0348020bee344d8728a9f41ea8
thaim/ansible,thaim/ansible
lib/ansible/runner/filter_plugins/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render, get_object_or_404\nfrom django.http import HttpResponse, Http404\nfrom polls.models import Question\n\n# Create your views here.\n\ndef index(request):\n latest_question_list = Question.objects.order_...
python
edit
1
2
mit
b5e6952841d19e75b308fb2ab16ca5b098d376a9
domenicosolazzo/practice-django,domenicosolazzo/practice-django,domenicosolazzo/practice-django
django-tutorial/tutorial/polls/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom mitmproxy import ctx\n\n# TODO authenticate user\ndef getUser(flow):\n if 'proxyauth' in flow.metadata: # TODO and user != None\n return flow.metadata['proxyauth'][0]\n else:\n retur...
python
edit
3
2
mit
dbbbb844f80e73f5743bd2d213e21e44937c1870
laurmurclar/mitmproxy,laurmurclar/mitmproxy,laurmurclar/mitmproxy,laurmurclar/mitmproxy
scripts/set_headers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Public/Private\nXERO_BASE_URL = \"https://api.xero.com\"\nREQUEST_TOKEN_URL = \"%s/oauth/RequestToken\" % XERO_BASE_URL\nAUTHORIZE_URL = \"%s/oauth/Authorize\" % XERO_BASE_URL\nACCESS_TOKEN_URL = \"%s/oauth/AccessToken\" % XERO_BASE_URL\n...
python
edit
1
0
bsd-3-clause
ceea28b5f07d43644bbefacb39bd1f2b40297e36
skillflip/pyxero
xero/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
4c3f483ad0c3f119b9c3bb7b2b8b28680c48da3f
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nProperty class\n\"\"\"\n\nclass Property(object):\n \"\"\"\n a monopoly property that items on the\n board can inherit from\n \"\"\"\n def __init__(self):\n pass\n\n```\n\nApply this change: Add some basic tran...
python
edit
3
1
mit
3ebb80476553e8228c6709a3e6ff75ea42fff586
markthethomas/monopoly
properties/property.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom fortiosapi import FortiOSAPI\nimport sys\nimport os\nimport pprint\nimport json\nimport pexpect\nimport yaml\nimport logging\nfrom packaging.version import Version\nformatter = logging.Formatter(\n '%(asctime)...
python
edit
1
1
apache-2.0
7b75e27e36ec20793732b51693ecb57026fa75be
thomnico/fortiosapi,thomnico/fortiosapi,thomnico/fortigateconf
examples/testlogin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.shortcuts import render_to_response, get_object_or_404\n\nfrom django.views.generic.detail import DetailView\nfrom django.views.generic.edit import CreateView\nfrom django.views.generic.list import Lis...
python
edit
1
2
mit
90f2c22a9243855546c8689c5773be837e05aa47
sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa
core/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"Utilities for building responsive websites in Django.\"\nfrom __future__ import unicode_literals\n\n\n__version__ = '0.2.0'\n\n```\n\nApply this change: Update development status on master." }, { "role": "assistant", "content"...
python
edit
1
0
bsd-2-clause
cd9bb30b68c491d2d8caf72d47e6b8c9f9a82a45
mlavin/django-responsive,mlavin/django-responsive,mlavin/django-responsive
responsive/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom collections import OrderedDict\nfrom egpackager.datasources import GspreadDataSource\n\n\nclass DataManager(object):\n\n def __init__(self, debug=False):\n # Set up logging\n if debug:\n lo...
python
edit
1
4
mit
430da89ec87a9ed862a4aa86e3de7672a07a313d
VUEG/egpackager
egpackager/datamanager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport argparse\nimport sys\n\nimport subprocess2\...
python
edit
3
5
bsd-3-clause
8dbea15b789227d55972512307feb8f40f5d11a1
svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools
git_upstream_diff.py
rejected_duplicate
Near-duplicate of sample 14819
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"\n\nThis script extracts the top module cells and their corresponding parameters\nfrom json files produced by Yosys.\nThe return code of this script is used to check if the output is equivalent.\n\"\"\"\n\nimpo...
python
edit
3
5
apache-2.0
1d6670165dd74084813b38032cfddb6d33cd9d7a
SymbiFlow/yosys-f4pga-plugins,SymbiFlow/yosys-f4pga-plugins,chipsalliance/yosys-f4pga-plugins,SymbiFlow/yosys-f4pga-plugins,chipsalliance/yosys-f4pga-plugins,SymbiFlow/yosys-symbiflow-plugins,antmicro/yosys-symbiflow-plugins,antmicro/yosys-symbiflow-plugins,SymbiFlow/yosys-symbiflow-plugins,antmicro/yosys-symbiflow-plu...
xdc-plugin/tests/compare_output_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion_info = (0, 20, 0)\n__version__ = '.'.join(map(str, version_info))\n\ntry:\n from . import greenthread\n from . import greenpool\n from . import queue\n from . import timeout\n from . import patcher\n from . import ...
python
edit
21
0
mit
2367a5454660ffec6b4bab11939edc52197be791
veegee/guv,veegee/guv
guv/__init__.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sms_generator\nimport sms_twilio\nimport db\nimport config\n\n\ndef broadcast_procedure(procedure, location, duration, doctor):\n message = sms_generator.new_procedure_message(procedure, location, duration, doctor)\n\n recipien...
python
edit
1
3
mit
26f08f0f3275c352351f27a36674b65c6e6d171f
nhshd-slot/SLOT,bsharif/SLOT,bsharif/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT,bsharif/SLOT
messaging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import ListView, DetailView\n\nfrom .models import Post\n\n\nclass PostListView(ListView):\n context_object_name = 'posts'\n model = Post\n template_name = 'hermes/post_list.html'\n \n def get_querys...
python
edit
1
2
mit
9c396e6f75bac114068421740b7faedbe3915966
emilian/django-hermes
hermes/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom textwrap import dedent\nimport warnings\n\n# Statsmodels is slow to fix upstream future warnings\n# This module is imported before the stats module so\n# so any FutureWarnings with the imports are suppressed\nwarnings.filterwarnings(\n...
python
edit
1
2
mit
c21bea6d80287d7c42b3634a7612e4e8cbc419be
has2k1/plotnine,has2k1/plotnine
plotnine/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport parler.appsettings\nfrom parler.utils.conf import add_default_language_settings\n\nfrom bluebottle.clients import properties\n\nappsettings = parler.appsettings\n\n\nclass TenantAwareParlerAppsettings(object):\n @property\n def...
python
edit
1
3
bsd-3-clause
c58322ba39708ac7bb6d48eacbb5e1011c676b8f
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/utils/monkey_patch_parler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom devilry.devilry_authenticate.views import CustomLoginView\nfrom django.conf.urls import url\n\nfrom django_cradmin.apps.cradmin_authenticate.views import logout\n\nurlpatterns = [\n url(r'^login$', CustomLoginView.as_view(), name='c...
python
edit
1
0
bsd-3-clause
406abe34d82aeb7d72d7f4dc96d44d57807f928b
devilry/devilry-django,devilry/devilry-django,devilry/devilry-django,devilry/devilry-django
devilry/devilry_authenticate/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n\"\"\"\nthis backend requires the twilio python library: http://pypi.python.org/pypi/twilio/\n\"\"\"\nfrom twilio.rest import TwilioRestClient\nfrom django.conf import settings\nfrom sendsms.backends.base import Base...
python
edit
3
5
mit
09d3ba64bfdb9d8d9a46e12ab9770e4a5f86ea20
stefanfoulis/django-sendsms
sendsms/backends/twiliorest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom .common import TestCase\nfrom h5py import File\n\n\nclass TestException(Exception):\n pass\n\ndef throwing(name, obj):\n print(name, obj)\n raise TestException(\"throwing exception\")\n\nclass TestVisit(TestCa...
python
edit
1
1
bsd-3-clause
70d7058e5a45699082dc5a834e462f70ebe30345
h5py/h5py,h5py/h5py,h5py/h5py
h5py/tests/test_h5o.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom redis import Redis\nimport os\n\nhitcounter = Flask(__name__)\nredis = Redis(host='redis', port=6379)\nwho = os.getenv('WHO', 'World')\n\n@hitcounter.route('/')\ndef hello():\n redis.incr('hits')\n return...
python
edit
1
1
bsd-2-clause
d39066a1de376e0c824510592c1e5e0c5edc46a3
kkonstan/hitcounter
hitcounter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Intel Corp.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/...
python
edit
1
2
apache-2.0
aa867937c1e9842bd58c4006d4497589132a5c92
cwolferh/heat-scratch,noironetworks/heat,openstack/heat,steveb/heat,steveb/heat,dims/heat,jasondunsmore/heat,jasondunsmore/heat,cwolferh/heat-scratch,openstack/heat,dims/heat,noironetworks/heat
heat/objects/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import NewsletterSubscription\n\n\nadmin.site.register(NewsletterSubscription,\n list_display=('email', 'is_active', 'confirmed_on', 'unsubscribed_on'),\n list_filter=('is_active',),\n ...
python
edit
1
0
bsd-3-clause
c7ac2b1805bd82bdeef3227fc34149431c161df7
guetux/django-yesimeanit
yesimeanit/showoff/newsletter_subscriptions/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom honeybadger import honeybadger\n\nclass DjangoHoneybadgerMiddleware(object):\n def __init__(self):\n from django.conf import settings\n config_kwargs = dict([(k.lower(), v) for k, v in getattr(settings, 'HONEYBADGER', ...
python
edit
3
3
mit
9a85df62fa7023a5e8155639a118fd4823895ae3
honeybadger-io/honeybadger-python,honeybadger-io/honeybadger-python
honeybadger/middleware.py
accepted
null
true