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\"\"\"\nSimple auto test discovery.\n\nFrom http://stackoverflow.com/a/17004409\n\"\"\"\nimport os\nimport sys\nimport unittest\n\ndef additional_tests():\n setup_file = sys.modules['__main__'].__file__\n setup_dir = os.path.abspath(o...
python
edit
1
1
mit
ed11fa0ebc365b8a7b0f31c8b09bf23b891e44b6
QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future,QuLogic/python-future,krischer/python-future,PythonCharmers/python-future,krischer/python-future,michaelpacer/python-future
discover_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os.path\nimport sys\nimport imp\nimport argparse\nfrom api import App, add_subparsers\n\n\ndef load_plugins(dir):\n for f in os.listdir(dir):\n module_name, ext = os.path.splitext(f)\n if ext == '.py':\n...
python
edit
1
3
mit
1b218de76e8b09c70abcd88a2c6dd2c043bfc7f0
schwa-lab/dr-apps-python
drcli/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys\nfrom glob import glob\nimport GlobalVars\n\ndef LoadFunction(path, loadAs=''):\n loadType = 'l'\n name = path\n src = __import__('Functions.' + name, globals(), locals(), [])\n if loadAs != '':\n name = lo...
python
edit
5
6
mit
788dd6f62899fb16aa983c17bc1a5e6eea5317b0
HubbeKing/Hubbot_Twisted
FunctionHandler.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\nif __name__ == \"__main__\":\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)\n\n```\n\nApply this change: Set a default settings module" }, ...
python
edit
1
0
bsd-3-clause
e6f3bd9c61be29560e09f5d5d9c7e355ec14c2e3
wagnerand/olympia,andymckay/addons-server,kumar303/addons-server,andymckay/olympia,aviarypl/mozilla-l10n-addons-server,aviarypl/mozilla-l10n-addons-server,wagnerand/addons-server,lavish205/olympia,Prashant-Surya/addons-server,harry-7/addons-server,harikishen/addons-server,mstriemer/olympia,mozilla/addons-server,andymck...
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.conf import settings\n\nimport pretix.control.urls\nimport pretix.presale.urls\n\n\nurlpatterns = [\n url(r'^control/', include(pretix.control.urls,...
python
edit
1
0
apache-2.0
76b85cd4fc848bf1b9db9d5e3a90e376400c66cb
lab2112/pretix,Flamacue/pretix,Unicorn-rzl/pretix,awg24/pretix,Flamacue/pretix,awg24/pretix,Unicorn-rzl/pretix,lab2112/pretix,Unicorn-rzl/pretix,akuks/pretix,akuks/pretix,lab2112/pretix,lab2112/pretix,awg24/pretix,Flamacue/pretix,akuks/pretix,awg24/pretix,akuks/pretix,Flamacue/pretix,Unicorn-rzl/pretix
src/pretix/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\".. Ignore pydocstyle D400.\n\n=============\nCore API URLs\n=============\n\nThe ``routList`` is ment to be included in ``urlpatterns`` with the\nfollowing code:\n\n.. code-block:: python\n\n from rest_framework import routers\n\n ...
python
edit
1
0
apache-2.0
0cb85aade1cfd7f264263bbe7113cb013b39cb44
dblenkus/rolca,dblenkus/rolca,dblenkus/rolca
src/rolca/core/api/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom project import app, db\nfrom project import models\nfrom flask.ext.script import Manager\nfrom flask.ext.migrate import Migrate, MigrateCommand\n\nmigrate = Migrate(app, db)\n\nmanager = Manager(app)\nmanager.add_command('db', MigrateC...
python
edit
4
1
mit
6c8feca973703cf87a82cfa954fa3c7a3f152c72
dylanshine/streamschool,dylanshine/streamschool
manage.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom django.conf import settings\nfrom rest_framework import serializers\nfrom rest_framework.validators import UniqueTogetherValidator\nfrom server.api.serializers.chapters import ChapterSerializer\nfrom .riders import Rid...
python
edit
4
0
mit
bf7b8df92fb1cc16fccefe201eefc0ed853eac5d
Techbikers/techbikers,Techbikers/techbikers,mwillmott/techbikers,mwillmott/techbikers,mwillmott/techbikers,Techbikers/techbikers,mwillmott/techbikers,Techbikers/techbikers
server/api/serializers/rides.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\"\"\"\n See LICENSE.txt file for copyright and license details.\n\"\"\"\nimport os\n\n\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\nWTF_CSRF_ENABLED = True\nSECRET_KEY = '3124534675689780'\n\n# TODO: s...
python
edit
2
0
bsd-3-clause
c541e85f8b1dccaabd047027e89791d807550ee5
rockwolf/python,rockwolf/python,rockwolf/python,rockwolf/python,rockwolf/python,rockwolf/python
fade/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport qnd\nimport tensorflow as tf\n\n\ndef model_fn(x, y):\n return (y,\n 0.0,\n tf.contrib.framework.get_or_create_global_step().assign_add())\n\n\ndef input_fn(q):\n shape = (100,)\n return tf.zeros(shape,...
python
edit
1
1
unlicense
2843052a222541e3b7ce45fa633f5df61b10a809
raviqqe/tensorflow-qnd,raviqqe/tensorflow-qnd
test/oracle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom libcloud.compute.types import Provider\nfrom libcloud.compute.providers import get_driver\nimport libcloud.security\n\nfrom config import get_config\n\n\ndef get_lc(profile, resource=None):\n if resource is None:\n from libcl...
python
edit
4
6
apache-2.0
22935ee89217ac1f8b8d3c921571381336069584
novel/lc-tools,novel/lc-tools
lctools/lc.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import include, url\n# from django.contrib import admin\nfrom django.conf.urls.static import static\n\n\nfrom . import views\n\n\nurlpatterns = [\n ### API ###\n url(r'^$', views...
python
edit
1
0
apache-2.0
a8f3491811bb639ebb59f79c55f461ae063b06b8
TomBaxter/osf.io,cwisecarver/osf.io,pattisdr/osf.io,wearpants/osf.io,caseyrygt/osf.io,sbt9uc/osf.io,jmcarp/osf.io,adlius/osf.io,adlius/osf.io,GageGaskins/osf.io,dplorimer/osf,reinaH/osf.io,abought/osf.io,TomHeatwole/osf.io,petermalcolm/osf.io,hmoco/osf.io,pattisdr/osf.io,jeffreyliu3230/osf.io,zachjanicki/osf.io,billyhu...
api/base/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .feeds import Feeds\nfrom .finances import Finances\nfrom .inbound_shipments import InboundShipments\nfrom .inventory import Inventory\nfrom .merchant_fulfillment import MerchantFulfillment\nfrom .offamazonpayments import OffAmazonPaym...
python
edit
1
0
unlicense
6f8a19c46a1d8b6b31039f212e733cd660551de7
Bobspadger/python-amazon-mws,GriceTurrble/python-amazon-mws
mws/apis/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by roadhump\n# Copyright (c) 2014 roadhump\n#\n# License: MIT\n#\n\n\"\"\"This module exports the ESLint plugin class.\"\"\"\n\nfrom Sub...
python
edit
1
0
mit
886d4d526d1766d154604f7a71182e48b3438a17
joeybaker/SublimeLinter-textlint,roadhump/SublimeLinter-eslint,AndBicScadMedia/SublimeLinter-eslint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\nfrom typing import List\n\nfrom django.conf import settings\nfrom django.core.checks import Error, register\n\n\n@register()\ndef check_extensions(app_configs, **kwargs):\n \"\"\"Confirm a correct import of plugins and ...
python
edit
1
4
bsd-3-clause
52430087413e24c94a532e67a2c77248ecc0598c
mociepka/saleor,mociepka/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,maferelo/saleor
saleor/core/extensions/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# remove section numbers for subheadings\n# Based on Wagner Macedo's filter.py posted at\n# https://groups.google.com/forum/#!msg/pandoc-discuss/RUC-tuu_qf0/h-H3RRVt1coJ\nimport pandocfilters as pf\n\nsec = 0\n\ndef do_filter(k, v, f, m):\n...
python
edit
1
6
apache-2.0
4f9ef0c4690a3d99e045c0ad347023dba3733bd0
wilsonCernWq/ospray,ospray/OSPRay,ospray/OSPRay,ospray/OSPRay,wilsonCernWq/ospray,wilsonCernWq/ospray,ospray/OSPRay
doc/filter-sectionnumbers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom games import models, bundle\n\n\ndef package_love(stdout, game, release):\n if release.get_asset('love') is not None:\n stdout.write(u\"SKIPPING {}\".format(release))\n ...
python
edit
1
6
mit
329f4cd5123440baf537db30340fd3d33d7bbbf1
stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb
games/management/commands/makelove.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Intercept HTTP connections that use `requests <http://docs.python-requests.org/en/latest/>`_.\n\"\"\"\n\nfrom . import WSGI_HTTPConnection, WSGI_HTTPSConnection, wsgi_fake_socket\nfrom requests.packages.urllib3.connectionpool import (...
python
edit
1
3
mit
b718c1d817e767c336654001f3aaea5d7327625a
sileht/python3-wsgi-intercept,cdent/wsgi-intercept
wsgi_intercept/requests_intercept.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ObjectDoesNotExist\n\nfrom db.models.repos import CodeReference\n\n\ndef get_project_code_reference(project, commit=None):\n if not project.has_code:\n return None\n\n repo = project.repo\n\n ...
python
edit
1
8
apache-2.0
d2c368995e33b375404e3c01f79fdc5a14a48282
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/libs/repos/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom os import getuid, geteuid, getgid, getegid\nfrom sys import argv\nfrom time import sleep\n\nfrom daemonize import Daemonize\n\npid = argv[1]\nlog = argv[2]\n\n\ndef main():\n uids = getuid(), geteuid()\n ...
python
edit
4
1
mit
fffb98874066d5762b815987d7e6768a2e9cb03c
thesharp/daemonize
tests/daemon_uid_gid.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom models.base_model import BaseModel\nfrom datetime import datetime\nfrom models.user_model import UserModel\nfrom peewee import CharField, TextField, DateTimeField, IntegerField, ForeignKeyField\n\nWAIFU_SHARING_STATUS_PRIVATE = 1\nWAIF...
python
edit
1
2
cc0-1.0
45abd54dcb14f3dbf45622c493f37e3726b53755
sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend
models/waifu_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom optparse import make_option\n\nfrom django.core.management import BaseCommand\n\nfrom djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase\nfrom obj_sys.models_ufs_obj import UfsObj\n\n\nclass FileTagger...
python
edit
1
2
bsd-3-clause
be00af0a0e87af5b4c82107d2f1356f378b65cb4
weijia/obj_sys,weijia/obj_sys
obj_sys/management/commands/tag_the_file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport config\n\ndef request(slug):\n url = \"%s%s\" % (config.server_url, slug)\n req = requests.get(url)\n\n if req.status_code != requests.codes.ok:\n raise req.raise_for_status()\n\n return req.json()...
python
edit
3
2
mit
a5faf69efd3a53b937b0bd27d42ad0ca8b0af9a9
iclab/centinel,JASONews/centinel,lianke123321/centinel,Ashish1805/centinel,lianke123321/centinel,iclab/centinel,iclab/centinel,ben-jones/centinel,rpanah/centinel,lianke123321/centinel,rpanah/centinel,rpanah/centinel
centinel/backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='python3-indy',\n version='1.6.1',\n packages=['indy'],\n url='https://github.com/hyperledger/indy-sdk',\n license='MIT/Apache-2.0',\n author='Vyacheslav Gudkov',\n auth...
python
edit
1
0
apache-2.0
de4f395d75d7307a79d8db44399a6feaa0118c0a
anastasia-tarasova/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,anastasia-tarasova/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,anastasia-tarasova/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,anastasia-tarasova/indy...
wrappers/python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport codecs\r\nfrom steel.fields import Field\r\nfrom steel.fields.mixin import Fixed\r\n\r\n__all__ = ['Bytes', 'String', 'FixedBytes', 'FixedString']\r\n\r\n\r\nclass Bytes(Field):\r\n \"A stream of bytes that should be left unconver...
python
edit
1
1
bsd-3-clause
99909048bc702e21e980bb1167caf9217aa31196
gulopine/steel-experiment
steel/fields/strings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom thefuck.rules.git_push import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.fixture\ndef stderr():\n return '''fatal: The current branch master has no upstream branch.\nTo push the current branc...
python
edit
1
1
mit
5df350254e966007f80f7a14fde29a8c93316bb3
scorphus/thefuck,mlk/thefuck,Clpsplug/thefuck,SimenB/thefuck,nvbn/thefuck,Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,nvbn/thefuck,scorphus/thefuck
tests/rules/test_git_push.py
rejected_duplicate
Near-duplicate of sample 640
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import renderers\nfrom icalendar import Calendar, Event\n\n\nclass ICalRenderer(renderers.BaseRenderer):\n media_type = 'text/calendar'\n format = 'ical'\n\n def render(self, data, media_type=None, renderer_cont...
python
edit
1
5
apache-2.0
258a9dc694fc5ad308c6fbadfe01b0a375a2a34e
ox-it/talks.ox,ox-it/talks.ox,ox-it/talks.ox
talks/core/renderers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSend a notification to slack.\n\nNB: The webhook should be configured in the nextflow profile\n\n\"\"\"\n\nimport os\nimport requests\n\n\ndef send_notification(title, message, plain=False):\n \"\"\"\n Send a notification to t...
python
edit
1
5
apache-2.0
fd5cad381e8b821bfabbefc9deb4b8a4531844f6
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
rnacentral_pipeline/rnacentral/notify/slack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nresource_package = __name__\nresource_path_format = 'datasource/{}.json'\n\nclass DatasourceRepository:\n def __init__(self):\n self.availableSources = json.loads(pkg_resources.resource_string(resource_package, reso...
python
edit
2
2
apache-2.0
c36b0639190de6517260d6b6e8e5991976336760
bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball
shared/btr3baseball/DatasourceRepository.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom itsdangerous import TimedJSONWebSignatureSerializer as Serializer\nfrom flask import request as flask_request\nfrom flask import abort\n\nimport logging\nimport os\n\ndef gen_auth_token(id,expiration=10000):\n \"\"\"Generate auth to...
python
edit
3
3
mit
3dad25bd909d4396129c7fe4aa848770119f0db7
tforrest/soda-automation,tforrest/soda-automation
app/util/danger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from http.server import SimpleHTTPRequestHandler\nexcept ImportError:\n from SimpleHTTPServer import SimpleHTTPRequestHandler\n\ntry:\n from socketserver import TCPServer\nexcept ImportError:\n from SocketServer import TC...
python
edit
3
2
mit
97e39ec9e03728384ad00a7e011194412521631e
kragniz/containers
tests/test_containers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gensim.models import Word2Vec\nimport logging\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\nlogger.addHandler(logging.StreamHandler())\n\n\nclass Word2VecSuggester():\n def __init__(self, modelfile):\n ...
python
edit
1
3
apache-2.0
ad3554ae58f65a295ac94c131d8193e0b2e7e6f8
nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search
termsuggester/word2vec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'annotator',\n version = '0.7.3',\n packages = find_packages(),\n\n install_requires = [\n 'Flask==0.8',\n 'pyes==0.16.0',\n 'PyJWT==0.1.4',\n ...
python
edit
1
0
mit
24b112885d7611fca4186cd97bdee97ea2f934c3
nobita-isc/annotator-store,nobita-isc/annotator-store,ningyifan/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,happybelly/annotator-store,openannotation/annotator-store
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='osm_hall_monitor',\n version='0.2',\n description='Passive changeset monitoring for OpenStreetMap.',\n url='http://github.com/ethan-nelson/osm_hall_monitor',\n author='Ethan Ne...
python
edit
1
0
mit
1641243682f080257b7f79b35503985d3d72aa44
ethan-nelson/osm_hall_monitor
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 Google LLC\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# https://www.apache....
python
edit
1
0
apache-2.0
ecf71bd004d99b679936e07453f5a938e19f71dc
google/megalista,google/megalista
megalist_dataflow/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This may seem like a silly module right now, but we had to\nseparate this out so that deferrable.py and its sub-modules\ncould all import it without circular imports.\"\"\"\n\nMAXIMUM_DELAY_SECONDS = 900\n\n```\n\nApply this change: A...
python
edit
1
0
mit
8b127a3d934470aa20fbff83d06ded2e37d00579
gamechanger/deferrable
deferrable/delay.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport subprocess\nfrom distutils.core import setup\n\nrequirements = [pkg.split('=')[0] for pkg in open('requirements.txt').readlines()]\n\ndescription = 'Download videos from Udemy for personal offline use'\ntry:\...
python
edit
1
0
unlicense
024878fc913097364123d28a99ab7cb5501b0af5
rinodung/udemy-dl
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom rest_framework_jwt.authentication import JSONWebTokenAuthentication\nfrom rest_framework_jwt.settings import api_settings\n\nfrom .user_utils import get_or_create_user\n\n\ndef patch_jwt_settings():\n ...
python
edit
2
3
bsd-2-clause
63a26cbf76a3d0135f5b67dd10cc7f383ffa7ebf
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
helusers/jwt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEFAULT_HOSTS = [\n 'dataverse.harvard.edu', # Harvard PRODUCTION server\n 'dataverse.lib.virginia.edu' # University of Virginia server\n]\n\nREQUEST_TIMEOUT = 15\n\n```\n\nApply this change: Increase request timeout...
python
edit
1
0
apache-2.0
6252706583be20abb3eb9f541d99a212489daf00
binoculars/osf.io,leb2dg/osf.io,baylee-d/osf.io,mfraezz/osf.io,pattisdr/osf.io,mattclark/osf.io,Johnetordoff/osf.io,adlius/osf.io,mfraezz/osf.io,sloria/osf.io,brianjgeiger/osf.io,binoculars/osf.io,mattclark/osf.io,Johnetordoff/osf.io,chennan47/osf.io,saradbowman/osf.io,adlius/osf.io,leb2dg/osf.io,CenterForOpenScience/o...
addons/dataverse/settings/defaults.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# coding:utf-8\n\nfrom os import path\n\n\n# the number of loop for train IBM Model 2\nloop_count = 10\nphrase_model_file = path.join(\n path.abspath(path.dirname(__file__)),\n \"phrase.model\"\n)\nbigram_model...
python
edit
1
0
mit
fb1f03c7d46d9274f144a767830cf9c81078e8c8
kenkov/kovlive
kovfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\n\ntemplate = string.Template(\"\"\"#\n# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.\n#\n# DNS configuration options\n#\n\n[DEFAULT]\n# dns_config_file=dns_config.xml\n hostip=$__contrail_host_ip__ # Resolv...
python
edit
1
0
apache-2.0
582c0e22c2d91b11a667933532b0a802757b26f6
Juniper/contrail-provisioning,Juniper/contrail-provisioning
templates/dns_param_template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\nimport zeit.cms.testing\n\n\nproduct_config = \"\"\"\\\n<product-config zeit.today>\n today-xml-url file://{base}/today.xml\n</product-config>\n\"\"\".format(base=pkg_resources.resource_filename(__name__, '.'))\n\nT...
python
edit
1
1
bsd-3-clause
39091c3390d121d48097d64526f40d0a09702673
ZeitOnline/zeit.today
src/zeit/today/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom mopidy import settings as raw_settings\n\nlogger = logging.getLogger('mopidy')\n\ndef get_version():\n return u'0.1.dev'\n\ndef get_mpd_protocol_version():\n return u'0.16.0'\n\ndef get_class(name):\n module_...
python
edit
1
4
apache-2.0
65fcfbfae9ef1a68d324aea932f983f7edd00cdf
SuperStarPL/mopidy,pacificIT/mopidy,swak/mopidy,hkariti/mopidy,dbrgn/mopidy,jmarsik/mopidy,diandiankan/mopidy,jmarsik/mopidy,glogiotatidis/mopidy,quartz55/mopidy,ali/mopidy,pacificIT/mopidy,adamcik/mopidy,rawdlite/mopidy,swak/mopidy,dbrgn/mopidy,jodal/mopidy,hkariti/mopidy,priestd09/mopidy,dbrgn/mopidy,jmarsik/mopidy,q...
mopidy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pickle\n\n\ndef load_data(path):\n \"\"\"\n Load Dataset from File\n \"\"\"\n input_file = os.path.join(path)\n with open(input_file, \"r\") as f:\n data = f.read()\n\n return data\n\n\ndef preproc...
python
edit
1
3
mit
c6ba057d2e8a1b75edb49ce3c007676f4fe46a16
spencer2211/deep-learning
tv-script-generation/helper.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\n\"\"\"\nThis package reads and writes data formats used by the Virtual\nObservatory (VO) initiative, particularly the VOTable XML format.\n\"\"\"\n\nfrom .table import (\n ...
python
edit
1
0
bsd-3-clause
0c785e349c2000bbf3b22671071a66eaca4d82d0
DougBurke/astropy,AustereCuriosity/astropy,funbaker/astropy,joergdietrich/astropy,StuartLittlefair/astropy,larrybradley/astropy,tbabej/astropy,mhvk/astropy,pllim/astropy,stargaser/astropy,lpsinger/astropy,joergdietrich/astropy,lpsinger/astropy,AustereCuriosity/astropy,kelle/astropy,saimn/astropy,DougBurke/astropy,bsipo...
astropy/io/votable/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\nimport crabpy\n\nfrom setuptools import setup, find_packages\n\npackages = [\n 'crabpy',\n]\n\nrequires = [\n 'suds-jurko>=0.6.0',\n 'dogpile.cache'\n]\n\nsetup(\n name='crabpy',...
python
edit
5
0
mit
6c506a17f606d346ce9240b5756b98923b4d821f
OnroerendErfgoed/crabpy
setup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.decorators import classonlymethod\nfrom django.views.decorators.csrf import csrf_exempt\nfrom rest_framework import serializers, viewsets\n\n\nNestedAVFields = ['id', 'attribute', 'value']\n\n\nclass CommonAPISerializer(se...
python
edit
1
1
bsd-3-clause
3dd5cd27963a0cfeb446a36fcd50c05e7c715eb3
akeym/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,murrown/cyder,murrown/cyder,murrown/cyder,OSU-Net/cyder,OSU-Net/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder,zeeman/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,akeym/cyder,zeeman/cyder
cyder/api/v1/endpoints/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport itertools\nevent_id_count = itertools.count()\n\nclass SimEvent(object):\n #def __init__(self, address=None, stmt_idx=None, message=None, exception=None, traceback=None):\n def __init__(self, state, event_type, **kwargs):\n ...
python
edit
1
2
bsd-2-clause
04416cd9652a9fdc3ab58664ab4b96cbaff3f698
axt/angr,schieb/angr,angr/angr,tyb0807/angr,f-prettyland/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/angr,f-prettyland/angr,angr/angr,axt/angr,tyb0807/angr,iamahuman/angr,iamahuman/angr,chubbymaggie/angr,angr/simuvex,schieb/angr,iamahuman/angr,axt/angr,angr/angr,f-prettyland/angr,schieb/angr
simuvex/s_event.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"Helper functions.\n\"\"\"\n\n# built-in modules\nimport json\n\n# 3rd-party modules\nfrom botocore.client import Config\n\n# local modules\nfrom mass.exception import UnsupportedSched...
python
edit
1
2
apache-2.0
8eddab84f27d5c068f5da477e05736c222cac4e2
badboy99tw/mass,KKBOX/mass,KKBOX/mass,badboy99tw/mass,KKBOX/mass,badboy99tw/mass
mass/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\nimport argparse\n\nparser = argparse.ArgumentParser(\n description=\"Upload submission from submit.cancergenetrust.org\")\nparser.add_argument('file', nargs='?', default=\"submission.json\",\n ...
python
edit
1
0
apache-2.0
a8bd6e86583b72211f028ecb51df2ee27550b258
ga4gh/CGT,ga4gh/CGT,ga4gh/CGT
submit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\n\ndef lowest_unique(int_list):\n numbers = {}\n for index in range(len(int_list)):\n group = numbers.setdefault(int(int_list[index]), [])\n group.append(index)\n for number in numbers:\n retval = ...
python
edit
2
4
mit
2339fa64974184c8174917be305c45a34013bae9
MikeDelaney/CodeEval
easy/lowest_unique/lowest_unique.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport dateutil.parser\nimport datetime\nimport humanize\n\nstatus_view = \"\"\"\\\n=== Bashhub Status\nhttps://bashhub.com/u/{0}\nTotal Commands: {1}\nTotal Sessions: {2}\nTotal Systems: {3}\n===\nSession PID {4} Started {5}\nCommands In ...
python
edit
3
1
apache-2.0
7fde39b0d4a41e8119893254d38460cf6914f028
rcaloras/bashhub-client,rcaloras/bashhub-client
bashhub/view/status.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\n\nclass EmailAuthBackend(object):\n \"\"\"\n Email Authentication Backend\n\n Allows a user to sign in using an email/password pair rather than\n a username/password pair.\n \"\"\"...
python
edit
1
5
apache-2.0
02df4f76b61556edc04869e8e70bf63c3df75ef3
armooo/zulip,qq1012803704/zulip,ikasumiwt/zulip,hj3938/zulip,nicholasbs/zulip,kou/zulip,pradiptad/zulip,jackrzhang/zulip,codeKonami/zulip,alliejones/zulip,Vallher/zulip,bastianh/zulip,natanovia/zulip,so0k/zulip,noroot/zulip,lfranchi/zulip,bitemyapp/zulip,wavelets/zulip,showell/zulip,codeKonami/zulip,praveenaki/zulip,dn...
humbug/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom contextlib import contextmanager\nimport time\n\nfrom main import has_subset_sum_zero\n\nclass Duration:\n def __init__(self, elapsed=None):\n self.elapsed = elapsed\n\n\n@contextmanager\ndef less_th...
python
edit
2
4
bsd-3-clause
697833caade1323ddb9a0b4e51031f1d494262cd
VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,vigojug/reto,vigojug/reto,vigojug/reto,vigojug/reto,VigoTech/reto,vigojug/reto,vigojug/reto,vigojug/reto,vigojug/reto,VigoTech/reto,VigoTech/reto,vigojug/reto,vigojug/reto
201705/migonzalvar/biggest_set.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom canis import siriusxm, spotify, oauth\n\ndef main():\n try:\n current = siriusxm.get_currently_playing('siriusxmu')\n spotify_id = spotify.id_for_song(current)\n print(current, spotify_id)\n except Exception,...
python
edit
3
2
mit
089e8c74106f3a19b229d085d73c932df6fe4e7d
maxgoedjen/canis
application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom signbank.registration.models import *\nfrom django.contrib import admin\nfrom django.core.urlresolvers import reverse\n\nclass UserProfileAdmin(admin.ModelAdmin):\n list_display = ['user', 'permissions', 'best_describes_you', 'austr...
python
edit
3
1
bsd-3-clause
524076bd1e629e2c73413609c012223a80b7e8a3
Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank
signbank/registration/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownershi...
python
edit
1
0
apache-2.0
df6f82dc8d6f429ec57dffb60e336253a062769b
angus-ai/angus-sdk-python
angus/client/version.py
rejected_duplicate
Near-duplicate of sample 1814
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n\nCreated on Fri Mar 30 18:27:25 2012\nAuthor: Josef Perktold\n\"\"\"\n\nfrom statsmodels.sandbox.stats.multicomp import MultiComparison\n\ndef pairwise_tukeyhsd(endog, groups, alpha=0.05):\n '''calculate...
python
edit
3
1
bsd-3-clause
e1240aa33b286ba52507128458fc6d6b3b68dfb3
gef756/statsmodels,detrout/debian-statsmodels,detrout/debian-statsmodels,bzero/statsmodels,YihaoLu/statsmodels,wzbozon/statsmodels,edhuckle/statsmodels,cbmoore/statsmodels,musically-ut/statsmodels,josef-pkt/statsmodels,cbmoore/statsmodels,rgommers/statsmodels,hlin117/statsmodels,ChadFulton/statsmodels,edhuckle/statsmod...
statsmodels/stats/multicomp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom tenyksservice import TenyksService, run_service\nfrom ddate.base import DDate\n\nclass DiscordianDate(TenyksService):\n direct_only = True\n irc_message_filters = {\n 'date': [r'^(?i)(ddate|discordian) (?P...
python
edit
1
1
mit
eb785ce7485c438cfcaf6bb48d8cf8a840970bd4
kyleterry/tenyks-contrib,cblgh/tenyks-contrib,colby/tenyks-contrib
src/tenyksddate/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.conf import settings\nfrom django.views.decorators.http import require_http_methods\nfrom django.http import HttpResponse\n\nfrom healthcheck.healthcheck import (\n DjangoDBsHealthCheck, FilesDontExistHealthChe...
python
edit
1
6
mit
6829e9b4cf87b8d8d8b6e5a1c3aaf881f66393cf
yola/healthcheck
healthcheck/contrib/django/status_endpoint/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass LoginForm(forms.Form):\n email = forms.EmailField(widget=forms.EmailInput(attrs={'placeholder': 'Email',\n 'class': 'form-control',\n ...
python
edit
1
0
mit
999d243fbc9908255ae292186bf8b17eb67e42e8
livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride
planner/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlite3 import Connection, Row\n\n\nclass Decoder:\n def __init__(self):\n self.conn = Connection('nes.sqlite')\n self.conn.row_factory = Row\n\n def __del__(self):\n self.conn.close()\n\n def decode(self,...
python
edit
1
2
mit
41c49a44c5f1bc9747b22b6d1f1088f1354a2cd5
Hexadorsimal/pynes
nes/cpu/decoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Rooter Analysis S.L.\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...
python
edit
1
1
apache-2.0
64ae41be94374b0dae33d37ea1e2f20b233dd809
OpenMOOC/moocng,OpenMOOC/moocng,GeographicaGS/moocng,GeographicaGS/moocng,GeographicaGS/moocng,GeographicaGS/moocng
moocng/peerreview/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nutils.py\n~~~~~~~~\n\nDefines utility functions used by UPnPy.\n\"\"\"\n\n\ndef camelcase_to_underscore(text):\n \"\"\"\n Convert a camelCasedString to one separated_by_underscores. Treats\n neighbo...
python
edit
1
5
mit
64a653b6bd6c9aae2492f3ee838bda1fafe639d6
WenhaoYu/upnpy,Lukasa/upnpy
upnpy/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration.\"\"\"\n\nimport logging\nimport os\nimport re\n\nfrom google.appengine.ext.appstats import recording\n\nlogging.info('Loading %s from %s', __name__, __file__)\n\n# Custom webapp middleware to add Appstats.\ndef webapp_a...
python
edit
1
8
apache-2.0
8974dc36e6ea0ab7b5ce3c78e9827d41cf1abcec
Koulio/rietveld,gco/rietveld,andyzsf/rietveld,google-code-export/rietveld,kscharding/integral-solutions-smxq,rietveld-codereview/rietveld,google-code-export/rietveld,v3ss0n/rietveld,ericmckean/rietveld,openlabs/cr.openlabs.co.in,aungzanbaw/rietveld,robfig/rietveld,Koulio/rietveld,arg0/rietveld,sajingeo/rietveld,openlab...
appengine_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Verily Life Sciences 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 Lice...
python
edit
1
0
apache-2.0
95d92a4443dac5490f304e61e21a2d556cedc12e
verilylifesciences/analysis-py-utils,verilylifesciences/analysis-py-utils
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nprime_test(n) returns a True if n is a prime number else it returns False\n'''\n\n\ndef prime_test(n):\n if n <= 1:\n return False\n if n==2 or n==3:\n return True\n if n%2==0 or n%3==0:\n return False\n ...
python
edit
4
9
mit
820ddf412d09f10977b4bec525d478cc55fe443b
amaozhao/algorithms,keon/algorithms
math/prime_test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..helpers import get_allowed\n\nimport subprocess\nimport web\n\nclass ShutdownMachineR:\n \"\"\"\n This endpoint is for shutting down a running machine.\n \"\"\"\n allow_origin, rest_url = get_allowed.get_allowed()\n de...
python
edit
1
3
apache-2.0
a633fd37a4d795e7b565254ef10aaa0f2ad77f31
cglewis/vcontrol,CyberReboot/vcontrol,CyberReboot/vcontrol,cglewis/vcontrol,CyberReboot/vcontrol,cglewis/vcontrol
vcontrol/rest/machines/shutdown.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom peewee import *\n\ndb = SqliteDatabase('emails.db')\n\n\nclass Transaction(Model):\n cost = FloatField()\n address = CharField()\n tempPass = CharField()\n domain = CharField(index=True)\n email = CharField(primary_key=T...
python
edit
11
1
mit
633c3a356a0ed88c00fbb1a5c972171de2255890
chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy
dinosaurs/transaction/database.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='libgen',\n version='0.1',\n license='MIT',\n author='Adolfo Silva',\n author_email='<EMAIL>',\n url='https://github.com/adolfosilva/libgen.py',\n description='A script to d...
python
edit
1
0
mit
d2f7fce3cac7b2d742ab553325b3394092a0c8f8
adolfosilva/libgen.py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import platform_specific, input\n\nfrom .graphics import screen\nfrom .run_loop import main_run_loop, every\n\nplatform_specific.fixup_env()\n\n\ndef run():\n main_run_loop.add_wait_callback(input.check_for_quit_event)\n main_r...
python
edit
1
2
bsd-2-clause
2b1e60a9910561de5a71e83d042b845f6be0bc73
furbrain/tingbot-python
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n__all__ = ['dailymotion_download']\n\nfrom ..common import *\n\ndef dailymotion_download(url, output_dir = '.', merge = True, info_only = False):\n \"\"\"Downloads Dailymotion videos by URL.\n \"\"\"\n\n ht...
python
edit
10
5
mit
cbeabd95e172ae213a3e95f2285b4ccc00a80254
linhua55/you-get,jindaxia/you-get,qzane/you-get,cnbeining/you-get,zmwangx/you-get,linhua55/you-get,Red54/you-get,lilydjwg/you-get,xyuanmu/you-get,qzane/you-get,zmwangx/you-get,lilydjwg/you-get,smart-techs/you-get,specter4mjy/you-get,xyuanmu/you-get,smart-techs/you-get,cnbeining/you-get
src/you_get/extractors/dailymotion.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.utils.translation import ugettext_lazy as _\nfrom wagtail.core import blocks\n\nfrom wagtail_personalisation.adapters import get_segment_adapter\nfrom wagtail_personali...
python
edit
1
6
mit
3ce0aef8d546f83485c1048dac9e9524f2501552
LabD/wagtail-personalisation,LabD/wagtail-personalisation,LabD/wagtail-personalisation
src/wagtail_personalisation/blocks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\nimport os\n\nfrom flake8.engine import get_style_guide\n\n\ncur_dir = os.path.dirname(__file__)\nconfig_file = os.path.join(cur_dir, '..'...
python
edit
1
5
mit
f625cac0a49bafc96403f5b34c2e138f8d2cfbea
wbond/asn1crypto
dev/lint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nimport utils\n\nclass Baro:\n \"\"\"This class contains info about the Void Trader and is initialized with\n data in JSON format\n\n \"\"\"\n\n def __init__(self, data):\n self.config ...
python
edit
5
3
mit
4a8b1a7633279e3276fceb3e12eca852dc583764
pabletos/Hubot-Warframe,pabletos/Hubot-Warframe
baro.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\nimport configparser\nimport shutil\nimport subprocess\n\n# Setup\nprint(\"Setting up...\")\nif os.path.isfile(\"../halite.ini\"):\n shutil.copyfile(\"../halite.ini\", \"temp.ini\")\n\nshutil.copyfile(\"tests.in...
python
edit
1
0
mit
dc1cedc1720886dcc3c3bd3da02c7aff58e5eb90
HaliteChallenge/Halite,lanyudhy/Halite-II,HaliteChallenge/Halite-II,yangle/HaliteIO,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,yangle/HaliteIO,yangle/HaliteIO,HaliteChallenge/Halite,lanyudhy/Halite-II,lanyudhy/Halite...
tests/runTests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plotly\n\ndef try_saving_plotly_figure(figure, filename):\n try:\n plotly.plotly.image.save_as(figure, filename)\n except plotly.exceptions.PlotlyError as e:\n if 'The response from plotly could not be translated....
python
edit
1
3
mit
cc6ce477550152135eed5a9e35bca8144be10111
kjteske/groupmestats,kjteske/groupmestats
groupmestats/plotly_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sympy.solvers import solve\nfrom sympy.simplify import simplify\n\n\ndef singularities(expr, sym):\n \"\"\"\n Finds singularities for a function.\n Currently supported functions are:\n - univariate real rational functions\n...
python
edit
3
2
bsd-3-clause
c13208dcc4fe1715db10d86e4dfd584c18f396fa
skidzo/sympy,chaffra/sympy,pandeyadarsh/sympy,VaibhavAgarwalVA/sympy,abhiii5459/sympy,jbbskinny/sympy,aktech/sympy,lindsayad/sympy,kevalds51/sympy,Titan-C/sympy,hargup/sympy,yukoba/sympy,farhaanbukhsh/sympy,moble/sympy,emon10005/sympy,bukzor/sympy,sahmed95/sympy,mafiya69/sympy,kaushik94/sympy,VaibhavAgarwalVA/sympy,jbb...
sympy/calculus/singularities.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA Twisted-friendly wrapper for scrypt.\n\"\"\"\nfrom txscrypt.wrapper import computeKey, verifyPassword\nfrom txscrypt._version import __version__\n\n__all__ = [\"computeKey\", \"verifyPassword\"]\n\n```\n\nApply this change: Make c...
python
edit
5
0
isc
38ce0d6b0433a68787c18691407c815d4eb1fdb2
lvh/txscrypt
txscrypt/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socket\n\ntry:\n from django.conf import settings\nexcept ImportError:\n settings = None\n\nfrom client import StatsClient\n\n\n__all__ = ['StatsClient', 'statsd']\n\nVERSION = (0, 4, 0)\n__version__ = '.'.join(map(str, VERSION...
python
edit
1
0
mit
e120858d5cb123e9f3422ddb15ce79bde8d05d64
lyft/pystatsd,jsocol/pystatsd,deathowl/pystatsd,Khan/pystatsd,Khan/pystatsd,smarkets/pystatsd,wujuguang/pystatsd,lyft/pystatsd
statsd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport sys\n\nimport acpc_python_client as acpc\n\n\nclass KuhnRandomAgent(acpc.Agent):\n def __init__(self):\n super().__init__()\n\n def on_game_start(self, game):\n pass\n\n def on_next_turn(self, ga...
python
edit
1
6
mit
74e8bf6574ce3658e1b276479c3b6ebec36844a4
JakubPetriska/poker-cfr,JakubPetriska/poker-cfr
kuhn_poker/agents/kuhn_random_agent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport webapp2\nfrom google.appengine.ext.webapp.mail_handlers import InboundMailHandler\nfrom google.appengine.api import mail\n\nclass ReplyHandler(InboundMailHandler):\n def receive(self, mail_message):\n loggin...
python
edit
1
1
mit
a765366f9542f48374fe240f3e9e049225f86cec
chaiso-krit/SimpleEmailGAE
email_handle/handle_incoming_email.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils import simplejson as json\nimport staticmedia\n\nclass JSONWidget(forms.Textarea):\n def render(self, name, value, attrs=None):\n if value is None:\n value = \"\"\n if ...
python
edit
2
3
bsd-3-clause
fe76abc03f7152f318712e1a233aad42f2e9870a
SideStudios/django-jsonfield,chrismeyersfsu/django-jsonfield
jsonfield/widgets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass App(object):\n def __init__(self, ID, name):\n self.ID = ID\n self.name = name\n self.date = []\n self.minutes = []\n self.last_day = []\n\n def id_str(self):\n return str(self.ID)\n\n ...
python
edit
2
3
mit
cea2d67bf2f806c295a6c03894efa5c8bc0644a1
fsteffek/steamplog
steamplaytime/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import Flask\nfrom flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface\nimport configparser\n\napp = Flask(__name__)\n# Security\nWTF_CSRF_ENABLED = True\napp.config['SECRET_KEY'] = '2bN...
python
edit
3
1
mit
a621a7803d177e4851d229973586d9b114b0f84c
rdempsey/weight-tracker,rdempsey/weight-tracker,rdempsey/weight-tracker
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\nimport logging\nimport unittest\n\nfrom django import test\nfrom timeout_decorator import timeout_decorator\n\nfrom realtime.app_settings import LOGGER_NAME\nfrom realtime.tasks import check_realtime_broker\nfrom realtime.ta...
python
edit
2
1
bsd-2-clause
11238c63240fa19b87fc478916bac3a4bdd86df5
AIFDR/inasafe-django,AIFDR/inasafe-django,AIFDR/inasafe-django,AIFDR/inasafe-django
django_project/realtime/tasks/test/test_celery_tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import SponsoredEvent\n\n\n@admin.register(SponsoredEvent)\nclass SponsoredEventAdmin(admin.ModelAdmin):\n fields = [\n 'host', 'title', 'slug', 'category', 'language',\n 'ab...
python
edit
1
0
mit
5c21f105057f8c5d10721b6de2c5cf698668fd3c
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
src/events/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\ndef make_set():\n\tpass\n\n\ndef link():\n\tpass\n\n\ndef find():\n\tpass\n\n\ndef union():\n\tpass\n\n\ndef kruskal():\n\t\...
python
edit
2
1
bsd-2-clause
4c2e76d62460828aa0f30e903f57e7f515cc43f7
bowen0701/algorithms_data_structures
alg_kruskal_minimum_spanning_tree.py
rejected_duplicate
Near-duplicate of sample 181
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015-2016 Masayuki Yamamoto\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# ht...
python
edit
1
1
apache-2.0
87bb90370b8d7439989072ae17634dd30276f24c
ma8ma/yanico
yanico/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nimport os.path as op\nimport yaml\nimport logging.config\n\nfrom .text_files import read\nfrom ..config import LOG_LEVEL\n\nMODULE_NAME = __name__.split('.')[0]\n\n\ndef setup_logging(log_config_file=op.j...
python
edit
1
1
bsd-3-clause
ffa8f79fe15621081acbb220a2a4dfd3d4d6d500
Neurita/galton
galton/utils/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTODO\n\"\"\"\n\n__docformat__ = 'restructuredtext'\n\nimport fmri, hrf, utils\nimport fmristat\n\nfrom nipy.testing import Tester\ntest = Tester().test\nbench = Tester().bench\n\n```\n\nApply this change: Fix missing import of formu...
python
edit
7
0
bsd-3-clause
678a6ed9e24b8f91933584ab211ee9f3b2643aad
alexis-roche/nipy,alexis-roche/nireg,arokem/nipy,arokem/nipy,bthirion/nipy,arokem/nipy,alexis-roche/nipy,nipy/nireg,alexis-roche/register,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/niseg,alexis-roche/nireg,bthirion/nipy,arokem/nipy,bthirion/nipy,alexis-roche/nipy,alexis-roche/register,bthirion/nipy,alexis-roche/nise...
nipy/modalities/fmri/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport math\nfrom django import template\nfrom ..conf import settings\n\nregister = template.Library()\n\n\n@register.inclusion_tag('googlesearch/_pagination.html', takes_context=True)\ndef show_pagination(context, pages_to_show=10):\n m...
python
edit
1
3
mit
e1b0222c8a3ed39bf76af10484a94aa4cfe5adc8
hzdg/django-google-search,hzdg/django-google-search
googlesearch/templatetags/search_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Django/PostgreSQL implementation of the Meteor DDP service.\"\"\"\nimport os.path\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-ddp',\n version='0.2.0',\n description=__doc__,\n ...
python
edit
3
0
mit
df97966941f2ffe924f98b329b136edf069eb6ca
django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,PythonicNinja/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,PythonicNinja/django-ddp,PythonicNinja/django-ddp
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import resolve\nfrom xpserver_web.views import main\n\n\ndef test_root_resolves_to_hello_world():\n found = resolve('/')\n assert found.func == main\n\n\n```\n\nApply this change: Add unit test for regist...
python
edit
1
1
mit
ee5ab61090cef682f37631a8c3f5764bdda63772
xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server
xpserver_web/tests/unit/test_web.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom __future__ import print_function\n\nimport subprocess\nimport sys\n\n\nDOCKER_CREATE_IN = 'docker create -it nodev {}'\nDOCKER_SIMPLE_CMD_IN = 'docker {} {container_id}'\n\n\ndef nodev(argv=()):\n container_id = subprocess.check_o...
python
edit
1
2
mit
9e22082a280babb1e0880fe24fa17c45aac09515
nodev-io/nodev-starter-kit,nodev-io/nodev-tutorial,nodev-io/nodev-starter-kit
docker-nodev.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import translation\nfrom feincms.module.page.models import Page\n\ndef blog_page(request):\n \"\"\" Used to get the feincms page navigation within the blog app. \"\"\"\n from feincms.module.page.models import Page\n ...
python
edit
null
null
bsd-3-clause
1c6fcd2e1ab02fef60e3507ba57cb9224b19d616
matthiask/feincms-elephantblog,feincms/feincms-elephantblog,joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,feincms/feincms-elephantblog,michaelkuty/feincms-elephantblog,matthiask/feincms-elephantblog,sbaechler/feincms-elephantblog,joshuajonah/feincms-elephantblog,sbaechler/feincms-elephantblog,sbaechle...
elephantblog/context_processors.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from functools import wraps\nexcept ImportError:\n from django.utils.functional import wraps\n\nfrom feincms.models import Page\n\n\ndef add_page_to_extra_context(view_func):\n def inner(request, *args, **kwargs):\n k...
python
edit
1
1
bsd-3-clause
c44db12bbf960c8883c4fc31f47e31f4409fe685
mjl/feincms,nickburlett/feincms,michaelkuty/feincms,michaelkuty/feincms,nickburlett/feincms,hgrimelid/feincms,matthiask/feincms2-content,pjdelport/feincms,matthiask/django-content-editor,joshuajonah/feincms,joshuajonah/feincms,matthiask/django-content-editor,matthiask/django-content-editor,mjl/feincms,joshuajonah/feinc...
feincms/views/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\n\ndef retrieve_in_order_from_db(model, ids):\n \"\"\"\n Retrieve entities of the given model from the RDBMS in order given their ids.\n :param model: model of the...
python
edit
1
4
apache-2.0
60317dda9795391dd6468b573f5e1038ae1fe384
dvalcarce/filmyou-web,dvalcarce/filmyou-web,dvalcarce/filmyou-web
src/apps/utils/db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nclass Model:\n def __init__(self, client, data, conversion = None):\n self._client = client\n self._data = data\n\n for k, v in data.items():\n if conversion is None:\n self._...
python
edit
1
4
mit
4a5ea880b77e44fa20129e6195cf37d5d72427f3
yamaneko1212/webpay-python
webpay/model/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport factory\nfrom django.contrib.auth.models import User\nfrom accounts.tests.factories import UserFactory\nfrom .. import models\n\n\nclass OrganizationFactory(factory.DjangoModelFactory):\n \"\"\"Organization factory\"\"\"\n FACT...
python
edit
1
4
mit
c81fff4ff4cccc51faf47c7ca9a63cd9eb6a2699
nvbn/coviolations_web,nvbn/coviolations_web
projects/tests/factories.py
accepted
null
true