messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nsetup(name='geventconnpool',\n version = \"0.1\",\n description = 'TCP connection pool for gevent',\n url=\"https://github.com/rasky/geventconnpool\",\n a... | python | edit | 1 | 0 | mit | bb204204482e868291efc34c5195d76024546a80 | rasky/geventconnpool,rasky/geventconnpool | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ply.lex as lex\nimport re\n\ntokens = ( 'SECTION',\n 'IDENTIFIER',\n 'LBRACE',\n 'RBRACE',\n 'SEMI',\n 'TRUE',\n 'FALSE' )\n \n\ndef t_SECTION(t):\n r'section'\... | python | edit | 3 | 1 | cc0-1.0 | dbfc1a11c0ced8ab7a997944e943a17ff0069199 | dmbaturin/ply-example | lexer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\n\nfrom rest.models import Sound\nfrom rest.serializers import SoundSerializer\nfrom rest_framework import generics\n\n\ndef hashfile(afile, hasher, blocksize=65536):\n buf = afile.read(blocksize)\n while len(buf) > 0:\... | python | edit | 1 | 2 | bsd-3-clause | 66d69bb487a7d5f60138a7c6d5191608a2611e6a | Soundphy/soundphy | rest/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport re\nimport codecs\n\nping = re.compile(u'.平')\nshang = re.compile(u'上聲')\nru = re.compile(u'入')\nqu = re.compile(u'去')\n\nmydict = { }\n\n# f = open(\"../Data/TangRhymesMap.cs... | python | edit | 7 | 0 | apache-2.0 | 8e26fa46ffdb9442254712b4083a973ab9ce6577 | jmworsley/TangShi | Python/tangshi.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Prepare to update Master branch to v 0.9.4"
},
{
"role": "assistant",
"content": "# This is the only location where the version will be written and changed.\n# Based on https://packaging.python.org/single_source_version/\n__versi... | python | new_file | 1 | 0 | mit | bf069a93484bff41c7cb46975fc8c41a7280723a | pastas/pasta,pastas/pastas,gwtsa/gwtsa | pastas/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (0, 1, 0)\n\ndef get_version():\n version = '%s.%s' % (VERSION[0], VERSION[1])\n if VERSION[2]:\n version = '%s.%s' % (version, VERSION[2])\n if VERSION[3:] == ('alpha', 0):\n version = '%s pre-alpha' % vers... | python | edit | 1 | 2 | unlicense | 18bf9dd5e1e054d0c260959a8379f331940e167f | hovel/django-online-status,hovel/django-online-status | online_status/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom django.conf import settings\nfrom django.core.exceptions import MiddlewareNotUsed\nfrom django.http import HttpResponseBadRequest\n\n\nclass MaliciousRequestsMiddleware:\n def __init__(self, get_response):\n self.g... | python | edit | 1 | 3 | mit | c2fb81dceddd4fd2ea5416565bbd4c7eb4e39bd0 | DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange | common/helpers/malicious_requests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport versioneer\n\nwith open('requirements.txt') as f:\n requirements = f.read().splitlines()\n\nrequirements = ['setuptools'] + requirements\n\nsetup(\n name='pyxrf',\n version=vers... | python | edit | 1 | 0 | bsd-3-clause | 0418a4a2e2cf2dc6e156c880600491691a57c525 | NSLS-II-HXN/PyXRF,NSLS-II-HXN/PyXRF,NSLS-II/PyXRF | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"voteswap URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app im... | python | edit | 1 | 0 | mit | fb69cb186b4c82ae5f64551dc65a3ed948650b5e | sbuss/voteswap,sbuss/voteswap,sbuss/voteswap,sbuss/voteswap | voteswap/urls.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# Flask application default config:\n# http://flask.pocoo.org/docs/config/#configuring-from-files\n# https://github.com/mbr/flask-appconfig\n\n\nproject_name = u'Ninhursag'\n\n\nclass Defau... | python | edit | 1 | 0 | mit | 928c70518af5580d803c69207028f566d572f3f4 | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag | app/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport platform\nfrom setuptools import setup, Extension\n\ncpython = platform.python_implementation() == 'CPython'\nis_glibc = platform.libc_ver()[0] == 'glibc'\nlibc_ok = is_glibc and platform.libc_ver()[1] >= '2.9'\nwindows =... | python | edit | 1 | 0 | mit | 0866695a2f60538d59277f45a69771664d6dee27 | agronholm/cbor2,agronholm/cbor2,agronholm/cbor2 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nfrom .mistune import markdown\n\nclass CreateMinuteCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\tregion = sublime.Region(0, self.view.size())\n\t\tmd_source = self.view.substr(region)\n\t\... | python | edit | 4 | 1 | mit | 34369635a22bf05abbabe47e708a2ed80db258e5 | Txarli/sublimetext-meeting-minutes,Txarli/sublimetext-meeting-minutes | MeetingMinutes.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\n\nnagiosPluginsCommandLines = [\n \"/usr/lib64/nagios/plugins/check_sensors\",\n \"/usr/lib64/nagios/plugins/check_mailq -w 10 -c 20 -M postfix\",\n]\n\n\nclass NagiosWrapper:\n def __init__(self, agentConfig, ch... | python | edit | 1 | 4 | bsd-3-clause | a388280d56bb73e64dbea2244e210878d9371984 | bastiendonjon/sd-agent-plugins,shanethehat/sd-agent-plugins,bencer/sd-agent-plugins,shanethehat/sd-agent-plugins,bencer/sd-agent-plugins,bastiendonjon/sd-agent-plugins | NagiosWrapper/NagiosWrapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import request, Response\nfrom .base import *\nfrom server import app\nimport requests\nimport re\nimport sys\nreload(sys)\nsys.setdefaultencoding('utf-8')\n\n@app.route('/nso')\ndef get_nso_events():\n r = requests.get(\"http... | python | edit | 6 | 6 | mit | ed0f115e600a564117ed540e7692e0efccf5826b | pennlabs/penn-mobile-server,pennlabs/penn-mobile-server | server/nso.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.bootstrap import Bootstrap\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom flask.ext.login import LoginManager\nfrom config import config\n\napp = Flask(__name__)\napp.config.from_object(config['de... | python | edit | 4 | 0 | mit | 92340a1238636d9160ce120cd9a12ed260007aca | timzdevz/fm-flask-app | app/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import viewsets\nfrom . import serializers, models\n\n\nclass PrintJobViewSet(viewsets.ModelViewSet):\n serializer_class = serializers.PrintJobSerializer\n\n def get_queryset(self):\n return self.request.use... | python | edit | 3 | 1 | mit | f11d7232486a92bf5e9dba28432ee2ed97e02da4 | aabmass/print-web,aabmass/print-web,aabmass/print-web | print_web_django/api/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport os\n\n#from tailorscad.config import ScadConfig\n\n\nBASE_DIR = '/usr/bin/'\nDEFAULT = BASE_DIR + 'openscad'\n\n\ndef build_with_openscad(state):\n\n args = build_args_from_state(state)\n\n out_call = ''\n\n ... | python | edit | 8 | 4 | mit | 5da0d563070f3a966f005a6987dd3e83d52bcaf9 | savorywatt/tailorSCAD | tailorscad/builder/openscad.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSpatial Transformations (:mod:`scipy.spatial.transform`)\n========================================================\n\n.. currentmodule:: scipy.spatial.transform\n\nThis package implements various spatial transformations. For now,\no... | python | edit | 1 | 0 | bsd-3-clause | ef98ba0f2aa660b85a4116d46679bf30321f2a05 | grlee77/scipy,pizzathief/scipy,endolith/scipy,Eric89GXL/scipy,gertingold/scipy,aeklant/scipy,anntzer/scipy,tylerjereddy/scipy,ilayn/scipy,scipy/scipy,matthew-brett/scipy,jor-/scipy,endolith/scipy,ilayn/scipy,person142/scipy,Eric89GXL/scipy,nmayorov/scipy,lhilt/scipy,arokem/scipy,endolith/scipy,ilayn/scipy,WarrenWeckess... | scipy/spatial/transform/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport socket\nimport datetime\nfrom ipaddress import ip_address\n\nimport zmq\nimport yaml\nimport quick2wire.i2c as i2c\n\nfrom database import Writer\nfrom database import Temperature, Base\n\n\nif __name__ == '__main__':\n\... | python | edit | 4 | 0 | bsd-3-clause | afa94ea297c6042f4444c0ce833c9b1ee02373c1 | CojoCompany/stowaway | stowaway.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom apps.bluebottle_utils.serializers import SorlImageField, SlugHyperlinkedIdentityField\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers\nfrom .models import Reaction\nfrom rest_framework.fields import... | python | edit | 1 | 0 | bsd-3-clause | b4c88bcedaf6cab078426675ddbaf0e963b4a821 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | apps/reactions/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Copyright (c) 2014, Ruslan Baratov\n# All rights reserved.\n\nimport os\nimport subprocess\nimport sys\n\ndef run():\n toolchain = os.getenv('TOOLCHAIN')\n if not toolchain:\n sys.exit('Environment variable ... | python | edit | 1 | 4 | bsd-2-clause | b3807e5ddb50ca34af3f4f187bc01fcc284afb20 | headupinclouds/polly,ruslo/polly,headupinclouds/polly,idscan/polly,idscan/polly,headupinclouds/polly,ruslo/polly | bin/jenkins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nFile: antifuzz.py\n\nAuthors: Kaitlin Keenan and Ryan Frank\n\n'''\n\nimport sys\nfrom shutil import copy2\nimport subprocess\nimport ssdeep #http://python-ssdeep.readthedocs.io/en/latest/installation.html\n\ndef main():\n\n\t# Take i... | python | edit | 4 | 1 | mit | 168937c586b228c05ada2da79a55c9416c3180d3 | ForensicTools/antifuzzyhashing-475-2161_Keenan_Frank | antifuzz.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import (\n BaseCommand,\n)\n\nfrom apps.api.models import (\n Convention,\n Contest,\n Contestant,\n Performance,\n)\n\n\nclass Command(BaseCommand):\n help = \"Command to denormailze data.... | python | edit | 1 | 5 | bsd-2-clause | 846a005c20ddc2e7702be48f5b2839b1c9fd1576 | barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore | project/apps/api/management/commands/denormalize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf8\n\nfrom io import StringIO\nfrom collections import deque\n\n\nclass StreamReader:\n def __init__(self, *args, stream_class=StringIO, **kwargs):\n self.streamClass = stream_class\n self.args = args\n s... | python | edit | 1 | 7 | mit | 0ee59d04cb2cbe93a3f4f87a34725fbcd1a66fc0 | JCH222/matriochkas | core/Reader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom .models import User\n\n\n\nclass UserSerializer(serializers.ModelSerializer):\n \"\"\" Usage:\n from rest_framework.renderers import JSONRenderer\n from semillas_backend.users.se... | python | edit | 1 | 0 | mit | 76cef8ae9961a64b2868fae32511f525860f8172 | Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform | semillas_backend/users/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module provides views for application.\"\"\"\nfrom tof_server import app, versioning, mysql\nfrom flask import jsonify, make_response\nimport string, random\n\n@app.route('/')\ndef index():\n \"\"\"Server information\"\"\"\n ... | python | edit | 1 | 4 | mit | 23d50e82212eb02a3ba467ae323736e4f03f7293 | P1X-in/Tanks-of-Freedom-Server | tof_server/views.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\"\"\"\nAccess to Fermi Gamma-ray Space Telescope data.\n\nhttp://fermi.gsfc.nasa.gov\nhttp://fermi.gsfc.nasa.gov/ssc/data/\n\"\"\"\nfrom astropy.config import ConfigurationIt... | python | edit | 5 | 0 | bsd-3-clause | 030e64d7aee6c3f0b3a0d0508ac1d5ece0bf4a40 | imbasimba/astroquery,imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery | astroquery/fermi/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Neuron:\n pass\n\nclass NeuronNetwork:\n neurons = []\n\n```\n\nApply this change: Create 2D list of Neurons in NeuronNetwork's init"
},
{
"role": "assistant",
"content": "class Neuron:\n pass\n\nclass NeuronNetwo... | python | edit | 3 | 3 | mit | c823a476b265b46d27b221831be952a811fe3468 | tysonzero/py-ann | ANN.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Set up test group file"
},
{
"role": "assistant",
"content": "import unittest\nimport requests\n\nimport requests_mock\n\nimport settings\nfrom util import register_uris\nfrom pycanvas import Canvas\nfrom pycanvas.course import C... | python | new_file | 6 | 1 | mit | 01641071c177e7b41f935a1683738f059e333d0b | ucfopen/canvasapi,ucfopen/canvasapi,ucfopen/canvasapi | tests/test_group.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass ModulesCommand(ModuleData):\n\timplements(IPlugin, IModuleData)\n\t\n\tname = \"ModulesCommand\"... | python | edit | 1 | 2 | bsd-3-clause | 02c2551b2760fc225bb4851c560f1881c7d674a4 | Heufneutje/txircd | txircd/modules/extra/listmodules.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Setup script for python packaging \"\"\"\nfrom setuptools import setup\n\nsetup(\n name=\"nbwavedrom\",\n packages=[\"nbwavedrom\"],\n version=\"0.3.0\",\n description=\"Wavedrom timing diagrams for Jupyter Notebook\",\n ... | python | edit | 1 | 0 | mit | cba6d3639f348d60133069fadec223837fde0005 | witchard/ipython-wavedrom,witchard/ipython-wavedrom,witchard/ipython-wavedrom | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nr\"\"\"\nTBmodels is a tool for creating / loading and manipulating tight-binding models.\n\"\"\"\n\n__version__ = '1.3.0b1'\n\n# import order is important due to circular imports\nfrom . import helpers\nfrom ._tb_model import Model\n\nfrom... | python | edit | 6 | 0 | apache-2.0 | 024a1d90ae890450167f697d97aa166dca3c0c5f | Z2PackDev/TBmodels,Z2PackDev/TBmodels | tbmodels/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport sys\nsys.path.append('../../')\nimport roche.settings\n\nfrom eulexistdb.db import ExistDB\nfrom roche.settings import EXISTDB_SERVER_URL\n\n#\n# Timeout higher?\n#\nxmldb = ExistDB(timeout=30)\n\nxmldb.createCollec... | python | edit | 4 | 0 | mit | f48eb543c3ae2222a71080592ae8932c227dc605 | beijingren/roche-website,beijingren/roche-website,beijingren/roche-website,beijingren/roche-website | roche/scripts/xml-load.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Classes and methods for working with PDA stacks.\"\"\"\n\n\nclass PDAStack(object):\n \"\"\"A PDA stack.\"\"\"\n\n def __init__(self, stack, **kwargs):\n \"\"\"Initialize the new PDA stack.\"\"\"\n... | python | edit | 1 | 2 | mit | 3427b2583c38ed7ec5239c36faa82536f3f95a3b | caleb531/automata | automata/pda/stack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownershi... | python | edit | 1 | 0 | apache-2.0 | 5187cd61c8063091304b8ee8e086c7474bbda71c | angus-ai/angus-sdk-python | angus/client/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix counterexample to be more explicit"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nimport sys\n\n# This submission exposes a bug in an older version of the output validator\n# where the valid range of possibl... | python | new_file | 3 | 0 | mit | 6447f7f025d00006300ec17668a479214206b09a | Kattis/problemtools,Kattis/problemtools,Kattis/problemtools,Kattis/problemtools | examples/guess/submissions/wrong_answer/guess_modulo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport dj_database_url\n\nfrom .base import * # noqa: F401,F403\n\n\nDEBUG = False\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\n\nSECRET_KEY = os.environ['SECRET_KEY']\n\n\n# Database\n# https://doc... | python | edit | 1 | 0 | bsd-2-clause | 3ae40027f42f6228489d2bbc5c2da53c7df8387a | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | babybuddy/settings/heroku.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Li... | python | edit | 1 | 2 | apache-2.0 | 32f38eb01c3a203ae35d70b485fcee7b13f1acde | GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker | tests/help_generation_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTest that we can call C++ template fucntions.\n\"\"\"\nimport lldb\nfrom lldbsuite.test.decorators import *\nfrom lldbsuite.test.lldbtest import *\nfrom lldbsuite.test import lldbutil\n\n\nclass TemplateFunctionsTestCase(TestBase):\... | python | edit | 10 | 2 | apache-2.0 | 5c6df7c8ddb6ae698ab54b30f211bbcd28549c95 | llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb | packages/Python/lldbsuite/test/lang/cpp/template-function/TestTemplateFunctions.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.tools import assert_true\nfrom ..examples.sample_data import (temperature_ramp, multisource_event,\n image_and_scalar)\nfrom metadatastore.api import Document\n\ndef run_example(example):\n ev... | python | edit | 1 | 2 | bsd-3-clause | dc071e4961c7db7e98e7dfdcd74cce368ce31039 | tacaswell/dataportal,NSLS-II/datamuxer,tacaswell/dataportal,danielballan/datamuxer,NSLS-II/dataportal,ericdill/datamuxer,NSLS-II/dataportal,ericdill/databroker,ericdill/datamuxer,ericdill/databroker,danielballan/dataportal,danielballan/datamuxer,danielballan/dataportal | dataportal/tests/test_examples.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim:ts=4:sw=4:noexpandtab\n\nimport importlib\n\nfrom .dictlib import ConfigDict\n\nconfig = ConfigDict(\n\tbot_nickname = 'pmxbot',\n\tdatabase = 'sqlite:pmxbot.sqlite',\n\tserver_host = 'irc.freenode.net',\n\tse... | python | edit | 1 | 0 | mit | 07e300e393701d8bddf6646a76542555b92c9f4d | yougov/pmxbot,yougov/pmxbot,yougov/pmxbot | pmxbot/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport matplotlib\nfrom matplotlib import pyplot as plt\n\nfrom astropy.utils.decorators import wraps\n\nMPL_VERSION = matplotlib.__version__\n\n# The developer versions of the form 3.1.x+... contain changes that will only\n# be included in... | python | edit | 1 | 1 | bsd-3-clause | bf5dd490cec02827d51c887506ce1f55d5012893 | mhvk/astropy,StuartLittlefair/astropy,larrybradley/astropy,StuartLittlefair/astropy,pllim/astropy,astropy/astropy,aleksandr-bakanov/astropy,mhvk/astropy,saimn/astropy,dhomeier/astropy,StuartLittlefair/astropy,stargaser/astropy,dhomeier/astropy,stargaser/astropy,mhvk/astropy,StuartLittlefair/astropy,bsipocz/astropy,dhom... | astropy/tests/image_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing Libs\nfrom tests.support.case import SSHCase\nfrom tests.support.unit import skipIf\n\n# Import Salt Libs\nimport salt.utils\n\... | python | edit | 1 | 2 | apache-2.0 | 85e853a63d7fed79b931b337bb9e6678077cf8d5 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/ssh/test_grains.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nFLUID DYNAMICS SIMULATOR\n\nRequires Python 2.7 and OpenCV 2\n\nTom Blanchet (c) 2013 - 2014 (revised 2017)\n\"\"\"\nimport cv2\nfrom fluidDoubleCone import FluidDoubleCone, RGB\nfrom fluidDoubleConeView imp... | python | edit | 3 | 1 | apache-2.0 | b47d7b44030a8388d1860316c117e02796ba9ccc | FrogBomb/fluidDynamicsSimulator | __init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Generated by Django 2.2 on 2019-04-15 19:28\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('contenttypes', '0002_remove_content_t... | python | edit | 1 | 0 | apache-2.0 | 6034265dfdfb2a7e1e4881076cc0f011ff0e639d | lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox | netbox/extras/migrations/0022_custom_links.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\n\nclass ProtractorTestCaseMixin(object):\n protractor_conf = 'protractor.conf.js'\n suite = None\n specs = None\n\n @classmethod\n def setUpClass(cls):\n super... | python | edit | 1 | 3 | mit | feefc687473b80adf30079e3ca23384459bb1558 | penguin359/django-protractor,jpulec/django-protractor | protractor/test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport network\r\nimport math\r\n\r\nclass Ipv4Net(network.Network):\r\n \r\n def __init__(self, net_id, netmask):\r\n self.netmask = netmask\r\n self.network_id = net_id\r\n\r\n @property\r\n def network_id(self):... | python | edit | 1 | 2 | mit | 0fe3d41a4aa69f1ce39f61623d10985c20e012e8 | foxfluff/network-py | network/ipv4_network.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n Detect SSDs\n'''\nimport os\nimport salt.utils\nimport logging\n\nlog = logging.getLogger(__name__)\n\ndef ssds():\n '''\n Return list of disk devices that are SSD (non-rotational)\n '''\n\n SSD... | python | edit | 1 | 4 | apache-2.0 | 7a49e7c4344f7d78a84644ade5ca1c3251065f4a | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/grains/ssds.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(\n genRESTEndPointsForSlicerCLIsInSubDirs,\n genRESTEndPointsForSlicerCLIsInDocker\n)\n\n_template = os.path.join(\n os.path.dirname(__file__),... | python | edit | 3 | 1 | apache-2.0 | ecbabd56f6afc4474402d3293bf11e3b6eb2e8f4 | DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK | server/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014, Ruslan Baratov\n# All rights reserved.\n\nimport detail.util\nimport os\nimport sys\n\ndef get(arch, vs_version):\n vs_path_env = 'VS{}0COMNTOOLS'.format(vs_version)\n vs_path = os.getenv(vs_path_env)\n if not vs_pa... | python | edit | 1 | 5 | bsd-2-clause | 8b4b5705907e1ec5f9dd3148560dc1bf4cd5b9b7 | idscan/polly,idscan/polly,ruslo/polly,ruslo/polly | bin/detail/get_nmake_environment.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom multiprocessing import Queue, Process\nimport time\nimport backend\ncommand_queue = Queue()\nresponse_queue = Queue()\n\n\ndef start_backend():\n if handler:\n handler.stop()\n handler = Process(target=backend.start, args=... | python | edit | 1 | 2 | mit | 1e17e868ff332003da959a397b8846c9386b35e8 | IAPark/PITherm | API_to_backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python\nimport os\nimport subprocess\n\nroot_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\"))\ntarfile = os.path.join(root_dir, \"src_pkg.tar\")\n\ndef _is_dir_newer(directory, filename):\n file_mtime = ... | python | edit | 1 | 6 | bsd-3-clause | 9d46df1680e3d799971e73ec73043c2a6c0590ce | vmalloc/mailboxer,Infinidat/lanister,vmalloc/mailboxer,Infinidat/lanister,getslash/mailboxer,vmalloc/mailboxer,getslash/mailboxer,getslash/mailboxer | scripts/build_tar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom gingerit.gingerit import GingerIt\n\n\n@pytest.mark.parametrize(\"text,expected\", [\n (\n \"The smelt of fliwers bring back memories.\",\n \"The smell of flowers brings back memories.\"\n ),\n (... | python | edit | 1 | 1 | mit | 87844a776c2d409bdf7eaa99da06d07d77d7098e | Azd325/gingerit | tests/test_gingerit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\n\nclass Profile(models.Model):\n user = models.OneToOneField(User)\n\n def __str__(self):\n return self.user.get_full_name() or self.user.username\n\n... | python | edit | 1 | 2 | mit | 7c18cbf6dced0435537fb4067dfa878ae9ccc6af | lockhawksp/beethoven,lockhawksp/beethoven | accounts/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module contains the high-level functions to access the library. Care is\ntaken to make this as pythonic as possible and hide as many of the gory\nimplementations as possible.\n\"\"\"\n\n\nfrom x690.types import ObjectIdentifier... | python | edit | 3 | 0 | mit | b6813731696a03e04367ea3286092320391080e9 | exhuma/puresnmp,exhuma/puresnmp | puresnmp/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# XIA2Version.py\n# Copyright (C) 2006 CCLRC, Graeme Winter\n#\n# This code is distributed under the BSD license, a copy of which is\n# included in the root directory of this package.\n#\n# 6th June 2006\n#\n# A... | python | edit | 4 | 0 | bsd-3-clause | df95836c39f859a455afd06e32840f5e68fc2c1d | xia2/xia2,xia2/xia2 | XIA2Version.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\n\n\nclass Settings(object):\n def __init__(self):\n self._settings = collections.OrderedDict()\n\n def __setattr__(self, name, value):\n if name.startswith('_'):\n super(Settings, self).__s... | python | edit | 1 | 3 | mit | 32def5f720b5ffb858f604dc360f66fa2a1b946a | piotrekw/pirx | pirx/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport json\nfrom django.conf import settings\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.http import HttpResponse\nfrom .models import ActionRecord\... | python | edit | 1 | 9 | mit | f941989ef9663ebbb3ba33709dd3c723c86bd2cc | bradojevic/django-action-log | action_log/views.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 Jon LaBelle\n# Copyright (c) 2017 Jon LaBelle\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Markdownlint plugin class.\"\"\"... | python | edit | 1 | 0 | mit | 3d58796f9bedb607cd2c23aa7dcb6ce86b8af075 | jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom base.form_utils import RequiredFieldForm\n\nfrom .models import Document\nfrom base.form_utils import FileDropInput\n\n\nclass DocumentForm(RequiredFieldForm):\n\n def __init__(self, *args, **kwargs):\n ... | python | edit | 1 | 2 | apache-2.0 | fece0019a54534b56960a30785bb70edb5d205bf | pkimber/base,pkimber/base,pkimber/base,pkimber/base | example_base/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport sys\nimport re\n\ndef parse(version, endpoint_path):\n \"\"\"Map an HTTP call to an API path\"\"\"\n\n with open('opendc/api/{}/paths.json'.format(version)) as paths_file:\n paths = json.load(paths_file)\n ... | python | edit | 3 | 8 | mit | c5671ab2e5115ce9c022a97a088300dc408e2aa4 | atlarge-research/opendc-web-server,atlarge-research/opendc-web-server | opendc/util/path_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom morenines import output\nfrom morenines import util\n\nfrom morenines.index import Index\nfrom morenines.ignores import Ignores\n\n\nNAMES = {\n 'repo_dir': '.morenines',\n 'index': 'index',\n 'ignore': 'ignore',\... | python | edit | 1 | 4 | mit | 9909ce7e900097b74b701ad52c0aae5ba68b8823 | mcgid/morenines,mcgid/morenines | morenines/repository.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\n\n# Check that we are in an activated virtual environment\ntry:\n import os\n virtual_env = os.environ['VIRTUAL_ENV']\nexcept KeyError:\n print(\"It doesn't look like you are in an activated v... | python | edit | 1 | 0 | mit | 8c637c0f70908a00713014ef2d2ff72e3d5a81dc | mpirnat/django-tutorial-v2 | prerequisites.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nScript used to create lut lists used by mayavi from matplotlib colormaps.\nThis requires matlplotlib to be installed and should not be ran by the\nuser, but only once in a while to synchronize with MPL develop... | python | edit | 1 | 0 | bsd-3-clause | bebb1d9bc44300e7c65fba90d6c2eb76243ea372 | dmsurti/mayavi,liulion/mayavi,alexandreleroux/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,liulion/mayavi | scripts/cm2lut.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"biofloat\",\n version = \"0.3.0\",\n packages = find_packages(),\n requires = ['Python (>=2.7)'],\n install_requires = [\n 'beautifulsoup4>=4.4',\n ... | python | edit | 1 | 0 | mit | 2c5dd9086681422b21d0bfac0906db5ccdf22b0c | biofloat/biofloat,biofloat/biofloat,MBARIMike/biofloat,MBARIMike/biofloat | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass InstructionBase(object):\n BEFORE=None\n AFTER=None\n\n def __init__(self, search_string):\n self.search_string = search_string\n\n @property\n def search_string(self):\n return self._search_string\n\n ... | python | edit | 1 | 3 | unlicense | 018acc1817cedf8985ffc81e4fe7e98d85a644da | djmattyg007/IdiotScript | instructions/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom openmc.arithmetic import *\nfrom openmc.cell import *\nfrom openmc.checkvalue import *\nfrom openmc.mesh import *\nfrom openmc.element import *\nfrom openmc.geometry import *\nfrom openmc.nuclide import *\nfrom openmc.macroscopic impor... | python | edit | 37 | 0 | mit | 87bd987ebb802200540c23cfccaba2c56a672ed5 | amandalund/openmc,walshjon/openmc,amandalund/openmc,walshjon/openmc,amandalund/openmc,walshjon/openmc,walshjon/openmc,amandalund/openmc | openmc/__init__.py | rejected_lint | Too many lint violations: 37 | 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#\nimport logging\nimport pytest\nfrom copy import copy\nfrom tests.common.test_vector import *\nfrom tests.common.impala_test_suite import *\n\nclass TestStri... | python | edit | 9 | 2 | apache-2.0 | 32d5f2bfcaad65230632f1854fabd2e9de1c151b | ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC | tests/query_test/test_chars.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport csv\n\nppelm_s3_key = ''\n\n\ndef process_from_dump(fname=None, delimiter='\\t'):\n ppelm_json = []\n if fname is None:\n # ToDo Get from S3\n pass\n else:\n with open(fname, 'r') as f:\n csv_... | python | edit | 1 | 3 | bsd-2-clause | e32d95c40dcfa4d3eb07572d5fd4f0fda710c64c | sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra | indra/sources/phosphoELM/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef _gap_insertion_sort(a_list, start, gap):\n for i in range(start + gap, len(a_list), gap):\n current_value = a_... | python | edit | 1 | 4 | bsd-2-clause | c35e004ae3b2b9b8338673078f8ee523ac79e005 | bowen0701/algorithms_data_structures | alg_shell_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2013 Andy Balaam and The Pepper Developers\n# Released under the MIT License. See the file COPYING.txt for details.\n\n# I assure you before God that what I am writing to you is no lie.\n# Galations 1 v20\n\nimport types\ni... | python | edit | 1 | 5 | mit | a9a5b9007f44495806bbdb876553974cd2d44e04 | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper | src/libpepper/utils/type_is.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom IPy import IP\n\nfrom django import forms\nfrom django.utils.encoding import force_unicode\nfrom django.utils.safestring import mark_safe\n\n\nclass NetInput(forms.Widget):\n input_type = 'text'\n\n def render(self, na... | python | edit | 1 | 3 | bsd-3-clause | cf026dbabffd92cb51baeb63c1e1e88045e946b9 | jmacul2/django-postgresql-netfields | netfields/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\nfrom rest_framework import serializers\n\nUser = get_user_model()\n\n\nclass UserSerializer(serializers.ModelSerializer):\n class Meta:\n model = User\n fields = [\"username\"... | python | edit | 1 | 0 | bsd-3-clause | 17499a12c9216d1db907305ef30f58970cd0932e | pydanny/cookiecutter-django,ryankanno/cookiecutter-django,pydanny/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-dja... | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (C) 2011 Lukas Lalinsky\n# Distributed under the MIT license, see the LICENSE file for details.\n\nfrom acoustid.script import run_script\nfrom acoustid.data.submission import import_queued_submissions\n... | python | edit | 1 | 1 | mit | cdc4f79210b69f131926374aff61be72ab573c46 | lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server | scripts/import_queued_submissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport textwrap\n\n\n@pytest.fixture\ndef warnings_demo(tmpdir):\n demo = tmpdir.joinpath('warnings_demo.py')\n demo.write_text(textwrap.dedent('''\n from logging import basicConfig\n from pip._internal.ut... | python | edit | 1 | 1 | mit | 2bb8ee6ae30e233f28ea0ae0fb01c0e4a1f8d9f1 | xavfernandez/pip,sbidoul/pip,pypa/pip,rouge8/pip,rouge8/pip,pfmoore/pip,xavfernandez/pip,sbidoul/pip,pypa/pip,pradyunsg/pip,xavfernandez/pip,pradyunsg/pip,pfmoore/pip,rouge8/pip | tests/functional/test_warning.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.conf.urls.defaults import patterns, url\n\n\n# Page patterns.\nurlpatterns = patterns(\"mezzanine.pages.views\",\n url(\"^admin_page_ordering/$\", \"admin_page_ordering\",\n name=\"admin_page_ordering\"),\n url(\"... | python | edit | 1 | 0 | bsd-2-clause | 906247c6431b85c90f8aec8a7f4f73f1064abeba | biomassives/mezzanine,AlexHill/mezzanine,spookylukey/mezzanine,frankchin/mezzanine,saintbird/mezzanine,adrian-the-git/mezzanine,jjz/mezzanine,agepoly/mezzanine,geodesign/mezzanine,jerivas/mezzanine,saintbird/mezzanine,wyzex/mezzanine,Skytorn86/mezzanine,industrydive/mezzanine,ryneeverett/mezzanine,eino-makitalo/mezzani... | mezzanine/pages/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .http import MPXApi\nfrom api_base import get_guid_based_id\n\n\n__version__ = '0.0.4'\n__title__ = 'mpxapi'\n\n```\n\nApply this change: Fix error to handle using mpxapi in subdirs"
},
{
"role": "assistant",
"content": "fr... | python | edit | 4 | 0 | mit | 1efbc464c651d99c7482a9674a90fb639f044c6e | blockbuster/mpxapi,blockbuster/mpxapi | mpxapi/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Read events and parameters from your Axis device.\"\"\"\n\nimport asyncio\nimport argparse\nimport logging\nimport sys\n\nfrom axis import AxisDevice\n\n\nasync def main(args):\n loop = asyncio.get_event_loop()\n device = AxisDe... | python | edit | 3 | 7 | mit | 2daeee0b9fabb4f1ad709bdbe9c8c12a6281d32d | Kane610/axis | axis/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from trello import TrelloCommand\n from output import Output\nexcept ImportError:\n from .trello import TrelloCommand\n from .output import Output\n\nclass TrelloNotificationsCommand(TrelloCommand):\n def work(self, co... | python | edit | 1 | 2 | mit | 698732f1276f92a94143b0531906caf37e885c28 | NicoSantangelo/sublime-text-trello | trello_notifications.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nMain command which is meant to be run daily to get the information\nfrom various social networks into the local db.\n'''\nimport traceback\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core.exception... | python | edit | 4 | 3 | mit | a5ce35c44938d37aa9727d37c0cbe0232b8e92d3 | CIGIHub/django-socializr,albertoconnor/django-socializr | socializr/management/commands/socializr_update.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\nimport re\n\n\ndef read_env():\n \"\"\"Pulled from Honcho code with minor updates, reads local default\n environment variables from a .env file located in the project root\n directory.\... | python | edit | 1 | 6 | mit | 5cbae4953ea0bde97b0cf7cd914a3a5263fa74be | jpadilla/feedleap,jpadilla/feedleap | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom minecraft_query import MinecraftQuery\n\napp = Flask(__name__)\n\n@app.route('/mcstatus')\n\ndef returnStatus():\n \n try:\n query = MinecraftQuery(\"mc.voltaire.sh\", 25565, 10, 3)\n basicQ... | python | edit | 1 | 1 | bsd-3-clause | bbfb09205974efa969fc636b6e1079a84dad3619 | voltaire/minecraft-site-old,voltaire/minecraft-site-old | mcstatus/application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nDatabase module.\nGet the database, convert it to the built-in data structure and hold a link\nto it. The module should be initialized before any other modules except mailer\nand log.\nDesign: Heranort\n'''\n\n'''\nConnect to the datab... | python | edit | 5 | 8 | mit | ce0be23f554eb9949a3769da1e4a3d3d51b546f1 | niwtr/map-walker | src/server/datab.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom st2actions.runners.pythonrunner import Action\nimport requests\n\n\nclass TravisCI(Action):\n def __init__(self, config):\n super(TravisCI, self).__init__(config)\n\n def _init_header(self):\n travis_header = {\n ... | python | edit | 1 | 5 | apache-2.0 | 1d448b65840509c5f21abb7f5ad65a6ce20b139c | StackStorm/st2contrib,StackStorm/st2contrib,pidah/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,psychopenguin/st2contrib,digideskio/st2contrib,pearsontechnology/st2contrib,lmEshoo/st2contrib,tonybaloney/st2contrib,tonybaloney/st2contri... | packs/travisci/actions/lib/action.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import cd, run, sudo, env, roles, execute\nfrom datetime import datetime\n\nenv.roledefs = {\n 'webuser': ['<EMAIL>'],\n 'sudoer': ['<EMAIL>'],\n}\nenv.hosts = ['andrewlorente.com']\n\ndef deploy():\n release_id = d... | python | edit | 1 | 1 | mit | 93af551b8f0ce03b16dd7aad1a2963cc4e5b6d6a | ErinCall/bloge | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom base64 import urlsafe_b64encode\nfrom datetime import timedelta\nfrom marshmallow import Schema, fields, post_load\n\nfrom zeus.models import Hook\nfrom zeus.utils import timezone\n\n\nclass HookSchema(Schema):\n id = fields.UUID(du... | python | edit | 1 | 2 | apache-2.0 | 1c3d2669d9bbe1aa3f4387f864d9085945e9257c | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | zeus/api/schemas/hook.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 NEC Corporation\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 Li... | python | edit | 1 | 1 | apache-2.0 | bd7ef1be82a6cd68060dee47046d90202b3a9e0c | masayukig/tempest,masayukig/tempest,Juniper/tempest,Juniper/tempest,openstack/tempest,cisco-openstack/tempest,cisco-openstack/tempest,openstack/tempest | tempest/api/volume/test_availability_zone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.http import HttpResponse\nfrom stocks import forms\n\n# Create your views here.\ndef index(request):\n regForm = forms.RegistrationForm()\n logForm = forms.LoginForm()\n return rende... | python | edit | 4 | 6 | apache-2.0 | 88964dc79be1c88f1a197c5a59f342c9b7749ed2 | ddsnowboard/FantasyStocks,ddsnowboard/FantasyStocks,ddsnowboard/FantasyStocks | fantasyStocks/stocks/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom threading import Timer\nfrom . import track\n\n_listeners = []\n\nclass TrackChecker():\n\tdef __init__(self, interval = 5):\n\t\tself.listeners = []\n\t\tself.CHECK_INTERVAL = interval\n\t\tself.currentSong = \"\"\n\t\tself.currentArt... | python | edit | 1 | 5 | mit | 84e7ebd3df1fc7b9cb52fa5c7fcb3af87e6b454d | ollien/playserver,ollien/playserver,ollien/playserver | playserver/trackchecker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import FloppyFormsTestCase\n\nimport floppyforms as forms\n\n\nclass IntegerFieldTests(FloppyFormsTestCase):\n def test_parse_int(self):\n int_field = forms.IntegerField()\n result = int_field.clean('15')\n ... | python | edit | 1 | 1 | bsd-3-clause | 8d0fe30fadc4834348c0f697b097f4753c7f9d84 | gregmuellegger/django-floppyforms,gregmuellegger/django-floppyforms,jonashaag/django-floppyforms,gregmuellegger/django-floppyforms,jonashaag/django-floppyforms | floppyforms/tests/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ndevicons_start = \"e700\"\ndevicons_end = \"e7c5\"\n\nprint \"Devicons\"\nfor ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1):\n print unichr(ii),\n\ncustom_start = \"e5f... | python | edit | 11 | 0 | mit | 99d16198b5b61ba13a441a6546ccd1f7ce0b91bc | mkofinas/prompt-support,mkofinas/prompt-support | test/symbols/show_glyphs.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests K2fov.plot\"\"\"\n\nfrom .. import plot\n\n\ndef test_basics():\n \"\"\"Make sure this runs without exception.\"\"\"\n try:\n import matplotlib\n plot.create_context_plot(180, 0)\n plot.create_context_... | python | edit | 3 | 0 | mit | 0f7ebec0442da08b12cd88f2558146d5c5a551ad | KeplerGO/K2fov,mrtommyb/K2fov | K2fov/tests/test_plot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom google.cloud import error_reporting\nfrom google.cloud import logging\n\nfrom analysis import Analysis\nfrom trading import Trading\nfrom twitter import Twitter\n\n# Analyzes Trump tweets, ... | python | edit | 1 | 2 | mit | 84e80ed4d36b102761e2c9b6900d46c4e126e9e6 | maxbbraun/trump2cash | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport candle\n\n\nfile_path = os.path.dirname(os.path.realpath(__file__))\nlib_path2 = os.path.abspath(os.path.join(file_path, '..', '..', 'common'))\nsys.path.append(lib_path2)\n\n\nREQUIRED = [\n 'learning_rate', \n 'lea... | python | edit | 1 | 2 | mit | 2a724872cba5c48ddbd336f06460aa2ad851c6d0 | ECP-CANDLE/Benchmarks,ECP-CANDLE/Benchmarks,ECP-CANDLE/Benchmarks | Pilot3/P3B5/p3b5.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import lcd, local\nfrom fabric.decorators import runs_once\n\nimport os\n\nfabfile_dir = os.path.dirname(__file__)\n\n\ndef update_theme():\n theme_dir = os.path.join(fabfile_dir, 'readthedocs', 'templates', 'sphinx')\n ... | python | edit | 1 | 1 | mit | 35308ba3dbfc25e86fab720e67d6a9576d6937c9 | espdev/readthedocs.org,pombredanne/readthedocs.org,davidfischer/readthedocs.org,rtfd/readthedocs.org,davidfischer/readthedocs.org,davidfischer/readthedocs.org,safwanrahman/readthedocs.org,tddv/readthedocs.org,techtonik/readthedocs.org,wijerasa/readthedocs.org,techtonik/readthedocs.org,espdev/readthedocs.org,stevepiercy... | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport logging\n\nDEBUG_FORMAT = (\"[%(asctime)s] %(levelname)s %(name)s:%(lineno)d\"\n \"(%(funcName)s): %(message)s\")\nINFO_FORMAT = (\"[%(asctime)s] %(message)s\")\nCOLOR_FORMAT = (\"[%(asctime)s] \\033[%(colo... | python | edit | 1 | 4 | bsd-2-clause | e55a1e97a191dd5c9fc43a1d2ed0b723ac64f46a | remind101/stacker,remind101/stacker | stacker/logger/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nYou can use this as a boilerplate for your test framework.\nDefine your customized library methods in a master class like this.\nThen have all your test classes inherit it.\nBaseTestCase will inherit SeleniumBase methods from BaseCase.... | python | edit | 1 | 2 | mit | 97990ea039228eb3311b148c047fae015a4f4d7e | seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | examples/boilerplates/base_test_case.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .manager import Manager\n\n\nclass Xero(object):\n \"\"\"An ORM-like interface to the Xero API\"\"\"\n\n OBJECT_LIST = (u'Contacts', u'Accounts', u'CreditNotes',\n u'Currencies', u'Invoices', u'Items', u'Organis... | python | edit | 1 | 2 | bsd-3-clause | 89d8ee0b91c9fd579dcf965e9e07f18954625c72 | wegotpop/pyxero,jarekwg/pyxero,jaymcconnell/pyxero,opendesk/pyxero,thisismyrobot/pyxero,freakboy3742/pyxero,MJMortimer/pyxero,unomena/pyxero,schinckel/pyxero,unomena/pyxeropos,jacobg/pyxero,direvus/pyxero | xero/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unicodedata\n\nfrom django.forms import fields\n\n\nclass XMLCompatCharField(fields.CharField):\n \"\"\"\n Strip 'control characters', as XML 1.0 does not allow them and the API may\n return data in XML.\n \"\"\"\n\n d... | python | edit | 1 | 4 | apache-2.0 | 87c861f6ed0e73e21983edc3add35954b9f0def5 | CDE-UNIBE/qcat,CDE-UNIBE/qcat,CDE-UNIBE/qcat,CDE-UNIBE/qcat | apps/configuration/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe default module run when imported from the command line and also the main entry point defined in\nsetup.py. Ex:\n\n python3 -m srm\n\"\"\"\n\nimport click\n\nfrom . import __version__, status\n\n\n@click.group()\n@click.versi... | python | edit | 1 | 1 | mit | 2e9a6a2babb16f4ed9c3367b21ee28514d1988a8 | cmcginty/simple-rom-manager,cmcginty/simple-rom-manager | srm/__main__.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.