messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom models import Player\n\ndef create_players():\n\t#TODO: Need to centralize this function call.\n\trandom.seed(123456789)\n\n\t# TODO: Do we need to delete all?\n\tPlayer.objects.all().delete()\n\tfor _ in xrange(3000):\n...
python
edit
2
0
mit
829aa30a052b1a35d2c0d0797abe6b0c34c2f9d2
isuraed/bluechip
bluechip/player/createplayers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 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# https://www.apache.o...
python
edit
1
0
apache-2.0
f10a8c498df0f83b43e636dfcb0b50d60860ed5e
GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python
googlecloudprofiler/__version__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .exceptions import ApiError\n\n# -----------------------------------------------------------------------------\n\n\nclass Related(object):\n def __init__(self, item_class=None, **kwargs):\n self._item_class = item_class\n ...
python
edit
1
6
mit
38cd50805e080f6613d7e1d5867a84952ec88580
taion/flask-jsonapiview,4Catalyzer/flask-jsonapiview,4Catalyzer/flask-resty
flask_resty/related.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework import routers\n\nfrom . import views\n\nfrom .views import PlayerViewSet, AdventureViewSet, RoomViewSet, ArtifactViewSet, EffectViewSet, MonsterViewSet\n\nrouter = routers.Defa...
python
edit
1
0
mit
e861def07da1f0dea7f5273d06e7dc674a79025f
kdechant/eamon,kdechant/eamon,kdechant/eamon,kdechant/eamon
adventure/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\n# This gives a nicer printout for masked arrays.\nnumpy.ma.default_real_fill_value = numpy.nan\n\nimport Integration\nimport PhiManip\nimport Numerics\nimport SFS\nimport ms\ntry:\n import Plotting\nexcept ImportError:\n ...
python
edit
8
0
bsd-3-clause
b0236a2cb936df9571139f074b35c178e2573593
RyanGutenkunst/dadi,niuhuifei/dadi,cheese1213/dadi,yangjl/dadi,yangjl/dadi,ChenHsiang/dadi,paulirish/dadi,beni55/dadi,ChenHsiang/dadi,beni55/dadi,RyanGutenkunst/dadi,paulirish/dadi,cheese1213/dadi,niuhuifei/dadi
dadi/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright (c) 2009 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\"\"\"Presubmit script for perf_expectations.\n\nS...
python
edit
1
4
bsd-3-clause
28fe69ab1bb9362a1ee105821ec4631b574417d3
littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,markYoungH/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,keishi/chromium,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crossw...
tools/perf_expectations/PRESUBMIT.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom flask import Flask\nfrom flask_selfdoc import Autodoc\n\n\nclass TestErrorHandling(unittest.TestCase):\n def test_app_not_initialized(self):\n app = Flask(__name__)\n autodoc = Autodoc()\n wit...
python
edit
1
1
mit
097bdd97d8106d0d4fdb073be80792047f52b15a
jwg4/flask-autodoc,jwg4/flask-autodoc
tests/test_error_handling.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom django.core.management.base import BaseCommand\nfrom ...models import Poll, Option\n\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **kwargs):\n Poll.objects.filter(id=1).delete()\n Option....
python
edit
2
2
mit
fb28813fbb906c1ea7c4fb3c52e60219c3ae1f19
douglasbastos/votacao_with_redis,douglasbastos/votacao_with_redis
votacao_with_redis/management/commands/gera_votacao.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom optparse import OptionParser\n\nfrom pegasus.service import app, em\nfrom pegasus.service.command import Command\n\nclass ServerCommand(Command):\n usage = \"%prog [options]\"\n description = \"Start Pe...
python
edit
6
5
apache-2.0
c7dbf93c123d4b055fcd4a73e5d3374e48ee248a
pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus-service,pegasus-isi/pegasus-service,pegasus-isi/pegasus-service,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus
pegasus/service/server.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nslow = pytest.mark.skipif(\n not pytest.config.getoption(\"--runslow\"),\n reason=\"need --runslow option to run\"\n)\n\nTOTAL_DEGREES = 30\n\nfrom .crv_coeffs import coeffs as correct_coeffs\nfrom ..cram import get_C...
python
edit
1
3
bsd-3-clause
75b02b3cafcc34dca143de9143f14c3c7c29c97c
ergs/transmutagen,ergs/transmutagen
transmutagen/tests/test_coefficients.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\"\"\"\nThe entry point of csft.\n\"\"\"\n\nimport argparse as ap\nfrom os.path import isdir\n\nfrom .csft import print_result\n\n\ndef main(argv=None):\n parser = ap.ArgumentParser(add_he...
python
edit
1
2
mit
c4a0dc9ecc12a82735738fe4b80dc74f991b66d7
yanqd0/csft
csft/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bcrypt\nfrom django.contrib.auth.models import User\nfrom django.conf import settings\n\n\ntry:\n rounds = settings.BCRYPT_ROUNDS\nexcept AttributeError:\n rounds = 12\n\n_check_password = User.check_password\n\ndef bcrypt_chec...
python
edit
1
2
mit
5a6970349ace3ddcf12cfac6bc72ec6dbc3424a2
dwaiter/django-bcrypt
django_bcrypt/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport types\nimport config\n\n\nclass Driver(object):\n\n def __init__(self):\n self.driver_type = self.__class__.__name__\n # Get credentials from conf files for CMDB\n pass\n\n def get_driver_...
python
edit
3
1
apache-2.0
ad8908753e31420f489f8e5fe2f1c5eac5a5c42a
sl4shme/alexandria,sl4shme/alexandria,sl4shme/alexandria,uggla/alexandria
alexandria/drivers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport requests\nimport json\nimport csv\nimport sys\n\ndef parse_dataset_metadata(dataset):\n if 'rights' in dataset.keys():\n\trights = dataset['rights'].encode('utf-8').strip()\n\trights = rights.replace(\"\\n\", \"...
python
edit
13
2
mit
e1c9828354036279469260ab498d8c979baa1562
Datafable/gbif-data-licenses,Datafable/gbif-data-licenses,Datafable/gbif-data-licenses
code/get_licenses.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport moderngl_window as mglw\n\n\nclass Example(mglw.WindowConfig):\n gl_version = (3, 3)\n title = \"ModernGL Example\"\n window_size = (1280, 720)\n aspect_ratio = 16 / 9\n resizable = False\n\n resource_d...
python
edit
1
1
mit
73fa2788a1e8d6faef1eda78520b1908ebde66b5
cprogrammer1994/ModernGL,cprogrammer1994/ModernGL,cprogrammer1994/ModernGL
examples/ported/_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom geopandas import GeoDataFrame\n\nfrom ..utils.geom_utils import generate_index, generate_geometry\n\n\nclass CartoDataFrame(GeoDataFrame):\n\n def __init__(self, *args, **kwargs):\n super(CartoDataFrame, self).__init__(*args,...
python
edit
1
1
bsd-3-clause
c55243d591793a9213d27126a3c240bb47c5f82b
CartoDB/cartoframes,CartoDB/cartoframes
cartoframes/core/cartodataframe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport models\nimport config\nimport time\nfrom hashlib import md5\nimport json\n\nimport serverinfo\n\nfrom google.appengine.ext import webapp\n\n\"\"\"\n{\n \"info\": {\n \"name\": \"<name>\",\n \"start_utc\": ...
python
edit
5
4
bsd-2-clause
42efd09692dffc67e58050a24a49ee874a8c105d
spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover
stats/sendcommand.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom . import views\n\nurlpatterns = [\n url(r'^$', views.PreprintList.as_view(), name=views.PreprintList.view_name),\n url(r'^(?P<node_id>\\w+)/$', views.PreprintDetail.as_view(), name=views.Prepri...
python
edit
1
0
apache-2.0
c08c437b22982667e8ed413739147caec6c5d1ca
mluo613/osf.io,rdhyee/osf.io,samchrisinger/osf.io,leb2dg/osf.io,cslzchen/osf.io,chrisseto/osf.io,leb2dg/osf.io,binoculars/osf.io,mluo613/osf.io,Nesiehr/osf.io,Johnetordoff/osf.io,laurenrevere/osf.io,emetsger/osf.io,monikagrabowska/osf.io,rdhyee/osf.io,CenterForOpenScience/osf.io,binoculars/osf.io,icereval/osf.io,binocu...
api/preprints/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom ast import *\n\nfrom .version_info import PY2\n\nif PY2:\n Try = TryExcept\n\n def argument_names(node):\n return [isinstance(arg, Name) and arg.id or None for arg in node.args.arg...
python
edit
4
4
mit
62ad2eb82c037350f25d3e575e59f16740365159
lisongmin/pies,AbsoluteMSTR/pies,timothycrosley/pies,AbsoluteMSTR/pies,timothycrosley/pies,lisongmin/pies
pies/ast.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views import generic\n\nfrom gallery.models import GalleryImage\nfrom gallery import queries\nfrom .models import Arc, Issue\n\n\nclass IndexView(generic.ListView):\n model = Arc\n template_name = \"comics/index.html\"\n ...
python
edit
1
1
mit
7925afd27ead247a017baf7a7dff97986904055f
evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca
comics/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# expose the most frequently used functions in the top level.\nfrom .path_related import (mkdir_p, rm_if_exists, remove_empty_paths,\n copy_contents_of_folder, count_files, \n copy_the_pre...
python
edit
23
0
apache-2.0
4e9dfbaff5a91af75e3b18e6b4e06379747c6083
grigorisg9gr/pyutils,grigorisg9gr/pyutils
research_pyutils/__init__.py
rejected_lint
Too many lint violations: 23
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport distutils.core\n\n# Uploading to PyPI\n# =================\n# $ python setup.py register -r pypi\n# $ python setup.py sdist upload -r pypi\n\nversion = '0.0'\ndistutils.core.setup(\n name='kxg',\n version=version,\n ...
python
edit
1
0
mit
2049be18b864fe2dab61ca6258b2295b3270d5c2
kxgames/kxg
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ControlGroup(set):\n def __init__(self, units):\n super().__init__({unit.tag for unit in units})\n\n def __hash__(self):\n return hash(tuple(sorted(list(self))))\n\n def select_units(self, units):\n retur...
python
edit
3
3
mit
03430a5b0abbd051e878274a669edf5afaa656b3
Dentosal/python-sc2
sc2/helpers/control_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unidecode import unidecode\n\n\nclass Normalizer:\n\n def normalize(text):\n text = Normalizer.remove_extra_whitespaces(text)\n text = Normalizer.replace_hyphens(text)\n # text = Normalizer.remove_accent_marks(t...
python
edit
1
1
mit
7c9fbdb62c6b045476064fd4193fd133ed0de7c3
davidmogar/genderator
genderator/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom abc import (\n ABCMeta,\n abstractmethod,\n)\nfrom impact.v1.helpers import (\n STRING_FIELD,\n)\n\n\nclass BaseHistoryEvent(object):\n __metaclass__ = ABCMeta\n\n CLASS_FIELDS = {\n \"event_type\": STRING_FIELD,\...
python
edit
1
4
mit
ac50044c16e2302e7543923d562cca5ba715e311
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/v1/events/base_history_event.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('interfaces', parent_package, top_path)\n\n config.add_data_dir('tests')\n config.add_data_dir(...
python
edit
1
1
bsd-3-clause
6df2a6e82a04c6cb19a789c55f758d0958a9b690
glatard/nipype,rameshvs/nipype,arokem/nipype,wanderine/nipype,wanderine/nipype,FredLoney/nipype,dmordom/nipype,arokem/nipype,Leoniela/nipype,blakedewey/nipype,wanderine/nipype,dmordom/nipype,FCP-INDI/nipype,FredLoney/nipype,gerddie/nipype,FCP-INDI/nipype,christianbrodbeck/nipype,iglpdc/nipype,mick-d/nipype,satra/NiPype...
nipype/interfaces/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\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open...
python
edit
1
0
mit
c1dcdb3c8856fbfd449524f66f5fc819eb1a19bc
jcollado/esis
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='scout',\n version=__import__('scout').__version__,\n description='scout',\n author='Charles Leifer',\n author_email='<EMAIL>',\n url='http://github.com/coleifer/scout/',\n ...
python
edit
1
0
mit
a0e73b06e22be39d06c276a89e04f56452802fba
coleifer/scout
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom distutils.core import setup\n\npackages = [\n 'upho',\n 'upho.phonon',\n 'upho.harmonic',\n 'upho.analysis',\n 'upho.structure',\n 'upho.irreps',\n 'upho.qpoints',\n 'group',\n]\nscripts =...
python
edit
1
0
mit
cd56fb2c1a0f4b6dd40ce03545e57c6fd2e1c519
yuzie007/upho,yuzie007/ph_unfolder
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Lookup methods for device data.\"\"\"\n\nimport re\n\nfrom pyatv.const import DeviceModel\n\n\n_MODEL_LIST = {\n \"AppleTV2,1\": DeviceModel.Gen2,\n \"AppleTV3,1\": DeviceModel.Gen3,\n \"AppleTV3,2\": DeviceModel.Gen3,\n \...
python
edit
1
4
mit
33775cd9e740ac70e9213c37825077516e683e55
postlund/pyatv,postlund/pyatv
pyatv/support/device_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nmodels.py\n\nApp Engine datastore models\n\n\"\"\"\n\n\nfrom google.appengine.ext import ndb\n\n\nclass ExampleModel(ndb.Model):\n \"\"\"Example Model\"\"\"\n example_name = ndb.StringProperty(required=True)\n example_descr...
python
edit
null
null
mit
9a2169e38374429db7792537e2c4c1a78281200d
shashisp/reWrite-SITA,shashisp/reWrite-SITA,shashisp/reWrite-SITA
src/application/models.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# request handler for editing page (/edit) goes here\n# assume admin login has already been handled\n\nimport cgi\nfrom google.appengine.api import users\nimport webapp2\n\nclass DateHandler(webapp2.RequestHandler):\n \n def get(self):\n ...
python
edit
8
1
mit
4aa9e487cceccf81608dfb4ac9a1f85587298415
shickey/BearStatus,shickey/BearStatus,shickey/BearStatus
edit.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom warnings import warn\nfrom django.conf import settings\n\n\ndef patch_response(request, response, methods):\n if getattr(settings, 'SERRANO_CORS_ENABLED', False):\n if hasattr(settings, 'SERRANO_CORS_ORIGIN'):\n wa...
python
edit
1
8
bsd-2-clause
3b3da9ffc5f8247020d2c6c58f83d95e8dbf8dd6
chop-dbhi/serrano,chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night
serrano/cors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2020 Chris Reed\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.o...
python
edit
1
1
apache-2.0
2724b4dd7ed350baeae0a8e0ef53475f40b1208b
project-generator/project_generator
project_generator/tools/makearmclang.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..kernel import Kernel\nfrom scannerpy import DeviceType\n\nimport tensorflow as tf\n\n\nclass TensorFlowKernel(Kernel):\n def __init__(self, config):\n # If this is a CPU kernel, tell TF that it should not use\n # any...
python
edit
1
4
apache-2.0
901ebb52f82c518c11285e6a282e18ad6954cd96
scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner
python/scannerpy/stdlib/tensorflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nfrom labcalc.run import *\nfrom labcalc import gibson\n\n# labcalc.gibson\n\ndef test_gibson_one_insert():\n d = {'insert1': [300, 50], 'vector': [5000, 50]}\n assert gibson.gibson_calc(d) == {'insert1': 0.24, ...
python
edit
2
1
bsd-3-clause
85b269bde76af2b8d15dc3b1e9f7cf882fc18dc2
dtarnowski16/labcalc,mandel01/labcalc,mjmlab/labcalc
labcalc/tests/test_functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport json\n\nfrom django import template\nfrom django.conf import settings\n\nregister = template.Library()\n\n# Build json value to pass as js config\n@register.simple_tag()\ndef trunkplayer_js_config(user):\n js_settin...
python
edit
3
5
mit
d4d448adff71b609d5efb269d1a9a2ea4aba3590
ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player
radio/templatetags/radio_js_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom tools import check_cmd\n\ndef run_cyclus(cyclus, cwd, sim_files):\n \"\"\"Runs cyclus with various inputs and creates output databases\n \"\"\"\n\n for sim_input, sim_output in zip(sim_files):\n ...
python
edit
1
3
bsd-3-clause
8de4cb6e314da95b243f140f53b3c77487695a55
Baaaaam/cyBaM,gonuke/cycamore,cyclus/cycaless,gonuke/cycamore,Baaaaam/cycamore,jlittell/cycamore,rwcarlsen/cycamore,Baaaaam/cyBaM,Baaaaam/cycamore,rwcarlsen/cycamore,jlittell/cycamore,gonuke/cycamore,jlittell/cycamore,rwcarlsen/cycamore,Baaaaam/cycamore,jlittell/cycamore,Baaaaam/cyBaM,Baaaaam/cyCLASS,cyclus/cycaless,Ba...
tests/cyclus_tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# greeting.py\r\n#\r\n# Demonstration of the pyparsing module, on the prototypical \"Hello, World!\"\r\n# example\r\n#\r\n# Copyright 2003, by Paul McGuire\r\n#\r\nfrom pyparsing import Word, alphas\r\n\r\n# define grammar\r\ngreet = Word( ...
python
edit
1
0
mit
bb9d1255548b46dc2ba7a85e26606b7dd4c926f3
pyparsing/pyparsing,pyparsing/pyparsing
examples/greeting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
3
apache-2.0
f22cabf494f13535cdbb489f12e98c7358a29f74
dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,dtroyer/python-openstacksdk
openstack/tests/functional/telemetry/v2/test_sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib2\nimport xml.etree.ElementTree as et\n\nhgnc_url = 'http://rest.genenames.org/fetch/'\n\ndef get_hgnc_name(hgnc_id):\n xml_tree = get_hgnc_entry(hgnc_id)\n if xml_tree is None:\n return None\n hgnc_name_tag =\\...
python
edit
1
3
bsd-2-clause
f5cc0d9327f35d818b10e200404c849a5527aa50
johnbachman/belpy,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,bgyori/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,jmuhlich/indra,jmuhlich/indra...
indra/databases/hgnc_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\"Test adapter specific config options.\"\"\"\nfrom test.integration.base import DBTIntegrationTest, use_profile\nimport textwrap\nimport yaml\n\n\nclass TestBigqueryAdapterSpecific(DBTIntegrationTest):\n\n @property\n def schem...
python
edit
1
1
apache-2.0
af118bcc539b5db0b6daa9cf74777176df413e32
analyst-collective/dbt,analyst-collective/dbt
test/integration/022_bigquery_test/test_bigquery_adapter_specific.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tagging.models import Tag, TaggedItem\nfrom django.contrib.contenttypes.models import ContentType\nfrom auxiliary.models import TagSuggestion\nfrom django.db import IntegrityError\n\ndef approve(admin, request, tag_suggestions):\n f...
python
edit
1
2
bsd-3-clause
c5730d19d41f7221c4108f340d0ff8be26c24c74
noamelf/Open-Knesset,otadmor/Open-Knesset,habeanf/Open-Knesset,habeanf/Open-Knesset,daonb/Open-Knesset,navotsil/Open-Knesset,noamelf/Open-Knesset,navotsil/Open-Knesset,navotsil/Open-Knesset,otadmor/Open-Knesset,noamelf/Open-Knesset,otadmor/Open-Knesset,ofri/Open-Knesset,Shrulik/Open-Knesset,jspan/Open-Knesset,jspan/Ope...
auxiliary/tag_suggestions/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom visualize import views\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom rest_framework import routers\n\nrouter = routers.DefaultRou...
python
edit
1
0
mit
a186a29ab028e601bd1f3dff0d37e09e412a7379
Bringing-Buzzwords-Home/bringing_buzzwords_home,Bringing-Buzzwords-Home/bringing_buzzwords_home,Bringing-Buzzwords-Home/bringing_buzzwords_home
bringing_buzzwords_home/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\nfrom datetime import datetime\n\nfrom SenseCells.tts import tts\n\ndef show_all_notes():\n conn = sqlite3.connect('memory.db')\n tts('Your notes are as follows:')\n\n cursor = conn.execute(\"SELECT notes FROM notes\...
python
edit
1
2
mit
009113edec59e788bb495b80ddaf763aabd8c82f
Melissa-AI/Melissa-Core,Melissa-AI/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,anurag-ks/Melissa-Core,anurag-ks/Melissa-Core
GreyMatter/notes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass WebhookRequestParser(object):\n \"\"\"Abstract parent class for git service parsers. Contains helper\n methods.\"\"\"\n\n def __init__(self, config):\n self._config = config\n\n def get_matching_repo_configs(self,...
python
edit
1
7
mit
394954fc80230e01112166db4fe133c107febead
evoja/docker-Github-Gitlab-Auto-Deploy,evoja/docker-Github-Gitlab-Auto-Deploy
gitautodeploy/parsers/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wordnik import swagger, WordApi, AccountApi\n\nclient = swagger.ApiClient(\n 'dd3d32ae6b4709e1150040139c308fb77446e0a8ecc93db31',\n 'https://api.wordnik.com/v4')\nword_api = WordApi.WordApi(client)\n\nwords = ['paint', 'mimic', '...
python
edit
1
0
mit
d06adea5117eb3ebfddd8592889346089c7391f7
tombosc/dict_based_learning,tombosc/dict_based_learning
dictlearn/wordnik_api_demo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django.contrib.auth.views as auth_views\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.contrib.staticfiles impor...
python
edit
3
0
apache-2.0
73219ea03b46599b4e2c84a301599c7f1f331751
sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal
sal/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numba.testing import SerialSuite\nfrom numba.testing import load_testsuite\nfrom numba import cuda\nfrom os.path import dirname, join\n\n\ndef load_tests(loader, tests, pattern):\n\n suite = SerialSuite()\n this_dir = dirname(__f...
python
edit
1
4
bsd-2-clause
7947d474da8bb086493890d81a6788d76e00b108
sklam/numba,numba/numba,seibert/numba,IntelLabs/numba,jriehl/numba,stonebig/numba,gmarkall/numba,cpcloud/numba,IntelLabs/numba,gmarkall/numba,jriehl/numba,cpcloud/numba,sklam/numba,cpcloud/numba,numba/numba,stonebig/numba,stefanseefeld/numba,sklam/numba,cpcloud/numba,seibert/numba,sklam/numba,gmarkall/numba,stefanseefe...
numba/cuda/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom django.views.generic import ListView\n\nfrom go.scheduler.models import Task\n\n\nclass SchedulerListView(ListView):\n paginate_by = 12\n context_object_name = 'tasks'\n template = 'scheduler/task_list.html'\n...
python
edit
1
1
bsd-3-clause
bc6c3834cd8383f7e1f9e109f0413bb6015a92bf
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/scheduler/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n# Copyright Lajos Katona\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 Licen...
python
edit
1
3
apache-2.0
2a9ac93236838b12b58f2f180265a23658e2a95b
elajkat/hugradexam,elajkat/hugradexam
programmingtheorems/python/theorem_of_selection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 MongoDB, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or...
python
edit
1
1
apache-2.0
306e6939c5b369f4a4ef4bb4d16948dc1f027f53
ajdavis/pymongo-mockup-tests
tests/test_initial_ismaster.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom unittest import TestCase\n\nfrom traitlets import TraitError\n\nfrom ipywidgets import FileUpload\n\n\nclass TestFileUpload(TestCa...
python
edit
3
1
bsd-3-clause
ea1c095fb12c4062616ee0d38818ab1baaabd1eb
ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets
ipywidgets/widgets/tests/test_widget_upload.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom .request import Request\nfrom .response import Response, response\n\nimport logging\nlog = logging.getLogger()\n\n\nclass View:\n\n def __call__(self, event, context):\n request = Request(event, context)\n resp = sel...
python
edit
4
3
bsd-3-clause
68a621005c5a520b7a97c4cad462d43fb7f3aaed
funkybob/paws
paws/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nimport pkgutil\n\n\ndef test_imports():\n \"\"\"\n This just imports all modules in astropy, making sure they don't have any\n dependencies that sneak through\n ...
python
edit
1
2
bsd-3-clause
d926c984e895b68ad0cc0383926451c0d7249512
saimn/astropy,lpsinger/astropy,mhvk/astropy,lpsinger/astropy,pllim/astropy,astropy/astropy,lpsinger/astropy,larrybradley/astropy,StuartLittlefair/astropy,astropy/astropy,pllim/astropy,saimn/astropy,saimn/astropy,StuartLittlefair/astropy,astropy/astropy,StuartLittlefair/astropy,astropy/astropy,mhvk/astropy,astropy/astro...
astropy/tests/tests/test_imports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\n\ndef main():\n cwd = os.getcwd()\n if not cwd.endswith(os.path.join('FRENSIE', 'scripts')):\n print 'This script must be run in \\\"FRENSIE/scipts\\\"'\n print 'Your CWD is', cwd\n retur...
python
edit
4
2
bsd-3-clause
624d6e4fc5455720badf4315e06f423eb60411ab
lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123
scripts/init_tree.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom rest_framework import filters\nfrom rest_framework import generics, permissions\n\nfrom django.conf.urls...
python
edit
1
0
mit
9ae5ea3876fae6ef0bc092d87c71d9ea86040cf7
SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
InvenTree/company/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport climate\nimport lmj.plot\nimport numpy as np\n\nimport source\nimport plots\n\n\n@climate.annotate(\n root='load experiment data from this directory',\n pattern=('plot data from files matching this pattern', 'option'),\n mar...
python
edit
1
4
mit
c3e2fccbc2a7afa0d146041c0b3392dd89aa5deb
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/plot-marker-trajectories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nroot = os.path.join(sys._MEIPASS, 'kivy_install')\n\nos.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')\nos.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')\nos.environ['GST_PLUGIN_PATH'] = '{};{}'....
python
edit
1
0
mit
cbdcdf16285823a8e13a68c8e86d6957aa7aa6d8
inclement/kivy,inclement/kivy,kivy/kivy,kivy/kivy,akshayaurora/kivy,akshayaurora/kivy,kivy/kivy,matham/kivy,rnixx/kivy,matham/kivy,inclement/kivy,matham/kivy,matham/kivy,rnixx/kivy,akshayaurora/kivy,rnixx/kivy
kivy/tools/packaging/pyinstaller_hooks/pyi_rth_kivy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013: Mirantis 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 License at\n...
python
edit
1
1
apache-2.0
d8d2e4b763fbd7cedc42046f6f45395bf15caa79
group-policy/rally,eayunstack/rally,openstack/rally,amit0701/rally,paboldin/rally,eonpatapon/rally,cernops/rally,afaheem88/rally,yeming233/rally,vganapath/rally,gluke77/rally,aforalee/RRally,yeming233/rally,openstack/rally,gluke77/rally,gluke77/rally,eayunstack/rally,openstack/rally,aforalee/RRally,cernops/rally,group-...
samples/plugins/scenario/scenario_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEPS = [\n 'recipe_engine/json',\n 'recipe_engine/path',\n 'recipe_engine/python',\n 'recipe_engine/raw_io',\n 'url',\n]\n\n```\n\nApply this change: Switch to recipe engine \"url\" module.\n\nBUG=None\nTEST=expectations\nR=<...
python
edit
1
0
bsd-3-clause
69e760e4a571d16e75f30f1e97ea1a917445f333
CoherentLabs/depot_tools,CoherentLabs/depot_tools
recipes/recipe_modules/gitiles/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nBENCHMARKS = set(( 'avrora'\n , 'batik'\n , 'eclipse'\n , 'fop'\n , 'h2'\n , 'jython'\n , 'luindex'\n ...
python
edit
1
1
mit
89b7b7f7fe1ec50f1d0bdfba7581f76326efe717
fhirschmann/penchy,fhirschmann/penchy
dacapo_analyzer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('matlab', parent_package, top_path)\n config.add_data_dir('tests')\n ret...
python
edit
1
1
bsd-3-clause
37ddf8b41ee770a27c4eb59d27fc74fea60faaee
anielsen001/scipy,kleskjr/scipy,WarrenWeckesser/scipy,cpaulik/scipy,felipebetancur/scipy,dominicelse/scipy,Shaswat27/scipy,arokem/scipy,aarchiba/scipy,ilayn/scipy,fernand/scipy,piyush0609/scipy,surhudm/scipy,sauliusl/scipy,mtrbean/scipy,petebachant/scipy,Gillu13/scipy,argriffing/scipy,sonnyhu/scipy,jor-/scipy,arokem/sc...
scipy/io/matlab/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom os import get_terminal_size\n\ndefault_palette = list('░▒▓█')\n\nprint(get_terminal_size())\n\ndef scale(val, src, dst):\n \"\"\"\n Scale the given value from the scale of src to the scale of dst.\n \"\"...
python
edit
1
3
mit
a4cacaba81dda523fb6e24f8a4382a334cc549a8
ijks/textinator
textinator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mbuild as mb\nimport parmed as pmd\nimport pytest\n\nfrom foyer import Forcefield\nfrom foyer.tests.utils import get_fn\nfrom foyer.utils.io import has_mbuild\n\n\n@pytest.mark.timeout(1)\ndef test_fullerene():\n fullerene = pmd.l...
python
edit
1
1
mit
c298abfddbdf83a12ab6c826dbb3562fb358e963
mosdef-hub/foyer,iModels/foyer,mosdef-hub/foyer,iModels/foyer
foyer/tests/test_performance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Transaction Downloader.\n\nUsage:\n transaction-downloader auth --account=<account-name>\n transaction-downloader -h | --help\n transaction-downloader --version\n\nOptions:\n -h --help Show this screen.\n --versio...
python
edit
3
1
mit
5a4401df95d3b8cb72e78edb30669d6fa88e4712
ebridges/plaid2qif,ebridges/plaid2qif,ebridges/plaid2qif
transaction_downloader/transaction_downloader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pymongo import MongoClient\n\n\ndef main():\n client = MongoClient()\n db = client.cityhotspots\n db.drop_collection('dineroptions')\n diners_collection = db.diners\n\n doc = {}\n diner_options_collection = db.dinerop...
python
edit
1
1
mit
3681660935d77d392a7ed470a8e85470e33aaca0
earlwlkr/POICrawler
extract_options.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Donald Stufft\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.or...
python
edit
1
2
apache-2.0
93a95afe231910d9f683909994692fadaf107057
pypa/readme,pypa/readme_renderer
readme_renderer/markdown.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may ob...
python
edit
1
1
apache-2.0
17ab8c01a88bda8dba4aaa5e57c857babfeb9444
openstack/debtcollector
debtcollector/fixtures/disable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport json\nfrom subprocess import Popen, PIPE\nimport tempfile\nimport os\n\nconfig = {}\nwith open ('../config/conversion.json') as fp:\n config = json.load(fp)\n\n\ndef to_cml(inchi):\n request = requests.get('%s/serv...
python
edit
2
2
bsd-3-clause
8adbb5c9cc089663bcdc62496415d666c9f818a3
OpenChemistry/mongochemweb,OpenChemistry/mongochemweb
service/inchi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- set coding: utf-8 -*-\n\nimport os\n\n# directories constants\nPARERGA_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))\nPARERGA_ENTRY_DIR = os.path.join(PARERGA_ROOT_DIR, \"p\")\nPARERGA_STATIC_DIR = os.path.join(PARERGA_ROOT_DI...
python
edit
1
0
bsd-3-clause
e93a321e3d137fb21a42d0e0bfd257a537be05d3
nadirs/parerga,nadirs/parerga
diy/parerga/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\nimport sys\n\ndef find_command(name):\n return commands[name]\n\ndef what_is_this_command():\n repository = find_current_repository()\n if repository is None:\n print \"Could not find source con...
python
edit
3
3
bsd-2-clause
05ed4d54d48ddf6540f8dc0d162e4fc95337dbb6
mwilliamson/mayo
blah/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nfrom unittest.mock import patch\nfrom django.test import TestCase\n\nfrom vcs_info_panel.clients.git import GitClient\n\n\nclass GitClientTestCase(TestCase):\n def setUp(self):\n self.client = GitClient()\n\n ...
python
edit
1
1
mit
3131ea5c8dd41d18192f685e61c1bc8987038193
giginet/django-debug-toolbar-vcs-info,giginet/django-debug-toolbar-vcs-info
vcs_info_panel/tests/test_clients/test_git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numba.np.ufunc.parallel import get_thread_count\nfrom os import environ as env\nfrom numba.core import config\nimport unittest\n\n\nclass TestParallelEnvVariable(unittest.TestCase):\n \"\"\"\n Tests environment variables related ...
python
edit
1
3
bsd-2-clause
6167215e4ed49e8a4300f327d5b4ed4540d1a420
seibert/numba,seibert/numba,stonebig/numba,cpcloud/numba,sklam/numba,gmarkall/numba,stuartarchibald/numba,numba/numba,stonebig/numba,seibert/numba,stuartarchibald/numba,sklam/numba,gmarkall/numba,sklam/numba,sklam/numba,stonebig/numba,IntelLabs/numba,IntelLabs/numba,stuartarchibald/numba,cpcloud/numba,numba/numba,stuar...
numba/tests/npyufunc/test_parallel_env_variable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tomviz._wrapping import PipelineStateManagerBase\n\nclass PipelineStateManager(PipelineStateManagerBase):\n _instance = None\n\n # Need to define a constructor as the implementation on the C++ side is\n # static.\n def __in...
python
edit
1
2
bsd-3-clause
0bff34400d912806a9d831f5e0436082d359a531
OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz
tomviz/python/tomviz/state/_pipeline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport base64\nimport os\n\nfrom armaadmin import users, web\n\nclass AuthorizedHandler(web.HTTPHandler):\n\tauth = [ 'Basic', 'Key' ]\n\trealm = 'unknown'\n\n\tdef respond(self):\n\t\tauth_header = self.request.headers.get('Authorization')...
python
edit
7
4
mit
d677027fb2e99305ec618b42c0bd96fa7f41125d
fkmclane/MCP,fkmclane/MCP,fkmclane/MCP,fkmclane/MCP
armaadmin/interface/common.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nManage launchd plist files\n'''\n\n# Import python libs\nimport os\nimport sys\n\n\ndef write_launchd_plist(program):\n '''\n Write a launchd plist for managing salt-master or salt-minion\n\n CLI Examp...
python
edit
1
2
apache-2.0
0d2079b1dcb97708dc55c32d9e2c1a0f12595875
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/runners/launchd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom shutil import copytree, rmtree\n\nfrom foliant.utils import spinner\nfrom foliant.backends.base import BaseBackend\n\n\nclass Backend(BaseBackend):\n '''Backend that just applies its preprocessors and returns a project\n that doe...
python
edit
3
1
mit
5bc51f525c702cd43d3d7bc3819d179815c41807
foliant-docs/foliant
foliant/backends/pre.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Views for Zinnia entries\"\"\"\nfrom django.views.generic.dates import BaseDateDetailView\n\nfrom zinnia.models.entry import Entry\nfrom zinnia.views.mixins.archives import ArchiveMixin\nfrom zinnia.views.mixins.entry_protection impor...
python
edit
1
0
bsd-3-clause
de324cc798da8694bab510efd51de4bfda528df7
Maplecroft/django-blog-zinnia,ZuluPro/django-blog-zinnia,petecummings/django-blog-zinnia,Maplecroft/django-blog-zinnia,ZuluPro/django-blog-zinnia,petecummings/django-blog-zinnia,petecummings/django-blog-zinnia,aorzh/django-blog-zinnia,extertioner/django-blog-zinnia,Maplecroft/django-blog-zinnia,ghachey/django-blog-zinn...
zinnia/views/entries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for github_webhook.webhook\"\"\"\n\nfrom __future__ import print_function\n\nimport unittest\nfrom mock import Mock\n\nfrom github_webhook.webhook import Webhook\n\n\nclass TestWebhook(unittest.TestCase):\n\n def test_constru...
python
edit
1
1
apache-2.0
c37e3fe832ef3f584a60783a474b31f9f91e3735
fophillips/python-github-webhook
github_webhook/test_webhook.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright 2013 by Arnold Krille <<EMAIL>>\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#...
python
edit
1
0
apache-2.0
ef7f0090bfb7f37fa584123520b02f69a3a392a0
kampfschlaefer/mezzanine-workout,kampfschlaefer/mezzanine-workout,kampfschlaefer/mezzanine-workout
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pygame\n\n\nclass Graphic:\n car_color = (255, 50, 50)\n car_width = 3\n road_color = (255, 255, 255)\n road_width = 6\n draw_methods = {\n 'Car': 'draw_car',\n 'Road': 'draw_road',\n }\n\n def __in...
python
edit
1
2
mit
b2aa4e4375dfea9c20a8242edeed495e649acc1a
thibault/vroom
vroom/graphics.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom machina.core.db.models import get_model\nfrom rest_framework import serializers\n\nForum = get_model('forum', 'Forum')\n\n\nclass ForumSerializer(serializers.ModelSe...
python
edit
1
2
mit
aae01cdcbd239397dad46b2d5fac91eb4219479f
ellmetha/machina-singlepageapp,ellmetha/machina-singlepageapp
project/apps/forum/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport hashlib\n\nclass Hasher(object):\n def __init__(self):\n self._hash = hashlib.sha1()\n \n def update(self, arg):\n self._hash.update(_sha1(arg))\n \n def update_with_dir(self, dir_path):\n ...
python
edit
1
3
bsd-2-clause
3fde2a6fe3064bab2cfc7adf040f0f4c91f89865
mwilliamson/whack
whack/hashes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hlt import *\nfrom networking import *\n\nplayerTag, gameMap = getInit()\nsendInit(\"BasicBot\"+str(playerTag))\n\nturtleFactor = random.randint(1, 20)\n\nwhile True:\n\tmoves = []\n\tgameMap = getFrame()\n\n\tfor y in range(0, len(gam...
python
edit
13
0
mit
4b52f2c237ff3c73af15846e7ae23436af8ab6c7
HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,yangle/HaliteIO,yangle/HaliteIO,lanyudhy/Halite-II,yangle/HaliteIO,yangle/HaliteIO,HaliteChallenge/Halite-II,yangle/HaliteIO,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halit...
airesources/Python/BasicBot.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import date\n\nfrom django import forms\nfrom django.utils import timezone\n\nfrom .models import Employee, DeptManager, Title, Salary\n\n\nclass ChangeManagerForm(forms.Form):\n manager = forms.ModelChoiceField(queryset=Em...
python
edit
1
1
bsd-3-clause
ebfaf30fca157e83ea9e4bf33173221fc9525caf
viewflow/django-material,viewflow/django-material,viewflow/django-material
demo/examples/employees/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf8\n\n\nfrom __future__ import (absolute_import, print_function, division, unicode_literals)\n\n# See - http://www.python.org/dev/peps/pep-0440/\n# See - http://semver.org\n__author__ = 'Roy Levien'\n__c...
python
edit
1
0
bsd-3-clause
e8bc2048f5b89b5540219b24921e596f11b34466
orome/crypto-enigma-py
crypto_enigma/_version.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\nfrom django.utils import timezone\n\n\nclass Transaction(models.Model):\n EXPENSE = 'exp'\n INCOME = 'inc'\n CATEGORY_C...
python
edit
1
1
mit
ed2c56cd044f905c4325f42b4e9cf7a5df913bfd
trimailov/finance,trimailov/finance,trimailov/finance
books/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport yaml\nimport logging\n\nCONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml')\n\nlog = logging.getLogger(__name__)\n\n\nclass _Config(object):\n \"\"\"\n This class is intended to unify teuthology's many c...
python
edit
2
2
mit
7153c2be456084dfdd7cc346d62a6eb0fcaa2a31
t-miyamae/teuthology,robbat2/teuthology,michaelsevilla/teuthology,michaelsevilla/teuthology,t-miyamae/teuthology,zhouyuan/teuthology,ivotron/teuthology,dreamhost/teuthology,ktdreyer/teuthology,dmick/teuthology,SUSE/teuthology,SUSE/teuthology,yghannam/teuthology,dmick/teuthology,dmick/teuthology,caibo2014/teuthology,cep...
teuthology/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#===============================================================================\n# -*- coding: UTF-8 -*-\n# Module : log\n# Author : Vincent BESANCON aka 'v!nZ' <<EMAIL>>\n# Description : Base to have some logging.\n#------...
python
edit
1
2
mit
a521a655db886bcd85f5f449c99875e90cd4fa93
bigbrozer/monitoring.nagios,bigbrozer/monitoring.nagios
monitoring/nagios/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom copy import copy\nimport argparse\n\nfrom preparation.resources.Resource import names_registered, resource_by_name\nfrom hb_res.storage import get_storage, ExplanationStorage\n\n\ndef generate_asset(resource, out_storage: ExplanationSt...
python
edit
1
6
mit
56a8b900570200e63ee460dd7e2962cba2450b16
hatbot-team/hatbot_resources
preparation/tools/build_assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport ConfigParser\n__author__ = 'alforbes'\n\nconfig = ConfigParser.ConfigParser()\n\nconfig.add_section('main')\nconfig.set('main', 'debug_mode', 'false')\nconfig.set('main', 'propagate_exceptions',...
python
edit
1
0
mit
3188b77e07bc060cfdd3db8eadbf0fbe1e34b72e
eBayClassifiedsGroup/orlo,al4/sponge,al4/orlo,al4/sponge,al4/sponge,eBayClassifiedsGroup/orlo,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/sponge,al4/orlo
orlo/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Python challenge solution #9:\nhttp://www.pythonchallenge.com/pc/return/good.html\"\"\"\n\n\ndef main():\n pass\n\n\nif __name__ == \"__main__\":\n main()\n\n```\n\nApply this change: Add authentication handler for opening image...
python
edit
3
1
mit
63a893add1170c1e90cdb8eaea6c1e1c6a3a8e0a
bm5w/pychal
9.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pprint import pprint\n#[{u'accountId': 2,\n #u'add': True,\n #u'broadcastUri': u'vlan://untagged',\n #u'firstIP': False,\n #u'networkRate': 200,\n #u'newNic': False,\n #u'nicDevId': 1,\n #u'oneToOneNat': False,\n #u'publicIp': ...
python
edit
4
6
apache-2.0
54b21220db28dc4ce34a360d7754add872f702c7
jcshen007/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack,resmo/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,resmo/cloudstack,resmo/cloudstack,DaanHoogla...
systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nimport logging.config\n\nLOG_CONFIG = {\n 'version': 1,\n 'formatters': {\n 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'}\n },\n 'handlers': {\n 'default': {\n ...
python
edit
1
1
mit
135d4ff79a9a650442548fa5acf44f2dbcd20c0e
snare/voltron,snare/voltron,snare/voltron,snare/voltron
voltron/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pywatson.watson import Watson\n\n\nclass TestWatson:\n def test_init(self, config):\n watson = Watson(url=config['url'], username=config['username'], password=config['password'])\n\n```\n\nApply this change: Add failing test ...
python
edit
3
1
mit
8a827d3e86cf2f6b9d36812e7058560ae120d4b2
sherlocke/pywatson
tests/test_watson.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport py\n\ndef get_version_string():\n fn = py.path.local(__file__).join(\"..\", \"..\", \"..\",\n \"_pytest\", \"__init__.py\")\n for line in fn.readlines():\n if...
python
edit
1
4
mit
a20c6d072d70c535ed1f116fc04016c834ea9c14
etataurov/pytest,gabrielcnr/pytest,mbirtwell/pytest,vodik/pytest,The-Compiler/pytest,omarkohl/pytest,Bjwebb/pytest,davidszotten/pytest,gabrielcnr/pytest,mdboom/pytest,ionelmc/pytest,malinoff/pytest,hpk42/pytest,tareqalayan/pytest,userzimmermann/pytest,rouge8/pytest,tgoodlet/pytest,abusalimov/pytest,bukzor/pytest,icemac...
doc/en/_getdoctarget.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom grow import Preprocessor\nfrom protorpc import messages\n\n\nclass CustomPreprocessor(Preprocessor):\n KIND = 'custom_preprocessor'\n\n class Config(messages.Message):\n value = messages.StringField(1)\n\n def run(self)...
python
edit
1
1
mit
c3f8069435f0f1c09c00ed6dba2e4f3bdb7ab91b
grow/grow,grow/pygrow,denmojo/pygrow,grow/pygrow,grow/grow,denmojo/pygrow,denmojo/pygrow,grow/pygrow,denmojo/pygrow,grow/grow,grow/grow
grow/testing/testdata/pod/extensions/preprocessors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport jsonschema\nfrom flask import current_app\nfrom jsonschema import validate\n\nwith open(\"schemata/g6-scs-schema.json\") as json_file1:\n G6_SCS_SCHEMA = json.load(json_file1)\n\nwith open(\"schemata/g6-saas-schema.js...
python
edit
2
5
mit
7e51d073952d10d3994fb93458e60c03b6746099
RichardKnop/digitalmarketplace-api,mtekel/digitalmarketplace-api,mtekel/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,alphagov/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,mtekel/digitalmarketplace-api,RichardKnop/digitalmarketplac...
app/services/g6importService.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom functools import wraps\nimport time\n\nclass RetryExceededError(Exception):\n pass\n\nclass retry(object):\n '''A decorator encapsulated retry logic.\n\n Usage:\n\n @retry(errors=(TTransportExcept...
python
edit
5
6
mit
b0efb7db50080dd1e9e96ad8d818e3b0859bbca3
soasme/retries
retry/__init__.py
rejected_lint
Too many lint violations: 5
true