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 rest_framework import serializers\nfrom django.conf import settings\n\n\ndef validate_grader_is_current_retina_user(grader, context):\n \"\"\"\n This method checks if the passed grader equals the request.user that is passed in th...
python
edit
1
6
apache-2.0
61b96e4f925831e64e80d0253428dbd1b2c8a6a4
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/grandchallenge/annotations/validators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nclass Config(object):\n \"\"\"\n The shared configuration settings for the flask app.\n \"\"\"\n PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__)))\n CSRF_ENABLED = True\n CSRF_SESSION_K...
python
edit
1
0
mit
f5c8c9909a8b7288503f1ed3dcd87c5e59d3817c
jawrainey/atc,jawrainey/atc
settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport multiprocessing\nimport unicornhat\nimport importlib\nimport sys\nimport os\n\n\nclass State:\n ''' Handles the Unicorn HAT state'''\n\n def __init__(self):\n self.process = None\n\n def start_program(self, name, para...
python
edit
4
3
mit
c037b0a9ef8424737b978dda0400a1c31d5cb300
njbbaer/unicorn-remote,njbbaer/unicorn-remote,njbbaer/unicorn-remote
app/state.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom ..util import get_doc\n\nimport pytest\nimport numpy\n\n@pytest.mark.parametrize('sentence,matrix', [\n (\n 'She created a test for spacy',\n numpy.array([\n ...
python
edit
1
1
mit
3d64eb4a7438b6b4f46f1fdf7f47d530cb11b09c
explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy
spacy/tests/regression/test_issue2396.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Remote control Samsung televisions via TCP/IP connection\"\"\"\n\nfrom .remote import Remote\n\n__title__ = \"samsungctl\"\n__version__ = \"0.6.0-git\"\n__url__ = \"https://github.com/Ape/samsungctl\"\n__author__ ...
python
edit
3
0
mit
ef576a884bd4155fbc8bec8615c25544e74b98c3
Ape/samsungctl
samsungctl/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef main():\n from _m5.stattest import stattest_init, stattest_run\n import m5.stats\n\n stattest_init()\n\n # Initialize the global statistics\n m5.stats.initSimStats()\n m5.stats.initText(\"cout\")\n\n # We're done re...
python
edit
1
1
bsd-3-clause
9651c0278d93bf5c4620e198baac975f0c84e9a0
TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu
src/unittest/stattestmain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom utils import CSVScraper\n\n\nclass OttawaPersonScraper(CSVScraper):\n csv_url = 'http://data.ottawa.ca/en/dataset/fd26ae83-fe1a-40d8-8951-72df40021c82/resource/33a437d3-a06d-4c56-a7fe-4fd622364ce6/download/elected-o...
python
edit
1
0
mit
8d1a4869286735a55773ce0c074349bb0cafd3aa
opencivicdata/scrapers-ca,opencivicdata/scrapers-ca
ca_on_ottawa/people.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"manages github repos\"\"\"\nimport os\nimport tempfile\nfrom typing import Dict, Any\n\nimport pygit2 as git\n\nfrom .webhook.handler import Handler\n\n\nclass Manager(object):\n \"\"\"handles git repos\"\"\"\n\n def __init__(se...
python
edit
3
3
mit
a6300723150d7d1ff9a58f4f3f1297e0fe2c6f78
neoliberal/css-updater
css_updater/git/manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nfrom prometheus_client import _INF\n\n# TODO(korfuri): if python>3.3, use perf_counter() or monotonic().\n\n\ndef Time():\n \"\"\"Returns some representation of the current time.\n\n This wrapper is meant to take advantag...
python
edit
1
4
apache-2.0
67710f78677c4ad2737504d9815154c8e9f3bb18
obytes/django-prometheus,wangwanzhong/django-prometheus,wangwanzhong/django-prometheus,korfuri/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus,DingaGa/django-prometheus,DingaGa/django-prometheus
django_prometheus/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, request\nfrom requests import codes\n\napp = Flask(__name__)\n\n@app.route('/login', methods=['POST'])\ndef login():\n username = request.form['email']\n password = request.form['password']\n respo...
python
edit
4
1
mit
5bdbdfa94d06065c0536b684e6694b94ad80047b
jenca-cloud/jenca-authentication
authentication/authentication.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf8\n\ntry:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO\n\nfrom .. import KeyValueStore\n\n\nclass MemcacheStore(KeyValueStore):\n def __contains__(self, ke...
python
edit
1
3
mit
b5fc673d44624dfddfbdd98c9806b7e7e2f67331
fmarczin/simplekv,fmarczin/simplekv,karteek/simplekv,mbr/simplekv,karteek/simplekv,mbr/simplekv
simplekv/memory/memcachestore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Library:\n \"\"\"This class represents a simaris target and is initialized with\n data in JSON format\n\n \"\"\"\n\n def __init__(self, data):\n self.target = data['CurrentTarget']['EnemyType']\n sel...
python
edit
1
2
mit
b71db5eb72fd5529be060d5f90ad744f0ea0870e
pabletos/Hubot-Warframe,pabletos/Hubot-Warframe
library.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 D-Wave Systems Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
96ef78f53b7762782491bdd635a2c2dd1d6c75d2
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pydle\nfrom .fixtures import with_client\nfrom .mocks import Mock\n\n\n@with_client()\ndef test_user_creation(server, client):\n client._create_user('WiZ')\n assert 'WiZ' in client.users\n assert client.users['WiZ']['nicknam...
python
edit
3
1
bsd-3-clause
9fdea42df37c722aefb5e8fb7c04c45c06c20f17
Shizmob/pydle
tests/test_client_users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom opendebates.utils import get_site_mode\n\n\nclass SiteModeMiddleware(object):\n \"\"\"\n Gets or creates a SiteMode for the request, based on the hostname.\n \"\"\"\n\n def process_view(self, request, view_func, view_args, ...
python
edit
1
1
apache-2.0
1cb201c57c592ebd014910fe225fa594cd87c745
caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates
opendebates/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.mail import EmailMessage\nfrom django.template.loader import render_to_string\n\n\ndef notify_existing_user(user, event):\n \"\"\" Sends e-mail to existing organizer, that they're added\n to the new Event.\n \"...
python
edit
1
1
bsd-3-clause
b77e39b21a326655a04dbd15fcacfd2cc57a6008
patjouk/djangogirls,patjouk/djangogirls,patjouk/djangogirls,DjangoGirls/djangogirls,patjouk/djangogirls,DjangoGirls/djangogirls,DjangoGirls/djangogirls
core/emails.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom selenium import webdriver\n\nfrom django.contrib.staticfiles.testing import StaticLiveServerTestCase\nfrom django.core.cache import cache\n\n\nclass BrowserTest(StaticLiveServerTestCase):\n def setUp(self):\n self.browser = w...
python
edit
1
1
mit
7ef1717f34360ae48f640439fd6d6706ae755e90
essanpupil/cashflow,essanpupil/cashflow
functional_tests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.simplejson import simplejson\n\nfrom oembed.exceptions import OEmbedException\n\nclass OEmbedResource(object):\n \"\"\"\n OEmbed resource, as well as a factory for creating resource instances\n from response json\...
python
edit
1
9
mit
da28458dffc3529f16cb222fce1676ddb0d87e05
0101/djangoembed,worldcompany/djangoembed,akvo/djangoembed,akvo/djangoembed,worldcompany/djangoembed,d4nielcosta/djangoembed,0101/djangoembed,d4nielcosta/djangoembed
oembed/resources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nsession_mgr._logger.setLevel(logging.INFO)\nfrom dataportal import (DataBroker as db,\n StepScan as ss, DataBroker,\n StepScan, DataMuxer)\n\n\nfrom bluesky.standard_config impor...
python
edit
14
0
bsd-2-clause
24e65db624221d559f46ce74d88ad28ec970d754
NSLS-II-XPD/ipython_ophyd,pavoljuhas/ipython_ophyd,pavoljuhas/ipython_ophyd,NSLS-II-XPD/ipython_ophyd
profile_collection/startup/00-startup.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef main():\n print('Hello, World.')\n\nif __name__ == '__main__':\n main()\n\n\n```\n\nApply this change: Add soup extraction of links in results page" }, { "role": "assistant", "content": "from bs4 import BeautifulSoup...
python
edit
1
2
mit
feef7985133241c5e11622b0932d3eb629e7fbfe
supermitch/craigschart
craigschart/craigschart.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Create a map from the input binomials to their ITIS accepted synonyms.\n\"\"\"\nimport pandas as pd\n\nitis_results = pd.read_csv(\"search_result.csv\", encoding = \"ISO-8859-1\")\n\n```\n\nApply this change: Implement locator in nome...
python
edit
1
0
mit
54b2a6953a4da2b217052d166ad1f069f683b9ee
jnfrye/local_plants_book
scripts/nomenclature/nomenclature_map.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\n'''\nimport functools\nimport operator\nfrom .. import monads\n\n\ndef view(func, **constraints):\n '''Functions that decorates a view. This function can also checks the\n argument values\n '''\n func.is_view = True\n @f...
python
edit
1
3
bsd-3-clause
8c6b4396047736d5caf00ec30b4283ee7cdc793e
GrAndSE/lighty
lighty/wsgi/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport math\nimport numpy\nfrom demodulate.cfg import *\n\ndef gen_tone(pattern, WPM):\n\tcycles_per_sample = MORSE_FREQ/SAMPLE_FREQ\n\tradians_per_sample = cycles_per_sample * 2 * math.pi\n\telements_per_second = WPM * 50.0 / 60.0\n\tsampl...
python
edit
6
3
mit
6196c1fe13df88c1d9f1fe706120c175ab890a1d
nickodell/morse-code
gen_tone.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport util\nfrom git_wrapper import GitWrapper\n\nclass GitWrapperIntegrationTest(util.RepoTestCase):\n def test_paths(self):\n self.open_tar_repo('project01')\n assert('test_file.txt' in self.repo.paths)\...
python
edit
4
1
mit
f67abceeae7716cd385a308b26ce447e0277518f
siu/git_repo
tests/git_wrapper_integration_tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conference_scheduler import parameters\n\n\ndef test_variables(shape):\n X = parameters.variables(shape)\n assert len(X) == 21\n\n\ndef test_schedule_all_events(shape, X):\n constraints = [c for c in parameters._schedule_all_e...
python
edit
1
2
mit
f96990118d51b56ad438a8efbf2a7f83ec0f3c63
PyconUK/ConferenceScheduler
conference_scheduler/tests/test_parameters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n Copyright 2015 herd contributors\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:/...
python
edit
1
1
apache-2.0
bda8f2a258023c14849119b6ac2856253e9c68b4
FINRAOS/herd,FINRAOS/herd,FINRAOS/herd,FINRAOS/herd,FINRAOS/herd
herd-code/herd-tools/herd-content-loader/herdcl/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: latin-1 -*-\n\n\"\"\"Unit tests.\"\"\"\n\nimport unittest\nimport commonsdownloader\n\n\nclass TestCommonsDownloader(unittest.TestCase):\n\n \"\"\"Testing methods from commonsdownloader.\"\"\"\n\n ...
python
edit
1
2
mit
c9f1335bff52e54f90eed151a273879b0f5144ea
Commonists/CommonsDownloader
test/test_commonsdowloader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nfrom discord.ext import commands\nfrom lxml import etree\n\n\nclass NSFW:\n def __init__(self, bot):\n self.bot = bot\n\n @commands.command(aliases=['gel'])\n async def gelbooru(self, ctx, *, tags):\n ...
python
edit
1
6
mit
73b6a84cfc0ccc20d04c3dd80c3e505cd118be4d
BeatButton/beattie-bot,BeatButton/beattie
nsfw.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nunset = object()\n\n\ndef of(d):\n return {k: v for k, v in d.iteritems() if v != unset}\n\n\n```\n\nApply this change: Replace iteritems with six helper" }, { "role": "assistant", "content": "from six import iteritems\nunset...
python
edit
1
3
mit
d815c8de309239e3c6f28e54793c9973ca9acc39
twilio/twilio-python,tysonholub/twilio-python
twilio/values.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .connection import Connection, connect\nfrom .iproto.protocol import Iterator, Response\n\n__version__ = '0.1.5'\n\n```\n\nApply this change: Fix schema refetch bug. Version increase" }, { "role": "assistant", "content": "f...
python
edit
6
0
apache-2.0
8a43c573ebb606cfc6436396f2062fb9f00189d2
igorcoding/asynctnt,igorcoding/asynctnt,igorcoding/asynctnt
asynctnt/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.internet import reactor\nfrom twisted.web import server, resource\nfrom teiler.server import FileServerResource\nfrom teiler.client import FileRequestResource\n\nimport sys\n\nfrom twisted.python import log\n\nclass HelloResour...
python
edit
1
1
mit
e170a96859232d1436930be7a0cbfc7f2295c8a7
derwolfe/teiler,derwolfe/teiler
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom wagtail.wagtailcore.models import Page\n\n\nclass Category(Page):\n \"\"\"\n user oscars category as a wagtail Page.\n this works becuase...
python
edit
1
0
mit
4bcf35efcfc751a1c337fdcf50d23d9d06549717
pgovers/oscar-wagtail-demo,pgovers/oscar-wagtail-demo
demo/apps/catalogue/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add skeleton for secondary structure and write pdb module" }, { "role": "assistant", "content": "# import porter_paleale\n\n\ndef predict_secondary_structure(sequence):\n \"\"\"\n Predict the secondary structure of a given ...
python
new_file
1
1
mit
e0a9b97792f48efdfb166b785a8ba1fd2448a171
mchelem/cref2,mchelem/cref2,mchelem/cref2
cref/structure/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom djangoautoconf.auto_conf_admin_tools.admin_feature_base import AdminFeatureBase\nfrom django.conf import settings\n\n__author__ = 'weijia'\n\n\nclass ReversionFeature(AdminFeatureBase):\n def __init__(self):\n super(Reversion...
python
edit
1
3
bsd-3-clause
6589df70baad1b57c604736d75e424465cf8775e
weijia/djangoautoconf,weijia/djangoautoconf
djangoautoconf/auto_conf_admin_tools/reversion_feature.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.auth import authenticate, login as auth_login, logout as auth_logout\nfrom django.contrib.a...
python
edit
1
4
bsd-3-clause
8c49359a79d815cc21acbd58adc36c52d75e20b7
losmiserables/djangodash2012,losmiserables/djangodash2012
dash2012/auth/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Benchmarks too low logger levels\"\"\"\nfrom logbook import Logger, ERROR\n\n\nlog = Logger('Test logger')\nlog.level = ERROR\n\n\ndef run():\n for x in xrange(500):\n log.warning('this is not handled')\n\n```\n\nApply this ...
python
edit
2
2
bsd-3-clause
4124297475fb7d77bf492e721a74fcfa02547a14
DasIch/logbook,maykinmedia/logbook,alonho/logbook,fayazkhan/logbook,maykinmedia/logbook,Rafiot/logbook,dvarrazzo/logbook,mbr/logbook,mitsuhiko/logbook,dvarrazzo/logbook,RazerM/logbook,FintanH/logbook,omergertel/logbook,dommert/logbook,DasIch/logbook,alex/logbook,alonho/logbook,pombredanne/logbook,alonho/logbook,alex/lo...
benchmark/bench_logger_level_low.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContains components that manage services, their sequences and interdependence (later)\n\"\"\"\n\nimport threading\nimport logging\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass ServiceManager(threading.Thread):\n \"\"\"\n ...
python
edit
2
4
mit
e29039cf5b1cd0b40b8227ef73c2d5327450c162
supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer
app/core/servicemanager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport smtplib, time\n\nmessages_sent = 0.0\nstart_time = time.time()\nmsg = file('examples/benchmarking/benchmark.eml').read()\n\nwhile True:\n \n if (messages_sent % 10) == 0:\n current_time = time.time()\n print '%s m...
python
edit
2
0
isc
914fe4f61b5cae2804d293169d318df499ab8183
bcoe/secure-smtpd
examples/benchmarking/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom optparse import make_option\n\nclass Command(BaseCommand):\n help = \"Send invitations to people on the waiting list\"\n option_list = BaseCommand.option_list + (\n make...
python
edit
4
3
bsd-3-clause
b8e1e5a926bc11d2d8ea975ad24496fca444f09e
euanlau/django-betainvite
betainvite/management/commands/send_waitlist_invites.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom django.test import TestCase\n\n\nclass LoginRequiredTest(TestCase):\n def test_login_required(self):\n response = self.client.get('/')\n self.assertEqua...
python
edit
1
1
mit
999752ec378bbf6d3017f7afc964090c6871b7d4
rexhepberlajolli/RHChallenge,rexhepberlajolli/RHChallenge
app/user_administration/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport json\nimport boto3\n\ntable_name = os.environ.get(\"TABLE_NAME\")\ntable = boto3.resource(\"dynamodb\").Table(table_name)\n\ndef _log_dynamo(response):\n print \"HTTPSta...
python
edit
2
1
mit
99af762edb7a8fa4b0914bdf157af151a814adb6
Vilsepi/no-servers,Vilsepi/no-servers,Vilsepi/no-servers,Vilsepi/no-servers
backend/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .format import DrmFormat\nfrom .framebuffer import DrmFramebuffer\nfrom .buffer import DrmDumbBuffer\n\n\nclass DrmImageFramebuffer(DrmFramebuffer):\n def __init__(self, drm=None, format_=None, width=None, height=None, bo=None):\n ...
python
edit
3
11
mit
eee35fdd148c825c492333d933eaaf8503bb09f2
notro/pydrm
pydrm/image.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n# Datei zum lokalen testen, PythonAnywhere verwendet bottle_app.py direkt\n\nfrom bottle import run, debug\n\nfrom bottle_app import application\n\n#debug(True)\nrun(application, host='172.31.1.100', port=80, reloader=Tru...
python
edit
3
0
mit
d30c9f5d83c88890771a0046a59325450151eebd
christophmeissner/lagesonum,coders4help/lagesonum,fzesch/lagesonum,fzesch/lagesonum,coders4help/lagesonum,fzesch/lagesonum,coders4help/lagesonum,christophmeissner/lagesonum
lagesonum/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\r\nimport time\r\n\r\nclass cfnewfile(sublime_plugin.TextCommand):\r\n\tdef run(self, edit):\r\n\t\tlocaltime = time.asctime( time.localtime(time.time()) )\r\n\t\tself.view.insert(edit,0,\"<!---\\r\\n\tName:\\...
python
edit
3
1
bsd-2-clause
8e75605e0511b85dfd500b644613739f29705da6
dwkd/SublimeCFNewFile
cfnf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport metasentence\nimport language_model\nimport standard_kaldi\n\nimport diff_align\n\nimport json\nimport os\nimport sys\n\n\nvocab = metasentence.load_vocabulary('PROTO_LANGDIR/graphdir/words.txt')\n\ndef lm_transcribe(audio_f, text_f)...
python
edit
2
1
mit
2e99893065abef2f751e3fb5f19a59bfee79a756
lowerquality/gentle,lowerquality/gentle,lowerquality/gentle,lowerquality/gentle
language_model_transcription.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.sites.models import Site\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass File(models.Model):\n\n site = models.OneToOneField(Site, verbose_name=_(u'site'))\n conten...
python
edit
1
1
isc
6d8b99b5e4dab49c5a2e90b07f02072c116a7367
trilan/lemon-robots,trilan/lemon-robots
robots/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport os\n\n\ndef get_files(path, ext=None):\n \"\"\"\n Get all files in directory path, optionally with the specified extension\n \"\"\"\n if ext is None:\n ext = ''\n\n return [\n os...
python
edit
1
5
mit
1fbb58a3f6692a7467f758ccedca6f8baa96a165
IanLee1521/utilities
text/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom piper.db import DbCLI\n\nimport mock\n\n\nclass DbCLIBase(object):\n def setup_method(self, method):\n self.cli = DbCLI(mock.Mock())\n self.ns = mock.Mock()\n self.config = mock.Mock()\n\n\nclass TestDbCLIRun(Db...
python
edit
1
1
mit
f292cfa783bcc30c2625b340ad763db2723ce056
thiderman/piper
test/test_db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom openrcv.models import ContestInfo\nfrom openrcv.utiltest.helpers import UnitCase\n\n\nclass ContestInfoTest(UnitCase):\n\n def test_get_candidates(self):\n contest = ContestInfo()\n contest.candidates = [\"Alice\", \...
python
edit
3
1
mit
cddb0309eaa0c31569f791b8b9f2c8666b65b8b4
cjerdonek/open-rcv,cjerdonek/open-rcv
openrcv/test/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass Excerpt(models.Model):\n name = models.CharField(max_length=128, verbose_name=_('name'), blank=F...
python
edit
1
1
mit
66edf9f04c1b23681fae4234a8b297868e66b7aa
geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx
osmaxx-py/osmaxx/excerptexport/models/excerpt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Event(models.Model):\n setup_start = models.DateField\n setup_end = model.DateField\n event_start = model.DateField\n event_end = model.DateField\n teardown_start = model.DateField\n t...
python
edit
9
0
mit
02ca8bc5908b0ff15cd97846e1fd1488eddb4087
bable5/schdlr,bable5/schdlr,bable5/schdlr,bable5/schdlr
backend/schedule/models.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Custom topology example\n\nauthor: Brandon Heller (<EMAIL>)\n\nTwo directly connected switches plus a host for each switch:\n\n host --- switch --- switch --- host\n\nAdding the 'topos' dict with a key/value pair to generate our new...
python
edit
1
1
bsd-3-clause
987fd7555eadfa15d10db7991f4a7e8a4a7dbbbf
mininet/mininet,mininet/mininet,mininet/mininet
custom/topo-2sw-2host.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport time\nimport serial\n\n# configure the serial connections (the parameters differs on the\n# device you are connecting to)\n\nclass Bumper(object):\n\n def __init__(self):\n try:\n self.ser = se...
python
edit
2
5
mit
e75cba739b92a7209cee87f66d2c8c9df3f97799
ipab-rad/rad_youbot_stack,ipab-rad/rad_youbot_stack,ipab-rad/rad_youbot_stack,ipab-rad/rad_youbot_stack
bumper_kilt/scripts/run_kilt.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#Main Settings\nblog_name = \"Pomash\"\nblog_author = \"JmPotato\"\nblog_url = \"http://xxx.oo/\"\n\ntwitter_card = False\ntwitter_username = \"@Jm_Potato\"\n\nanalytics = \"\"\n\nenable_com...
python
edit
1
0
mit
12daa2e0f2cc8772fd6ff2ee3abf6054e36e1f18
JmPotato/Pomash,JmPotato/Pomash
settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aiohttp\nfrom aioes import Elasticsearch\n\nfrom .importer import Importer\nfrom .kudago import KudaGo\n\n\nELASTIC_ENDPOINTS = ['localhost:9200']\nELASTIC_INDEX_NAME = 'theatrics'\n\n\nasync def update():\n with aiohttp.ClientSes...
python
edit
1
1
mit
90531ef7caf2ad3f6cd5a50fd2f0acdc1236abd4
despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics
importer/importer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nNODE_VERSION = 'v0.11.10'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'\n\n```\n\nApply this change: Upgrade l...
python
edit
1
0
mit
834d02d65b0d71bd044b18b0be031751a8c1a7de
bbondy/electron,greyhwndz/electron,Neron-X5/electron,jacksondc/electron,baiwyc119/electron,brave/electron,tinydew4/electron,trigrass2/electron,pirafrank/electron,arturts/electron,RobertJGabriel/electron,takashi/electron,wan-qy/electron,hokein/atom-shell,digideskio/electron,tincan24/electron,jonatasfreitasv/electron,ben...
script/lib/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport json\nimport urllib\nimport urllib2\n\napi_key = os.getenv(\"MAPS_API_KEY\")\nif api_key == \"\":\n sys.exit(\"Please obtain an API key from https://developers.google.com/maps/documentation/geocoding/start#g...
python
edit
3
0
bsd-3-clause
82d312826ee67b098d9e9a52277912d8e1829960
caseyjlaw/flaskigm,caseyjlaw/flaskigm
geocode.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom rest_framework import serializers, status\nfrom rest_framework.response import Response\n\nfrom sentry.api.bases.team import TeamEndpoint\nfrom sentry.api.permissions import assert_perm\nfrom s...
python
edit
1
3
bsd-3-clause
ed91a6832d459dffa18d1b2d7b827b6aa6da2627
BuildingLink/sentry,JamesMura/sentry,mvaled/sentry,beeftornado/sentry,JamesMura/sentry,ngonzalvez/sentry,Kryz/sentry,fuziontech/sentry,nicholasserra/sentry,TedaLIEz/sentry,JackDanger/sentry,songyi199111/sentry,BayanGroup/sentry,songyi199111/sentry,1tush/sentry,kevinlondon/sentry,gg7/sentry,jokey2k/sentry,Natim/sentry,v...
src/sentry/api/endpoints/team_project_index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nCreated on Fri Mar 14 15:25:36 2014\n\n@author: ibackus\n\"\"\"\n\nimport time\n\nt0 = time.time()\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport datetime\nimport sys\n\nt1 = time.time()\nprint '...
python
edit
6
0
mit
66805c134125d957d7c7a0234e6b46e6aa1fa17f
ibackus/custom_python_packages,trquinn/custom_python_packages
walltime.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n@author: Seva Zhidkov\n@contact: <EMAIL>\n@license: The MIT license\n\nCopyright (C) 2015\n\"\"\"\n\n# Bot module contains bot's main class - Sheldon\nfrom sheldon.bot import *\n\n# Hooks module contains h...
python
edit
5
0
mit
db6b9761d51d45b2708ba6bca997196fc73fbe94
lises/sheldon
sheldon/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport zlib\nfrom .compression import CompressionSocket\n\n\nclass DefalteSocket(CompressionSocket):\n def __init__(self, socket, level):\n self._decompressor = zlib.decompressobj(level)\n...
python
edit
1
1
bsd-3-clause
d70ccd856bb4ddb061ff608716ef15f778380d62
wtolson/gnsq,hiringsolved/gnsq,wtolson/gnsq
gnsq/stream/defalte.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport requests\n\n\nclass TmdbService:\n\n __TMDB_API = 'https://api.themoviedb.org/3/movie/'\n __IMAGE_URL = 'https://image.tmdb.org/t/p/w396/'\n\n def __init__(self, movie_id):\n self.id = movie_id\n\n def g...
python
edit
1
1
mit
13ad993a0ca542d5b7e0901afe4c889c18deff5f
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
source/services/tmdb_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.template.defaultfilters import slugify\nfrom budget.models import Budget, BudgetEstimate\n\n\nclass BudgetForm(forms.ModelForm):\n class Meta:\n model = Budget\n fields = ('name', 'star...
python
edit
1
2
bsd-3-clause
42709afec9f2e2ed419365f61324ce0c8ff96423
jokimies/django-pj-budget,jokimies/django-pj-budget,toastdriven/django-budget,toastdriven/django-budget,jokimies/django-pj-budget
budget/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cell import Actor, Agent\nfrom cell.actors import Server\n\nfrom kombu import Connection\nfrom kombu.log import setup_logging \n\nconnection = Connection()\n\n\nclass GreetingActor(Server):\n default_routing_key = 'GreetingActor'\n\...
python
edit
4
1
bsd-3-clause
a24c657ca84e553a39e23d201d605d84d828c322
celery/cell,celery/cell
examples/hello.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2017 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test deprecation of R...
python
edit
1
1
mit
ed45c8201977aecde226b2e9b060820a8fd677c3
guncoin/guncoin,AkioNak/bitcoin,tjps/bitcoin,myriadteam/myriadcoin,tjps/bitcoin,tecnovert/particl-core,vmp32k/litecoin,jamesob/bitcoin,achow101/bitcoin,jtimon/bitcoin,particl/particl-core,DigitalPandacoin/pandacoin,MarcoFalke/bitcoin,kazcw/bitcoin,cdecker/bitcoin,andreaskern/bitcoin,paveljanik/bitcoin,Kogser/bitcoin,an...
test/functional/rpc_deprecated.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom cyder.cydhcp.interface.dynamic_intr.models import (DynamicInterface,\n DynamicIntrKeyValue)\nfrom cyder.base.mixins import UsabilityFormMixin\nfrom cyder....
python
edit
1
1
bsd-3-clause
be03e3d6c1323e8c750afc1d4e80997f3d9d52f3
akeym/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,zeeman/cyder,zeeman/cyder,murrown/cyder,OSU-Net/cyder,drkitty/cyder,drkitty/cyder,zeeman/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,zeeman/cyder
cyder/cydhcp/interface/dynamic_intr/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport unittest\n\nfrom ..models import sanitize_exif_value\n\n\nclass SanitizeExifValueTestCase(unittest.TestCase):\n def test_strip_null_bytes(self):\n \"\"\"\n Check that null b...
python
edit
1
1
mit
6deab74e41cabcb9a3fb4075f270a9cdd591a435
zsiciarz/django-pgallery,zsiciarz/django-pgallery
pgallery/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\n\ndef to_rgb(pixels):\n return np.repeat(pixels, 3 if pixels.shape[2] == 1 else 1, 2)\n\ndef binarize(arr, generate=np.random.uniform):\n \"\"\"\n Stochastically binarize values in [0, 1] by treating them as p...
python
edit
1
2
apache-2.0
73b61983de6ff655b4f11205c0acd2b2f92915f4
israelg99/eva
eva/util/nutil.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pythonforandroid.recipe import CythonRecipe\nfrom pythonforandroid.toolchain import current_directory, shprint\nfrom os.path import join\nimport sh\n\n\nclass XedDSARecipe(CythonRecipe):\n name = 'xeddsa'\n version = '0.4.4'\n ...
python
edit
1
1
mit
c977e1c235ccb040f28bc03c63d2667924d5edd3
germn/python-for-android,rnixx/python-for-android,rnixx/python-for-android,germn/python-for-android,rnixx/python-for-android,kivy/python-for-android,PKRoma/python-for-android,germn/python-for-android,germn/python-for-android,kronenpj/python-for-android,kivy/python-for-android,kronenpj/python-for-android,kivy/python-for...
pythonforandroid/recipes/xeddsa/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEFAULT_NUM_MONTHS = 60\n\n\ndef generate_dates(end_str, months=None):\n \"\"\"\n Given an end date as a string in YYYY-MM form (or the underscore separated\n equivalent), return a list of N consecutive months as strings in YYYY-MM...
python
edit
1
3
mit
fc8ac6ba5081e7847847d31588a65db8ea13416c
ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc
openprescribing/matrixstore/build/dates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\nfrom django.conf import settings\n\n\nclass DevsDCAPIHelper:\n def __init__(self):\n self.AUTH_TOKEN = settings.DEVS_DC_AUTH_TOKEN\n self.base_url = \"https://developers.democracyclub.org.uk/api/v1\"\n\n ...
python
edit
1
3
mit
8e47696a805cce70989a79cc6e8324aaec870f6d
DemocracyClub/electionleaflets,DemocracyClub/electionleaflets,DemocracyClub/electionleaflets
electionleaflets/apps/people/devs_dc_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nimport niche_vlaanderen as nv\nimport numpy as np\nimport rasterio\n\nclass TestFloodPlain(TestCase):\n def test__calculate(self):\n fp = nv.FloodPlain()\n fp._calculate(depth=np.array([1, 2, ...
python
edit
1
1
mit
867a8081646eb061555eda2471c5174a842dd6fd
johanvdw/niche_vlaanderen
tests/test_floodplain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django.contrib.sites.models import get_current_site\nfrom django.conf import settings\n\nfrom haystack.forms import SearchForm\nfrom entities.models import Entity\n\nfrom oshot....
python
edit
1
5
bsd-3-clause
1a65ebc4a36da37840b3bd74666bf7f607ed190b
hasadna/open-shot,hasadna/open-shot,hasadna/open-shot
oshot/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom kokki import Execute, Package\n\napt_list_path = '/etc/apt/sources.list.d/pitti-postgresql-lucid.list'\n\nExecute(\"apt-update-postgresql9\",\n command = \"apt-get update\",\n action = \"nothing\")\n\napt = None\nif en...
python
edit
5
0
bsd-3-clause
e3a530d741529a7bbfeb274c232e2c6b8a5faddc
samuel/kokki
kokki/cookbooks/postgresql9/recipes/default.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 Intel Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# ...
python
edit
1
1
apache-2.0
8f1fd73d6a88436d24f936adec997f88ad7f1413
openstack/neutron,mahak/neutron,noironetworks/neutron,huntxu/neutron,eayunstack/neutron,openstack/neutron,huntxu/neutron,eayunstack/neutron,mahak/neutron,mahak/neutron,openstack/neutron,noironetworks/neutron
neutron/tests/unit/objects/test_l3agent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib import urlencode\nfrom urllib2 import urlopen\n\nfrom rapidsms.backends.base import BackendBase\n\nclass TropoBackend(BackendBase):\n \"\"\"A RapidSMS threadless backend for Tropo\"\"\"\n\n def configure(self, config=None, ...
python
edit
3
1
bsd-3-clause
4da19da48cb9c78e1ec327a2cc886a03ca60d67c
caktus/rapidsms-tropo,dimagi/rapidsms-tropo
rtropo/outgoing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDATABASES = {\n 'default': {\n 'ENGINE': '{{ db_engine }}',\n 'NAME': '{{ db_name }}',\n 'USER': '{{ db_user}}',\n 'PASSWORD': '{{ db_pass }}',\n },\n 'other': {\n 'ENGINE': 'django.db.backends.sq...
python
edit
1
0
mit
2cf8d03324af2fadf905da811cfab4a29a6bc93a
ericholscher/pony_barn,ericholscher/pony_barn
pony_barn/settings/django_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nRevision ID: 0245_archived_flag_jobs\nRevises: 0244_another_letter_org\nCreate Date: 2018-11-22 16:32:01.105803\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\nrevision = '0245_archived_flag_jobs'\ndown_revision = ...
python
edit
1
1
mit
452924faafcfb4dcb1eb960ea30ab000f1f93962
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0245_archived_flag_jobs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nimport shutil\n\nfrom logya.core import Logya\nfrom logya.fs import copytree\nfrom logya.writer import DocWriter\n\n\nclass Generate(Logya):\n \"\"\"Generate a Web site to deploy from current directory...
python
edit
1
3
mit
8beb6ddd2e58d6a3e54ab297d490c6650fb85a9d
elaOnMars/logya,elaOnMars/logya,elaOnMars/logya,yaph/logya,yaph/logya
logya/generate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Contains functions to canonicalize relationships.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nfrom nltk.corpus import wordnet\nfrom .utils imp...
python
edit
1
4
mit
ac3c0e93adf35015d7f6cfc8c6cf2e6ec45cdeae
hotpxl/canonicalization-server,hotpxl/canonicalization-server
server/canonicalization/relationship_mapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport sys\nfrom utils import format_duration\n\nif sys.platform == \"win32\":\n default_timer = time.clock\nelse:\n default_timer = time.time\n\n\nclass Benchmark():\n\n def __init__(self, func, name=\"\", repeat=5):\...
python
edit
1
3
mit
16d0f3f0ca4ce59f08e598b6f9f25bb6dc8e1713
jameshy/libtree,conceptsandtraining/libtree
benchmark/benchmark.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\nfrom funcy import split, map\n\nfrom .analysis import global_usage, local_usage, FileSet\n\n\ndef main():\n command = sys.argv[1]\n opts, args = split(r'^--', sys.argv[2:])\n opts = dict(map(r'^...
python
edit
2
4
bsd-2-clause
413413ac7b2f5a953443bdd08d625a55bd890938
Suor/flaws
flaws/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport requests\n\ndef vimtips(msg=None):\n try:\n tip = requests.get('http://vim-tips.com/random_tips/json').json()\n except Exception as e:\n return None\n return u'%s\\n%s' % (tip['Content'], tip['...
python
edit
4
3
bsd-2-clause
5a6c809afc6b228d7f5d37154adda162802c0110
JokerQyou/bot
botcommands/vimtips.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom traits.api import HasTraits\n\nimport json\n\nclass Instrument(HasTraits):\n\t\"\"\"\n\tMain super-class for all instruments.\n\t\"\"\"\n\n\tdef get_settings(self):\n\t\treturn self.__getstate__()\n\n\tdef set_settings(self, settings):...
python
edit
3
2
apache-2.0
3e842228beba066000eac536635e7e9d4d87c8e2
Plourde-Research-Lab/PyQLab,rmcgurrin/PyQLab,calebjordan/PyQLab,BBN-Q/PyQLab
instruments/Instrument.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The version of Review Board.\n#\n# This is in the format of:\n#\n# (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released)\n#\nVERSION = (1, 0, 1, 'alpha', 1, False)\n\n\ndef get_version_string():\n version = '%s.%s' % (...
python
edit
1
5
mit
da72373b572d3ce76ccc82b9f4ada7a122e76eb2
chipx86/reviewboard,sgallagher/reviewboard,chazy/reviewboard,davidt/reviewboard,custode/reviewboard,beol/reviewboard,atagar/ReviewBoard,Khan/reviewboard,1tush/reviewboard,reviewboard/reviewboard,custode/reviewboard,davidt/reviewboard,reviewboard/reviewboard,Khan/reviewboard,chazy/reviewboard,Khan/reviewboard,chazy/revi...
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom ..plot_object import PlotObject\nfrom ..properties import Bool\n\nclass Widget(PlotObject):\n disabled = Bool(False)\n\n```\n\nApply this change: Implement display protocol for Widget (_repr...
python
edit
1
1
bsd-3-clause
96f9819ab67b48135a61c8a1e15bc808cf82d194
evidation-health/bokeh,abele/bokeh,mutirri/bokeh,percyfal/bokeh,htygithub/bokeh,jakirkham/bokeh,rhiever/bokeh,DuCorey/bokeh,srinathv/bokeh,DuCorey/bokeh,awanke/bokeh,clairetang6/bokeh,ericdill/bokeh,ahmadia/bokeh,saifrahmed/bokeh,mutirri/bokeh,bokeh/bokeh,gpfreitas/bokeh,philippjfr/bokeh,xguse/bokeh,srinathv/bokeh,drap...
bokeh/models/widget.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport yaml\nimport shutil\nimport os\nfrom subprocess import call\nfrom os.path import expanduser, isdir\n\nfrom config import load_config\nimport cliparser\nimport indexer\nimport io\nimport commands\n\n\ndef main():\n c...
python
edit
2
7
mit
00eb518f9caeab4df20f08a08826aac57f23300e
phss/notes-cli
notescli/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pupa.scrape\n\nfrom legistar.utils.itemgenerator import make_item\nfrom legistar.ext.pupa.base import Adapter, Converter\n\n\nclass OrgsAdapter(Adapter):\n '''Converts legistar data into a pupa.scrape.Person instance.\n Note th...
python
edit
1
3
bsd-3-clause
589598a9fc3871fe534e4dde60b61c9a0a56e224
opencivicdata/python-legistar-scraper,datamade/python-legistar-scraper
legistar/ext/pupa/orgs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom traits.api import HasTraits\n\nimport json\n\nclass Instrument(HasTraits):\n\t\"\"\"\n\tMain super-class for all instruments.\n\t\"\"\"\n\n\tdef get_settings(self):\n\t\treturn self.__getstate__()\n\n\tdef set_settings(self, settings):...
python
edit
3
2
apache-2.0
3e842228beba066000eac536635e7e9d4d87c8e2
Plourde-Research-Lab/PyQLab,rmcgurrin/PyQLab,calebjordan/PyQLab,BBN-Q/PyQLab
instruments/Instrument.py
rejected_duplicate
Near-duplicate of sample 1606
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom parler.models import TranslatableModel, TranslatedFields\nfrom fluent_contents.models import ContentItem, PlaceholderField\n\n\nclass SharedContent(...
python
edit
2
1
apache-2.0
6430785e60fcef9bbac3cf4e7c70981f5af6affa
jpotterm/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents,ixc/django-fluent-contents,edoburu/django-fluent-contents,jpotterm/django-fluent-contents,django-fluent/django-fluent-contents,pombredanne/django-fluent-contents,jpotterm/django-fluent-contents,pombredanne/django-f...
fluent_contents/plugins/sharedcontent/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFunctions for connecting to the pScheduler database\n\"\"\"\n\nimport psycopg2\n\ndef pg_connection(dsn='', autocommit=True):\n \"\"\"\n Connect to the database, and return a handle to it\n\n Arguments:\n\n dsn - A data ...
python
edit
1
2
apache-2.0
8703ff401b77333ca23a696026802bacebd879b1
perfsonar/pscheduler,mfeit-internet2/pscheduler-dev,perfsonar/pscheduler,perfsonar/pscheduler,perfsonar/pscheduler,mfeit-internet2/pscheduler-dev
python-pscheduler/pscheduler/pscheduler/db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# media.py\n\nclass Movie(object):\n def __init__(self,\n title,\n storyline,\n poster_image_url,\n trailer_youtube_url,\n lead_actors,\n rel...
python
edit
1
1
mit
d312815697a3457ee0b3d12da9d07c0cab7a5622
vishallama/udacity-fullstack-movie-trailer,vishallama/udacity-fullstack-movie-trailer
media.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import DetailView, UpdateView\nfrom django.contrib.auth.views import redirect_to_login\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import redirect\n\nfrom braces.views import LoginRequiredM...
python
edit
1
5
mit
324941bb4946cea19800fb1102035bd32e8028db
SoPR/horas,SoPR/horas,SoPR/horas,SoPR/horas
apps/profiles/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\nfrom django.conf.urls.static import static\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\n\n# from mezzanine.c...
python
edit
1
0
bsd-3-clause
154b64b2ee56fa4391251268ba4a85d178bedd60
weijia/djangoautoconf,weijia/djangoautoconf
djangoautoconf/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write three functions to begin the feature to mask values of some keyvalue pairs. Publish to begin writing the tests and making these work and process better. Write it through." }, { "role": "assistant", "content": "'''\nUtilitie...
python
new_file
3
4
apache-2.0
93f61fa8eb526763ddaf3de476cee6643f044908
kalaboster/stringer,kalaboster/stringer
stringer/utils/file_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:...
python
edit
2
0
apache-2.0
41fbd5b92ac04c3a4ca0e33204bb08b12a533052
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/doc/DataSources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import json\nfrom nose.tools import eq_\nfrom server import app\n\nclient = app.test_client()\n\n\ndef test_hello_world():\n # When: I access root path\n resp = client.get('/')\n\n # Then: Expected response is returned\n...
python
edit
1
1
mit
cd2bc29837d31d8999d9f72f7ddaecddb56e26a5
agarone-mm/scholastic-demo,totem/totem-demo,risingspiral/appnexus-demo
tests/unit/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Amazon.com, Inc. or its affiliates. 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# A copy of the License i...
python
edit
16
0
apache-2.0
c3d6613b4f611857bee1c1b9c414aebd9abf21d7
amznlabs/ion-python,almann/ion-python
amazon/ion/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = 'pyglab'\n__version__ = '0.0dev'\n__author__ = 'Michael Schlottke'\n__license__ = 'MIT License'\n__copyright__ = '(c) 2014 Michael Schlottke'\n\nfrom .pyglab import Pyglab\nfrom .apirequest import ApiRequest, RequestType\n\n```\...
python
edit
6
0
mit
9f3289f45c727835c8f52b0c2489b06da2f03c25
sloede/pyglab,sloede/pyglab
pyglab/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Generate a gallery to compare all available typhon styles.\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom typhon.plots import styles\n\n\ndef simple_plot(stylename):\n \"\"\"Generate a s...
python
edit
1
3
mit
c1f71014218d9b6cdb6c45d9d1ce0cc0424f70f8
atmtools/typhon,atmtools/typhon
doc/pyplots/stylesheet_gallery.py
accepted
null
true