messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" these are helper classes for object creation during the scrape \"\"\"\nfrom pupa.models.person import Person\nfrom pupa.models.organization import Organization\nfrom pupa.models.membership import Membership\n\n\nclass Legislator(Pers... | python | edit | 1 | 1 | bsd-3-clause | 1965b1db79758a53eb45f81bb25e83c4d09b95af | rshorey/pupa,rshorey/pupa,influence-usa/pupa,influence-usa/pupa,mileswwatkins/pupa,datamade/pupa,opencivicdata/pupa,mileswwatkins/pupa,datamade/pupa,opencivicdata/pupa | pupa/scrape/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom subprocess import Popen\nfrom typing import List\n\n\ndef systemctl(*args: List[str]):\n Popen(['systemctl'] + list(args))\n\n\ndef start(service: str):\n systemctl('start', service)\n\n\ndef stop(service: ... | python | edit | 1 | 1 | mit | 48ab9fa0e54103a08fec54d8a4d4870dc701d918 | hatchery/genepool,hatchery/Genepool2 | genes/systemd/commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport collections\nimport math\nimport unittest\n\nimport raco.fakedb\nimport raco.myrial.interpreter as interpreter\nimport raco.myrial.parser as parser\n\nclass MyrialTestCase(unittest.TestCase):\n\n def setUp(self):\n self.d... | python | edit | 5 | 2 | bsd-3-clause | ceb848021d5323b5bad8518ac7ed850a51fc89ca | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco | raco/myrial/myrial_test.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os.path\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom abel.tools import calculate_speeds\n\n... | python | edit | 3 | 2 | mit | 1be8c268f2da618e9e9e13d55d53599d637d3a6a | rth/PyAbel,huletlab/PyAbel,DhrubajyotiDas/PyAbel,PyAbel/PyAbel,stggh/PyAbel | abel/tests/test_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework import renderers, status\nfrom rest_framework.decorators import renderer_classes, api_view\nfrom rest_framework.respo... | python | edit | 1 | 4 | bsd-3-clause | 1c953644fe922ed1a523279c86e4ad1724112849 | avorio/saleor,avorio/saleor,maferelo/saleor,taedori81/saleor,jreigel/saleor,Drekscott/Motlaesaleor,josesanch/saleor,jreigel/saleor,rodrigozn/CW-Shop,HyperManTT/ECommerceSaleor,Drekscott/Motlaesaleor,rchav/vinerack,maferelo/saleor,HyperManTT/ECommerceSaleor,dashmug/saleor,UITools/saleor,car3oon/saleor,taedori81/saleor,K... | saleor/dashboard/product/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hoomd import _hoomd\nfrom hoomd.custom import (\n _CustomOperation, _InternalCustomOperation, Action)\nfrom hoomd.operation import _Tuner\n\n\nclass _TunerProperty:\n @property\n def updater(self):\n return self._action... | python | edit | 1 | 2 | bsd-3-clause | 3bddeade05ca5ddc799733baa1545aa2b8b68060 | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/tune/custom_tuner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import generics, response\n\nfrom nodeconductor.events import elasticsearch_client\n\n\nclass EventListView(generics.GenericAPIView):\n\n def list(self, request, *args, **kwargs):\n order_by = request.GET.get('... | python | edit | 1 | 2 | mit | eac2f296e855f92d040321edee943ad5f8a8fb39 | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/events/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\r\nCreated on 01.06.2014\r\n\r\n@author: ionitadaniel19\r\n'''\r\nfrom selenium.webdriver.support.wait import WebDriverWait\r\nfrom selenium.webdriver.support import expected_conditions as EC\r\nfrom selenium.webdriver.common.by import ... | python | edit | 1 | 1 | mit | 873b7d7e7de770b9407840f6ccd662929b5dd3b6 | ionitadaniel19/testframeworksevolution | src/modularframework/login.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nfrom setuptools import setup\n\n\nsetup(name=\"abzer\",\n author=\"Wieland Hoffmann\",\n author_email=\"<EMAIL>\",\n packages=[\"abzer\"],\n package_dir={\"ab... | python | edit | 1 | 0 | mit | fefee2d3de81f2072f97ffb83a56049b7f81028c | mineo/abzer,mineo/abzer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.cache import cache\nfrom django.test import TestCase\n\nfrom opendebates.context_processors import global_vars\nfrom opendebates.models import NUMBER_OF_VOTES_CACHE_ENTRY\n\n\nclass NumberOfVotesTest(TestCase):\n def tes... | python | edit | 1 | 1 | apache-2.0 | 7173d3cf67bfd9a3b01f42c0832ce299c090f1d6 | ejucovy/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates | opendebates/tests/test_context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nProblem repository management for the shell manager.\n\"\"\"\n\nimport spur, gzip\n\nfrom shutil import copy2\nfrom os.path import join\n\ndef local_update(repo_path, deb_paths=[]):\n \"\"\"\n Updates a local deb repository by... | python | edit | 1 | 2 | mit | a05a05f24c29dcf039e02b55c18c476dc69757df | RitwikGupta/picoCTF-shell-manager,cganas/picoCTF-shell-manager,RitwikGupta/picoCTF-shell-manager,cganas/picoCTF-shell-manager,picoCTF/picoCTF-shell-manager,cganas/picoCTF-shell-manager,cganas/picoCTF-shell-manager,RitwikGupta/picoCTF-shell-manager,picoCTF/picoCTF-shell-manager,picoCTF/picoCTF-shell-manager,picoCTF/pico... | shell_manager/problem_repo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = False\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': os.path.abspath(os.path.join(\n BASE_DIR, '..', 'data', 'db.sqlite3')),\n }\n }\n... | python | edit | 17 | 0 | mit | 1f8b19d3baa2970adc008d5b7903730b51edad58 | cnobile2012/dcolumn,cnobile2012/dcolumn,cnobile2012/dcolumn,cnobile2012/dcolumn | example_site/settings/travis.py | rejected_lint | Too many lint violations: 17 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nCOV = None\n\nif os.environ.get('FLASK_COVERAGE'):\n import coverage\n COV = coverage.coverage(branch=True, include='app/*')\n COV.start()\n\nfrom flask_script import Manager\nfrom flask_migrate import Migrate, Migrate... | python | edit | 1 | 4 | apache-2.0 | 1abb838a1fa56af25b9c6369dff93c65e17fbc3a | atindale/business-glossary,atindale/business-glossary | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport multiprocessing # noqa # stop tests breaking tox\nfrom setuptools import find_packages, setup\n\nimport tvrenamr\n\n\ndef long_desc():\n with open('README.rst') as f:\n readme = f.read()\n\n with open('CHANGELOG.rst') a... | python | edit | 1 | 1 | mit | 1709282ed45baa582f09324bd269eae3b6c40a05 | ghickman/tvrenamr,wintersandroid/tvrenamr | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport io\r\nfrom .base import Field, DynamicValue, FullyDecoded\r\n\r\n\r\nclass SubStructure(Field):\r\n def __init__(self, structure, *args, **kwargs):\r\n self.structure = structure\r\n super(SubStructure, self).__init_... | python | edit | 3 | 3 | bsd-3-clause | c9da64ac1c90abdee8fc72488a4bef58a95aa7c6 | gulopine/steel | biwako/bin/fields/compounds.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Set the path\nimport os, sys\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))\n\nfrom flask.ext.script import Manager, Server\nfrom maproulette import app\n\nmanager = Manager(app)\n\n# Turn on debugger by ... | python | edit | 2 | 1 | apache-2.0 | 2353c00e76d841b10e7c27750c4ce973d536f453 | mvexel/maproulette,mvexel/mr-tnav,Crashfreak/maproulette,mvexel/maproulette,osmlab/maproulette,osmlab/maproulette,osmlab/maproulette,mvexel/maproulette,osmlab/maproulette,Crashfreak/maproulette,mvexel/mr-tnav,mvexel/maproulette,Crashfreak/maproulette,Crashfreak/maproulette | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 Red Hat, Inc.\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# a copy of the ... | python | edit | 1 | 1 | apache-2.0 | 2880e0b8c38af68cfb17bbcc112f1a40b6a03a11 | openstack/cinder,mahak/cinder,mahak/cinder,openstack/cinder | cinder/db/sqlalchemy/migrate_repo/versions/088_add_replication_info_to_cluster.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mock import patch\nimport pytest\nimport os\nimport shutil\nimport tempfile\n\n\nclass Directory:\n def __init__(self, directory):\n self.directory = directory\n\n def __getitem__(self, name):\n path = os.path.join(... | python | edit | 1 | 3 | bsd-3-clause | 1e5e2a236277dc9ba11f9fe4aff3279f692da3f7 | fschulze/ploy,ployground/ploy | ploy/tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# test machine module\n\nimport machine\nimport uctypes\n\nprint(machine.mem8)\n\nbuf = bytearray(8)\naddr = uctypes.addressof(buf)\n\nmachine.mem8[addr] = 123\nprint(machine.mem8[addr])\n\nmachine.mem16[addr] = 12345\nprint(machine.mem16[a... | python | edit | 1 | 0 | mit | f6518a7bd554c87b4dcb68d1ca618babcf278c63 | vitiral/micropython,lowRISC/micropython,adafruit/circuitpython,danicampora/micropython,ryannathans/micropython,pfalcon/micropython,mgyenik/micropython,adafruit/micropython,blazewicz/micropython,vitiral/micropython,chrisdearman/micropython,dxxb/micropython,dinau/micropython,tdautc19841202/micropython,utopiaprince/microp... | tests/extmod/machine1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom .core import Agent\nfrom .core import Proxy\n\n\ndef pyro_log():\n os.environ[\"PYRO_LOGFILE\"] = \"pyro_osbrain.log\"\n os.environ[\"PYRO_LOGLEVEL\"] = \"DEBUG\"\n\n\ndef log_handler(agent, message, topic):\n # TOD... | python | edit | 4 | 1 | apache-2.0 | 10b0d6102b391f489e98fd1c2e08b766e77c87e9 | opensistemas-hub/osbrain | osbrain/logging.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom molo.core.tests.base import MoloTestCaseMixin\nfrom django.test import TestCase, Client\nfrom django.contrib.auth.models import User\nfrom django.core.urlresolvers import reverse\n\n\nclass GemRegistrationViewTest(TestCase, MoloTestCas... | python | edit | 1 | 1 | bsd-2-clause | 1779970872afd457336334231bef3c8629dcd375 | praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem | gem/tests/test_profiles.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport uuid\nimport time\nimport json\n\nfrom flask import Flask\n\napp = Flask(__name__)\napp.debug = True\n\ndef check(endpoint):\n def actual_check(function):\n start_time = time.time()\n ret = function()\n ... | python | edit | 1 | 3 | mit | 8523576286a45318f654ad5ab462e9a6f65b69e2 | yuvipanda/tools-canary | canary/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Setup script for GDM.\"\"\"\n\nimport setuptools\n\nfrom gdm import __project__, __version__, CLI, DESCRIPTION\n\nimport os\nif os.path.exists('README.rst'):\n README = open('README.rst').read()\nelse:\n ... | python | edit | 1 | 0 | mit | 8a0ea95de9343b901d7d3cd8b3c5b0370d43eb0f | jacebrowning/gitman,jacebrowning/gdm | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\nfrom . import AWSProperty, AWSObject, Tags\nfrom .validators import json_checker, boolean\n\n\nclass IEMap(AWSProperty):\n ... | python | edit | 8 | 0 | bsd-2-clause | 6d13b3b041e3e6cd6089814ad3276a905aa10bc3 | cloudtools/troposphere,cloudtools/troposphere | troposphere/fms.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Package versioning solution originally found here:\n# http://stackoverflow.com/q/458550\n\n# Store the version here so:\n# 1) we don't load dependencies by storing it in __init__.py\n# 2) we can import it in setup.py for the same reason\n... | python | edit | 1 | 0 | bsd-3-clause | 6c7089177a970f4535cf1494ea17b6412fa36bf0 | arsenovic/clifford,arsenovic/clifford | clifford/_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom corehq.apps.sms.api import incoming\nfrom corehq.apps.sms.views import IncomingBackendView\nfrom corehq.messaging.smsbackends.smsgh.models import SQLSMSGHBackend\nfrom django.http import HttpResponse, HttpResponseBadRequest\n\n\nclass ... | python | edit | 3 | 3 | bsd-3-clause | 2a5cc23be491fa3f42fe039b421ad436a94d59c2 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/messaging/smsbackends/smsgh/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport feedparser\nimport time\n\nfrom newswall.providers.base import ProviderBase\n\n\nclass Provider(ProviderBase):\n def update(self):\n feed = feedparser.parse(self.config['source'])\n\n f... | python | edit | 1 | 2 | bsd-3-clause | 5f42f76ffd11e82d51a334b91d64723388ca4a0d | michaelkuty/django-newswall,registerguard/django-newswall,matthiask/django-newswall,HerraLampila/django-newswall,registerguard/django-newswall,HerraLampila/django-newswall,michaelkuty/django-newswall,matthiask/django-newswall | newswall/providers/feed.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template import Library, Variable\nfrom django.template import TemplateSyntaxError, VariableDoesNotExist\nfrom django.template.defaulttags import URLNode\n\nfrom ..models import MenuItem\nfrom ..settings import CONFIG\n\n\nregis... | python | edit | 3 | 3 | bsd-3-clause | df51d042bf1958f48fc39f1f3870285c87491243 | trilan/lemon,trilan/lemon,trilan/lemon | lemon/templatetags/main_menu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TOOL test-data-in-out.py: \"Test data input and output in Python\" (Data input output test.) \n# INPUT input TYPE GENERIC\n# OUTPUT output\n# OUTPUT OPTIONAL missing_output.txt\n\nimport shutil\n\nshutil.copyfile('input', 'output')\n\n\n`... | python | edit | 1 | 0 | mit | 608dc0db688be1dabe3c6ba7647807f6697fcefe | chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools | tools/misc/python/test-data-in-out.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport sys\n\n\ndef error(message, exit=True):\n \"\"\"Print an error message and optionally exit.\"\"\"\n\n assert isinstance(message, str), \"message must be a str\"\n assert isinstance(ex... | python | edit | 1 | 2 | mit | cdb55b385074d50a98f87027fd46021d663f9df8 | Brickstertwo/git-commands | bin/commands/utils/messages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\ndef over_rect(line):\n line = line.rstrip()\n if line:\n line = line.split(',')\n rect_a = [int(item) for item in line[:4]]\n rect_b = [int(item) for item in line[4:]]\n return (rect_a[0] <=... | python | edit | 2 | 8 | mit | 5b2451ee653873b8fb166d291954c72a165af368 | MikeDelaney/CodeEval | moderate/overlapping_rectangles/over_rect.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nif sys.platform.startswith('win'):\n sys.path.insert(0, 'c:/work/code/dscas3/')\nelse:\n sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')\n\nimport modules\n\n# * we need to give the module paths relative... | python | edit | 3 | 0 | bsd-3-clause | 9bab06465d2b2665efaac4edea2e3c538c600908 | chrisidefix/devide,zhangfangyan/devide,nagyistoce/devide,ivoflipse/devide,fvpolpeta/devide,chrisidefix/devide,fvpolpeta/devide,ivoflipse/devide,nagyistoce/devide,zhangfangyan/devide | installer/hooks/hook-moduleManager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.... | python | edit | 1 | 3 | apache-2.0 | 3cc1cb9894fdb1b88a84ad8315669ad2f0858fdb | tensorflow/minigo,tensorflow/minigo,tensorflow/minigo,tensorflow/minigo,tensorflow/minigo,tensorflow/minigo | cloud_logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._abstract import AbstractScraper\n\n\nclass WholeFoods(AbstractScraper):\n @classmethod\n def host(self, domain=\"com\"):\n return f\"www.wholefoodsmarket.{domain}\"\n\n```\n\nApply this change: Add wrapper methods for cl... | python | edit | 1 | 1 | mit | 5856e4daaf141e5bf9cdef438378a3757297f9c0 | hhursev/recipe-scraper | recipe_scrapers/wholefoods.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module contains base classes for defining game objects as well\nas their individual components and behaviours.\n\"\"\"\nfrom pygame.sprite import Sprite\n\n\nclass Entity(Sprite):\n \"\"\"An object within the game.\n\n It c... | python | edit | 1 | 0 | unlicense | 3e1033637d0bb5dd8856052ffd1667df0ccceb5d | MarquisLP/gamehappy | entity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport importlib\nimport pkgutil\n\nignore_packages = set(['test'])\n\ndef import_submodules(package, recursive=True):\n \"\"\" Import all submodules of a module, recursively, including subpackages\n\n :param package: package (name or... | python | edit | 1 | 6 | apache-2.0 | 400c8de8a3a714da21c0e2b175c6e4adad3677b9 | aradhyamathur/PySyft,sajalsubodh22/PySyft,OpenMined/PySyft,dipanshunagar/PySyft,sajalsubodh22/PySyft,dipanshunagar/PySyft,joewie/PySyft,cypherai/PySyft,cypherai/PySyft,joewie/PySyft,aradhyamathur/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | syft/__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 GM on an Android device. \"\"\"\n\n... | python | edit | 1 | 1 | bsd-3-clause | f71897270d9a040930bfb41801bf955ea3d0a36e | google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Ti... | slave/skia_slave_scripts/android_run_gm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport copy\nfrom rest_framework import renderers\n\nfrom rest_framework_ember.utils import get_resource_name\n\n\nclass JSONRenderer(renderers.JSONRenderer):\n \"\"\"\n Render a JSON response the way Ember Data wants it. Such as:\n ... | python | edit | 3 | 3 | bsd-2-clause | 621ae7f7ff7d4b81af192ded1beec193748cfd90 | django-json-api/django-rest-framework-json-api,aquavitae/django-rest-framework-json-api,hnakamur/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,coUrbanize/rest_framework_ember,abdulhaq-e/django-rest-framework-json-api,pattisdr/django-rest-framework-j... | rest_framework_ember/renderers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .dcct import DCCT\nfrom .li_llrf import LiLLRF\nfrom .rf import RF\nfrom .sofb import SOFB\nfrom .kicker import Kicker\nfrom .septum import Septum\nfrom .screen import Screen\nfrom .bpm import BPM\nfrom .ict import ICT\nfrom .ict impor... | python | edit | 15 | 0 | mit | b1547647deec6c1edf54c497fa4ed20235ea6902 | lnls-fac/sirius | pymodels/middlelayer/devices/__init__.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import current_app, g\nfrom flask.ext.script import Manager, Server, prompt_bool\nfrom massa import create_app\n\n\nmanager = Manager(create_app)\nmanager.add_option('-c', '--config', dest='config', req... | python | edit | 1 | 2 | mit | 9b4333f25f22269f02f605579d4756da43701241 | jaapverloop/massa | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom enum import Enum\n\nfrom .AbstractModule import AbstractModule, ModuleState\n\n\nclass WireColors(Enum):\n MISSING = 'missing'\n BLACK = 'black'\n RED = 'red'\n WHITE = 'white'\n BLUE = 'blue'\n YELLOW = 'yellow'\n\n\... | python | edit | 3 | 4 | mit | 91b01e37897ea20f6486118e4dd595439f81006b | hanzikl/ktane-controller | ktane/Model/Modules/WiresModule.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom django.test import TestCase\nfrom io import BytesIO\nfrom rest_framework_json_api.parsers import JSONParser\n\n\nclass TestJSONParser(TestCase):\n\n def setUp(self):\n class MockRequest(object):\n\n ... | python | edit | 2 | 1 | bsd-2-clause | 5e2943b8e17ee753ddfafd1420c9e8155c496aba | django-json-api/rest_framework_ember,Instawork/django-rest-framework-json-api,leo-naeka/django-rest-framework-json-api,abdulhaq-e/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api | example/tests/test_parsers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom client import Client\nfrom uv_stream import UvStream\n\n__all__ = ['Client', 'UvStream', 'c']\n\n```\n\nApply this change: Add helper function for connecting with Neovim"
},
{
"role": "assistant",
"content": "from client im... | python | edit | 1 | 1 | apache-2.0 | 2eb4fcb2d75e6f93f33b1ae41098919f6d4ebc92 | fwalch/python-client,Shougo/python-client,bfredl/python-client,brcolow/python-client,starcraftman/python-client,traverseda/python-client,justinmk/python-client,neovim/python-client,meitham/python-client,meitham/python-client,0x90sled/python-client,justinmk/python-client,zchee/python-client,traverseda/python-client,bfre... | neovim/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.db.models import fields\n\n\nclass Receipt(models.Model):\n title = fields.CharField(max_length=255)\n price = fields.DecimalField(max_digits=10, d... | python | edit | 1 | 1 | mit | 494f14a69d08e9bfd556fccc6b4e2319db129a38 | trimailov/finance,trimailov/finance,trimailov/finance | books/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom mopidy.core import CoreListener\n\nimport pykka\n\nimport .menu import BrowseMenu\nimport .painter import Painter\n\nlogger = logging.getLogger(__name__)\n\nclass FrontPanel(... | python | edit | null | null | apache-2.0 | 5398a864449db0a1d6ec106ddb839fff3b6afcda | nick-bulleid/mopidy-frontpanel | mopidy_frontpanel/frontend.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom discord import app_commands\n\nimport logging\nimport sys\nimport traceback\n\nimport sentry_sdk\n\n\nclass CommandTree(app_commands.CommandTree):\n\n async def on_error(self, interaction, command, error):\n sentry_sdk.capt... | python | edit | 1 | 1 | mit | 9f81cc80e1a82f4a26e400dd2ae5c290abe48382 | Harmon758/Harmonbot,Harmon758/Harmonbot | Discord/tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django_evolution.db import evolver\n\ndef write_sql(sql):\n \"Output a list of SQL statements, unrolling parameters as required\"\n for statement in sql:\n if isinstance(statement, tuple):\n print unicode(statem... | python | edit | 3 | 5 | bsd-3-clause | 76fa14f61811cd38f2c91851a648fa88f6142b15 | clones/django-evolution | django_evolution/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom src import conversion\n\nclass TestNotationConverter(unittest.TestCase):\n \"\"\"Tests for NotationConverter class\"\"\"\n def test_alg_search_good_input_a5(self):\n \"\"\"Input with 'a5'\"\"\"\n ac... | python | edit | 1 | 1 | mit | 938043259eefdec21994489d68b1cf737618ba34 | blairck/chess_notation | test/test_conversion.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import PermissionDenied\n\nfrom ...order import models\nfrom ..utils import get_node\nfrom .types import Order\n\n\ndef resolve_orders(info):\n user = info.context.user\n if user.is_anonymous:\n rais... | python | edit | 1 | 3 | bsd-3-clause | 378b820bd2a474640974ccefc7b224caebc9400f | mociepka/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,maferelo/saleor,mociepka/saleor | saleor/graphql/order/resolvers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import reverse\n\nfrom rest_framework import serializers\n\nfrom .models import Tafseer, TafseerText\n\n\nclass TafseerSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = Tafseer\n fields = [... | python | edit | 1 | 1 | mit | a990362d80980b90b04907c0e7717a55c421bf9d | EmadMokhtar/tafseer_api | quran_tafseer/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Cloudbase Solutions Srl\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# a copy o... | python | edit | 1 | 0 | apache-2.0 | 68e51fd9772aaf4bd382ffe05721e27da6bddde6 | stefan-caraiman/cloudbase-init-ci,cloudbase/cloudbase-init-ci,micumatei/cloudbase-init-ci | argus/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom zope.interface import implementer\n\nfrom .interfaces (\n IAuthSourceService,\n )\n\n@implementer(IAuthSourceService)\nclass SessionAuthSource(object):\n \"\"\" An authentication source that uses the current session \"... | python | edit | null | null | isc | 71ea6816eea95e8bf750563718b0dd39114a3c49 | usingnamespace/pyramid_authsanity | pyramid_authsanity/sources.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add public imports to exchange module"
},
{
"role": "assistant",
"content": "from cryptex.exchange.exchange import Exchange\nfrom cryptex.exchange.cryptsy import Cryptsy, CryptsyPublic\nfrom cryptex.exchange.btce import BTCE, BTC... | python | new_file | 7 | 0 | mit | 7769e5ddd5784b7e56b75fc33f25b0f40ecaa99e | coink/cryptex | cryptex/exchange/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\npackage = 'aws-utils'\nversion = '0.2.7'\n\nINSTALL_REQUIRES = [\n 'boto>=2.38.0',\n 'boto3>=1.2.3',\n 'smart-open>=1.3.1',\n 'dateutils>=0.6.6',\n 'retrying>=1.3.3'\n]\n\nsetup(... | python | edit | 1 | 0 | apache-2.0 | 509ca7039b6b914785f44ec7aa2de5b644075a37 | skimhub/aws-utils | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Make a couple frequently used things available right here.\nfrom webassets.bundle import Bundle\nfrom django_assets.env import register\n\n\n__all__ = ('Bundle', 'register')\n\n__version__ = (0, 11)\n__webassets_version__ = ('0.11',)\n\n\... | python | edit | 3 | 0 | bsd-2-clause | 9e7ab78fd1cea466a4811b9244b096a87d34c100 | ridfrustum/django-assets,adamchainz/django-assets,jaddison/django-assets,mcfletch/django-assets | django_assets/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\" ``SQLAlchemy`` model definition for the watercourses.\"\"\"\nfrom geoalchemy import GeometryColumn, GeometryDDL, LineString\nfrom sqlalchemy import Column, Unicode, Integer\n\nfrom anuket.models import Base\n... | python | edit | 1 | 0 | mit | 8a6c678c18bb112caf89b7b7c9968215e9e0eff5 | miniwark/begotemp | begotemp/models/watercourse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '1.0.0.dev3'\n__author__ = 'D-Wave Systems Inc.'\n__authoremail__ = '<EMAIL>'\n__description__ = 'A shared API for binary quadratic model samplers.'\n\n```\n\nApply this change: Update version 1.0.0.dev3 -> 1.0.0.dev4"
},
... | python | edit | 1 | 0 | apache-2.0 | cde48bca684e225b2f99be6637380f4ef3365f17 | dwavesystems/dimod,dwavesystems/dimod | dimod/package_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-\n# ex: set expandtab softtabstop=4 shiftwidth=4:\n#\n# Copyright (C) 2008,2009,2010,2013 Contributor\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may no... | python | edit | 2 | 0 | apache-2.0 | d4356b7aa879a345939c1885742efc3deceeb08f | guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,quattor/aquilon | lib/aquilon/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nimport sys\n\ndata = dict(\n name='python-datetime_tz',\n version='0.1',\n author='Tim Ansell',\n author_email='<EMAIL>',\n ... | python | edit | 1 | 0 | apache-2.0 | b0bc5c5573e33b67cf0803fb7da4bb0d6a875fc6 | matthewhampton/python-datetime-tz,dave42/python-datetime-tz,j5int/python-datetime-tz,mithro/python-datetime-tz,davidfraser/python-datetime-tz,mithro/python-datetime-tz,davidfraser/python-datetime-tz,j5int/python-datetime-tz | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport datetime\nimport os\nimport sys\nimport smtplib\nfrom email.mime.text import MIMEText\n\ndef timeString():\n return str(datetime.datetime.now())\n\nif not os.path.exists('email-list'):\n print(timeStri... | python | edit | 3 | 1 | unlicense | 28786f30be37bb43a175262f96b618fc440d5ace | nerflad/mds-new-products,nerflad/mds-new-products,nerflad/mds-new-products | send-email.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom django.utils import timezone\nfrom django_webtest import WebTest\nfrom exam.decorators import fixture\nfrom exam.cases import Exam\nfrom django.core.urlresolvers import reverse\n\n\nclass SmokeTest(Exam, WebTest):\n csrf_... | python | edit | 4 | 1 | cc0-1.0 | 43e8dc72304c7647dae9323cbce73e7bc78ecf7d | cfpb/idea-box,cfpb/idea-box,cfpb/idea-box | src/idea/tests/smoke_tests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tests.scoring_engine.engine.checks.check_test import CheckTest\n\n\nclass TestHTTPSCheck(CheckTest):\n check_name = 'HTTPSCheck'\n required_properties = ['useragent', 'vhost', 'uri']\n properties = {\n 'useragent': 'tes... | python | edit | 1 | 0 | mit | b6e57269b8bd57420fb856daba75452dbf37cfa2 | pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine | tests/scoring_engine/engine/checks/test_https.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport base64\nimport json\n\nfrom nacl.encoding import URLSafeBase64Encoder\nimport nacl.exceptions\nimport nacl.signing\nfrom flask import Blueprint, abort, current_app, render_template, request\nfrom nacl.signi... | python | edit | 1 | 1 | mit | 7add1c5a43c6bef29613167ca430ad7ff0e26670 | scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash | src/ocspdash/web/blueprints/ui.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom lobster import cmssw\nfrom lobster.core import *\n\nstorage = StorageConfiguration(\n output=[\n \"hdfs:///store/user/matze/test_shuffle_take29\",\n \"file:///hadoop/store/user/matze/test_shuffle_take29\",\... | python | edit | 7 | 0 | mit | 873c5e8bf85a8be5a08852134967d29353ed3009 | matz-e/lobster,matz-e/lobster,matz-e/lobster | examples/simple.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n__version__ = '0.35.0-dev'\n\n\ndef get_client_version():\n from conans.model.version import Version\n from conans import __version__ as client_version\n from os import getenv\n # It is a mess comparing dev versions, lets assu... | python | edit | 3 | 1 | mit | 6f4758b39c257dcabcabc6405cf400e8f6a358ea | conan-io/conan-package-tools | cpt/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFlask-Selfdoc\n-------------\n\nFlask selfdoc automatically creates an online documentation for your flask app.\n\"\"\"\nfrom setuptools import setup\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\n\... | python | edit | 1 | 1 | mit | 0c9daff813d81e712b92fb78a02ef8bc17cdfdc3 | jwg4/flask-autodoc,jwg4/flask-autodoc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom optparse import make_option\nfrom optparse import OptionParser\nfrom scaffolder import get_minion_path\nfrom scaffolder.core.template import TemplateManager\nfrom scaffolder.core.comman... | python | edit | 3 | 1 | mit | edf151feea948ebf4a9f00a0248ab1f363cacfac | goliatone/minions | scaffolder/commands/install.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nimport keyring\nfrom keyring.testing.backend import BackendBasicTests\nfrom keyring.backends import macOS\n\n\n@pytest.mark.skipif(\n not keyring.backends.macOS.Keyring.viable,\n reason=\"macOS backend not viable\",\n... | python | edit | 1 | 1 | mit | 62e32c356fc86bcd855d2931974b9df17856809e | jaraco/keyring | tests/backends/test_macOS.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom sqlalchemy import (\n Column,\n Date,\n Integer,\n MetaData,\n Numeric,\n String,\n Table,\n)\n\n\ndef define_tables(metadata):\n Table('measurement', metadata,\n Column('id', I... | python | edit | 1 | 2 | mit | 8b0302544bfb09d8abf9630db9a1dcc7e47add39 | jaapverloop/massa | massa/domain.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tensorflow as tf\n\n\ndef rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):\n dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0\n\n cell = tf.nn.rnn_cell.GRUCell(num_units, name=name... | python | edit | 1 | 4 | mit | e650c319b109ca554c2d66f2d9446ef62440cc0f | jpbottaro/anna | anna/model/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom rest_framework import filters\nfrom rest_framework.serializers import ValidationError\n\nfrom core.models import AtmosphereUser, MaintenanceRecord\nfrom core.query import only_current\n\nfrom api.permissions im... | python | edit | 7 | 5 | apache-2.0 | 606feda80b4631f9079021214c7b6078beb9a3f4 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | api/v2/views/maintenance_record.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom datetime import datetime\n\nimport requests\n\nfrom .model.puzzleboard import pop_puzzleboard\n\n\nclass HuntwordsPuzzleBoardPopCommand(object):\n '''Command class that processes puzzleboard-pop message'''\n\n def ru... | python | edit | 1 | 1 | mit | 3245946ff25889149dc60cf6b1364bd09c953809 | klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords | faas/puzzleboard-pop/puzzleboard_pop.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom setuptools import setup\n\nlong_description=\"\"\"TravisCI results \n .. image:: https://travis-ci.org/nanonyme/simplecpreprocessor.svg\n\"\"\"\n\n\nsetu... | python | edit | 1 | 0 | mit | 0740d16b60a3ecc26e72c51ea85257b2c0d03d18 | nanonyme/simplecpreprocessor | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom contextlib import redirect_stdout\n\nfrom conllu import print_tree\nfrom conllu.tree_helpers import TreeNode\nfrom io import StringIO\n\n\nclass TestPrintTree(unittest.TestCase):\n def test_print_empty_list(self):\n... | python | edit | 1 | 1 | mit | 9a6b06d4a69bf5a7fb59d93000dc2aba02035957 | EmilStenstrom/conllu | tests/test_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport string\n\n\nclass Steckerbrett:\n def __init__(self):\n pass\n\n\nclass Umkehrwalze:\n def __init__(self, wiring):\n self.wiring = wiring\n\n def encode(self, letter):\n return self.wiring[string.ascii_u... | python | edit | 1 | 1 | mit | b94458b5dc184798580ade159ace700a46ab5877 | ranisalt/enigma | enigma.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nfrom django.core.management import BaseCommand\nfrom django.urls import get_resolver\n\nfrom corehq.apps.hqwebapp.decorators import waf_allow\n\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **options):\n ... | python | edit | 1 | 7 | bsd-3-clause | e98201ae47f3af4fe8756c69464986dc524206e5 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/hqwebapp/management/commands/list_waf_allow_patterns.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .rest import RestClient\n\n\nclass DeviceCredentials(object):\n\n \"\"\"Auth0 connection endpoints\n\n Args:\n domain (str): Your Auth0 domain, e.g: 'username.auth0.com'\n\n jwt_token (str): An API token created wit... | python | edit | 1 | 2 | mit | dd8c85a49a31693f43e6f6877a0657d63cbc1b01 | auth0/auth0-python,auth0/auth0-python | auth0/v2/device_credentials.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_restful import Api\nfrom flask_migrate import Migrate, MigrateCommand\nfrom flask_script import Manager\nfrom app import app\nfrom app import db\nfrom app.auth import Register, Login\nfrom app.bucketlist_api import BucketList, Bu... | python | edit | 1 | 0 | mit | 24ea32f71faab214a6f350d2d48b2f5715d8262d | andela-bmwenda/cp2-bucketlist-api | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name=\"sqlite_object\",\n version=\"0.3.3\",\n author_email=\"<EMAIL>\",\n description=\"sqlite-backed collection objects\",\n author=\"Luke Hospadaruk\",\n url=\"https://github... | python | edit | 1 | 0 | mit | 675f5a269859f1e38419b23a82b732f22f858b74 | hospadar/sqlite_object | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nConvert code to human readable text\n\"\"\"\n\n# Standard library modules.\nimport re\n\n# Third party modules.\n\n# Local modules.\n\n# Globals and constants variables.\n_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')\... | python | edit | 1 | 3 | mit | 385879b90d3aaa7452931108c999cbbc5e41a1b2 | pyhmsa/pyhmsa-gui | pyhmsa/gui/util/human.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Organizer(models.Model):\n full_name = models.CharField(max_length=200)\n email = models.EmailField(\n default='', blank=True,\n help_text=\"This is private\")\n twitter = model... | python | edit | 1 | 1 | mit | 224abf5e0e8d5e7bad7a86c622b711e997e8ae10 | pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2016 | pyconcz_2016/team/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n # Python 3\n from collections.abc import Iterable\n string_types = (str,)\nexcept ImportError:\n # Python 2\n from collections import Iterable\n string_types = (str, unicode)\n\n\ndef is_expanded(request, key):\n ... | python | edit | 1 | 7 | mit | b1e6f3eacccb5e575ac47b6a40809f4671510672 | rsinger86/drf-flex-fields | rest_flex_fields/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom datetime import datetime, timedelta\n\nfrom changes.config import queue\nfrom changes.constants import Status\nfrom changes.models.task import Task\nfrom changes.queue.task import TrackedTask\n... | python | edit | 1 | 3 | apache-2.0 | 3ed807b44289c00d6a82b0c253f7ff8072336fdd | dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes | changes/jobs/cleanup_tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom django.core.management import call_command\n\n\nif __name__ == '__main__':\n os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\n import django\n if hasattr(django, 'setup'):\n ... | python | edit | 1 | 0 | mit | aa89bed3502e4a94ab41005dd9265bfee58fd784 | henriquebastos/django-test-without-migrations,henriquebastos/django-test-without-migrations | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='django-cacheops',\n version='1.3.1',\n author='Alexander Schepanovski',\n author_email='<EMAIL>',\n\n description='A slick ORM cache with automatic granular event-driven invalida... | python | edit | 1 | 0 | bsd-3-clause | ae6607feb1d9c7be224bfae13319f672c47368c0 | whyflyru/django-cacheops,andwun/django-cacheops,Suor/django-cacheops,ErwinJunge/django-cacheops,LPgenerator/django-cacheops,bourivouh/django-cacheops,rutube/django-cacheops,th13f/django-cacheops | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='lmsh',\n version='0.1',\n description=\"Command line interface to Lab Manager SOAP API\",\n license='BSD',\n author='James Saryerwinnie',\n author_email='<EMAIL... | python | edit | 1 | 0 | bsd-3-clause | 26d0961b210190f43584ddd46db42284761b50e8 | jamesls/labmanager-shell | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom base import SubLayout, Rect\nfrom sublayouts import HorizontalStack\nfrom subtile import SubTile\n\nclass SubVertTile(SubTile):\n arrangements = [\"top\", \"bottom\"]\n \n def _init_sublayouts(self):\n ratio = self.rati... | python | edit | 3 | 4 | mit | 98bdb678a9092c5c19bc2b379cca74a2ed33c457 | rxcomm/qtile,de-vri-es/qtile,EndPointCorp/qtile,zordsdavini/qtile,bavardage/qtile,nxnfufunezn/qtile,encukou/qtile,andrewyoung1991/qtile,ramnes/qtile,himaaaatti/qtile,de-vri-es/qtile,frostidaho/qtile,encukou/qtile,andrewyoung1991/qtile,w1ndy/qtile,frostidaho/qtile,nxnfufunezn/qtile,StephenBarnes/qtile,farebord/qtile,kop... | libqtile/layout/subverttile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n##################################\n# Added for BAE\n##################################\n\ntry:\n CACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n 'LOCATION': co... | python | edit | 4 | 0 | bsd-3-clause | 9901044b2b3218714a3c807e982db518aa97a446 | weijia/djangoautoconf,weijia/djangoautoconf | djangoautoconf/features/bae_settings.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nfrom django.conf import settings\ntry:\n from django import setup\nexcept ImportError:\n def setup():\n pass\n\n\nif not settings.configured:\n settings.configure(\n DAT... | python | edit | 3 | 2 | bsd-2-clause | 2812f11bdc86495dd9ef62b4b45d90335bcbda7d | mlavin/django-selectable,affan2/django-selectable,affan2/django-selectable,mlavin/django-selectable,mlavin/django-selectable,affan2/django-selectable | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='striketracker',\n version='0.5',\n description='Command line interface to the Highwinds CDN',\n url='https://github.com/Highwinds/striketracker',\n author='Mark Cahill',\n ... | python | edit | 1 | 0 | mit | ba500886eb0d49fc92188ec2cce7a14326d63ef1 | Highwinds/striketracker | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a ... | python | edit | 1 | 1 | apache-2.0 | 0fd6a6e3281bc49addd1131ae30b1985b9da30f9 | brightchen/Impala,rampage644/impala-cut,brightchen/Impala,XiaominZhang/Impala,caseyching/Impala,cgvarela/Impala,ImpalaToGo/ImpalaToGo,caseyching/Impala,tempbottle/Impala,cchanning/Impala,scalingdata/Impala,tempbottle/Impala,AtScaleInc/Impala,scalingdata/Impala,gistic/PublicSpatialImpala,rampage644/impala-cut,bowlofstew... | tests/benchmark/plugins/clear_buffer_cache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom .network import autoencoder, get_encoder\nfrom .io import read_records, load_model\n\n\ndef encode(input_file, output_file, log_dir):\n X = read_records(input_file)\n size = X.shape[1]\n\n model = load_mo... | python | edit | 3 | 1 | apache-2.0 | a9a55f87abc0a26d41e3fa3091f2f2efad7a2543 | theislab/dca,theislab/dca,theislab/dca | autoencoder/encode.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\nfrom stock import Stock\n\n# simple structure to keep track of a specific piece\nPiece = collections.namedtuple('Piece', 'id, length')\n\nclass Planner(object):\n\n def __init__(self, sizes, needed, loss=0.25):\n ... | python | edit | 3 | 3 | mit | 90f7bcb7ab6a43e0d116d6c9e71cc94977c6479c | alanc10n/py-cutplanner | cutplanner/planner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n :codauthor: :email:`Mike Place <<EMAIL>>`\n'''\n\n# Import Salt Testing libs\nfrom salttesting.helpers import (ensure_in_syspath, destructiveTest)\nfrom salttesting.mock import MagicMock, patch\nensure_in_s... | python | edit | 1 | 1 | apache-2.0 | 6144ac22f7b07cb1bd322bb05391a530f128768f | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/fileserver/fileclient_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\nfrom flask import Flask, jsonify, request\nfrom funds_correlations import correlations, parse_performances_from_dict\nimport traceback\n\napp = Flask(__name__)\n\n@app.route(\"/correlations\", methods=['POST'])\ndef corr... | python | edit | 1 | 5 | apache-2.0 | 0636d474764c1dd6f795ebf5c4f73e2a101ae023 | egenerat/portfolio,egenerat/portfolio,egenerat/portfolio | correlations/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom disco.schemes.scheme_redis import redis_output_stream\nfrom disco.worker.task_io import task_output_stream\nfrom disco.core import Job, result_iterator\n\nclass WordCount(Job):\n reduce_output_stream = (task_output_stream, redis_out... | python | edit | 2 | 2 | bsd-3-clause | 7ee29cfee740d6096fca8379253073077890a54c | seabirdzh/disco,discoproject/disco,oldmantaiter/disco,pooya/disco,oldmantaiter/disco,simudream/disco,pombredanne/disco,seabirdzh/disco,discoproject/disco,simudream/disco,discoproject/disco,ErikDubbelboer/disco,mozilla/disco,mozilla/disco,pombredanne/disco,ErikDubbelboer/disco,mwilliams3/disco,pooya/disco,mwilliams3/dis... | examples/util/wordcount_redis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Export long monologues for Nao.\n\nFunctions:\nintroduction -- Make Nao introduce itself.\n\"\"\"\n\nimport time\nfrom say import say\n\n\ndef introduction(tts):\n \"\"\"Make Nao introduce itself.\n\n Keyword arguments:\n tts... | python | edit | 1 | 1 | mit | a0420b066e0a5064ebe0944a16348debf107a9a4 | AliGhahraei/nao-classroom | speech.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os, sys\n\nversion = '0.0.1'\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.rst')).read()\nexcept IOError:\n README = ''\n\nTES... | python | edit | 1 | 0 | mit | 56f7be6efa949eba46c5ba65b8c2f614cb09be8f | miraculixx/depot,rlam3/depot,amol-/depot,eprikazc/depot,miraculixx/depot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"\n\"imgur-album-downloader\" is great, but it seems to download\nalbums twice, and appends their stupid ID to the end.\nThis script fixes both.\n\"\"\"\n\nimport hashlib\nimport re\nimport os\nimport sys\n\nI... | python | edit | 1 | 0 | mit | a85beb35d7296b0a8bd5a385b44fa13fb9f178ed | ammongit/scripts,ammongit/scripts,ammongit/scripts,ammongit/scripts | imgur-clean.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom rajab_roza import RajabRoza\n\nlat = 51.0 + 32.0/60.0\nlng = -22.0/60.0\nstart_year = 1400\nend_year = 1500\nfilename = \"london-durations.yml\"\n\nif __name__ == '__main__':\n rajab_roza = RajabRoza(lat, ln... | python | edit | 1 | 0 | mit | 98870a8dc7fe51936fcdcdceef3484fa28947eaf | mygulamali/rajab_roza | get_data.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.