messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\n\n\ndef sort(items):\n if items is None:\n raise TypeError(\"Collection cannot be of type None\")\n\n if len(items) < 2:\n return items\n\n pivot = random.randint(0, len(items) - 1)\n\n greater = []\... | python | edit | 1 | 6 | mit | c88efde14ea79419a69a3459b5ba9ba19332fffd | vilisimo/ads,vilisimo/ads | python/algorithms/sorting/quicksort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport builtins\nimport operator\nimport functools\nimport importlib\n\n# Choose a function based on the number of arguments.\nvarary = lambda *fs: lambda *xs: fs[len(xs) - 1](*xs)\n\n\nbuiltins.__dict__.update({\n # Runtime counterpart... | python | edit | 1 | 0 | mit | 7d1c3ca61fb11aae181fb15d4ab825dfe9c2e710 | pyos/dg | runtime/__init__.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#\n# Based on AboutArrayAssignments in the Ruby Koans\n#\n\nfrom runner.koan import *\n\nclass AboutListAssignments(Koan):\n def test_non_parallel_assignment(self):\n names = [\"Jo... | python | edit | 3 | 1 | mit | f9c654a60501ef734de178e7e2e7e89955eb39e0 | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | jesusmtnez/python/koans/koans/about_list_assignments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file... | python | edit | 1 | 1 | apache-2.0 | d26b2fd19b048d3720d757ba850d88b683d4b367 | StackStorm/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2 | st2common/st2common/runners/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nfrom decimal import Decimal\n\nfrom django.core.serializers.json import DjangoJSONEncoder\n\nDATETIME = (datetime.datetime,)\nDATE = (datetime.date,)\nTIME = (datetime.time,)\n\ntry:\n import freezegun.api\nexcept Import... | python | edit | 1 | 8 | bsd-3-clause | ac30d4e6434c6c8bbcb949465a3e314088b3fc12 | SideStudios/django-jsonfield | jsonfield/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint, request, render_template\nfrom ..load import processing_results, api\nimport string\nimport tweepy\n\n\ntwitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')\n\nascii_... | python | edit | 1 | 6 | mit | a0c0499c3da95e53e99d6386f7970079a2669141 | griimick/feature-mlsite,griimick/feature-mlsite,griimick/feature-mlsite | app/twitter/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test IAM Policy templates are valid JSON.\"\"\"\nimport jinja2\n\nfrom foremast.iam.construct_policy import render_policy_template\nfrom foremast.utils.templates import LOCAL_TEMPLATES\n\n\ndef test_all_iam_templates():\n \"\"\"Ver... | python | edit | 3 | 3 | apache-2.0 | 4027cccb929308528666e1232eeebfc1988e0ab1 | gogoair/foremast,gogoair/foremast | tests/iam/test_iam_valid_json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport csv\nimport sys\n\nimport figs\n\ndef load_counts(filename):\n counts = {}\n with open(filename) as stream:\n stream.readline()\n reader = csv.reader(stream)\n for row in reader:\n ... | python | edit | 1 | 2 | unlicense | b3ae8ed9c17ed9371a80d14d97062136da225a92 | datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business | src/chicago_flow.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib\nimport urlparse\n\nfrom . import app_settings\n\ndef strip_token(url):\n bits = urlparse.urlparse(url)\n original_query = urlparse.parse_qsl(bits.query)\n\n query = {}\n for k, v in original_query:\n if k !... | python | edit | 1 | 3 | bsd-3-clause | 81aa35961ba9552701eecbdb4d8e91448835aba0 | playfire/django-autologin | django_autologin/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom unittest import TestCase\nfrom servequnit.factory import ServerFactory\nfrom servequnit.tester import QunitSeleniumTester, TestFailedError\n\nclass QunitSeleniumTesterTestCase(TestCase):\n def _make_tester(self, server, s... | python | edit | 1 | 2 | mit | 37eeecd3d4d1e6d2972565961b5c31731ae55ec7 | bnkr/servequnit,bnkr/servequnit,bnkr/servequnit,bnkr/selenit,bnkr/selenit | tests/tester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n@author: Bryan Silverthorn <<EMAIL>>\n\"\"\"\n\nif __name__ == \"__main__\":\n from borg.tools.bench_bellman import main\n\n raise SystemExit(main())\n\ndef main():\n \"\"\"\n Benchmark the Bellman plan computation code.... | python | edit | 2 | 1 | mit | b4d3fbb0535074f2153b2b9bad53fdf654ddedd1 | borg-project/borg | src/python/borg/tools/bench_bellman.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDBB Ranking Parser\n~~~~~~~~~~~~~~~~~~\n\nExtract league rankings from the DBB (Deutscher Basketball Bund e.V.)\nwebsite.\n\nThe resulting data is structured as a list of dictionaries.\n\nPlease note that rankings are usually only a... | python | edit | 4 | 0 | mit | 1c35bf9c4831babcdaabd9feb291a757ad298657 | homeworkprod/dbb-ranking-parser | src/dbbrankingparser/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.extension import Extension\n\nfrom os import system\n\nsetup(name='vsimj1a',\n ext_modules=[ \n Extension('vsimj1a',\n ['vsim.cpp'],\n depends=[\"obj_dir/Vv3__AL... | python | edit | 3 | 0 | bsd-3-clause | f5983348940e3acf937c7ddfded73f08d767c5a1 | jamesbowman/swapforth,zuloloxi/swapforth,uho/swapforth,uho/swapforth,zuloloxi/swapforth,GuzTech/swapforth,jamesbowman/swapforth,jamesbowman/swapforth,GuzTech/swapforth,uho/swapforth,RGD2/swapforth,zuloloxi/swapforth,RGD2/swapforth,GuzTech/swapforth,zuloloxi/swapforth,GuzTech/swapforth,uho/swapforth,RGD2/swapforth,james... | j1a/verilator/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: ISO-8859-1 -*-\n#-----------------------------------------------------------------------------\n# Copyright (c) 2014, HFTools Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full lice... | python | edit | 7 | 1 | bsd-3-clause | 8f0caecc4accf8258e2cae664181680973e1add6 | hftools/hftools | hftools/dataset/tests/test_helper.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\ntry:\n from io import StringIO\nexcept ImportError: # pragma: no cover\n from StringIO import StringIO\nfrom rock.exceptions import ConfigError\n\nROCK_SHELL = (os.environ.get('RO... | python | edit | 2 | 2 | mit | 0f7732d3ceb67ecd445bb4fe2fee1edf4ce8a2f4 | silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock | rock/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date\n\nfrom rows import fields\n\n\nclass IntegerField(fields.IntegerField):\n\n @classmethod\n def deserialize(cls, value, *args, **kwargs):\n try: # Rows cannot convert values such as '2011.0' to intege... | python | edit | 1 | 2 | mit | c7b684ebf85e2a80e0acdd44ea91171bc1aa6388 | datasciencebr/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/jarbas,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/serenata-de-amor,marcusrehm/serenata-de-amor | jarbas/chamber_of_deputies/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved\n\nimport sys\n\nfrom django.core.management.base import BaseCommand\n\nfrom awx.main.task_engine import TaskSerializer\n\n\nclass Command(BaseCommand):\n \"\"\"Return a exit stat... | python | edit | 1 | 1 | apache-2.0 | 158e11dc1c11e606621a729b3b220cecf5ca700a | wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx | awx/api/management/commands/uses_mongo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unicodedata\n\n\ndef shortest_normalization_form():\n \"\"\"\n Find unicode normalization that generates shortest utf8 encoded text.\n\n Result NFKC\n \"\"\"\n s = 'Iñtërnâtiônàlizætiøn☃ and st... | python | edit | 1 | 1 | bsd-2-clause | 7f79e575b9a2b5dc15ed304e2c1cb123ab39b91b | coblo/isccbench | iscc_bench/metaid/shortnorm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.contrib.sites.models import get_current_site\n\nfrom .models import Channel\n\n\ndef channel_context(request):\n \"\"\" Channel con... | python | edit | 1 | 1 | mit | ab079e05cb0a242235c1f506cb710279bf233ba0 | YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps | opps/channels/context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse, json, os.path\nimport jinja2, requests\n\n\ndef main():\n parser = argparse.ArgumentParser()\n\n parser.add_argument(\n \"-i\", \"--input\",\n default=\"swagger.json\",\n help=\"path to or URL of ... | python | edit | 1 | 2 | mit | f5408c02202a07a1b45019eefb505eb8a0d21852 | moigagoo/swagger2markdown | swagger2markdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport optparse\nimport sys\nimport unittest\n\nfrom walrus import tests\n\ndef runtests(verbose=False, failfast=False, names=None):\n if names:\n suite = unittest.TestLoader().loadTestsFromNames(names, te... | python | edit | 1 | 3 | mit | 6281da3b846bfea26ea68e3fe480c738a5181506 | coleifer/walrus | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nURL = \"https://api.dev.verigator.com\"\n\nCREATE_SERVICE = \"v1/service/service\"\nGET_SERVICE = \"v1/service/service/{}\"\nDELETE_SERVICE = \"v1/service/service/{}\"\nGET_USERS = \"v1/service/service/{}/users\"\nGET_USER = \"v1/service/se... | python | edit | 1 | 0 | apache-2.0 | e07d6d0db7dfed8013f6b1b058167aa16070fc35 | messente/verigator-python | messente/verigator/routes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Position(models.Model):\n job_id = models.CharField(max_length=25, unique=True)\n title = models.CharField(max_length=100)\n requisition_id = models.PositiveIntegerField()\n category = mod... | python | edit | 1 | 4 | bsd-3-clause | 69595a9617ce83e04c5de5f4d8cd6185765f3697 | mozilla/django-jobvite | django_jobvite/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlite3\n\n\ndef max_sql_variables():\n \"\"\"Get the maximum number of arguments allowed in a query by the current\n sqlite3 implementation.\n\n Returns:\n int: SQLITE_MAX_VARIABLE_NUMBER\n\n \"\"\"\n db = sqli... | python | edit | 1 | 6 | mit | 2715c9accc8e8abaad72cd9afcec914dda0c6b46 | Kynarth/pokediadb | pokediadb/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Increment version number to 0.3"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n__version__ = (0, 3, 0, 'final', 0)\n"
}
] | python | new_file | 1 | 0 | bsd-3-clause | 75ae022a615d51850e5c8766b1a300207489559d | akx/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,niwinz/django-jinja,glogiotatidis/django-jinja,akx/django-jinja | django_jinja/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Base1:\n def __init__(self, *args):\n print(\"Base1.__init__\", args)\n\nclass Ctuple1(Base1, tuple):\n pass\n\na = Ctuple1()\nprint(len(a))\na = Ctuple1([1, 2, 3])\nprint(len(a))\n\nprint(\"---\")\n\nclass Ctuple2(tuple,... | python | edit | 1 | 1 | mit | c96a2f636b48b065e8404af6d67fbae5986fd34a | pramasoul/micropython,adafruit/circuitpython,henriknelson/micropython,MrSurly/micropython,bvernoux/micropython,tobbad/micropython,kerneltask/micropython,kerneltask/micropython,tobbad/micropython,tobbad/micropython,pramasoul/micropython,selste/micropython,adafruit/circuitpython,henriknelson/micropython,pozetroninc/micro... | tests/basics/subclass_native2_tuple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Launch a WMT simulation using `bash` or `qsub`.\"\"\"\n\nfrom __future__ import print_function\nimport sys\nimport os\n\nfrom ..launcher import BashLauncher, QsubLauncher\n\n\n_LAUNCHERS = {\n 'bash': BashLauncher,\n 'qsub': Qsu... | python | edit | 4 | 2 | mit | 4d3a0dc3b3b8a11a066f52bc78b1160e194ad64f | csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe | wmtexe/cmd/script.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAcquisition functions based on (GP) UCB.\n\"\"\"\n\n# future imports\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\n# use this to simplify (slightly) the Thompson i... | python | edit | 1 | 2 | bsd-2-clause | cf0110f2b1adc8fbf4b8305841961d67da33f8c7 | mwhoffman/pybo,jhartford/pybo | pybo/bayesopt/policies/thompson.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = \"2.0.0b1\"\n\nfrom pyquil.quil import Program\nfrom pyquil.api import list_quantum_computers, get_qc\n\n```\n\nApply this change: Set version back to dev"
},
{
"role": "assistant",
"content": "__version__ = \"2.0.... | python | edit | 5 | 0 | apache-2.0 | 5a653d0a6f0c97109254b043e9697675b5863218 | rigetticomputing/pyquil | pyquil/__init__.py | rejected_lint | Too many lint violations: 5 | 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 | 4 | 0 | apache-2.0 | 9d541eeebe789d61d915dbbc7fd5792e244bd93f | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: UTF-8 -*-\n\"\"\"\nhttps://github.com/behave/behave/issues/619\n\nWhen trying to do something like::\n\n foo = getattr(context, '_foo', 'bar')\n\nBehave fails with::\n\n File \"[...]/behave/runner.py\", line 208, in __ge... | python | edit | 1 | 1 | bsd-2-clause | 8fa72cea635171e94f0fb5538bc82197c6890b36 | jenisys/behave,jenisys/behave | tests/issues/test_issue0619.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport urlparse\nfrom flask import Flask, make_response\nfrom flask.ext.restful import Api\nfrom flask_peewee.db import Database\n\nimport redis\nfrom redash import settings, utils\n\n__version__ = '0.3.2'\n\napp = Flask(__name... | python | edit | 3 | 2 | bsd-2-clause | 0a522863dce6e42bf66c66a56078c00901c64f52 | denisov-vlad/redash,EverlyWell/redash,44px/redash,rockwotj/redash,M32Media/redash,guaguadev/redash,stefanseifert/redash,hudl/redash,easytaxibr/redash,denisov-vlad/redash,ninneko/redash,jmvasquez/redashtest,crowdworks/redash,easytaxibr/redash,getredash/redash,pubnative/redash,rockwotj/redash,crowdworks/redash,stefanseif... | redash/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\" Run the Skia GM executable. \"\"\"\n\nf... | python | edit | 1 | 2 | bsd-3-clause | fa7228e26791987e43fdcb216f98658b45a8b220 | google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Ti... | slave/skia_slave_scripts/run_gm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom utils import parse_worksheet\n\n\nclass TestParseWorksheet(unittest.TestCase):\n def test_open_worksheet_function_is_defined(self):\n if not hasattr(parse_worksheet, '__open_worksheet'):\n self.fail... | python | edit | 3 | 2 | mit | 35a046a61d0acc1d6b7a1c084077bdf9ed7ff720 | jdgillespie91/trackerSpend,jdgillespie91/trackerSpend | tests/utils/parse_worksheet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport alabaster\n\nfrom sprockets.mixins import cors\n\nproject = 'sprockets.mixins.cors'\ncopyright = '2015, AWeber Communication, Inc.'\nversion = cors.__version__\nrelease = '.'.join(str(v) for v in cors.version_i... | python | edit | 1 | 0 | bsd-3-clause | e188e324f1c7b8afab3b65b9e7337a0b1c3981f0 | sprockets/sprockets.mixins.cors | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Export all responses from yesterday and save them to a CSV file.\"\"\"\n\nimport sqlite3\nimport csv\nfrom datetime import datetime, timedelta\nimport os\n\n\ntoday = str(datetime.now().strftime('%Y-%m-%d'))\nyesterday = str((datetime... | python | edit | 1 | 0 | mit | 86418b48ca9bef5d0cd7cbf8468abfad633b56ed | andrewlrogers/srvy | write_csv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os, sys, time\n\nfolders = sys.argv[1:]\n\ncurrSize = dict((x, 0) for x in folders)\ntotalSize = dict((x, 0) for x in folders)\nmaxSize = dict((x, 0) for x in folders)\n\nfmts = \"%*s %13s %13s %13s\"\nfmt... | python | edit | 4 | 0 | apache-2.0 | e5940200612b293b1cecff4c6a683ecefa684345 | jskora/scratch-nifi,jskora/scratch-nifi,jskora/scratch-nifi | dirMonitor.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ntry:\n from jose.backends.pycrypto_backend import RSAKey\nexcept ImportError:\n from jose.backends.cryptography_backend import CryptographyRSAKey as RSAKey\n\ntry:\n from jose.backends.cryptography_backend import CryptographyECKe... | python | edit | 4 | 0 | mit | d12fecd2eb012862b8d7654c879dccf5ccce833f | mpdavis/python-jose | jose/backends/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Jack Brewer\n# Copyright (c) 2015 Jack Brewer\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Stylint plugin class.\"\"\"\n\nf... | python | edit | 1 | 0 | mit | 4fa8f7cb8a0592ed1d37efa20fd4a23d12e88713 | jackbrewer/SublimeLinter-contrib-stylint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.intersphinx'\n]\n\nsource_suffix = '.rst'\n\nmaster_doc = 'index'\n\nproject = 'Javelin'\ncopyright = '20... | python | edit | 1 | 0 | mit | b13baaa37133b7d4fe46682dbce7ed94d46ecaf4 | rosswhitfield/javelin | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport os.path\nimport yaml\n\n\nCONFIG_PATH = os.path.join(os.path.dirname(__file__), 'settings.yaml')\n\nwith open(CONFIG_PATH, 'r') as fh:\n config = yaml.load(fh)\n\n# Jira settings\nJIRA_URL = config['jira']['url'... | python | edit | 1 | 0 | mit | 63ca4ab4fc7237a9b32d82d73160b7f02c3ac133 | vv-p/jira-reports,vv-p/jira-reports | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django import forms\nfrom django.contrib.auth.models import Group\n\nfrom osf.models import AdminProfile\n\n\nclass LoginForm(forms.Form):\n email = forms.CharField(label=u'Email', required=... | python | edit | 1 | 0 | apache-2.0 | 88f02fbea11390ec8866c29912ed8beadc31e736 | adlius/osf.io,mfraezz/osf.io,cslzchen/osf.io,mfraezz/osf.io,baylee-d/osf.io,felliott/osf.io,mfraezz/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,pattisdr/osf.io,aaxelb/osf.io,adlius/osf.io,adlius/osf.io,felli... | admin/common_auth/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Testing Siemens CSA header reader\n\"\"\"\nimport os\nfrom os.path import join as pjoin\n\nimport numpy as np\n\nimport dipy.io.csareader as csa\n\nfrom nose.tools import assert_true, assert_false, \\\n assert_equal, assert_raise... | python | edit | 8 | 1 | bsd-3-clause | cb97f453284658da56d12ab696ef6b7d7991c727 | jyeatman/dipy,beni55/dipy,samuelstjean/dipy,FrancoisRheaultUS/dipy,demianw/dipy,demianw/dipy,nilgoyyou/dipy,jyeatman/dipy,Messaoud-Boudjada/dipy,maurozucchelli/dipy,Messaoud-Boudjada/dipy,StongeEtienne/dipy,villalonreina/dipy,JohnGriffiths/dipy,rfdougherty/dipy,villalonreina/dipy,sinkpoint/dipy,JohnGriffiths/dipy,Franc... | dipy/io/tests/test_csareader.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"prawcore.sessions: Provides prawcore.Session and prawcore.session.\"\"\"\n\nimport requests\n\n\nclass Session(object):\n \"\"\"The low-level connection interface to reddit's API.\"\"\"\n\n def __init__(self):\n \"\"\"Pre... | python | edit | 1 | 1 | bsd-2-clause | 0ad6cb338bbf10c48049d5649b5cd41eab0ed8d1 | praw-dev/prawcore | prawcore/sessions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Jonas Gratz\n# Copyright (c) 2015 Jonas Gratz\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Tlec plugin class.\"\"\"\n\nimpo... | python | edit | 1 | 2 | mit | 266e0976ee41e4dd1a9c543c84d422a8fba61230 | ePages-rnd/SublimeLinter-contrib-tlec | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom karspexet.ticket.models import Account, Reservation, Ticket, Voucher, PricingModel\n\n\nclass ReservationAdmin(admin.ModelAdmin):\n list_display = ('show', 'total', 'finalized', 'reservation_code'... | python | edit | 1 | 0 | mit | 563f2e153437e7f78e05ed9dade1bd1690bef6a5 | Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet | karspexet/ticket/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport csv\nimport datetime\n\n\nclass Row(dict):\n\n def __init__(self, *args, **kwargs):\n super(Row, self).__init__(*args, **kwargs)\n self._start_date = None\n self._end_date = None\n\n def _cast_date(self, s)... | python | edit | 1 | 2 | unlicense | aad92644d01994685d20121def511da2765adfad | datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business | src/data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import request\nimport flask\nimport hashlib\nimport json\nimport gzip\napp = Flask(__name__)\n\nstored_files = {}\n\n\n@app.route('/profile/<type>', methods=['GET'])\ndef get_dummy_files(type):\n if t... | python | edit | 4 | 5 | mit | fb02617b29cab97a70a1a11b0d3b7b62b834aa3b | rotemh/soteria | server.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 Intel Inc, OpenStack Foundation.\n# All Rights Reserved.\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# ... | python | edit | 1 | 1 | apache-2.0 | 24f1f686c5cdc9a2272adbea7d1c2e1eb481dc8d | varunarya10/oslo.i18n,openstack/oslo.i18n | tests/unit/fakes.py | rejected_duplicate | Near-duplicate of sample 2008 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass PoyoException(Exception):\n \"\"\"Super class for all of Poyo's exceptions.\"\"\"\n\n\nclass NoMatchException(PoyoException):\n \"\"\"Raised when the parser cannot find a pattern that matches the giv... | python | edit | 1 | 0 | mit | 565c95ce9a8ff96d177196c6dbf8d8f88cdfa029 | hackebrot/poyo | poyo/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport M1 # import parameters file\nfrom netpyne import sim # import netpyne sim module\n\nsim.createAndExport(netParams = M1.netParams, \n simConfig = M1.simConfig,\n reference = 'M1') # creat... | python | edit | 1 | 0 | mit | eaec82bb0a4a11f683c34550bdc23b3c6b0c48d2 | Neurosim-lab/netpyne,thekerrlab/netpyne,Neurosim-lab/netpyne | examples/M1/M1_export.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\ndef _tcldis_init():\n import sys\n import _tcldis\n mod = sys.modules[__name__]\n for key, value in _tcldis.__dict__.iteritems():\n if not callable(value):\n continue\n ... | python | edit | 1 | 0 | bsd-3-clause | 38a9f75bc87dbfb698b852145b7d62e9913602b4 | tolysz/tcldis,tolysz/tcldis,tolysz/tcldis,tolysz/tcldis | tcldis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom numba import from_dtype, cuda\nfrom numba import unittest_support as unittest\n\n\nclass TestAlignment(unittest.TestCase):\n def test_record_alignment(self):\n rec_dtype = np.dtype([('a', 'int32'), ('b', '... | python | edit | 1 | 2 | bsd-2-clause | 37d8fadd25ebf06207e046007097b06ecb9f33ac | sklam/numba,pombredanne/numba,IntelLabs/numba,GaZ3ll3/numba,stonebig/numba,stuartarchibald/numba,IntelLabs/numba,jriehl/numba,IntelLabs/numba,ssarangi/numba,stonebig/numba,stonebig/numba,seibert/numba,seibert/numba,jriehl/numba,GaZ3ll3/numba,jriehl/numba,sklam/numba,stonebig/numba,gmarkall/numba,numba/numba,gmarkall/nu... | numba/cuda/tests/cudapy/test_alignment.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logs import *\nimport requests\n\nclass Ifttt(object):\n \"\"\"\n \"\"\"\n\n def __init__(self, config, packpub_info, upload_info):\n self.__packpub_info = packpub_info\n self.__url = \"https://maker.ifttt.com/tr... | python | edit | 7 | 1 | mit | 5aca39cef15ea4381b30127b8ded31ec37ffd273 | niqdev/packtpub-crawler,niqdev/packtpub-crawler,niqdev/packtpub-crawler | script/notification/ifttt.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask, render_template\nfrom jinja2 import Template\n\napp = Flask(__name__, template_folder='.', static_url_path='', static_folder='..')\napp.config.from_pyfile('settings.py')\n\nBASE = '/%s' % app.config['REPO... | python | edit | 1 | 2 | bsd-3-clause | 24fc06d17303868ef4ea057cd001ec6cb49ab18f | sknippen/refreeze,sknippen/refreeze,sknippen/refreeze | flask_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponse\nfrom django.shortcuts import render\n\nfrom members.models import User\nfrom .models import Protocol, Topic\nfrom .forms import ProtocolForm, T... | python | edit | 8 | 3 | mit | 7fe3776a59de7a133c5e396cb43d9b4bcc476f7d | Hackfmi/Diaphanum,Hackfmi/Diaphanum | protocols/views.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis script handles the skimage exif problem.\n\"\"\"\n\nfrom PIL import Image\nimport numpy as np\n\nORIENTATIONS = { # used in apply_orientation\n 2: (Image.FLIP_LEFT_RIGHT,),\n 3: (Image.ROTATE_180,),\n 4: (Image.FLIP_... | python | edit | 1 | 6 | bsd-2-clause | 9516115f722fb3f95882553d8077bf1ab4a670ef | wangg12/caffe,longjon/caffe,gnina/gnina,gogartom/caffe-textmaps,wangg12/caffe,tackgeun/caffe,longjon/caffe,wangg12/caffe,tackgeun/caffe,tackgeun/caffe,gogartom/caffe-textmaps,gnina/gnina,tackgeun/caffe,gnina/gnina,CZCV/s-dilation-caffe,gnina/gnina,wangg12/caffe,longjon/caffe,gnina/gnina,gogartom/caffe-textmaps,CZCV/s-d... | examples/web_demo/exifutil.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom spec import eq_, skip, Spec, raises, ok_\n\nfrom invoke.run import run\nfrom invoke.exceptions import Failure\n\n\nclass Run(Spec):\n \"\"\"run()\"\"\"\n def return_code_in_result(self):\n r = run(\"echo 'foo'\")\n ... | python | edit | 4 | 1 | bsd-2-clause | 0c8739457150e4ae6e47ffb42d43a560f607a141 | frol/invoke,sophacles/invoke,mkusz/invoke,alex/invoke,mkusz/invoke,frol/invoke,pyinvoke/invoke,kejbaly2/invoke,mattrobenolt/invoke,mattrobenolt/invoke,pfmoore/invoke,tyewang/invoke,kejbaly2/invoke,pfmoore/invoke,singingwolfboy/invoke,pyinvoke/invoke | tests/run.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- conding: utf-8 -*-\r\nimport os\r\n\r\nimport jinja2\r\nimport webapp2\r\n\r\nimport utils\r\n\r\nJINJA_ENV = jinja2.Environment(\r\n loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),\r\n autoescape=True)\r\n\r\n\r\ncla... | python | edit | 1 | 3 | mit | cb4c0cb2c35d97e0364a4c010715cdf15d261e4c | lttviet/udacity-final | basehandler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom haystack import site\n\nfrom foirequest.models import FoiRequest\n\n\nclass FoiRequestIndex(indexes.SearchIndex):\n text = indexes.EdgeNgramField(document=True, use_template=True)\n title = indexes.C... | python | edit | 1 | 1 | mit | d33d7e5bf29d8c135c68eb5f1206d2f7df6f42ed | catcosmo/froide,fin/froide,catcosmo/froide,fin/froide,ryankanno/froide,stefanw/froide,catcosmo/froide,okfse/froide,ryankanno/froide,ryankanno/froide,CodeforHawaii/froide,LilithWittmann/froide,okfse/froide,CodeforHawaii/froide,ryankanno/froide,stefanw/froide,LilithWittmann/froide,okfse/froide,fin/froide,okfse/froide,Cod... | froide/foirequest/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom pymongo import MongoClient\nfrom splinter import Browser\n\nfrom features.support.http_test_client import HTTPTestClient\nfrom features.support.support import Api\n\n\nclass SplinterClient(object):\n\n def __init__... | python | edit | 4 | 1 | mit | 91141713b672f56a8c45f0250b7e9216a69237f8 | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | features/support/splinter_client.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, request, redirect, url_for\nfrom werkzeug.utils import secure_filename\nimport datetime\nimport os\n\ndef timestamp():\n return datetime.datetime.now().strftime('%Y%m%d%H%M%S')\n\napp = Flask(__n... | python | edit | 3 | 5 | bsd-3-clause | 89d9787fc5aa595f6d93d49565313212c2f95b6b | stephenbradshaw/pentesting_stuff,stephenbradshaw/pentesting_stuff,stephenbradshaw/pentesting_stuff,stephenbradshaw/pentesting_stuff | helper_servers/flask_upload.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Update init file with descriptions"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"A processor for the `Drug Gene Interaction Database (DGI-DB) <http://www.dgidb.org>`_.\n\n* `Integration of the Drug–Gene ... | python | new_file | 4 | 0 | bsd-2-clause | bf73e73c93c323a6b7395b3a1d40dd55dea4b65a | bgyori/indra,johnbachman/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,sorgerlab/indra | indra/sources/dgi/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n# this contains imports plugins that configure py.test for astropy tests.\n# by importing them here in conftest.py they are discoverable by py.test\n# no matter how it is in... | python | edit | 5 | 0 | bsd-3-clause | f7611e37ef1e0dfaa568515be365d50b3edbd11c | astropy/ccdproc,mwcraig/ccdproc | ccdproc/conftest.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\nimport unittest\n\nimport requests\n\nfrom pymatgen.ext.jhu import get_kpoints\nfrom pymatgen.io.vasp.inputs import Incar\nfro... | python | edit | 4 | 1 | mit | 08aa5214a1b1a5fc6872de76b12cf97f5ceb03c9 | gmatteo/pymatgen,vorwerkc/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,gVallverdu/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,vorwerkc/pymatgen,davidwaroquiers/pymatgen,gmatteo/pymatgen,davidwaroquiers/pymatgen,davidwaroquiers/pymatgen,davidwaroquiers/pymatgen,gVallverdu/pymatgen,vorwerkc/pymatgen,vorwerkc/pymatge... | pymatgen/ext/tests/test_jhu.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Virtual alias file syntax:\n# email, space, email, (space, email, space, email,) newline, (repeat)\n# Example:\n# <EMAIL> \t<EMAIL> <EMAIL>\n# <EMAIL> \t\t<EMAIL>\n\n# Catchall alias email = '@arenbergorkest.be'\n\nfrom email_aliases impo... | python | edit | 1 | 0 | mit | 4c646128cfcb6d59445890c257447f01ed77a706 | tfiers/arenberg-online,tfiers/arenberg-online,tfiers/arenberg-online | core/management/update_email_forwards.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'dcl9'\nfrom render import render_template\nimport argparse\nimport yaml\n\n\ndef generate_track_dict(metadata):\n d = dict()\n d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata... | python | edit | 1 | 3 | mit | 9f1134174c594564519a88cbfafe443b2be782e2 | Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator | python/render/render_tracks.py | rejected_duplicate | Near-duplicate of sample 12516 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, division\n\n# Re export\nfrom .stubs import (threadIdx, blockIdx, blockDim, gridDim, syncthreads,\n shared, local, const, grid, gridsize, atomic,\n ... | python | edit | 24 | 3 | bsd-2-clause | fa5bb37159d09c5bff53b83a4821e3f154892d1d | sklam/numba,cpcloud/numba,sklam/numba,numba/numba,seibert/numba,jriehl/numba,numba/numba,stuartarchibald/numba,jriehl/numba,IntelLabs/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,IntelLabs/numba,jriehl/numba,seibert/numba,numba/numba,jriehl/numba,gmarkall/numba,numba/numba,sklam/numba,seibert/numba,stuartar... | numba/cuda/device_init.py | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom indra.java_vm import autoclass, JavaException\n\nclass EidosReader(object):\n \"\"\"Reader object keeping an instance of the Eidos reader as a singleton.\n\n This allows the Eidos reader to need initialization when t... | python | edit | 3 | 2 | bsd-2-clause | 151a5f75a240c875fc591390c208c933e8d0e782 | johnbachman/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,pvtodorov/indra | indra/sources/eidos/eidos_reader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom binascii import unhexlify\n\ndef request(context, flow):\n if (flow.request.host.find('change.me') > -1 and flow.request.path.find('somethingaboutcurrency') > -1):\n \n\ndef response(context, flow):\n \n if (flow.request... | python | edit | 1 | 3 | apache-2.0 | 67c98ba67f99d5de5022b32fdb3eb9cd0d96908f | jstuyck/MitmProxyScripts | scripts/tappedout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass CannotOverwriteExistingCassetteException(Exception):\n def __init__(self, *args, **kwargs):\n message = self._get_message(kwargs[\"cassette\"], kwargs[\"failed_request\"])\n super(CannotOverwriteExistingCassetteExcept... | python | edit | 1 | 3 | mit | 09ed0e911e530e9b907ac92f2892248b6af245fa | kevin1024/vcrpy,graingert/vcrpy,graingert/vcrpy,kevin1024/vcrpy | vcr/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport xbmc\nimport urllib2\nimport threading\nfrom pulsar.config import PULSARD_HOST\n\n\nclass PulsarMonitor(xbmc.Monitor):\n def __init__(self):\n self._closing = threading.Event()\n\n @property\n def closing(self):\n ... | python | edit | 1 | 2 | bsd-3-clause | 64a78085fffe8dc525596b870c8e150d9171f271 | likeitneverwentaway/plugin.video.quasar,komakino/plugin.video.pulsar,johnnyslt/plugin.video.quasar,elrosti/plugin.video.pulsar,Zopieux/plugin.video.pulsar,pmphxs/plugin.video.pulsar,johnnyslt/plugin.video.quasar,steeve/plugin.video.pulsar,peer23peer/plugin.video.quasar,peer23peer/plugin.video.quasar,likeitneverwentaway... | resources/site-packages/pulsar/monitor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom functools import wraps, _make_key\n\nimport redis\n\n\ndef logging(*triggers, out=sys.stdout):\n \"\"\"Will log function if all triggers are True\"\"\"\n log = min(triggers) # will be False if any trigger is false\n\... | python | edit | 1 | 3 | mit | 17ddd05e35f7cff90530cdb2df0c4971b97e7302 | festinuz/cmcb,festinuz/cmcb | cmcb/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Josh Hagins\n# Copyright (c) 2014 Josh Hagins\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Scalac plugin class.\"\"\"\n\nfr... | python | edit | 1 | 3 | mit | 564bca1e051f6b1cc068d1dd53de55fcf4dc7c6f | jawshooah/SublimeLinter-contrib-scalac | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.flatpages.admin import FlatpageForm, FlatPageAdmin\nfrom django.contrib.flatpages.models import FlatPage\nfrom django.utils.module_loading import import... | python | edit | 1 | 0 | bsd-3-clause | 866f95cfb0db14da0596efe41a128baf2a3a1cfe | ad-m/django-basic-tinymce-flatpages | django_basic_tinymce_flatpages/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom guardian.admin import GuardedModelAdmin\n\n#from django.contrib import admin\nimport xadmin as admin\n\n\ndef register_to_sys(class_inst, admin_class = None):\n if admin_class is None:\n admin_class = type(class_inst.__name__... | python | edit | 1 | 4 | bsd-3-clause | d1008437dcf618700bce53913f3450aceda8a23f | weijia/djangoautoconf,weijia/djangoautoconf | djangoautoconf/auto_conf_admin_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef populate_enrollment_info(apps, schema_editor):\n \"\"\"\n Populate the Enrollment info based on static text\n \"\... | python | edit | 3 | 3 | mit | 13b602c50f3be62b2a3a8b267ba00b685fc0c7fe | smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning | python/ecep/portal/migrations/0011_auto_20160518_1211.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\n\ndef display_results(repo_name, contributors, api_len):\n \"\"\"\n Fancy display. \n \"\"\"\n print(\"\\n\")\n\n print(\"All Contributors:\")\n\n # Sort and consolidate on Name\n ... | python | edit | 1 | 5 | bsd-3-clause | b286e03f96cce8518dd60b74ff8dac6d7b7c5a97 | LABHR/octohatrack,glasnt/octohat | octohatrack/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom girder.utility.webroot import Webroot\n\nfrom .rest_slicer_cli import genRESTEndPointsForSlicerCLIsInDocker\n\n_template = os.path.join(\n os.path.dirname(__file__),\n 'webroot.mako'\n)\n\n\ndef load(info):\n gird... | python | edit | 1 | 1 | apache-2.0 | e17fe26503e9a72b43c1b9b662dd4319ccff1fd7 | DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK | server/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyforms\nfrom pyforms import BaseWidget\nfrom pyforms.Controls import ControlText\n\nclass WelcomeScreen(BaseWidget):\n\tdef __init__(self):\n\t\tsuper(WelcomeScreen, self).__init__(\"TEST1\")\n\t\tself.testText = ControlText(\"WHERE... | python | edit | 7 | 1 | mit | 628d65a15b5c51cb7d4a68e1e6babc01a712a538 | cgsheeh/SFWR3XA3_Redevelopment,cgsheeh/SFWR3XA3_Redevelopment | src/redevbazaar.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Include Plot, SPlot in xnuplot.__all__."
},
{
"role": "assistant",
"content": "from .plot import Plot, SPlot\n__all__ = [\"Plot\", \"SPlot\", \"gnuplot\", \"numplot\"]\n"
}
] | python | new_file | 3 | 0 | mit | e1fc818b8d563c00c77060cd74d2781b287c0b5d | marktsuchida/Xnuplot | xnuplot/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/ms/dist/python/PROJ/core/2.5.2-1/bin/python\n# ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-\n# Copyright (C) 2008 Morgan Stanley\n#\n# This module is part of Aquilon\n\"\"\"Add /ms/dist... | python | edit | 4 | 5 | apache-2.0 | 7c37d4f95897ddbc061ec0a84185a19899b85b89 | quattor/aquilon-protocols,quattor/aquilon-protocols | compile_for_dist.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport sys\nimport requests\n\n\ndef py_version():\n if sys.version_info < (3, 0, 0):\n print(sys.version)\n print('You must use Python 3.x to run this application.')\n sys.exit(1)\n\n\ndef get_version(e... | python | edit | 1 | 3 | mit | 7bfa9d24f7af811746bbb0336b5e75a592cff186 | jpdoria/aws_eis | aws_eis/lib/checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Aparajita Fishman\n# Copyright (c) 2013 Aparajita Fishman\n#\n# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jsl\n... | python | edit | 1 | 0 | mit | ae11251f7669e4ddde6f0491ff1fe0afdfd54a7a | SublimeLinter/SublimeLinter-jsl | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tkinter import *\n\n\nclass TextEditor():\n def __init__(self):\n self.root = Tk()\n self.root.wm_title(\"BrickText\")\n self.text_panel = Text(self.root)\n self.text_panel.pack(fill=BOTH, expand=YES)\n\n... | python | edit | 6 | 1 | mit | cd006f8d3885005e867255e63819fc8a5c7430bf | BrickText/BrickText | redactor/TextEditor.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom module_interface import Module, ModuleType\n\nclass Say(Module):\n def __init__(self):\n self.trigger = \"say\"\n self.moduleType = ModuleType.ACTIVE\n self.messagesTypes = [\"PRIVMSG\"]\n self.helpText =... | python | edit | 1 | 1 | mit | 4585ab22a4185122162b987cf8cc845a63ed5a05 | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | pyheufybot/modules/say.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport json\nimport sqlite3\nimport socket\nfrom collections import deque\n\nclass safesocket(socket.socket):\n def __init__(self, *args):\n self.floodQueue = deque([0] * 10, maxlen=10)\n super().__init__(*args... | python | edit | 1 | 3 | mit | 51a505747d29198ea3df0a43c32b1018a40e6bc9 | laneshetron/monopoly | monopoly/Bank/g.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"maguire\",\n version=\"0.1\",\n url='https://github.com/picsadotcom/maguire',\n license='BSD',\n author='Picsa',\n author_email='<EMAIL>',\n packages=find_p... | python | edit | 1 | 0 | bsd-3-clause | 42b6e51df4377e933e6ee24b12a5d83d42a655da | picsadotcom/maguire | backend/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the... | python | edit | 1 | 1 | apache-2.0 | e5f662d9cebe4133705eca74a300c325d432ad04 | stackforge/anvil,stackforge/anvil,mc2014/anvil,mc2014/anvil | anvil/components/cinder_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nStatistics.\n\"\"\"\n\n\nfrom numpy import exp\nfrom scipy.stats import rv_continuous\nfrom scipy.special import gamma\n\n\nclass grw_gen(rv_continuous):\n \"\"\"\n Generalized Reverse Weibull distribution.\n\n PDF:\n ... | python | edit | 3 | 5 | mit | 209c0d0201b76a0f2db7d8b507b2eaa2df03fcae | jbernhard/ebe-analysis | lib/stats.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom time import sleep\n\n# Usage: ./bonus_level.py, then input your plaintext enclosed by quotes\n\n# Note: I haven't made a ciphertext for this because the attack on it depends\n# a lot on the machine it was implem... | python | edit | 2 | 0 | mit | 8b889c10abf043f6612409973458e8a0f0ed952e | japesinator/Bad-Crypto,japesinator/Bad-Crypto | bonus_level.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\"\"\"\nThis subpackage contains classes and functions for celestial coordinates\nof astronomical objects. It also contains a framework for conversions\nbetween coordinate s... | python | edit | 13 | 0 | bsd-3-clause | 2a2c9dc43a7d096dd5601f51c0407c36433e73e1 | kelle/astropy,lpsinger/astropy,dhomeier/astropy,StuartLittlefair/astropy,DougBurke/astropy,astropy/astropy,stargaser/astropy,AustereCuriosity/astropy,lpsinger/astropy,stargaser/astropy,pllim/astropy,astropy/astropy,funbaker/astropy,joergdietrich/astropy,joergdietrich/astropy,kelle/astropy,aleksandr-bakanov/astropy,kell... | astropy/coordinates/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\n__version__ = VERSION = (0, 0, 1)\n\nlogger = logging.getLogger('mutant')\n\nimport hacks\n```\n\nApply this change: Make sure to avoid loading hacks on mutant loading"
},
{
"role": "assistant",
"content": "imp... | python | edit | 1 | 0 | mit | f52287bfc6a38b35daf9d880886cc159550a157c | charettes/django-mutant | mutant/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, unicode_literals, absolute_import, division\n\n__all__ = [\n '__version__',\n]\n\n# Examples of valid version strings\n# __version__ = '1.2.3.dev1' # Development release 1\n# __version__ = '1.2.3a1... | python | edit | 1 | 0 | bsd-3-clause | ab1028ccd73ea39d14f1eee57b91b303b31e2d63 | pybee/briefcase | briefcase/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\nimport json\nimport re\n\ndef extract_from_b64(encoded_doc):\n #doc = base64.urlsafe_b64decode(encoded_doc)\n doc = encoded_doc.decode(\"base64\")\n doc = re.sub(\"</p><p>\", \" \", doc)\n soup = B... | python | edit | 3 | 2 | mit | 0f4fd0d49ba06963b0b97e032fd2e6eedf8e597a | ahalterman/cloacina | cloacina/extract_from_b64.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport dask.array as da\nfrom into import into\nfrom dask.array.into import discover\nfrom dask.dot import dot_graph\nimport tempfile\nimport rcnmf.tsqr\n\nx = da.random.standard_normal(size=(100, 100), blockshape=(100, 50))\n\ntemp_file = ... | python | edit | 3 | 0 | bsd-2-clause | 51d37f7ac6bebf9b1d4c6efd16a968b7410a7791 | marianotepper/csnmf | rcnmf/tests/test_tsqr2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Utility to load compute graphs from diffrent sources.\"\"\"\n\nimport os\n\ndef load_compute_graph(name):\n path = os.path.join('/opt/aiy/models', name)\n with open(path, 'rb') as f:\n return f.read()\n\n\n```\n\nApply this chang... | python | edit | 1 | 1 | apache-2.0 | 359040acc4b8c54db84e154b15cabfb23b4e18a6 | google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian | src/aiy/vision/models/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nimport os, shutil\n\nfiles = [\"/etc/crontab\",\n \"/usr/local/bin/ssu\", \"/usr/local/bin/xyzzy\",\n \"/home/dagon/.bashrc\",\"/home/dagon/.i3status.conf\", \"/home/dagon/.profile\", \"/home/dagon/.v... | python | edit | 1 | 0 | unlicense | 1f8b54d22cee5653254514bf07c1b4cb1eb147cb | weloxux/dotfiles,weloxux/dotfiles | _grabconfig.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pysam\nfrom numpy.random import choice\nimport math\n\n\ndef assign_random_gt(input_vcf, outname, sample_name=\"HG\", default_af=0.01):\n vcf_pointer = pysam.VariantFile(filename=input_vcf)\n new_header = vcf_pointer.header.cop... | python | edit | 1 | 5 | apache-2.0 | 87d1b24d8ee806c5aa6cf73d83472b129b0f87fe | sbg/Mitty,sbg/Mitty | mitty/simulation/genome/sampledgenome.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport emission.core.wrapper.motionactivity as ecwa\nimport emission.net.usercache.formatters.common as fc\nimport attrdict as ad\n\ndef format(entry):\n formatted_entry = ad.AttrDict()\n formatted_entry[\"_id\"] = e... | python | edit | 3 | 4 | bsd-3-clause | cfeca089dd10a6853d2b969d2d248a0f7d506d1a | e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,yw374cornell/e-mis... | emission/net/usercache/formatters/android/motion_activity.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.