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\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.views import generic\n\nfrom characters.forms import CharacterForm\nfrom characters.models import Character, Class, Race\n\n\nclass CharacterIndexView(generic.Lis...
python
edit
5
4
mit
061306d137b85ac59e182ffbba29d22bc8c624ba
mpirnat/django-tutorial-v2
characters/views.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom handover_api.models import User, Handover, Draft\nfrom rest_framework import viewsets\nfrom serializers import UserSerializer, HandoverSerializer, DraftSerializer\n\n\nclass UserViewSet(viewsets.ModelViewSet):\n \"\"\"\n API endp...
python
edit
1
0
mit
afc658c6ae125042182976dd95af68881865a2da
Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService
handoverservice/handover_api/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom __future__ import print_function, division\n\n# Spectrum Class\n\n# Begun August 2016\n# Jason Neal\n\n\nclass Spectrum:\n \"\"\" Spectrum class represents and manipulates astronomical spectra. \"\"\"\n \n d...
python
edit
1
1
mit
857124a12f10e3954c114c2b6b688857b80a77a5
jason-neal/spectrum_overload,jason-neal/spectrum_overload,jason-neal/spectrum_overload
Spectrum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n#\n# Define containerized environment for running Diosix on Qemu\n#\n# On Google Cloud Run: Creates HTTP server on port 8080\n# or whatever was specified using the PORT system variable.\n# Outputs via the HTTP port. This...
python
edit
1
1
mit
4b545d2e72080537672bb4ebb990708cad678344
diodesign/diosix
entrypoint.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Improve database model and apperance for admin site" }, { "role": "assistant", "content": "from django.db import models\nfrom django.utils import timezone\nimport datetime\n\n\nclass Poll(models.Model):\n\tquestion = models.CharF...
python
new_file
1
1
mit
5733c800c10a7546228ec4562e40b2bd06c77c7e
egel/polls
models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom needle.cases import NeedleTestCase\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom selenium.webdriver.support import expected_conditions as ec\n\n\nclass TestLogo(NeedleTestCa...
python
edit
1
2
apache-2.0
06914af3d8df899947a53c2fe3b3ce1de208d04d
laurentbristiel/robotframework-needle
robot-framework-needle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Work on SQL example set" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThis example shows some examples of how to access data in SQL databases using\nblaze. It walks through how blaze syntax corresponds...
python
new_file
8
1
bsd-3-clause
5cff34d49edfc5697b3e84b84d110c49728d0338
xlhtc007/blaze,cpcloud/blaze,scls19fr/blaze,ContinuumIO/blaze,aterrel/blaze,FrancescAlted/blaze,mrocklin/blaze,FrancescAlted/blaze,ChinaQuants/blaze,maxalbert/blaze,cpcloud/blaze,LiaoPan/blaze,mwiebe/blaze,aterrel/blaze,cowlicks/blaze,FrancescAlted/blaze,alexmojaki/blaze,maxalbert/blaze,mwiebe/blaze,jdmcbr/blaze,caseyc...
samples/blaze_sql.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = 'Vitaly Potyarkin'\nBIO = 'Unsorted ramblings, sometimes related to programming'\nSITENAME = 'Randomize'\nSITEURL = ''\n\nPATH = 'content'...
python
edit
1
0
apache-2.0
72205981af062258c4cf75c4323aa3e4d2859bb8
sio/potyarkin.ml,sio/potyarkin.ml
pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom django import forms\nfrom .models import Message\nfrom .utils import timestamp_to_datetime, datetime_to_timestamp\n\n\n\nclass MessageForm(forms.Form):\n text = forms.CharField(widget=forms.Textarea)\n typing = for...
python
edit
1
2
mit
14f2161efbd9c8377e6ff3675c48aba1ac0c47d5
gtklocker/ting,gtklocker/ting,mbalamat/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,dionyziz/ting,gtklocker/ting,dionyziz/ting,dionyziz/ting,dionyziz/ting,mbalamat/ting
API/chat/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flexbe_core import EventState, Logger\nimport rospy\nimport re\nimport ros\nimport math\n\nclass getDistance(EventState):\n \"\"\"\n Calcule la distance entre deux points donnes.\n\n ### InputKey\n ...
python
edit
7
1
bsd-3-clause
fba983fa54691fcde0de93d6519b3906dff3cb32
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/get_distance2D.py
rejected_lint
Too many lint violations: 7
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
4
apache-2.0
f87b979443bd4a578884bdb327dbd72616d07533
wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes
changes/backends/jenkins/generic_builder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Setup specs for packaging, distributing, and installing MR lib.\"\"\"\n\nimport distribute_setup\n# User may not have setuptools installed on their machines.\n# This script will automatically install the right v...
python
edit
1
0
apache-2.0
2849499a076b6997f8e3c7b76103df94f50ac6c3
talele08/appengine-mapreduce,talele08/appengine-mapreduce,soundofjw/appengine-mapreduce,westerhofffl/appengine-mapreduce,westerhofffl/appengine-mapreduce,GoogleCloudPlatform/appengine-mapreduce,westerhofffl/appengine-mapreduce,soundofjw/appengine-mapreduce,soundofjw/appengine-mapreduce,VirusTotal/appengine-mapreduce,Ca...
python/src/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools import find_packages\nimport versioneer\n\n# README #\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\nsetup(name='fair',\n version=versioneer.get_version(),\n ...
python
edit
1
1
apache-2.0
5ac3dab347aa3c828bd63632141959381cb08728
OMS-NetZero/FAIR
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.7.1'\n\n```\n\nApply this change: Increment patch version to 0.7.2" }, { "role": "assistant", "content": "\"\"\"yolk.\n\nA...
python
edit
1
0
bsd-3-clause
b8d812039051addacda3c04d2cfe657a58bc3681
myint/yolk,myint/yolk
yolk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This ``settings`` file specifies the Eve configuration.\"\"\"\n\nimport os\n\n# The run environment default is production.\n# Modify this by setting the NODE_ENV environment variable.\nenv = os.getenv('NODE_ENV') or 'production'\n# Th...
python
edit
1
0
bsd-2-clause
7fc81e93ea44e52ab7c29087a01eac65a145db09
ohsu-qin/qiprofile-rest,ohsu-qin/qirest
qiprofile_rest/server/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom django_services import admin\nfrom dbaas_services.analyzing.service import AnalyzeRepositoryService\nfrom dbaas_services.analyzing.forms import AnalyzeR...
python
edit
1
0
bsd-3-clause
0fe7cd8cf316dc6d4ef547d733b634de64fc768c
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/dbaas_services/analyzing/admin/analyze.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pprint import pformat\n\n\ndef assert_calls_equal(expected, actual):\n \"\"\"\n Check whether the given mock object (or mock method) calls are equal and\n return a nicely formatted message.\n \"\"\"\n if not expected == ...
python
edit
1
3
apache-2.0
d0c3906a0af504f61f39e1bc2f0fd43a71bda747
elritsch/python-sharedmock
sharedmock/asserters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef start_server():\n os.system('ssh pi@192.168.2.4 python python-libs/RaspberryDrive/driving_server.py &')\n return\n\n\n```\n\nApply this change: Add logic to try server 3 times, pausing a little more each time." }, { ...
python
edit
null
null
mit
2666eee0a59581c504b36acd618e256cf313c377
jwarshaw/RaspberryDrive
start_server.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport commands\nimport time\nimport logging\nimport sys\n\nif len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']):\n print \"ERROR! Use:\\n python scripts/data_download/school_census/create_files.py en/pt output_path\...
python
edit
2
0
mit
fbcf9fbfe162b0f7491c5c89a2098a3f56bd6c6a
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
scripts/data_download/school_census/create_all_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 reinforce.io. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#...
python
edit
1
0
apache-2.0
98b84a09fb64f0647cd136f63603a5f37de2b0ee
reinforceio/tensorforce,lefnire/tensorforce
tensorforce/tests/test_trpo_agent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\n\nfrom .common import * # noqa\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n 'ENGI...
python
edit
4
0
mit
c954c153525265b2b4ff0d89f0cf7f89c08a136c
praba230890/junction,praba230890/junction,farhaanbukhsh/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junction,praba230890/junction,ChillarAnand/junction,pythonindia/junction,nava45/junction,nava45/junction,ChillarAnand/junction,nava45/junction,ChillarAnand/junction,praba230890/...
settings/test_settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# third party\nfrom sqlalchemy import Column\nfrom sqlalchemy import Integer\nfrom sqlalchemy import String\n\n# relative\nfrom . import Base\n\n\nclass SetupConfig(Base):\n __tablename__ = \"setup\"\n\n id = Column(Integer(), primary...
python
edit
1
1
apache-2.0
691e3581f1602714fba33f6dcb139f32e0507d23
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/syft/src/syft/core/node/common/node_table/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport morepath\nimport os\nfrom .template_engine import FormatLoader\n\n\nclass App(morepath.App):\n pass\n\n\n@App.path(path='{name}')\nclass Person(object):\n def __init__(self, name):\n self.name = name\n\n\n@App.template_l...
python
edit
3
1
bsd-3-clause
ed4666b0d1bf5b8f82e298dfb043cce158c4ba2f
taschini/morepath,faassen/morepath,morepath/morepath
morepath/tests/fixtures/template_unknown_extension_no_render.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport vim\nimport re\nimport json\nfrom os import path\n\ncurrent = vim.eval(\"expand('%:p')\")\nccd = vim.eval(\"l:ccd\")\nopts = []\n\nwith open(ccd) as database:\n data = json.load(database)\n\n for d in data:\n # hax for h...
python
edit
1
0
isc
6138f02896bc865a98480be36300bf670a6defa8
justmao945/vim-clang,justmao945/vim-clang
plugin/complete_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_botanick\n----------------------------------\n\nTests for `botanick` module.\n\"\"\"\n\n\nfrom botanick import Botanick\n\ndef test_botanick():\n\temails_found = Botanick.search...
python
edit
3
1
mit
6551c882745b13d5b9be183e83f379e34b067921
avidot/Botanick
tests/test_emailharvesterws.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# from twisted.words.xish import domish\nfrom twisted.words.protocols.jabber.xmpp_stringprep import nodeprep\n\nfrom base import *\nimport random\nimport time\nimport bnw.core.bnw_objects as objs\n\n\ndef _(s, user)...
python
edit
13
4
bsd-2-clause
c8a0aee9b68b0567adb8285c3264d244e2ed71ca
stiletto/bnw,ojab/bnw,ojab/bnw,stiletto/bnw,stiletto/bnw,un-def/bnw,un-def/bnw,stiletto/bnw,ojab/bnw,ojab/bnw,un-def/bnw,un-def/bnw
bnw/handlers/command_register.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport subprocess\nimport sys\nimport time\nimport os\n\ndef start(args, logfile, errfile):\n if os.name == 'nt':\n subprocess.check_call('\"..\\\\sbt\\\\sbt.bat\" assembly', shell=True, cwd=\"spray\", stderr=errfile, stdout=logfile)\...
python
edit
4
5
bsd-3-clause
d90d91906981a4393810069b494d68230f17439e
zane-techempower/FrameworkBenchmarks,denkab/FrameworkBenchmarks,Verber/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,ashawnbandy-te-tfb/Framewo...
frameworks/Scala/spray/setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.schedules import crontab\n\n\nCELERYBEAT_SCHEDULE = {\n # Internal tasks\n \"clearsessions\": {\"schedule\": crontab(hour=3, minute=0), \"task\": \"users.tasks.clearsessions\"},\n}\n\n```\n\nApply this change: Disable pros...
python
edit
1
0
mit
1775782f100f9db9ad101a19887ba95fbc36a6e9
vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate
backend/project_name/celerybeat_schedule.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom itertools import imap, ifilter\nfrom os import path\nfrom ast import parse\n\nif __name__ == '__main__':\n package_name = 'gitim'\n\n get_vals = lambda var0, var1: imap(lambda buf: nex...
python
edit
4
0
mit
a890b8099779aaece5cb3a963c9b86bb3f8156f7
muhasturk/gitim
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom streamsx.topology.topology import *\nimport streamsx.topology.context\nimport sys\nimport tweets\n\n#\n# Continually stream tweets that contain\n# the terms passed on the command line.\n#\n# python3 app.py Food GlutenFree\n#\ndef main(...
python
edit
3
1
apache-2.0
1b0a5388c246dba1707f768e9be08b3a63503a31
IBMStreams/streamsx.topology,ddebrunner/streamsx.topology,wmarshall484/streamsx.topology,wmarshall484/streamsx.topology,ddebrunner/streamsx.topology,wmarshall484/streamsx.topology,IBMStreams/streamsx.topology,IBMStreams/streamsx.topology,ibmkendrick/streamsx.topology,ddebrunner/streamsx.topology,ibmkendrick/streamsx.to...
samples/python/topology/tweepy/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport arrow\n\n\ndef to_datetime(value):\n if value is None:\n return None\n\n # Parse ISO8601 datetime\n dt = arrow.get(value)\n\n # Return python datetime object\n return dt.datetime\n\n```\n\nApply this change: Con...
python
edit
1
2
mit
3b5ad132f3670d1c1210190ecd7b41a379fbd10e
shad7/trakt.py,fuzeman/trakt.py
trakt/core/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ndef react_context_processor(request):\n \"\"\"Expose a global list of react components to be processed\"\"\"\n print(\"react_context_processor is no longer required.\")\n\n return...
python
edit
1
1
mit
54296c607b735ce06b3420efecb312f52876e012
Frojd/django-react-templatetags,Frojd/django-react-templatetags,Frojd/django-react-templatetags
django_react_templatetags/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.conf.urls.defaults import *\nfrom django.views.generic.simple import direct_to_template\r\n\n\nurlpatterns = patterns(\"ratemyflight.views\",\n url(\"^api/airport/list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/$...
python
edit
11
0
bsd-2-clause
eb0aeda225cc7c0aef85559857de4cca35b77efd
stephenmcd/ratemyflight,stephenmcd/ratemyflight
ratemyflight/urls.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom thinglang.execution.execution import ExecutionEngine\nfrom thinglang.lexer.lexer import lexer\nfrom thinglang.parser.parser import parse\n\n\ndef run(source):\n if not source:\n raise ValueError('Got empty source')\n\n sou...
python
edit
1
2
mit
1fed9f26010f24af14abff9444862ed0861adb63
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Parked check integration test.\"\"\"\r\n\r\n\r\ndef test_parked_query(webapp):\r\n \"\"\"Test the parked API against our own domain.\"\"\"\r\n request = webapp.get('/api/parked/dnstwister.report')\r\n\r\n assert request.statu...
python
edit
1
1
unlicense
92ca956dc8f4229a1c427cb24843c7fe3baef405
thisismyrobot/dnstwister,thisismyrobot/dnstwister,thisismyrobot/dnstwister
tests/integration/test_parked.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
3
5
apache-2.0
511c0a480aa2353d30224f7dbde822a02a8dd2c4
riannucci/rietveldv2,riannucci/rietveldv2
appengine_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom been.core import DirectorySource, source_registry\nfrom hashlib import sha1\nimport re\nimport unicodedata\nimport time\nimport markdown\n\ndef slugify(value):\n value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', ...
python
edit
5
3
bsd-3-clause
c563c0deb99d3364df3650321c914164d99d32cf
chromakode/been
been/source/markdowndirectory.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .component import Component, Tuple\nfrom .bolt import BatchingBolt, Bolt, TicklessBatchingBolt\nfrom .spout import Spout\n\n__all__ = [\n 'BatchingBolt',\n 'Bolt',\n 'Component',\n 'Spout',\n 'TicklessBatchingBolt',\n ...
python
edit
4
0
apache-2.0
c7ab4bc8e0b3dbdd305a7a156ef58dddaa37296c
pystorm/pystorm
pystorm/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Setup specs for packaging, distributing, and installing gcs lib.\"\"\"\n\nimport distribute_setup\ndistribute_setup.use_setuptools()\n\n\nimport setuptools\n\n\nsetuptools.setup(\n name=\"GoogleAppEngineCloudStorageClient\",\n v...
python
edit
1
0
apache-2.0
3a5c7cecbca59567a76be1264d15d45824e69199
aozarov/appengine-gcs-client,aozarov/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,aozarov/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client
python/src/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# test builtin min and max functions\n\nprint(min(0,1))\nprint(min(1,0))\nprint(min(0,-1))\nprint(min(-1,0))\n\nprint(max(0,1))\nprint(max(1,0))\nprint(max(0,-1))\nprint(max(-1,0))\n\nprint(min([1,2,4,0,-1,2]))\nprint(max([1,2,4,0,-1,2]))\n...
python
edit
1
0
mit
e23d5a64cfd5604f74cce583db3366f2cabb5e1f
mpalomer/micropython,dinau/micropython,henriknelson/micropython,deshipu/micropython,blazewicz/micropython,supergis/micropython,MrSurly/micropython-esp32,henriknelson/micropython,torwag/micropython,matthewelse/micropython,swegener/micropython,dmazzella/micropython,turbinenreiter/micropython,Timmenem/micropython,tralamaz...
tests/basics/builtin_minmax.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport test_primitives, test_astypes, test_helpers\n\ndef get_suite():\n modules = (test_primitives, test_astypes, test_helpers)\n suites = [unittest.TestLoader().loadTestsFromModule(module) for\n module ...
python
edit
1
2
mit
9fa55bc43a3f83a57318799ba8b9f2769676bd44
wulczer/flvlib
test/test_flvlib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom nodeconductor.core.log import EventLoggerAdapter\n\n\nlogger = logging.getLogger(__name__)\nevent_logger = EventLoggerAdapter(logger)\n\n\ndef log_ssh_key_save(sender, instan...
python
edit
1
2
mit
d317b27a5dac13900beb8f2674b0725313970a80
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/core/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom libs.djpubsubhubbub.signals import updated\n\n\ndef update_handler(sender, update, **kwargs):\n \"\"\"\n Process new content being provided from SuperFeedr\n\n \"\"\"\n print sender\n for entry in update.entries:\n ...
python
edit
2
5
mit
2b8674528972655937eff797e61fa6819bfc3ba8
jpadilla/feedleap,jpadilla/feedleap
apps/feeds/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#coding=utf8\n\n\"\"\"\nError dialog interface.\n\"\"\"\n\nfrom whacked4.ui import windows\nimport wx\n\n\nclass ErrorDialog(windows.ErrorDialogBase):\n\n def __init__(self, parent):\n windows.ErrorDialogBas...
python
edit
1
2
bsd-2-clause
82696dd76351f8d0bb4fcfe9f173ada652947acc
GitExl/WhackEd4,GitExl/WhackEd4
whacked4/whacked4/ui/dialogs/errordialog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom oeqa.runtime.cases.parselogs import *\n\nrpi_errors = [\n 'bcmgenet fd580000.genet: failed to get enet-eee clock',\n 'bcmgenet fd580000.genet: failed to get enet-wol clock',\n 'bcmgenet fd580000.genet: failed to get enet clock...
python
edit
11
0
mit
a5626b61892549aa376969e44a26c01a69ddd8f8
agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,schnitzeltony/meta-raspberrypi,schnitzeltony/meta-raspberrypi,schnitzeltony/meta-raspberrypi,agherzan/meta-raspberrypi
lib/oeqa/runtime/cases/parselogs_rpi.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom app import create_app, db\nfrom app.models import User, Category\n\nfrom flask_script import Manager\nfrom flask_migrate import Migrate, MigrateCommand\n\napp = create_app(os.getenv('FLASK_CONFIG') or 'default')\nmanager =...
python
edit
1
3
mit
68aefd4c1bc682dc04721f5572ab21b609e1818f
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base_settings import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\nSECRET_KEY = '$1B&VUf$OdUEfMJXd40qdakA36@%2NE_41Dz9tFs6l=z4v_3P-'\nDATABASES = {\n 'default': {\n 'ENGINE': 'djang...
python
edit
2
0
mit
232bc2bb83190482c1125ca5879ffb6f11d67b40
dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server
puzzlehunt_server/settings/travis_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-06-09 10:26\nfrom __future__ import unicode_literals\n\nimport django.contrib.postgres.fields\nfrom django.db import migrations, models\n\n\nclass PostgresOnlyCreateModel(migratio...
python
edit
1
3
bsd-2-clause
6153952ca9794ccb1dd5d76696aa2d4881a665c1
daniell/django-import-export,jnns/django-import-export,django-import-export/django-import-export,bmihelac/django-import-export,copperleaftech/django-import-export,brillgen/django-import-export,PetrDlouhy/django-import-export,daniell/django-import-export,daniell/django-import-export,PetrDlouhy/django-import-export,PetrD...
tests/core/migrations/0004_bookwithchapters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport subprocess\nimport sys\nimport setup_util\nimport os\n\ndef start(args):\n subprocess.Popen(\"gunicorn hello:app -b 0.0.0.0:8080 -w \" + str((args.max_threads * 2)) + \" --log-level=critical\", shell=True, cwd=\"wsgi\")\n return ...
python
edit
4
4
bsd-3-clause
cfaaf421bb9627f1741a9ef4074517fd5daaec86
torhve/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,denkab/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,grob/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jetty-project/FrameworkBenchmark...
wsgi/setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Rework get body text method" }, { "role": "assistant", "content": "# TODO: remove useless params\ndef get_body(grab, encoding='cp1251', bom=False, skip_errors=True, fix_spec_chars=True):\n return grab.doc.body.decode('utf-8', ...
python
new_file
1
1
mit
0e7fdc409c17870ada40f43f72b9b20b7f490519
Holovin/D_GrabDemo
d_parser/helpers/get_body.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Check external REDIRECTIONS\"\"\"\n\nimport pytest\n\nfrom nikola import __main__\n\nfrom .helper import append_config, cd\nfrom .test_demo_build import prepare_demo_site\nfrom .test_empty_build import ( # NOQA\n test_archive_exis...
python
edit
1
1
mit
3ec71d3925a3551f6f25fc25e827c88caaff1fdd
okin/nikola,okin/nikola,okin/nikola,getnikola/nikola,getnikola/nikola,getnikola/nikola,okin/nikola,getnikola/nikola
tests/integration/test_redirection_external.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nConsumers\n=========\n\nA `Consumer` is a simple consumer of messages. Based on a given `routing_key`,\nyour consumer's :meth:`consume` method will be called with the message.\n\nExample consumers:\n\n -tapping into a koji build...
python
edit
1
1
apache-2.0
f600ec497a6ff20c4cd8c983e27482fc77ab4deb
lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha,pombredanne/moksha,mokshaproject/moksha,ralphbean/moksha,mokshaproject/moksha,mokshaproject/moksha,ralphbean/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha
moksha/api/hub/consumer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom bs4 import BeautifulSoup\nimport requests\n\n\nclass FreePacktBook(object):\n\n base_url = 'https://www.packtpub.com'\n url = base_url + '/packt/offers/free-learning/'\n\n def __init__(self, email=None, password=N...
python
edit
1
1
mit
016d955319b6971fec42ac6ada1052f88d867cee
bogdal/freepacktbook
freepacktbook/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport re\nimport six\n\nBASIC_LATIN_RE = re.compile(r'[\\u0021-\\u007E]')\nWHITESPACE_RE = re.compile(\"[\\s]+\", re.UNICODE)\n\n\ndef force_text(value):\n if isinstance(...
python
edit
2
4
mit
b67617abe1e8530523da7231a9d74283935a1bb7
hunza/htext
htext/ja/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n## PyMoira client library\n##\n## This file contains the Moira-related errors.\n#\n\nimport moira_constants\n\nclass MoiraBaseError(Exception):\n\t\"\"\"Any exception thrown by the library is inhereted from this\"\"\"\n\n\tpass\n\nclass ...
python
edit
1
2
mit
b38647ef390ed6c78c2d55d706bac2f6a396ad39
vasilvv/pymoira
errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pureyaml import dump as dumps\nfrom pureyaml import load as loads\n\n__all__ = ['dumps', 'loads']\n\n```\n\nApply this change: Use PyYAML as YAML's loader and dumper" }, { "role": "assistant", "content": "from __future__ im...
python
edit
1
0
mit
7e766747dbda4548b63b278e062335c8a10fe008
howl-anderson/vimapt,howl-anderson/vimapt
src/vimapt/library/vimapt/data_format/yaml.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bottle\nfrom bottle import response, request\nimport json\nimport jedi\nimport logging\n\n\napp = bottle.Bottle( __name__ )\nlogger = logging.getLogger( __name__ )\n\n\n@app.get( '/healthy' )\ndef healthy():\n return _Json({})\n\n\n...
python
edit
1
2
apache-2.0
78d61ad0897b0a3f3f46c6df285f1a0907a0a910
micbou/JediHTTP,vheon/JediHTTP,vheon/JediHTTP,micbou/JediHTTP
jedihttp/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .api import Account, Charges, Customers\nimport requests\n\nclass WebPay:\n def __init__(self, key, api_base = 'https://api.webpay.jp/v1'):\n self.key = key\n self.api_base = api_base\n self.account = Account(se...
python
edit
1
1
mit
fff0b4af89e02ff834221ef056b7dcb979dc6cd7
yamaneko1212/webpay-python
webpay/webpay.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport json\n\nimport falcon\n\nfrom pipeline.api import models, schemas\n\ndef json_serializer(obj):\n if isinstance(obj, datetime.datetime):\n return obj.isoformat()\n raise TypeError('{} is not JSON serializ...
python
edit
1
2
mit
c197bf432655ca051ff4fb672cd41e876d539990
thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline
pipeline/api/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.views.generic import DetailView\nfrom django.contrib.syndication.views import Feed\nfrom django.shortcuts import get_object_or_404\n\nfrom .models import Section\n\n\nclass SimpleSec...
python
edit
1
2
apache-2.0
f5d36900f7b0503a60a526fd70b57ecb91625fa0
texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections
armstrong/core/arm_sections/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport warnings\nfrom haystack import indexes\nfrom avocado.conf import settings\nfrom avocado.models import DataConcept, DataField\n\n# Warn if either of the settings are set to false\nif not getattr(settings, 'CONCEPT_SEARCH_ENABLED', Tru...
python
edit
1
1
bsd-2-clause
b723cbceb896f7ca8690eaa13c38ffb20fecd0be
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
avocado/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Taken from jinja2. Thanks, Armin Ronacher.\n# See also http://lucumr.pocoo.org/2010/2/11/porting-to-python-3-a-guide\n\n\nfrom lib2to3 import fixer_base\nfrom lib2to3.fixer_util import Name, BlankLine\n\n\nclass FixAltUnicode(fixer_base.B...
python
edit
1
1
mit
b37814280dc06dbf8aefec4490f6b73a47f05c1a
live-clones/pybtex
custom_fixers/fix_alt_unicode.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Generated by Django 2.2.28 on 2022-04-20 13:05\n\nfrom django.db import (\n migrations,\n models,\n)\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('accelerator', '0098_update_startup_update_20220408_0...
python
edit
1
0
mit
ea633b9cf062e28525910f5659b6b8f2ddbb74e3
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0099_update_program_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Creates the station class\"\"\"\n\n\n\n#import ask_user from ask_user\n#import int_check from int_check\n#import reasonable_check from reasonable_check\n\n\nclass Station:\n \"\"\"\n Each train station is an instance of the Stat...
python
edit
6
1
mit
cdae77dee9888d6d6094566747650bf80d631f03
ForestPride/rail-problem
station.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.databases import biolookup_client\n\n\ndef test_lookup_curie():\n curie = 'pubchem.compound:40976'\n res = biolookup_client.lookup_curie(curie)\n assert res['name'] == '(17R)-13-ethyl-17-ethynyl-17-hydroxy-11-' \\\n ...
python
edit
1
1
bsd-2-clause
eb4cda636a0b0ceb5312b161e97ae5f8376c9f8e
johnbachman/indra,bgyori/indra,johnbachman/indra,bgyori/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/indra
indra/tests/test_biolookup_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Class to encapsulate a message \"\"\"\n\nimport logging\n\nclass Message:\n \"\"\" A message object \"\"\"\n\n def __init__(self, text, user, room, connector):\n \"\"\" Create object with minimum properties \"\"\"\n ...
python
edit
3
1
apache-2.0
f076acb05840c361890fbb5ef0c8b43d0de7e2ed
FabioRosado/opsdroid,jacobtomlinson/opsdroid,opsdroid/opsdroid
opsdroid/message.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bleach\n\nALLOWED_TAGS = [\n 'a',\n 'abbr',\n 'acronym',\n 'b',\n 'blockquote',\n 'code',\n 'em',\n 'i',\n 'li',\n 'ol',\n 'strong',\n 'ul',\n 'p',\n 'br',\n 'h3',\n 'h4',\n 'h5',\n ...
python
edit
1
1
bsd-3-clause
cfc50cb9e70b7a5358b36a54d4b3bc27a2cfb2cb
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/common/sanitizer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom autocomplete_light import shortcuts as autocomplete_light\nfrom django.contrib.auth.models import User, Group\n\nclass UserAutocomplete(autocomplete_light.AutocompleteModelBase):\n search_fields = ['username', 'first_name', 'last_na...
python
edit
1
8
bsd-3-clause
66946f72d243f1836df0dbd8917f204011ec1701
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
hs_core/autocomplete_light_registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import template\n\nfrom admin_interface.models import Theme\n\n\nregister = template.Library()\n\n\n@register.assignment_tag(takes_context = True)\ndef get_admin_interface_theme(context):\n\n theme ...
python
edit
1
4
mit
70b4be757d671bc86876b4568632bb6fe6064001
fabiocaccamo/django-admin-interface,fabiocaccamo/django-admin-interface,fabiocaccamo/django-admin-interface
admin_interface/templatetags/admin_interface_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n@pytest.fixture(scope=\"session\")\ndef initdir(tmpdir):\n tmpdir.chdir()\n\n```\n\nApply this change: Switch from scope=\"session\" to autouse=True" }, { "role": "assistant", "content": "import pytest\n\n@py...
python
edit
1
1
mit
592ffbcd7fbbc29bfd377b5abadb39aa29f1c88d
iModels/foyer,mosdef-hub/foyer,mosdef-hub/foyer,iModels/foyer
foyer/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nAUTHENTICATION_BACKENDS = [\n \"django.contrib.auth.backends.ModelBackend\",\n \"sesame.backends.ModelBackend\",\n]\n\nCACHES = {\"default\": {\"BACKEND\": \"django.core.cache.backends.locmem...
python
edit
1
0
bsd-3-clause
4de82c9a0737c079634a87d0ea358fba7840a419
aaugustin/django-sesame,aaugustin/django-sesame
sesame/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.7\n\nfrom Handler import Handler\nimport urllib\nimport urllib2\n\n\nclass HttpPostHandler(Handler):\n\n# Inititalize Handler with url and batch size\n def __init__(self, config=None):\n Handler.__init__(self, c...
python
edit
1
2
mit
c8e11b602eb7525789ed1c5f4ea686f45b44f304
signalfx/Diamond,ramjothikumar/Diamond,jriguera/Diamond,anandbhoraskar/Diamond,jriguera/Diamond,Precis/Diamond,jriguera/Diamond,socialwareinc/Diamond,saucelabs/Diamond,acquia/Diamond,dcsquared13/Diamond,stuartbfox/Diamond,hvnsweeting/Diamond,h00dy/Diamond,cannium/Diamond,dcsquared13/Diamond,Ssawa/Diamond,bmhatfield/Dia...
src/diamond/handler/httpHandler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nSimple webhook bridge\nAccepts alert json from Alert Manager and then POSTs individual alerts to\nconfigured webhook destinations\n'''\n\nimport logging\nimport requests\nfrom promgen.sender import SenderBase\n\nlogger = logging.getLog...
python
edit
1
1
mit
3a0b844f33274f7d9c389dd89b21a953cb9c1510
kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen
promgen/sender/webhook.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nClass for FileToList\n\"\"\"\n\n\nclass FileToList(object):\n \"\"\"\n FileToList is a helper class used to import text files and turn them into\n lists, with each index in the list representing a single line from the\n ...
python
edit
1
2
apache-2.0
aa114d31ab8f97430faf0c16de2d6aff577a0d20
samjabrahams/anchorhub
anchorhub/lib/filetolist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# stdlib\nfrom typing import Any\nfrom typing import Dict\n\n# third party\nfrom pandas import DataFrame\n\n# syft relative\nfrom ...messages.infra_messages import CreateWorkerMessage\nfrom ...messages.infra_messages import DeleteWorkerMess...
python
edit
1
1
apache-2.0
76b39021fb0171da6036ceaf7894e3ff18d259ae
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
src/syft/grid/client/request_api/worker_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scrollphat\nfrom pijobs.scrollphatjob import ScrollphatJob\n\nclass ScrollJob(ScrollphatJob):\n def default_options(self):\n opts = {\n 'brightness': 2,\n 'interval': 0.1,\n 'sle...
python
edit
2
5
mit
7a281be50ba1fc59281a76470776fa9c8efdfd54
ollej/piapi,ollej/piapi
pijobs/scrolljob.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logbook\n\n\n# Let's name this DatabaseBase. 'tis a silly name.\nclass DatabaseBase(object):\n \"\"\"\n Abstract class representing a persistance layer\n\n \"\"\"\n\n def __init__(self):\n self.log = logbook.Logger...
python
edit
1
2
mit
3093941ebed1f9c726a88776819ee181cdb0b869
thiderman/piper
piper/db/core.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add intial tests for decorators." }, { "role": "assistant", "content": "from name.decorators import jsonp\nfrom mock import MagicMock\n\n\ndef test_jsonp_returns_without_status_code_200():\n # Setup the mock view.\n f = Mag...
python
new_file
1
1
bsd-3-clause
ebe6281773bd10ed2e6be9b20e257f0403e3cc74
damonkelley/django-name,unt-libraries/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name
tests/test_decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.gis.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom geotrek.authent.models import StructureRelated\nfrom geotrek.common.mixins import NoDeleteMixin, TimeSt...
python
edit
1
1
bsd-2-clause
5cd9ac8d3079fca16828b25b40fed8358286708b
makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/outdoor/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\n\ndef rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):\n dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0\n\n cell = tf.nn.rnn_cell.GRUCell(num_units, name=name...
python
edit
1
4
mit
c61e595098cd4b03828a81db98fb1e2b91b2eec0
jpbottaro/anna
anna/model/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport blaze\nfrom blaze.datadescriptor import dd_as_py\nimport unittest\n\n\nclass TestBasic(unittest.TestCase):\n\n def test_add(self):\n types = ['int8', 'int16', 'int32', 'int64']\n for type_ in types:\n a = ...
python
edit
1
3
bsd-3-clause
37207b2e91eee3f7f2417ff8157fada890c2d05b
cowlicks/blaze,ChinaQuants/blaze,scls19fr/blaze,ContinuumIO/blaze,AbhiAgarwal/blaze,mrocklin/blaze,dwillmer/blaze,AbhiAgarwal/blaze,alexmojaki/blaze,maxalbert/blaze,ContinuumIO/blaze,markflorisson/blaze-core,maxalbert/blaze,LiaoPan/blaze,FrancescAlted/blaze,scls19fr/blaze,markflorisson/blaze-core,cowlicks/blaze,cpcloud...
blaze/tests/test_calc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PdfProcessor import *\nimport argparse\nfrom datetime import datetime\nimport ConfigParser\nimport ProcessLogger\n\nparser = argparse.ArgumentParser(description='Processes the pdf and extracts the text')\nparser.add_argument('-i','--in...
python
edit
8
0
mit
454740f2657efa88efa16abdba93dc427bcf4d70
manishgs/pdf-processor,anjesh/pdf-processor,manishgs/pdf-processor,anjesh/pdf-processor
run.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.pagination import PageNumberPagination\nfrom rest_framework.response import Response\n\n\nclass QuotesResultsSetPagination(PageNumberPagination):\n page_size = 10\n page_size_query_param = 'page_size'\n max_page...
python
edit
1
3
bsd-3-clause
1747fa822c6daf63d0875cf7b3da37423b0932dc
lucifurtun/myquotes,lucifurtun/myquotes,lucifurtun/myquotes,lucifurtun/myquotes
apps/api/paginators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport foauth.providers\n\n\nclass Netflix(foauth.providers.OAuth1):\n # General info about the provider\n provider_url = 'https://www.netflix.com/'\n docs_url = 'http://developer.netflix.com/docs'\n\n # URLs to interact with th...
python
edit
1
1
bsd-3-clause
95f0ae5e04df6e5ce454b15551133caacfd44536
foauth/foauth.org,foauth/oauth-proxy,foauth/foauth.org,foauth/foauth.org
services/netflix.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! -*- coding:utf-8 -*-\n\nfrom swf.querysets.activity import ActivityTypeQuerySet\nfrom swf.querysets.domain import DomainQuerySet\nfrom swf.querysets.workflow import (WorkflowTypeQuerySet,\n WorkflowExec...
python
edit
7
0
mit
87de1fce846d7f50017fba885725a0907d43275e
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
swf/querysets/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .contentbase import LOCATION_ROOT\nCHERRY_LAB_UUID = 'cfb789b8-46f3-4d59-a2b3-adc39e7df93a'\n\n\ndef groupfinder(login, request):\n if ':' not in login:\n return None\n namespace, localname = login.split(':', 1)\n user ...
python
edit
1
13
mit
00b134df7281c39595f9efcc1c1da047d1d10277
kidaa/encoded,philiptzou/clincoded,4dn-dcic/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,philiptzou/clincoded,philiptzou/clincoded,hms-dbmi/fourfront,kidaa/encoded,ENCODE-DCC/snovault,ClinGen/clincoded,ENCODE-DCC/snovault,kidaa/encoded,T2DREAM/t2dream-portal,philiptzou/clincoded,ENCODE-DCC/snovault,ENCODE-DCC/encode...
src/encoded/authorization.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import division, print_function\nimport pytest\n\nimport sys\n# Add Spectrum location to path\nsys.path.append('../')\nimport Spectrum\n\n# Test using hypothesis\nfrom hypothesis import given\nimport...
python
edit
3
4
mit
96a6b929d80bd5ad8a7bf5d09955b3e45e5bbe56
jason-neal/spectrum_overload,jason-neal/spectrum_overload,jason-neal/spectrum_overload
test/test_Spectrum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\\\nSciPy --- A scientific computing package for Python\n===================================================\n\nYou can support the development of SciPy by purchasing documentation\nat\n\n http://www.trelgol.com\n\nIt is being distri...
python
edit
10
0
bsd-3-clause
d6b2dc137111e0a077625feefb0a2c70fc8e789b
mgaitan/scipy,rgommers/scipy,Srisai85/scipy,tylerjereddy/scipy,juliantaylor/scipy,sonnyhu/scipy,apbard/scipy,juliantaylor/scipy,zxsted/scipy,behzadnouri/scipy,mikebenfield/scipy,richardotis/scipy,nmayorov/scipy,pnedunuri/scipy,befelix/scipy,anntzer/scipy,mortada/scipy,chatcannon/scipy,WarrenWeckesser/scipy,mingwpy/scip...
Lib/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nimport relay_api.api.server as backend\n\n\nserver = Flask(__name__)\n\nbackend.init_relays()\n\n\n@server.route(\"/relay-api/relays/\", methods=[\"GET\"])\ndef get_all_relays():\n js = backend.get_all_relays()\n...
python
edit
1
2
mit
39b382770ecc1b4c4fc33273fac0467344ccadfc
pahumadad/raspi-relay-api
relay_api/api/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport RPi.GPIO as GPIO\nimport time\nimport os\n\nfrom optparse import OptionParser\n\n# Parse input arguments\nparser = OptionParser()\nparser.add_option(\"-t\", \"--testGPIO\", action=\"store_true\", help=\"Test GPIO connection, does not...
python
edit
3
0
mit
7d69bcc6474d954b311251bf077750e0418170cb
henne-/guest-password-printer,henne-/guest-password-printer
button.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport PIL\nfrom io import BytesIO\n# StringIO module is removed in python3, use io module\n\ndef read_png(res):\n import PIL.Image\n img = PIL.Image.open(BytesIO(res))\n return np.asarray(img)\n\ndef read_npy(r...
python
edit
1
2
mit
f5d56b0c54af414f02721a1a02a0eaf80dbba898
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
client/python/unrealcv/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nfrom .stop_words import STOP_WORDS\nfrom .lex_attrs import LEX_ATTRS\nfrom .punctuation import TOKENIZER_SUFFIXES\n\nfrom .tokenizer_exceptions import TOKENIZER_EXCEPTIONS\nfrom ..t...
python
edit
1
0
mit
ee4f312e89fe262a682011da3a7881bfbf47fcdf
honnibal/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy
spacy/lang/ar/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__author__ = 'mfliri'\n\n\ndef create_directory(output_dir):\n if not os.path.exists(output_dir):\n os.makedirs(output_dir)\n```\n\nApply this change: Remove author notice and add newline at end of file" }, { ...
python
edit
1
2
mit
1c5a4afa06f56ca8fd7c36b633b7f73d259f1281
alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,alphagov/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,gds-attic/transactions-explorer,gds-attic/transactions-explorer
lib/filesystem/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom dateutil import parser\n\nfrom statsSend.teamCity.teamCityConnection import TeamCityConnection\nfrom statsSend.teamCity.teamCityUrlBuilder import TeamCityUrlBuilder\nfrom statsSend.teamCity.teamCityProject imp...
python
edit
4
8
mit
d17a2308ff903b459b6c9310fd6d42eb0e051544
luigiberrettini/build-deploy-stats
statsSend/teamCity/teamCityStatisticsSender.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom watchdog.observers import Observer\nfrom watchdog.events import FileSystemEventHandler\nimport os\n\n\nclass MyEventHandler(FileSystemEventHandler):\n\n def __init__(self, filePath, callback):\n super(MyEventHandler, self).__...
python
edit
1
2
apache-2.0
9a6467688f567abc405a3fca6c4bfda7b6cd0351
BBN-Q/PyQLab,calebjordan/PyQLab,Plourde-Research-Lab/PyQLab,rmcgurrin/PyQLab
FileWatcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\nfrom .dispatch import dispatch, Dispatch\nfrom .context import (dispatch_method, DispatchMethod,\n methodify, clean_dispatch_methods)\nfrom .arginfo import arginfo\nfrom .error import RegistrationError\n...
python
edit
1
0
bsd-3-clause
56c25218cb3c987201839917930fc1ae791b5601
morepath/reg,taschini/reg
reg/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain ...
python
edit
1
1
apache-2.0
167ca3f2a91cd20f38b32ab204855a1e86785c67
StackStorm/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2
st2common/st2common/constants/meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.wtf import Form\nfrom wtforms import SelectField, RadioField\n\n\n# TODO add validation to ensure same award isn't assigned twice\nclass AwardWinnerForm(Form):\n # TODO these category constants should live separately\n ...
python
edit
1
0
mit
51801b0902e5a33c38e4c3cbff243ca6529bab64
rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy
app/awards/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom conman.routes.models import Route\nfrom . import views\n\n\nclass RouteRedirect(Route):\n \...
python
edit
1
2
bsd-2-clause
c5ba874987b2e788ae905a1a84e7f2575ff9f991
Ian-Foote/django-conman,meshy/django-conman,meshy/django-conman
conman/redirects/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.view import view_config\n\nfrom pyramid.httpexceptions import (\n HTTPNotFound,\n)\n\n@view_config(route_name='page', renderer='templates/page.mako')\n@view_config(route_name='page_view', renderer='templates/page.mako')\ndef...
python
edit
1
3
mit
e4c7a9186ef90ab6af637dbfb2bf5331823e64d9
matslindh/kimochi-consumer
kimochiconsumer/views.py
accepted
null
true