messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n...
python
edit
1
2
mit
7895b0a39694e88ed1bdd425c69fb747b7531c59
indico/indico,ThiefMaster/indico,indico/indico,OmeGak/indico,ThiefMaster/indico,OmeGak/indico,mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,mvidalgarcia/indico,OmeGak/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,mic4ael/indico,ind...
indico/testing/mocks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .base import FunctionalTestCase\nfrom .pages import game\n\nclass HomePageTest(FunctionalTestCase):\n def test_create_game(self):\n # Alice is a user who visits the website\n self.browser.get(s...
python
edit
1
1
mit
06b6b2fa0d8f7d8e4ef35068c3aa32cd39ac04c3
XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant
accountant/functional_tests/test_homepage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__author__ = 'Raphael Pierzina'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\nfrom .jinja2_time import TimeExtension\n\n__all__ = ['TimeExtension']\n\n```\n\nApply this change: Fix flake8 issue in init" }, ...
python
edit
1
0
mit
d0b56873b40acd3932f450293c363b01b5a709b9
hackebrot/jinja2-time
jinja2_time/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyQuantuccia import quantuccia\n\n\ndef test_get_holiday_date():\n \"\"\" At the moment the only thing this function\n can do is return NULL.\n \"\"\"\n assert(quantuccia.get_holiday_date() is None)\n\n```\n\nApply this...
python
edit
1
1
bsd-3-clause
2872d4f34dbcfe4b212ca7c72a7b9ec725cfcc20
jwg4/pyQuantuccia,jwg4/pyQuantuccia
pyQuantuccia/tests/test_get_holiday_date.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy\nimport Adafruit_BBIO.GPIO as GPIO\nfrom vortex_msgs.msg import CameraFeedSelection\n\nPIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0')\nPIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1')\nP...
python
edit
null
null
mit
bd5223af36fc167ce48bfa5c97f8a3fd79a7995a
vortexntnu/rov-control,vortexntnu/rov-control,vortexntnu/rov-control
camera_selection/scripts/camera_selection.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom os.path import abspath\nfrom os.path import dirname\nfrom flask import Flask, request\nimport yaml\nimport utils.config\nfrom services import find_services\nfrom comms import find_and_load_comms\...
python
edit
3
1
apache-2.0
024ddea9e3dc5ab2702b08c860e6df8702b3e5e8
brantje/captain_hook,brantje/telegram-github-bot,brantje/telegram-github-bot,brantje/captain_hook,brantje/telegram-github-bot,brantje/captain_hook
captain_hook/endpoint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n Interface to some libcrypto functions\n\n\"\"\"\n\n\nfrom ctypes import CDLL, c_char_p\n\ndef config(filename=None):\n \"\"\"\n Loads OpenSSL Config file. If none are specified, loads default\n (compiled in) one...
python
edit
1
1
mit
336fbbd82a09469a7ac7d0eb850daa6a55f42669
vbwagner/ctypescrypto
ctypescrypto/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''Implementation of a simple hash table.\nThe table has `hash`, `get` and `set` methods.\nThe hash function uses a very basic hash algorithm to insert the value\ninto the table.\n'''\n\n\nclass HashItem(object):\n ...
python
edit
1
2
mit
7e5221a65bd644cc86003f67daa3148f22b4a530
jwarren116/data-structures-deux
hash_table.py
rejected_duplicate
Near-duplicate of sample 15555
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pythonosc.osc_server import AsyncIOOSCUDPServer\nfrom pythonosc.dispatcher import Dispatcher\nimport asyncio\n\n\ndef filter_handler(address, *args):\n print(f\"{address}: {args}\")\n\n\ndispatcher = Dispatcher()\ndispatcher.map(\"/...
python
edit
1
2
unlicense
6612978356a9b40e3a4b663c61b8e5ab96316623
attwad/python-osc
examples/async_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom SublimeLinter.lint import Linter, util\n\n\nclass Cppcheck(Linter):\n cmd = (\n 'cppcheck',\n '--template={file}:{line}: {severity}: {message}',\n '--inline-suppr',\n '--quiet',\n '${args}',\n ...
python
edit
1
3
mit
a3ee55cf4d9182247dcc7a42b0336c467dce9e3e
SublimeLinter/SublimeLinter-cppcheck
linter.py
rejected_duplicate
Near-duplicate of sample 19761
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.cache import cache\n\nfrom .models import PodcastProvider\nfrom .remote.interface import PodcastDetails\nfrom .remote.timbre import fetch_podcasts, fetch_podcast\n\n__all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'...
python
edit
1
2
mit
694651b5c143e4ce1fd3de25500909c1a16faf95
urfonline/api,urfonline/api,urfonline/api
api/podcasts/controller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport logging\n\nfrom create_dataset import *\n\nif __name__ == '__main__':\n logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO)\n parser = argparse.Argument...
python
edit
3
0
mit
709e1562e61110ba94ae7581952bc5233ee1035e
CorcovadoMing/DataLoader,CorcovadoMing/DataLoader
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\nimport Tool\r\nimport time\r\nfrom Tieba import Tieba\r\n\r\n\r\ndef main():\r\n print(\"Local Time:\", time.asctime(time.localtime()))\r\n # Read Cookies\r\n cookies = Tool.load...
python
edit
1
4
apache-2.0
6d03be0c21ac21e9d5ed826c5fe4991fa01743cb
jiangzc/TiebaSign
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms.widgets import Media\nfrom django.utils.encoding import smart_unicode\nfrom django.conf import settings\nfrom cms.middleware.toolbar import HTML_TYPES\n\ndef inster_before_tag(string, tag, insertion):\n no_case = string...
python
edit
1
5
bsd-3-clause
65ede498c28dc37b96bc1a2d435f5714c9a4eb1e
sephii/django-cms,mkoistinen/django-cms,cyberintruder/django-cms,andyzsf/django-cms,isotoma/django-cms,takeshineshiro/django-cms,SachaMPS/django-cms,sznekol/django-cms,pbs/django-cms,chkir/django-cms,stefanw/django-cms,vad/django-cms,ScholzVolkmer/django-cms,webu/django-cms,VillageAlliance/django-cms,intip/django-cms,c...
cms/middleware/media.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-\n# ex: set expandtab softtabstop=4 shiftwidth=4:\n#\n# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# ...
python
edit
1
0
apache-2.0
92d2ff8a16b7419123a848f98ec8594694c5203a
stdweird/aquilon,quattor/aquilon,stdweird/aquilon,stdweird/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon
lib/python2.6/aquilon/client/depends.py
rejected_duplicate
Near-duplicate of sample 633
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport shutil\nimport sys\nimport traceback\n\nbuiltin_cmds = {'cd', 'pwd', 'exit',}\n\ndef prompt():\n print('%s $ ' % os.getcwd(), end='', flush=True)\n\ndef read_command():\n return sys.stdin.re...
python
edit
1
5
mit
1923fdf26f2df092a52318dfcc91825fa10fac40
mmichie/mesh
mesh.py
rejected_duplicate
Near-duplicate of sample 14646
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_support import verify,verbose\nimport imaplib\nimport time\n\n# We can check only that it successfully produces a result,\n# not the correctness of the result itself, since the result\n# depends on the timezone the machine is in.\...
python
edit
1
0
mit
daac5f26c07045ad162a481d035359dd17227c91
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_imaplib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport math\n\nfrom geometry_msgs.msg import Point\n\n\nclass NegativeTimeException(Exception):\n pass\n\nclass Trajectory:\n def __init__(self):\n self.position = Point()\n\n def get_position_at(self,...
python
edit
3
2
mit
9dc068f947cbd5ca29b324436496d2d78f55edf7
bit0001/trajectory_tracking,bit0001/trajectory_tracking
src/trajectory/trajectory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .builder import JenkinsBuilder\n\n\nclass JenkinsGenericBuilder(JenkinsBuilder):\n def __init__(self, *args, **kwargs):\n self.script = kwargs.pop('script')\n self.cluster = kwargs.pop('cluster')\n super(Jenkins...
python
edit
1
3
apache-2.0
6dd523e0d92c39f1a3e4c9be2dac0442535bb88f
wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes
changes/backends/jenkins/generic_builder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport openpnm as op\n\n\nclass GenericGeometryTest:\n\n def setup_class(self):\n self.net = op.network.Cubic(shape=[3, 3, 3])\n self.geo = op.geometry.StickAndBall(network=self.net,\n ...
python
edit
1
1
mit
b5cab8fe05899891e4508cb686d40d88e3c5b955
PMEAL/OpenPNM
tests/unit/geometry/GenericGeometryTest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom doitpy.pyflakes import Pyflakes\n\n\nDOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']}\n\n\ndef task_pyflakes():\n yield Pyflakes().tasks('*.py')\n\ndef task_test():\n return {\n 'actions': ['py.test'],\n ...
python
edit
1
1
mit
cc04dc53dd992b14b2f56f50f3efbfde83d5154d
schettino72/configclass
dodo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pycket.expand import load_json_ast_rpython\nfrom pycket.interpreter import interpret_one\nfrom pycket.error import SchemeException\n\nfrom rpython.rlib import jit\n\ndef main(argv):\n jit.set_param(None, \"trace_limit\", 20000)\n ...
python
edit
6
5
mit
7b6c3b4af18746ad02169a93270fc13579c60829
pycket/pycket,pycket/pycket,samth/pycket,krono/pycket,samth/pycket,vishesh/pycket,samth/pycket,magnusmorton/pycket,pycket/pycket,krono/pycket,magnusmorton/pycket,magnusmorton/pycket,krono/pycket,cderici/pycket,cderici/pycket,vishesh/pycket,vishesh/pycket,cderici/pycket
pycket/targetpycket.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\n\nfrom datetime import datetime\n\nfrom dateutil.tz import UTC\n\nfrom event_manager.event import Attribute\nfrom tests.utils import BaseTest\n\n\nclass TestAttribute(BaseTest):\n def test_props(self):\n attr = Attrib...
python
edit
1
1
apache-2.0
ad73c91d4e2b2d5faed35420a1393d016af84e40
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
tests/test_event_manager/test_attribute.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom django.test import SimpleTestCase\nfrom guardian.compat import get_user_model\nfrom guardian.compat import mock\nfrom guardian.management import create_...
python
edit
1
1
bsd-2-clause
64db9a503322ce1ee61c64afbdc38f367c3d6627
calvinpy/django-guardian,vovanbo/django-guardian,loop0/django-guardian,frwickst/django-guardian,thedrow/django-guardian,emperorcezar/django-guardian,alexshin/django-guardian,calvinpy/django-guardian,flisky/django-guardian,vitan/django-guardian,sustainingtechnologies/django-guardian,rfleschenberg/django-guardian,frwicks...
guardian/testapp/tests/management_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Utility functions\n\"\"\"\nimport random\nimport time\nfrom . import constants\n\ndef _service_url_from_hostport(secure, host, port):\n \"\"\"\n Create an appropriate service URL given the parameters.\n\n `secure` should be ...
python
edit
2
4
mit
8a509fd2b6bfa5114986df5548132ab41eefff13
lightstephq/lightstep-tracer-python
lightstep/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\n\n# Create Flask application\napp = Flask(__name__)\n\n@app.route('/inventory')\ndef index():\n \"\"\" Intro page of the inventory API\n\n This method will only return some welcome words.\n\n Returns:\n respon...
python
edit
1
1
mit
6129a57ab8b7de1a4189706a966b32174182c086
devops-foxtrot-s17/inventory,devops-foxtrot-s17/inventory
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass AdminProfile(models.Model):\n\n user = models.OneToOneField('osf.OSFUser', related_name='admin_profile')\n\n desk_token = models.CharField(max_length=45, blank=True)\n desk_token_secret = mod...
python
edit
1
0
apache-2.0
eaa85b0fe69e4ff020cd269007fa1a5c7f864b53
mattclark/osf.io,crcresearch/osf.io,acshi/osf.io,HalcyonChimera/osf.io,Nesiehr/osf.io,caneruguz/osf.io,binoculars/osf.io,caneruguz/osf.io,cslzchen/osf.io,felliott/osf.io,crcresearch/osf.io,hmoco/osf.io,baylee-d/osf.io,caseyrollins/osf.io,acshi/osf.io,leb2dg/osf.io,erinspace/osf.io,Johnetordoff/osf.io,chennan47/osf.io,s...
admin/common_auth/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\nfrom nose2.tests._common import FunctionalTestCase\n\n\nclass TestCoverage(FunctionalTestCase):\n def test_run(self):\n proc = self.runIn(\n 'scenario/test_with_module',\n '-v',\n ...
python
edit
1
1
bsd-2-clause
275c39faa02dc0bd4f8b9d9bd2a012eaee12a338
ojengwa/nose2,ptthiem/nose2,ptthiem/nose2,little-dude/nose2,ojengwa/nose2,little-dude/nose2
nose2/tests/functional/test_coverage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.conf import settings\nfrom django.contrib import admin\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n (r'^admin/', include(admin.site.urls)),\n url(r'^admin_tools/', includ...
python
edit
1
0
mit
cc3b82a943baf42f78b131d3218ad5eb748a11ce
husbas/django-admin-tools,husbas/django-admin-tools,husbas/django-admin-tools
test_proj/urls.py
rejected_duplicate
Near-duplicate of sample 14408
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom migrate.versioning.shell import main\n\nif __name__ == '__main__':\n main(debug='False')\n\n```\n\nApply this change: Add Apache 2.0 license to source file\n\nAs per OpenStack licensing guide lines [1]:\n[H102...
python
edit
1
0
apache-2.0
2e40bccd158d0dd3a8e741704f055dbe7a04e3a5
openstack/heat,noironetworks/heat,openstack/heat,noironetworks/heat
heat/db/sqlalchemy/migrate_repo/manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nHarvester for the ScholarWorks for the SHARE project\n\nExample API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc\n'''\nfrom __future__ import unicode_literals\n\nfrom scrapi.base import OAIHar...
python
edit
1
0
apache-2.0
c10badab9b93eb021b1942475c681042292c182c
CenterForOpenScience/scrapi,CenterForOpenScience/scrapi
scrapi/harvesters/boise_state.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\ntypedef struct _fluid_hashtable_t fluid_settings_t;\ntypedef struct _fluid_synth_t fluid_synth_t;\ntypedef struct _fluid_audio_driver_t fluid_audio_driver_t;\n\nfluid_settings_t* new_flu...
python
edit
1
0
mit
ac4f5451baaefd67392d9b908c9ccffc4083a9ad
paultag/python-fluidsynth
fluidsynth/fluidsynth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport alsaaudio\n\nfrom mopidy.mixers import BaseMixer\n\nclass AlsaMixer(BaseMixer):\n \"\"\"\n Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control\n volume.\n \"\"\"\n\n def __init__(self, *args, **kwa...
python
edit
1
3
apache-2.0
894060b4e4a59d1626cf2b9d80b5184371d79fb9
tkem/mopidy,SuperStarPL/mopidy,ZenithDK/mopidy,vrs01/mopidy,dbrgn/mopidy,adamcik/mopidy,ali/mopidy,dbrgn/mopidy,hkariti/mopidy,bencevans/mopidy,mopidy/mopidy,swak/mopidy,glogiotatidis/mopidy,priestd09/mopidy,tkem/mopidy,abarisain/mopidy,pacificIT/mopidy,SuperStarPL/mopidy,priestd09/mopidy,jodal/mopidy,hkariti/mopidy,db...
mopidy/mixers/alsa.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ndaparser\n\nif __name__ == \"__main__\" : \n trns = ndaparser.parseLine(\"T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A ...
python
edit
1
0
mit
3504b4f3687fdf3ac52d6d7df9306519762900a7
rambo/asylum,hacklab-fi/asylum,ojousima/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,ojousima/asylum,ojousima/asylum,jautero/asylum,rambo/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,HelsinkiHacklab/asylum,ojousima/asylum,jautero/asylum,jautero/asylum,hacklab-fi/asylum,hacklab-fi/...
ndaparser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom functools import partial, wraps\n\nimport click\n\n\ndef verify_response(func):\n \"\"\"Decorator verifies response from the function.\n It expects function to return (bool, []), when bool is False\n content of lis...
python
edit
1
4
mit
ffc3bec9d488135ba2331386cec3279283927217
inirudebwoy/bamp
bamp/helpers/ui.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom flask import Flask, render_template, request, make_response\nfrom names import get_full_name\n\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef index():\n if (request.headers.get('User-Agent', '...
python
edit
1
3
mit
82b78ed248f28709b6603315bd673337e4997c4e
treyhunner/pseudorandom.name,treyhunner/pseudorandom.name
pseudorandom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Collection of Models used in blogsite.\"\"\"\nfrom . import db\n\n\nclass Post(db.Model):\n \"\"\"Model representing a blog post.\n\n Attributes\n ----------\n id : SQLAlchemy.Column\n Autogenerated primary key\n ...
python
edit
1
2
mit
4c4fd3021931e2203088a2ec578eb479a622e2c5
paulaylingdev/blogsite,paulaylingdev/blogsite
blogsite/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom hashlib import sha1\nfrom os import path\n\nfrom pipeline.compressors import SubProcessCompressor\n\nclass ClosureSourceMapCompressor(SubProcessCompressor):\n def compress_js(self, js):...
python
edit
1
2
apache-2.0
279f0b984209f27743791aca9cf3da7941e5d520
gigawhitlocks/zulip,hayderimran7/zulip,dhcrzf/zulip,jackrzhang/zulip,MariaFaBella85/zulip,verma-varsha/zulip,esander91/zulip,jonesgithub/zulip,johnnygaddarr/zulip,hackerkid/zulip,joshisa/zulip,Frouk/zulip,arpitpanwar/zulip,qq1012803704/zulip,dawran6/zulip,RobotCaleb/zulip,wavelets/zulip,qq1012803704/zulip,jerryge/zulip...
zephyr/lib/minify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport jpype\n\n\nclass Thread:\n \"\"\" Thread support for Python\n\n JPype adds methods to ``java.lang.Thread`` to interact with \n Python threads. These methods are all classmethods that \n act on the current Python thread....
python
edit
1
0
apache-2.0
4b0c8371bf08ff2d0c3f7c64dd5867d5732d3531
originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype
doc/java/lang.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# this contains imports plugins that configure py.test for astropy tests.\n# by importing them here in conftest.py they are discoverable by py.test\n# no matter how it is invoked within the source tree.\n\nfrom astropy.tests.pytest_plugins ...
python
edit
4
0
bsd-3-clause
ad74a2d02b109308b79b5629920a23b85748e439
larrybradley/photutils,astropy/photutils
photutils/conftest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Write short blurb about module and its usage" }, { "role": "assistant", "content": "\"\"\"\nThe OmniPath module accesses biomolecular interaction data from various\ncurated databases using the OmniPath API (see\nhttps://saezlab.g...
python
new_file
4
0
bsd-2-clause
4b10355d256f1a0bf6b7cc8eae1eda4b8794cb09
sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,bgyori/indra,sorgerlab/indra
indra/sources/omnipath/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.conf import settings\nfrom django.test import TestCase\n\nfrom go.api.go_api import client\n\nfrom mock import patch\n\n\nclass ClientTestCase(TestCase):\n @patch('requests.request')\n def test_request(self,...
python
edit
1
1
bsd-3-clause
d7621f5bf2e1ae30f79d1701fe5e34ee60da1a53
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/api/go_api/tests/test_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hypothesis_auto import auto_pytest_magic\n\nfrom isort import wrap_modes\n\nauto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,))\nauto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,))\nauto_py...
python
edit
1
1
mit
a9892cc1fcb7d2911f6afba52a06a6f1c1ed9b25
PyCQA/isort,PyCQA/isort
tests/test_wrap_modes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef hello_world():\n return 'Hello World!'\n\n\nif __name__ == '__main__':\n app.run()\n\n```\n\nApply this change: Index action ready with \"Hello, World!\" messa...
python
edit
1
1
mit
da90ddfd697da5be7e0c01f183e733bbc981fe85
alexander-emelyanov/microblog,alexander-emelyanov/microblog
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom datetime import datetime\n\nclass BaseSolver(object):\n task = None\n\n best_solution = None\n best_distance = float('inf')\n search_time = None\n cycles = 0\n\n def __init_...
python
edit
1
2
mit
0a5e4194fe06b20b4eaacaa9452403f70076ccd3
Cosiek/KombiVojager
base_solver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport rospy\nfrom std_msgs.msg import Int32\n\npub = rospy.Publisher('/pub_val', Int32, queue_size=10)\n\n\ndef pub_foo():\n rospy.init_node('pub_foo', anonymous=True)\n while True:\n pub.publish(rospy...
python
edit
1
2
mit
cf52a25001a3c9883caff70d3eb0318c8418fa76
gtagency/pyrostest,gtagency/pyrostest
test/pyrostest/pub_foo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport signal\nimport time\n\nfrom pirc522 import RFID\n\nloop = True\nrfid = RFID()\nutil = rfid.util()\n\ndef end_read(signal, frame):\n global loop\n print(\"\\nCtrl+C captured, ending read.\")\n loop = False\n rfid.cleanup()...
python
edit
15
1
mit
fdfd26b57abfd471fca36fb1f73f739a6374ddb3
straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock
ScannerServer/nfc_scanner.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBenchmark on Twisted Names subsystem.\n\"\"\"\n\nfrom twisted.names.dns import DNSDatagramProtocol\nfrom twisted.names.server import DNSServerFactory\nfrom twisted.names import hosts, client\nfrom twisted.internet import reactor\n\n...
python
edit
null
null
mit
dd472ed80ba374d719f9b1dc56fd3038f6a73dee
AlekSi/benchmarking-py
examples/benchmark/benchmark_twisted_names.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBased on:\n\nhttps://devcenter.heroku.com/articles/getting-started-with-django\n\"\"\"\n\nimport settings\n\nDEBUG = False\n\n# Parse database configuration from $DATABASE_URL\nimport dj_database_url\n\nDATABASES = {'default': dj_da...
python
edit
4
0
mit
d54c54d50a17afde8dbaa8116d7475d66f787aad
mattblair/pdx-trees-django,mattblair/pdx-trees-django
pdxtrees/settings_production.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n TODO load balancer check settings\n\"\"\"\n\nfrom biothings.web.api.es.handlers.base_handler import BaseESRequestHandler\nfrom elasticsearch.exceptions import ElasticsearchException\nfrom tornado.web import HTTPError\n\n\nclass ...
python
edit
1
3
apache-2.0
66a4fc0ce6e5c07540c5e4849b829e6623df6590
biothings/biothings.api,biothings/biothings.api
biothings/web/api/es/handlers/small_handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import db\nfrom hashlib import md5\n\n\nclass User(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n nickname = db.Column(db.String(64), index=True, unique=True)\n email = db.Column(db.String(120), index=True, un...
python
edit
1
2
mit
4b3428bca7bf9afd448d8c8da1633756a2e540fe
ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport enum\nfrom sqlalchemy import Column, Integer, String, Enum\n\nfrom virtool.pg.utils import Base, SQLEnum\n\n\nclass IndexType(str, SQLEnum):\n \"\"\"\n Enumerated type for index file types\n\n \"\"\"\n\n json = \"json\"\n...
python
edit
1
1
mit
6c3621aa5d3936953da027efde9dd3622da50d38
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
virtool/indexes/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom . import base\n\nfrom maya import cmds\n\n__also_reload__ = ['.base']\n\n\nclass Exporter(base.Exporter):\n \n def get_previous_publish_ids(self):\n ids = cmds.fileInfo('sgpublish_...
python
edit
1
3
bsd-3-clause
e165143ff629c193a2e9c31874b66c0925de3c60
westernx/sgpublish
sgpublish/io/maya.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of slack rtm read" }, { "role": "assistant", "content": "import slackclient\nimport time\nimport os\n\nslackClient = slackClient.SLackClient(os.environ[\"SLACK_TOKEN\"])\nslackClient.rtm_connect()\n\nwhile True:\n pri...
python
new_file
4
0
mit
e1dffa732ab0a2f9468e16c026a392e3d35cdd9c
ollien/Slack-Welcome-Bot
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import LiveServerTestCase\n\ntry:\n from django.urls import reverse\nexcept ImportError: # django < 1.10\n from django.core.urlresolvers import reverse\n\nfrom tusclient import client\n\n\nclass TestUploadView(LiveSe...
python
edit
1
1
mit
56c173a9f1bd1f22448a33b044283ad0d7bcf16e
alican/django-tus
tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.conf import settings\nfrom django.conf.urls.static import static\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\n\nadmin.autodiscover()\n\nurlp...
python
edit
1
0
mit
7d6c60898dd2708df07847253bca86049a33ed78
sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web
SigmaPi/SigmaPi/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation\nimport numpy as np\n\ndef generate_data(size):\n \"\"\"\"\n x_train = []\n y_train = []\n for i in range(size):\n x = random....
python
edit
6
1
apache-2.0
ba2913658e3770ef73d0e7972435def32199cc08
alexkorep/dogs-vs-cats
test.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rx import Observer\nfrom rx.internal.exceptions import ReEntracyException, CompletedException\n\nclass CheckedObserver(Observer):\n def __init__(self, observer):\n self._observer = observer\n self._state = 0 # 0 - idle...
python
edit
1
4
mit
1db1dfe35a97080286577b78f4708cc9afd82232
dbrattli/RxPY,ReactiveX/RxPY,ReactiveX/RxPY
rx/checkedobserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 The resource-policy-evaluation-library Authors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obt...
python
edit
1
1
apache-2.0
77d4f2bfcab2cb3ca1b8d1736c51018d69fe0940
forseti-security/resource-policy-evaluation-library
rpe/resources/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns('',\n url(r'^$', 'mini.views.index'),\n url(r'^about$', 'mini.views.about'),\n # Examples:\n # url(r'^$', 'sample.vi...
python
edit
1
0
bsd-3-clause
10e040890f5dd1297aa4fa04ce2cf9e9db447d09
tamarackapp/tamarack-collector-py
sample/sample/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Module with all classes related to links.\n\nLinks are low level abstractions representing connections between two\ninterfaces.\n\"\"\"\n\nimport json\n\nfrom kytos.core.common import GenericEntity\n\n\nclass Link(GenericEntity):\n ...
python
edit
1
4
mit
3373521f43b0d605bba6cc36b190c064d5a0303e
kytos/kyco,kytos/kytos,renanrodrigo/kytos,macartur/kytos
kytos/core/link.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils import timezone\n\n\nclass TimeTrackedModel(models.Model):\n created_at = models.DateTimeField(editable=False)\n updated_at = models.DateTimeField()\n\n def save(self, *args, **kwargs...
python
edit
1
2
bsd-3-clause
6bdec176a7a43b3e6eb65a2c7e639c09a89d43bc
data-refinery/data_refinery,data-refinery/data_refinery,data-refinery/data_refinery
data_models/data_refinery_models/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass DBMutex(models.Model):\n \"\"\"\n Models a mutex lock with a ``lock_id`` and a ``creation_time``.\n\n :type lock_id: str\n :param lock_id: A unique CharField with a max length of 256\n\n ...
python
edit
1
0
mit
429d701cce7ad2cf8fb77f169c4af6f2f27562fd
minervaproject/django-db-mutex
db_mutex/models.py
rejected_duplicate
Near-duplicate of sample 17322
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Urls for the Zinnia entries short link\"\"\"\nfrom django.conf.urls import url\nfrom django.conf.urls import patterns\n\nfrom zinnia.views.shortlink import EntryShortLink\n\n\nurlpatterns = patterns(\n '',\n url(r'^(?P<token>[\\...
python
edit
1
0
bsd-3-clause
e730c552c0b6095a8962f29a114069fb335d7ec6
aorzh/django-blog-zinnia,marctc/django-blog-zinnia,marctc/django-blog-zinnia,dapeng0802/django-blog-zinnia,ghachey/django-blog-zinnia,aorzh/django-blog-zinnia,ZuluPro/django-blog-zinnia,1844144/django-blog-zinnia,Maplecroft/django-blog-zinnia,extertioner/django-blog-zinnia,Zopieux/django-blog-zinnia,bywbilly/django-blo...
zinnia/urls/shortlink.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\n\n# import default models from djangoSHOP to materialize them\nfrom shop.models.defaults.address import ShippingAddress, BillingAddress\nf...
python
edit
1
0
bsd-3-clause
f01c6d22d30e175d120e5ffe10bef93378375ea7
jrief/django-shop,khchine5/django-shop,nimbis/django-shop,jrief/django-shop,nimbis/django-shop,khchine5/django-shop,divio/django-shop,nimbis/django-shop,jrief/django-shop,khchine5/django-shop,divio/django-shop,awesto/django-shop,jrief/django-shop,awesto/django-shop,awesto/django-shop,divio/django-shop,nimbis/django-sho...
example/myshop/models/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\nfrom django.shortcuts import render\nfrom .models import Blog\n\n# Create your views here.\ndef index(request):\n blogs_list = Blog.objects.filter(published=True).or...
python
edit
1
3
bsd-3-clause
b6da3311c894ad502b32b1cb96c3b0e0a02b0b85
brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3
blog/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nfrom django.template import Library\n\nregister = Library()\n\ntry:\n head = subprocess.Popen(\"git rev-parse --short HEAD\",\n shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n VERSION = head.s...
python
edit
1
3
mit
e92784a36053e6708a3eb2772f4c5cd4e16cde4a
internship2016/sovolo,internship2016/sovolo,internship2016/sovolo
app/base/templatetags/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"ohmycommand URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app...
python
edit
1
0
mit
59dd1dd68792b13ea75b4aaffc68983236d02ad3
gopar/OhMyCommand,gopar/OhMyCommand,gopar/OhMyCommand
config/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#import spam\nimport filter_lta\n\n#List of all directories containing valid observations \nVALID_FILES = filter_lta.VALID_OBS()\n\n#List of all directories for current threads to process\nTHREAD_FILES = VALID_FILES[0:len(VALID_FILES):5]\np...
python
edit
2
2
mit
269670c239339bb26b61e2f9dcf0a4110b80f828
NCRA-TIFR/gadpu,NCRA-TIFR/gadpu
exec_thread_1.py
rejected_duplicate
Near-duplicate of sample 2500
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDetermine whether an integer is a palindrome. Do this without extra space.\n\nSome hints:\n Could negative integers be palindromes? (ie, -1)\n \n If you are thinking of converting the integer to string, note the\n restri...
python
edit
1
5
mit
64d9a15f84257988b371a2d12f1137f7b9f41b02
ufjfeng/leetcode-jf-soln,ufjfeng/leetcode-jf-soln
python/009_palindrome_number.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport unittest\nimport importlib\n\ndef iam(m_str):\n \"\"\" import and add a module \"\"\"\n global all_tests\n\n module = importlib.import_module(\"pentai.ai.%s\" % m_str)\n\n suite = unittest.defaultTest...
python
edit
1
1
mit
ec80d534e91e480a40152550db10e8be8e777f43
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
pentai/ai/t_all.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 DeepMind Technologies Limited. 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...
python
edit
1
1
apache-2.0
cb0c4b7af5efc16d1ca5da9722d9e29cae527fec
deepmind/acme,deepmind/acme
acme/utils/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core import validators\nfrom django.db.models import get_model\nfrom django.forms.fields import MultiValueField, CharField, IntegerField\n\nfrom .widgets import AssetWidget\n\n\nclass AssetField(MultiValueField):\n _delimiter...
python
edit
1
3
bsd-3-clause
bea43abce031ab70a1f4e59e5c1e4a00af37a406
socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages
fancypages/assets/forms/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA script to scrape all the function exports from the PASS_FTN.FOR\n\nBy Ian Bell, NIST, January 2018\n\"\"\"\nimport os\nfrom generate_header import generate_interface_file, generate_function_dict\n\nif __name__=='__main__':\n ge...
python
edit
3
0
mit
d74fb6c7f9d0bf194b44443a13114ff1d5bb0756
CoolProp/REFPROP-headers,CoolProp/REFPROP-headers,CoolProp/REFPROP-headers,CoolProp/REFPROP-headers
scrape_PASS_FTN.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom timepiece import models as timepiece\nfrom timepiece.forms import QuickSearchForm\n\n\ndef timepiece_settings(request):\n default_famfamfam_url = settings.STATIC_URL + 'images/icons/'\n famfamf...
python
edit
1
2
mit
47b031db83f5cb90f786029a6ffbdb7a599145db
gaga3966/django-timepiece,josesanch/django-timepiece,BocuStudio/django-timepiece,dannybrowne86/django-timepiece,josesanch/django-timepiece,BocuStudio/django-timepiece,gaga3966/django-timepiece,BocuStudio/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,gaga3966/django-timep...
timepiece/context_processors.py
rejected_duplicate
Near-duplicate of sample 5049
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom mock import *\nfrom nose.tools import *\nfrom hypothesis import *\nfrom hypothesis.specifiers import *\n\nfrom six import text_type, binary_type\nfrom pymacaroons import Macaroon, Verifier\n\n...
python
edit
20
3
mit
1db5fefc1752b71bf11fbf63853f7c93bcc526f5
matrix-org/pymacaroons,matrix-org/pymacaroons,ecordell/pymacaroons,illicitonion/pymacaroons
tests/macaroon_property_tests.py
rejected_lint
Too many lint violations: 20
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nlogger = logging.getLogger(\"LanguageClient\")\nfileHandler = logging.FileHandler(filename=\"/tmp/LanguageClient.log\")\nfileHandler.setFormatter(\n logging.Formatter(\n \"%(asctime)s %(levelname)-8s %(message)s\...
python
edit
1
0
mit
6e8f35b83fc563c8349cb3be040c61a0588ca745
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
rplugin/python3/LanguageClient/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom django.core.urlresolvers import reverse\n\nfrom example.tests.utils import load_json\n\npytestmark = pytest.mark.django_db\n\n\ndef test_included_data_on_list(multiple_entries, client):\n response = client.get(reverse...
python
edit
1
5
bsd-2-clause
1a8f67ec1eaa97aebe25d7d6625a237f8e1ce151
django-json-api/rest_framework_ember,scottfisk/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,lukaslundgren/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,leo-naeka/django-rest-fr...
example/tests/integration/test_includes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = 'vcspull'\n__package_name__ = 'vcspull'\n__description__ = 'synchronize your repos'\n__version__ = '1.2.0'\n__author__ = 'Tony Narlock'\n__github__ = 'https://github.com/vcs-python/vcspull'\n__pypi__ = 'https://pypi.org/project/...
python
edit
1
0
mit
382b8df7a25732ee8384c02d776472a93c18a0ea
tony/vcspull,tony/vcspull
vcspull/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import current_app\nfrom gevent.queue import Queue\n\nclients = set()\n\n\ndef broadcast(event, data=None):\n for q in clients:\n q.put((event, data))\n\n\ndef handle_sse_request():\n return current_app.response_clas...
python
edit
1
4
mit
d1cc22a5ab94b6df503679cc8b6a19948f4049c9
ThiefMaster/maildump,ThiefMaster/maildump,ThiefMaster/maildump,ThiefMaster/maildump
maildump/web_realtime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass NumberToWords(object):\n \"\"\"\n Class for converting positive integer values to a textual representation\n of the submitted number for value of 0 up to 999999999.\n \"\"\"\n\n MAX = 999999999\n SMALL_NUMBERS = ['',...
python
edit
4
3
mit
be67ff47938be435f1eb713ed1c9b08f3f98bc5b
ianfieldhouse/number_to_words
number_to_words.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nwith open('version.txt', 'r') as fh:\n version = fh.read().strip()\n\nwith open('README.md', 'r') as fh:\n long_description = fh.read()\n\nsetup(name='adb-enhanced',\n ...
python
edit
3
0
apache-2.0
332a9086e1481697389774648cfcfefa332ff3e2
ashishb/adb-enhanced
adb-enhanced/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import render_template\nimport requests\nimport json\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n r = requests.get(\"http://127.0.0.1:5000/playlist\")\n playlist = json.loads(r.text...
python
edit
1
1
mit
ab3d830ca682805180710bf1aeb79519c826a7f0
MCG-Radio/frontend,MCG-Radio/frontend,MCG-Radio/frontend
frontend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom raven.contrib.flask import Sentry\n\napp = Flask(__name__)\napp.config.from_object(os.environ.get('SETTINGS'))\ndb = SQLAlchemy(app)\n\n\n...
python
edit
1
2
mit
f735e813d1babba1c488f8ea761ffd1295103451
LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha
systemofrecord/__init__.py
rejected_duplicate
Near-duplicate of sample 12538
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom master import gitiles_poller\n\n\ndef Update(config, c):\n webr...
python
edit
1
1
bsd-3-clause
d7454240f4f888309a63bba07526a821962c9670
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.chromium.webrtc.fyi/master_source_cfg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\n Braintree Django Python Module\n\"\"\"\n\nimport braintree\n\nfrom django.conf import settings\n\nVERSION = \"1.0\"\n\nif not hasattr(braintree.Configuration, \"merchant_id\"):\n braintree.Configurati...
python
edit
1
0
mit
f46e91ae286dbc1dd86180d2920017d3222a48e2
danielgtaylor/braintree_django
btdjango/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport discord\n\nfrom applebot.utils import caller_attr\n\nlog = logging.getLogger(__name__)\n\n\nclass BotModule(object):\n def __init__(self, client=None):\n self.__name__ = None\n self.client = client ...
python
edit
1
7
mit
937db1a685da31a9b00d7652835f2fafc7493fc7
appul/applebot
applebot/botmodule.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Take a series of exposures at different focus positions to estimate best focus.\n\"\"\"\nimport TUI.Base.BaseFocusScript\n# make script reload also reload BaseFocusScript\nreload(TUI.Base.BaseFocusScript)\nSlitviewerFocusScript = TUI....
python
edit
2
1
bsd-3-clause
e53da7173bfa63ea4acbe5a1884d41ed295e978f
r-owen/stui,r-owen/stui
TUI/Scripts/TSpec/Focus.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport h2o\nimport socket\nimport threading\nimport unittest\nimport urllib.request\n\nSIMPLE_PATH = b'/simple'\nSIMPLE_BODY = b'<h1>It works!</h1>'\n\n\nclass E2eTest(unittest.TestCase):\n def setUp(self):\n config = h2o.Config()...
python
edit
1
2
mit
57d4e10636b9593ef650f0f62410f0b0d7effdf2
iceb0y/pyh2o,iceb0y/pyh2o
test/test_e2e.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cms.models import CMSPlugin\nfrom django.db import models\n\n\nclass IframePlugin(CMSPlugin):\n src = models.URLField()\n\n```\n\nApply this change: Increase urlfield size from 200 to 500 to deal with large embed urls for google cal...
python
edit
1
0
mit
e94d40af916fa51e7e8737fd151d8cfc8a94891a
jonasmcarson/cmsplugin-iframe,jonasmcarson/cmsplugin-iframe
cmsplugin_iframe/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport unittest\n\nfrom .config import *\nfrom tweepy import API, OAuthHandler\n\n\nclass TweepyAuthTests(unittest.TestCase):\n\n def testoauth(self):\n auth = OAuthHandler(oauth_consumer_key, oauth_consumer_secret)...
python
edit
6
1
mit
5fd3bed281018a556cfd6305670317bf5acb2a16
svven/tweepy,tweepy/tweepy
tests/test_auth.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBoard represents a four in a row game board.\n\nAuthor: Isaac Arvestad\n\"\"\"\nclass Board:\n \"\"\"\n Initializes the game with a certain number of rows\n and columns.\n \"\"\"\n def __init(self, rows, columns):\n ...
python
edit
4
5
mit
89b164781ba433c9209f306889463e189006778c
isaacarvestad/four-in-a-row
board.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport datetime\nfrom subprocess import call\n\nfrom ca import app, db, mail\nfrom ca.models import Request\n\nfrom flask import Flask, render_template\nfrom flask_mail import Message\n\n\nd...
python
edit
3
1
mit
964da81ef5a90130a47ff726839798a7a7b716ef
freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net
buildcert.py
rejected_duplicate
Near-duplicate of sample 12621
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom support import lib,ffi\nfrom qcgc_test import QCGCTest\n\nclass ArenaTestCase(QCGCTest):\n def test_size_calculations(self):\n exp = lib.QCGC_ARENA_SIZE_EXP\n size = 2**exp\n bitmap = size / 128\n cells =...
python
edit
3
1
mit
6f9a2ef636c8ac5272de15ddfeb7c80b3bd00246
ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc
test/test_arena.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nkeysym_re = re.compile(r\"^#define\\s+(XF86)?XK_(\\w+)\\s+(\\S+)\")\n\n\nclass Keysyms(object):\n __slots__ = ('name_to_code', 'code_to_name', '__dict__')\n\n def __init__(self):\n self.name_to_code = {}\n s...
python
edit
1
4
mit
116e76557d239edab69bab47c96cb5835618c31f
tailhook/tilenol,tailhook/tilenol
tilenol/xcb/keysymparse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add freeform profile for user\n\nRevision ID: 87acbbe5887b\nRevises: f2a71c7b93b6\nCreate Date: 2016-09-11 21:39:20.753000\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '87acbbe5887b'\ndown_revision = 'f2a71c7b93b6...
python
edit
1
1
mit
1a35294baac296bbd665dc55e35cd2b383ae7116
katajakasa/aetherguild2,katajakasa/aetherguild2
alembic/versions/87acbbe5887b_add_freeform_profile_for_user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the Wallace API.\"\"\"\n\nimport subprocess\nimport re\nimport requests\n\n\nclass TestHeroku(object):\n\n \"\"\"The Heroku test class.\"\"\"\n\n def test_sandbox(self):\n \"\"\"Launch the experiment on Heroku.\...
python
edit
1
1
mit
12a9ef54d82d9508852e5596dbb9df321986e067
Dallinger/Dallinger,berkeley-cocosci/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger,suchow/Wallace,berkeley-cocosci/Wallace,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,suchow/Wallace,suchow/Wallace,jcpeterson/Dallinger,Dallinger/Dalli...
tests/test_heroku.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport unittest\n\nfrom units.trivia import check_answer\n\n\nclass TestCheckAnswer(unittest.TestCase):\n\n def test_correct_answer(self):\n self.assertTrue(check_answer(\"correct\", \"correct\"))\n\n def test_incorrect_answe...
python
edit
1
1
mit
3c66efc142d53a4c8f9f88fb33d942c6840bd343
Harmon758/Harmonbot,Harmon758/Harmonbot
tests/test_trivia.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport common.time\n\nSPREADSHEET = \"1yrf6d7dPyTiWksFkhISqEc-JR71dxZMkUoYrX4BR40Y\"\n\ndef format_row(title, description, video, timestamp, nick):\n\tif '_id' in video:\n\t\turl = \"https://www.twitch.tv/loadingreadyrun/manager/%s/highligh...
python
edit
1
2
apache-2.0
46807ee4923a5799ec371cd8094c36f0b672f4b4
andreasots/lrrbot,mrphlip/lrrbot,mrphlip/lrrbot,andreasots/lrrbot,mrphlip/lrrbot,andreasots/lrrbot
common/highlights.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import (\n get_object_or_404, render)\n\nfrom .forms import TagForm\nfrom .models import Startup, Tag\n\n\ndef startup_detail(request, slug):\n startup = get_object_or_404(\n Startup, slug__iexact=slug)\n ...
python
edit
1
3
bsd-2-clause
b06f0e17541f7d424e73fd200ae10db0722b1a5a
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/views.py
accepted
null
true