messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals\n\nimport errno\nimport sys\n\nimport subprocrunner as spr\n\nfrom ._common import find_bin_path\nf...
python
edit
3
3
mit
1ba3536e214e283f503db0a9bf0d1ac4aa64f771
thombashi/tcconfig,thombashi/tcconfig
tcconfig/_tc_command_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport sys\nimport timeit\n\nimport numpy\n\nfrom rank_filter import lineRankOrderFilter\n\n\ndef benchmark():\n input_array = numpy.random.normal(size=(100, 101, 102))\n output_array = numpy.empty_like(inpu...
python
edit
1
1
bsd-3-clause
abd2df6436d7a4a1304bf521c0f0a6c8922e5826
nanshe-org/rank_filter,DudLab/rank_filter,jakirkham/rank_filter,jakirkham/rank_filter,nanshe-org/rank_filter,nanshe-org/rank_filter,DudLab/rank_filter,DudLab/rank_filter,jakirkham/rank_filter
src/benchmark_rank_filter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"lambda_function.py main entry point for aws lambda\"\"\"\n\nimport json\nimport urllib.request\nfrom typing import Dict, Optional\n\nimport settings\nfrom logger import logger\nfrom spot import to_msw_id\n\n\ndef close(fulfillment_sta...
python
edit
1
4
mit
eb0d6d2c1d13e4dc7f84ca602ba95c2ebc31431a
Smotko/surfbot,Smotko/surfbot
src/lambda_function.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Models.\"\"\"\nfrom django.db import models\n\n\n# Create your models here.\n\n\nclass ImagerProfile(models.Model):\n \"\"\"Imager Profile Model.\"\"\"\n\n camera_model = models.CharField(max_length=200)\n photography_type = ...
python
edit
1
0
mit
1dca59c4de479d2a75c34c0d1aae3948d819b84b
DZwell/django-imager
imagersite/imager_profile/models.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 rest_framework.authtoken.views import obtain_auth_token\nfrom rest_framework.routers import DefaultRouter\nfrom . import views\n\napi_router = DefaultRouter()...
python
edit
1
0
mit
d608d9f474f089df8f5d6e0e899554f9324e84f3
lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard
squash/dashboard/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n...
python
edit
1
0
mit
69d0cf6cc0d19f1669f56a361447935e375ac05c
DirkHoffmann/indico,indico/indico,OmeGak/indico,pferreir/indico,ThiefMaster/indico,ThiefMaster/indico,DirkHoffmann/indico,mvidalgarcia/indico,mvidalgarcia/indico,pferreir/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,indico/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,DirkHoffmann/ind...
indico/modules/events/logs/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\nimport ast\n\nfrom django.db import models\n\n\nclass DataPoint(models.Model):\n name = models.CharField(max_length=600)\n exact_name = models.CharField(max_length=1000, null=True, blank=True)\n decay_feature = models...
python
edit
2
2
mit
205b832c287bdd587eff7ba266a4429f6aebb277
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
data/models.py
rejected_duplicate
Near-duplicate of sample 4904
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# To change this license header, choose License Headers in Project Properties.\n# To change this template file, choose Tools | Templates\n# and open the template in the editor.\n\n__author__=\"UShareSoft\"\n\ndef print_graph(values):\n ...
python
edit
5
7
apache-2.0
918568524f1c5ef7264fee76597e8a88b6e2427f
yanngit/ussclicore,usharesoft/ussclicore
src/ussclicore/utils/ascii_bar_graph.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aiohttp\n\nasync def test_async_with_session(loop):\n async with aiohttp.ClientSession(loop=loop) as session:\n pass\n\n assert session.closed\n\n```\n\nApply this change: Add tests on closing connection by error" }, ...
python
edit
1
1
apache-2.0
260daaad18e4889c0e468befd46c38d02bb1316a
AraHaanOrg/aiohttp,rutsky/aiohttp,juliatem/aiohttp,singulared/aiohttp,moden-py/aiohttp,singulared/aiohttp,hellysmile/aiohttp,z2v/aiohttp,alex-eri/aiohttp-1,z2v/aiohttp,moden-py/aiohttp,alex-eri/aiohttp-1,z2v/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp,rutsky/aiohttp,arthurdarcet/...
tests/test_py35/test_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test IAM Policies for correctness.\"\"\"\nimport json\n\nfrom foremast.iam.construct_policy import construct_policy\n\nANSWER1 = {\n 'Version': '2012-10-17',\n 'Statement': [\n {\n 'Effect': 'Allow',\n ...
python
edit
3
1
apache-2.0
f8df781d4f2d96496f59942646718e9b30c9337f
gogoair/foremast,gogoair/foremast
tests/test_construct_policy.py
rejected_duplicate
Near-duplicate of sample 12209
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport xmlsec\n\n\ndef test_create_signature_template():\n node = xmlsec.create_signature_template()\n\n assert node.tag.endswith('Signature')\n assert node.xpath('*[local-name() = \"SignatureValue\"]')\n assert node.xpath('*[lo...
python
edit
1
1
mit
839f9edc811776b8898cdf1fa7116eec9aef50a7
devsisters/python-xmlsec,concordusapps/python-xmlsec,mehcode/python-xmlsec,devsisters/python-xmlsec,mehcode/python-xmlsec,concordusapps/python-xmlsec
tests/xmlsec/test_templates.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
1
apache-2.0
93fa014ea7a34834ae6bb85ea802879ae0026941
mahak/keystone,openstack/keystone,mahak/keystone,mahak/keystone,openstack/keystone,openstack/keystone
keystone/common/policies/revoke_event.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright 2015-2016 Samsung Electronics Co., Ltd.\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...
python
edit
1
2
apache-2.0
0d98a1c9b2682dde45196c8a3c8e89738aa3ab2a
dhs-shine/litmus
litmus/cmds/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2008-2015 Nokia Networks\n# Copyright 2016- Robot Framework Foundation\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 m...
python
edit
1
2
apache-2.0
0d48a418787e5724078d3821d28c639f0a76c8b2
robotframework/robotframework,robotframework/robotframework,HelioGuilherme66/robotframework,HelioGuilherme66/robotframework,robotframework/robotframework,HelioGuilherme66/robotframework
src/robot/htmldata/normaltemplate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\n\nfrom blinker import Namespa...
python
edit
1
0
apache-2.0
00ce59d43c4208846234652a0746f048836493f2
selahssea/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,kr41/ggrc-cor...
src/ggrc/services/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2018 The TensorFlow Datasets Authors.\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
0
apache-2.0
6c6934e8a36429e2a988835d8bd4d66fe95e306b
tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets
tensorflow_datasets/image/cifar_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Match\nfrom .models import Tip\n\ndef delete_tips(modeladmin, request, queryset):\n for match in queryset:\n tips = Tip.objects.filter(match = match)\n for tip in tips:\...
python
edit
1
3
mit
c74b777cc861963595593486cf803a1d7431ad65
leventebakos/football-ech,leventebakos/football-ech
matches/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport hashlib\nimport json\nimport os\nimport sys\nprint(sys.path)\nfrom gigacluster import Doc, dr, Tokenizer\n\ntok = Tokenizer()\nfor root, dirs, files in os.walk(sys.argv[1]):\n dirs.sort()\n files = set...
python
edit
1
0
mit
9feb84c39c6988ff31f3d7cb38852a457870111b
schwa-lab/gigacluster,schwa-lab/gigacluster
bin/readability_to_dr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\nfrom tempfile import NamedTemporaryFile\n\n\ndef dump_table(table):\n def handle_record(record, fields):\n def handle_field(column, field):\n return '%d:%d:%d %s' % (record, column, len(field), fiel...
python
edit
1
5
mit
4af5e3c9e48ff997084d5316f384b3c6411edaa3
jvirtanen/fields,jvirtanen/fields
test/dump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Models.\"\"\"\nfrom django.db import models\n\n\n# Create your models here.\n\n\nclass ImagerProfile(models.Model):\n \"\"\"Imager Profile Model.\"\"\"\n\n camera_model = models.CharField(max_length=200)\n photography_type = ...
python
edit
2
1
mit
5b10184e132004e2b9bd6424fc56cf7f4fc24716
DZwell/django-imager
imagersite/imager_profile/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom cyder.base.mixins import ObjectUrlMixin\nfrom cyder.base.models import BaseModel\nfrom cyder.cydhcp.keyvalue.models import KeyValue\n\n\nclass System(BaseModel, ObjectUrlMixin):\n name = models.CharFi...
python
edit
1
1
bsd-3-clause
27d7ab7ecca0d2e6307dbcb1317b486fe77a97d7
drkitty/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,akeym/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder
cyder/core/system/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass TestCase:\n\n def assertEqual(value, expected):\n if value != expected:\n raise CaseFailed(\"{0} != {1}\")\n\n def assertTrue(value):\n assertEqual(value, True)\n\n def assertFalse(value):\n as...
python
edit
3
2
mit
84bada1b92e18dad8499964ddf8a4f8120a9cc9e
zillolo/vsut-python
vsut/case.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.util.image.models\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2017 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom collections import namedtuple\nfrom enum import Enum\n\n\nclass Dimen...
python
edit
1
1
bsd-3-clause
d073de94f1896239bd6120893b6a94c43061a279
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
byceps/util/image/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom errno import ENOENT\nfrom stat import S_IFDIR\nfrom pygit2 import GIT_SORT_TIME\n\nfrom gitfs import FuseOSError\nfrom log import log\nfrom .view import View\n\n\nclass HistoryView(View):\n def getat...
python
edit
5
4
apache-2.0
78f6bda69c7cdcb52057971edc0853b0045aa31a
PressLabs/gitfs,rowhit/gitfs,bussiere/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs
gitfs/views/history.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pydub import AudioSegment\nfrom io import BytesIO\n\n\ndef convert_to_ogg(f):\n bio = BytesIO()\n\n AudioSegment.from_file(f).export(bio, format='ogg')\n bio.seek(0)\n\n return bio\n\n```\n\nApply this change: Use libopus c...
python
edit
1
1
mit
16767206ba1a40dbe217ec9e16b052c848f84b10
MelomanCool/telegram-audiomemes
converter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport subprocess\nimport re\nimport datetime\nimport pygsheets\nimport speedtest\n\n# Set constants\nDATE = datetime.datetime.now().strftime(\"%d-%m-%y %H:%M:%S\")\n\ndef get_credentials():\n \"\"\"F...
python
edit
5
1
mit
2d8d540e10f2bdcd4f8b3cbb5d6e378b8c2c6b44
frdmn/google-speedtest-chart
speedtest-charts.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\" Utilities for ASAN,TSAN,etc. build step...
python
edit
2
1
bsd-3-clause
f359aa0eef680a3cc11cacaac4b20ade29594bcd
Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbo...
slave/skia_slave_scripts/flavor_utils/xsan_build_step_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport click\n\n\nclass JungleCLI(click.MultiCommand):\n\n \"\"\"Jangle CLI main class\"\"\"\n\n def list_commands(self, ctx):\n \"\"\"return available modules\"\"\"\n return ['ec2', 'elb']\n\n ...
python
edit
1
1
mit
89bc764364137d18d825d316f5433e25cf9c4ceb
achiku/jungle
jungle/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 OpenStack Foundation.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy...
python
edit
1
0
apache-2.0
4e7c71304710178dbd668073ecfca59e8da459df
zeinsteinz/tacker,openstack/tacker,priya-pp/Tacker,trozet/tacker,stackforge/tacker,openstack/tacker,trozet/tacker,priya-pp/Tacker,openstack/tacker,stackforge/tacker,zeinsteinz/tacker
tacker/db/models_v1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass Extra(object):\n\n def __init__(self, where=None, tables=None):\n self.where = where if where is not None else []\n self.tables = tables if tables is not None else []\n\n def is_empty(self):\n return self....
python
edit
1
3
mit
85be5c1e0510d928f8b5a9a3de77ce674bf38dc4
zorainc/django-datafilters,freevoid/django-datafilters,zorainc/django-datafilters
datafilters/extra_lookup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nfrom trex.views.pr...
python
edit
1
0
mit
d4f5471a7975df526751ffa5c0653e6fe058227f
bjoernricks/trex,bjoernricks/trex
trex/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCommand that will allow for a user to inject triples into a database.\n\"\"\"\nfrom rhobot.components.commands.base_command import BaseCommand\nfrom rdflib.namespace import FOAF, RDF\nfrom rhobot.namespace import RHO\nfrom rhobot.co...
python
edit
5
1
bsd-3-clause
9cafbdb268435eafffdbf15ce0d63af37ee1b0f0
rerobins/rho_erudite
erudite/components/commands/find_owner.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013-2017 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# ...
python
edit
1
4
apache-2.0
921977589a6837575ab7aadaa6238b20d0771ae2
QuLogic/meson,pexip/meson,QuLogic/meson,pexip/meson,QuLogic/meson,pexip/meson,becm/meson,jeandet/meson,pexip/meson,becm/meson,pexip/meson,becm/meson,jpakkane/meson,pexip/meson,jeandet/meson,mesonbuild/meson,jeandet/meson,MathieuDuponchelle/meson,mesonbuild/meson,QuLogic/meson,jeandet/meson,mesonbuild/meson,jeandet/meso...
mesonbuild/dependencies/platform.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom django.utils import timezone\nfrom django.contrib.sites.models import get_current_site\n\nfrom opps.views.generic.list import ListView\nfrom opps.containers.models import Container\n\n\nclass TagList(ListView...
python
edit
1
8
mit
c13fb7a0decf8b5beb0399523f4e9b9b7b71b361
jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps
opps/core/tags/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom mcapi.mcapp import app, mcdb_connect\nfrom mcapi import utils, access\nfrom mcapi import objects, cache\nfrom mcapi.user import account, usergroups, projects\nfrom mcapi.globus import globus_service\nfrom os im...
python
edit
8
1
mit
29eeb2ca5988e9a4f6d8ec2493701b278ee2b554
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/mcapiserver.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .widget import Widget, DOMWidget, CallbackDispatcher, register\n\nfrom .widget_bool import Checkbox, ToggleButton\nfrom .widget_button import Button\nfrom .widget_box import Box, Popup, FlexBox, HBox, VBox\nfrom .widget_float import Fl...
python
edit
64
0
bsd-3-clause
e7ccf47114bbae254f40029b9188eacc6d1c5465
ipython/ipython,ipython/ipython
IPython/html/widgets/__init__.py
rejected_lint
Too many lint violations: 64
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom plugin import CommandPlugin, PluginException\n\n\nclass Ball8(CommandPlugin):\n \"\"\"\n 8ball command (by javipepe :))\n \"\"\"\n\n def __init__(self, bot):\n CommandPlugin.__init__(self, bot)\n ...
python
edit
1
3
mit
8e051959bc69305cb4987a913a2b0bd845a9fa70
Brottweiler/nimbus,itsmartin/nimbus,bcbwilla/nimbus,Plastix/nimbus
plugins/ball8.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom jingo import register\nimport jinja2\n\n\n# TODO: Allow configurable whitelists\nALLOWED_TAGS = [\n 'a', 'abbr', 'br', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li',\n 'ol', 'p', 'strong', 'ul'\n]\n\n\n@register.filter\nd...
python
edit
1
2
bsd-3-clause
1c3eadcbc378ae528f3a4cbf82d41675343ac104
lmorchard/badg.us,lmorchard/badg.us,deepankverma/badges.mozilla.org,mozilla/badges.mozilla.org,lmorchard/badg.us,mozilla/badg.us,mozilla/badg.us,deepankverma/badges.mozilla.org,deepankverma/badges.mozilla.org,mozilla/badg.us,mozilla/badges.mozilla.org,mozilla/badges.mozilla.org,mozilla/badges.mozilla.org,lmorchard/badg...
badgus/base/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test for the name inject utility.\"\"\"\n\nfrom drudge import Drudge\n\n\ndef test_drudge_injects_names():\n \"\"\"Test the name injection method of drudge.\"\"\"\n\n dr = Drudge(None) # Dummy drudge.\n string_name = 'string...
python
edit
3
1
mit
207c3fc8467c7f216e06b88f87433dc4eb46e13c
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/name_injection_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# queue_timings.py\n# Analysis script for bodyfetcher queue timings. Call from the command line using Python 3.\n\nimport os.path\nimport platform\nif int(platform.python_version_tuple()[0]) == 2:\n import cPickle as pickle\nelif int(pla...
python
edit
1
5
apache-2.0
d73654fd4d11a2bf5730c6fbf4bc2167593f7cc4
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector
queue_timings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom zenaida.contrib.hints.models import Dismissed\nfrom zenaida.contrib.hints.forms import DismissHintForm\n\nfrom django.http import (HttpResponse, HttpResponseNotAllowed,\n HttpResponseBadRequest, HttpResponseRedir...
python
edit
5
4
bsd-3-clause
27ab5b022dec68f18d07988b97d65ec8fd8db83e
littleweaver/django-zenaida,littleweaver/django-zenaida,littleweaver/django-zenaida,littleweaver/django-zenaida
zenaida/contrib/hints/views.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom account.models import Account, AnonymousAccount\n\ndef openid(request):\n return {'openid': request.openid}\n\ndef account(request):\n if request.user.is_authenticated():\n try:\n account = Account._default_ma...
python
edit
1
3
mit
e90e4fe8ad2679ff978d4d8b69ea2b9402029ccd
amarandon/pinax,alex/pinax,amarandon/pinax,amarandon/pinax,alex/pinax,amarandon/pinax,alex/pinax
pinax/apps/account/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport abc\nimport six\n\n\n@six.add_metaclass(abc.ABCMeta)\nclass Learner(object):\n\n def __init__(self, env, n_episodes=1000, verbose=True):\n self.env = env\n self.n_episodes = n_episodes\n self.verbose = verbose...
python
edit
1
3
mit
2faf9d30ae7eb935ace3ff9012844de1d4149f45
davidrobles/mlnd-capstone-code
capstone/rl/learner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport enum\n\nfrom sqlalchemy.schema import Column\nfrom sqlalchemy.types import Integer\n\nfrom cliche.sqltypes import EnumType\nfrom cliche.orm import Base\n\n\nclass Color(enum.Enum):\n\n red = 1\n green = 2\n blue = 3\n\n\ncla...
python
edit
1
1
mit
f2012869d3e16f0a610e18021e6ec8967eddf635
item4/cliche,clicheio/cliche,item4/cliche,clicheio/cliche,clicheio/cliche
tests/sqltypes_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyinfra import host\nfrom pyinfra.modules import apt\n\nSUDO = True\n\ncode_name = host.fact.linux_distribution['release_meta'].get('DISTRIB_CODENAME')\nprint(host.fact.linux_name, code_name)\n\nif host.fact.linux_name in ['Debian', 'U...
python
edit
1
0
mit
3471024a63f2bf55763563693f439a704291fc7d
Fizzadar/pyinfra,Fizzadar/pyinfra
examples/apt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n#SRT411 Assignment 2 - Part 2\n#Cymon API Interaction\n#Written by: Connor Brozic\n#Malware Domains retrieved from https://malwaredomains.usu.edu/\n#Implements Cymon API Calls\n\n#Import time for sleep function.\n#Import ...
python
edit
1
0
mit
8a40d0df910cf9e17db99155ba148c69737809dc
ConnorBrozic/SRT411-Assignment2
ConnorBrozic-CymonScriptA2P2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom locust import HttpLocust, TaskSet, task\n\nclass HttpPingTasks(TaskSet):\n @task\n def ping(self):\n self.client.get(\"/\")\n\nclass SayHelloLocust(HttpLocust):\n task_set = HttpPingTasks\n min_wait = 100\n max_wa...
python
edit
1
1
apache-2.0
08f80959be067178d4e58138309f7d1b402339e5
drednout/locust_on_meetup
http_ping.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 AbstractUser\nfrom django.conf import settings\nfrom django.db.models.signals import post_save\nfrom saltedge.factory import get_saltedge_app\n\n\nclass User(AbstractUser)...
python
edit
2
2
mit
d20039737d1e25f4462c4865347fa22411045677
ltowarek/budget-supervisor
budgetsupervisor/users/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*\nimport re\n\n\ndef normalize_correction_title_dashes(raw_title):\n \"\"\"returns s with normalized spaces before and after the dash\"\"\"\n if not raw_title:\n return None\n m = re.match(r'(תיקון)( ?)...
python
edit
1
3
bsd-3-clause
45c7b58dde546711c07969b6b59be9983d45e27e
alonisser/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset,OriHoch/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset
simple/parsers/utils/laws_parser_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nF = input(\"Gimme Fahrenheit: \")\n\nprint (F-32) * 5 / 9\nprint (F-32) / 1.8000\n\n```\n\nApply this change: Change variable name to fahrenheit" }, { "role": "assistant", "content": "#!/usr/bin/env pyth...
python
edit
1
0
apache-2.0
0c0f56dba4b9f08f4cb443f2668cdee51fe80c32
MindCookin/python-exercises
chapter02/fahrenheitToCelsius.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport json\n\nclass MatrixClient:\n\n ONE_TO_MANY_URL = 'https://matrix.mapzen.com/one_to_many'\n\n def __init__(self, matrix_key):\n self._matrix_key = matrix_key\n\n \"\"\"Get distances and times to a set...
python
edit
1
1
bsd-3-clause
96199b0d6dfea835d6bb23bc87060e5732ef4094
CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api
server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(name=\"zutil\",\n version='0.1.2',\n description=\"Utilities used for generating zCFD control dictionaries\",\n author=\"Zenotech\",\n author_email=\"<EMAIL>\",\n url=\"http...
python
edit
1
0
mit
525fdd26dac942d90352276f00f06460d1f950ee
zCFD/zutil
setup.py
rejected_duplicate
Near-duplicate of sample 12102
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''Test issue that arises when too many labels are added to NER model.'''\nimport random\nfrom ...lang.en import English\n\ndef train_model(train_data, entity_types):\n nlp = English(pipeline=[])\n\n ner = nlp.create_pipe(\"ner\")\n ...
python
edit
4
4
mit
2ac69facc6da342c38c9d851f1ec53a3be0b820a
aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,honnibal/s...
spacy/tests/regression/test_issue2800.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom minibot.bot import Bot\nfrom minibot.hardware.rpi.gpio import PWM\nfrom minibot.interface.servo import Servo\n\nimport math\nimport time\n\nL_MOTOR_PIN = 12\nR_MOTOR_PIN = 18\n\nclass GoBot(Bot):\n\n def __init__(self):\n Bot...
python
edit
1
1
apache-2.0
87b5fe729ef398722c2db1c8eb85a96f075ef82c
cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot
examples/GoBot/gobot.py
rejected_duplicate
Near-duplicate of sample 14436
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django_countries\n\nfrom django import forms\nfrom django_countries.fields import LazyTypedChoiceField\n\n\nclass SearchForm(forms.Form):\n title = forms.CharField(label='', widget=forms.TextInput(attrs={'placeholder': 'Movie Titl...
python
edit
1
0
mit
72d65a50d31fc32fadccc907c91c8e66ad192beb
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
source/forms/search_form.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n#! /usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\n# with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:\n# README = readme.read()\n\n\n# allow setup.py to be run from any path\nos...
python
edit
1
0
bsd-3-clause
d57088b4beeae269786970041b7837f69f0e9daf
unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,unt-libraries/django-name,damonkelley/django-name,damonkelley/django-name
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nversion = '0.6.3'\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.txt')).read()\n CHANGES = open(os.path.join(here, 'docs/HI...
python
edit
1
0
mit
fb00316ac62014564e299c94b8130b9316ee3d31
TurboGears/tgext.admin,TurboGears/tgext.admin
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\ndef get_readme():\n return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\nsetup(\n name='rest_framework_ember',\n version='1.0....
python
edit
1
1
bsd-2-clause
84ecbb0200c4d0cc170593835a5ae7ca5a6a09fc
coUrbanize/rest_framework_ember,grapo/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,leo-naeka/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,leifurhauks/django-rest-framework-json-api,abdulhaq-e/django-rest-framework-json-...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport sys\nfrom setuptools import setup\n\nwith open('README.rst', 'rb') as f:\n long_desc = f.read().decode('utf-8')\n\n# We have to be able to install on Linux to build the docs, even though\n# dmgbuild presen...
python
edit
3
0
mit
fe60f4b290403ccdf17f78502f9033e70dbff52a
al45tair/dmgbuild
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8\n\nfrom multiprocessing import Queue, Process, Event\n\n\nclass Timer(Process):\n def __init__(self, interval, function, args=[], kwargs={}):\n super(Timer, self).__init__()\n self.interval = interval\n ...
python
edit
1
3
mit
5dcfeb2a13f3ab9fe8b20e2620cbc15593cd56dc
blueyed/pytest-watch,rakjin/pytest-watch,ColtonProvias/pytest-watch,joeyespo/pytest-watch
pytest_watch/spooler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\ntry:\n long_description = open(\"README.md\").read()\nexcept IOError:\n long_description = \"\"\n\nsetup(\n name=\"vania\",\n version=\"0.1.0\",\n descri...
python
edit
1
0
mit
53d1a66498f05d89b9644d2013104bb7ec739a31
Hackathonners/vania
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nfrom fandjango import __version__\n\nsetup(\n name = 'fandjango',\n version = __version__,\n description = \"Fandjango makes it stupidly easy to create Facebook applications ...
python
edit
1
0
mit
6531a8c9da651f57a64036b777ff7fa4f430b517
jgorset/fandjango,jgorset/fandjango
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptes_client',\n url='https://github.com/zooniverse/panoptes-python-client',\n author='Adam McMaster',\n author_email='<EMAIL>',\n version='1.1.1',\n package...
python
edit
1
0
apache-2.0
f58e8e3b4a00069186a3a7f7075a76aa6d95cc60
zooniverse/panoptes-python-client
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'Evan Cordell'\n\n__version__ = \"0.5.1\"\n__version_info__ = tuple(__version__.split('.'))\n__short_version__ = __version__\n\nfrom .macaroon import Macaroon\nfrom .caveat import Caveat\nfrom .verifier import Verifier\n\n```\n...
python
edit
1
0
mit
3121d42bdca353d459ae61a6a93bdb854fcabe13
illicitonion/pymacaroons,ecordell/pymacaroons,matrix-org/pymacaroons,matrix-org/pymacaroons
pymacaroons/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\nimport os\nimport sys\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\ndef find_packages_in(where, **kwargs):\n return ...
python
edit
3
2
bsd-3-clause
8f5341324be97e7c6c7f0e93bd23762f3ad0b4a1
allanlei/django-multitenant
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 The resource-policy-evaluation-library 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 obt...
python
edit
1
0
apache-2.0
6457af6c631ca92c3c55df225c25cf8130c0aa3b
forseti-security/resource-policy-evaluation-library
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/Applications/anaconda/envs/Python3/bin\n\ndef main():\n x = input(\"Enter a number: \")\n print(\"Your number is {}\".format(x))\n\n\nif __name__ == '__main__':\n main()\n\n```\n\nApply this change: Add PY quick start examples" ...
python
edit
9
10
mit
af63afb5d5a010406557e325e759cdd310214c71
HKuz/Test_Code
setup.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\nwith open(\"README.md\") as readme_file:\n readme = readme_file.read()\n\nrequirements = [\"Pillow>=5.3.0\", \"numpy>=1.15.4\", \"Click>=7.0\"...
python
edit
1
0
mit
e4badca1d01e25efec8cf2b45f1e2731f4dc2d5a
ragibson/Steganography
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n###############################################################################\n# Copyright 2015-2016 University of Florida. All rights reserved.\n# This file is part of UF CTS-IT's NACCulator project.\n# Use of this source code is governe...
python
edit
1
0
bsd-2-clause
4c629e16c6dcd5ea78ddccca75c0a5cee602cfa6
ctsit/nacculator,ctsit/nacculator,ctsit/nacculator
setup.py
rejected_duplicate
Near-duplicate of sample 13212
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\nimport os\n\n\n# Utility function to read README file\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name='iss',\n version='...
python
edit
1
1
mit
36456b313a24ffb5502a9020217e5172bc73bc15
AASHE/iss
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nbase = os.path.dirname(__file__)\n\nmdata = {}\nwith open(os.path.join(base, 'uniplot', '__about__.py')) as f:\n exec(f.read(), mdata)\n\nsetup(\n name=mdata['__title__'],\n version=mdata[...
python
edit
1
0
mit
1fc72a38e1e62bde62650356cddf4e22bab21d73
Sean1708/uniplot
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name=\"ticket_auth\",\n version=\"0.1.0\",\n packages=['ticket_auth'],\n author='Gnarly Chicken',\n author_email='<EMAIL>',\n test_suite='tests',\n license='MIT')\n\n```\n\nApp...
python
edit
1
0
mit
dde21c684965c76144adf2654ff04c89ad2c86c8
gnarlychicken/ticket_auth
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptes_client',\n url='https://github.com/zooniverse/panoptes-python-client',\n author='Adam McMaster',\n author_email='<EMAIL>',\n version='1.1.1',\n package...
python
edit
1
0
apache-2.0
05a0b448b647a7a0d968bfd0019a1520b3496bd1
zooniverse/panoptes-python-client
setup.py
rejected_duplicate
Near-duplicate of sample 18142
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nscriptnames = ['runElegant.sh',\n 'sddsprintdata.sh',\n 'renametolower.sh',\n 'file2lower.sh',\n 'lte2json',\n '...
python
edit
1
1
mit
9b2d464a2562ecf915f22c4664f00af3d66b34ce
Archman/beamline
setup.py
rejected_duplicate
Near-duplicate of sample 5218
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\nimport os\nimport sys\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings')\n\n\nclass PyTest(Test...
python
edit
1
1
bsd-3-clause
8e3e72b26e490f35c7e9c4a33ac5314d3be07077
laosunhust/saleor,tfroehlich82/saleor,tfroehlich82/saleor,spartonia/saleor,laosunhust/saleor,maferelo/saleor,maferelo/saleor,mociepka/saleor,rodrigozn/CW-Shop,UITools/saleor,rodrigozn/CW-Shop,car3oon/saleor,itbabu/saleor,itbabu/saleor,rchav/vinerack,jreigel/saleor,car3oon/saleor,jreigel/saleor,HyperManTT/ECommerceSaleo...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='gapi',\n version='0.5.0',\n author='Scott Hendrickson, Josh Montague',\n author_email='<EMAIL>',\n packages=[],\n scripts=['search_api.py', 'paged_search_api.py'],\n ur...
python
edit
1
0
bsd-2-clause
af328240631dd31b405e90c09052c1872490713d
DrSkippy/Gnip-Python-Search-API-Utilities,blehman/Gnip-Python-Search-API-Utilities,DrSkippy/Gnip-Python-Search-API-Utilities,blehman/Gnip-Python-Search-API-Utilities
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='orges',\n version='0.0.1',\n description='OrgES Package - Organic Computing for Evolution Strategies',\n long_description=open('README.rst'...
python
edit
3
0
bsd-3-clause
961f8ab2b664dd24886b5dcf350c437a17fefe1a
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(\n name = 'diabric',\n version = '0.1',\n license = 'MIT',\n description = 'Diabolically atomic Python Fabric fabfile tasks and utilities.',\n long_description = open('README.md').read(...
python
edit
3
0
mit
f87c291ce7ee7a54a987f3d8bd1a43e1cee2b6a0
todddeluca/diabric
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'ckanext-archiver',\n version = '0.1',\n packages = find_packages(),\n install_requires = [\n 'celery>=2.3.3',\n 'kombu-sqlalchemy>=1.1.0',\n 'S...
python
edit
1
0
mit
ca29731fd9b8f207a927c8c96c9d9fbb3c98e930
ckan/ckanext-archiver,datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver,ckan/ckanext-archiver,datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='icapservice',\n version='0.1.1',\n description='ICAP service library for Python',\n author='Giles Brown',\n author_email='<EMAIL>',\n url='https://github.com/gilesbrown/icap...
python
edit
1
0
mit
96871ab62c6635c396325591c84bed243745fd16
gilesbrown/python-icapservice,gilesbrown/python-icapservice
setup.py
rejected_duplicate
Near-duplicate of sample 5375
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ndef listify(filename):\n return filter(None, open(filename, 'r').readlines())\n\nsetup(\n name=\"python-smpp\",\n version=\"0.1.6a\",\n url='http://github.com/praekelt/python-smpp...
python
edit
1
1
bsd-3-clause
e0bbd05c252438d157de6f9b85079848920f574e
praekelt/python-smpp,praekelt/python-smpp
setup.py
rejected_duplicate
Near-duplicate of sample 5361
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\nsetup(\n name='algorithmia',\n version='0.9.2',\n description='Algorithmia Python Client',\n long_description='Algorithmia Python Client is a client library for accessing Algorithmia ...
python
edit
3
0
mit
7b9f9fe1816233d59d32fc41c737250f15fd1b7c
algorithmiaio/algorithmia-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport board\n\nsetup(\n name='django-board',\n version=board.__version__,\n description='A Django app for managing an organisation\\'s board members page.',\n long_description=open...
python
edit
1
0
mit
65e72e330bfaf1c8e2dd03cb809ad697a5f9af35
dominicrodger/django-board,dominicrodger/django-board
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import path, pardir, chdir\nfrom setuptools import setup, find_packages\n\nREADME = open(path.join(path.dirname(__file__), 'README.rst')).read()\n\n# allow setup.py to be run from any path\nchdir(path.normpath(path.join(path.abspath...
python
edit
1
0
mit
13a29de045e1386dde2be6185f5f05095f3d4c2d
yunojuno/django-perimeter,yunojuno/django-perimeter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Build import cythonize\n\nsetup(\n name='cygroonga',\n version='0.1.0',\n ext_modules=cythonize([\n Extension(\"cygroonga\", [\"cygroon...
python
edit
1
0
apache-2.0
5d4baf4d9b2c4967276f188a496d04062041c26c
hnakamur/cygroonga
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .default import * # NOQA\n\n#\n# Django Development\n# ..........................\n\nDEBUG = True\nTEMPLATE_DEBUG = True\n\nSOUTH_TESTS_MIGRATE = False # Tested at settings.tests\n\n#\n# Developper Toolbar\n# ...........................
python
edit
10
0
bsd-2-clause
c9d992cd69fd1ec5c0b8655b379862527b452fb6
makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,johan--/Geotrek,johan--/Geotrek,johan--/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,Anaethelion/Geotrek,johan--/Geot...
geotrek/settings/dev.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\ndef GaussianSample(mean, var, scope):\n with tf.name_scope(scope):\n return tf.random_normal(tf.shape(mean), mean, tf.sqrt(var))\n\n```\n\nApply this change: Add importance weighting and monte carlo feat...
python
edit
1
1
mit
d7df3f73b521327a6a7879d47ced1cc8c7a47a2d
RuiShu/tensorbayes
tensorbayes/layers/sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socks\nimport socket\n\n\nclass Tor(object):\n \"\"\"Tor class for socks proxy and controller\"\"\"\n def __init__(self, socks_port=9050):\n self.socks_port = socks_port\n self.default_socket = socket.socket\n\n``...
python
edit
1
1
mit
4ca8b6140ea68ee3a4824220590ecd7150cf90a4
MA3STR0/simpletor
tor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for quick sort" }, { "role": "assistant", "content": "from random import shuffle\nimport pytest\n\nfrom quick_sort import quick_srt\n\n\ndef test_quick_srt():\n expected = range(20)\n actual = expected[:]\n ...
python
new_file
1
1
mit
0af1b0bc4448a289c0e21b32face5545ce5d13c7
jonathanstallings/data-structures
test_quick_sort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nfrom config import INTERFACES\nfrom built_in_classes import RootHTBClass\nfrom .upload import Interactive, TCPACK, SSH, HTTP, Default\n\n\ndef apply_qos():\n public_if = INTERFACES[\"public_if\"]\n root_class = Ro...
python
edit
1
1
bsd-2-clause
27f6f1a352ddb72e48550e7d656a3882126d6de6
Anthony25/python_tc_qos
pythonic_rules.example/upload/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" TCP Server for mobile streaming\n\"\"\"\n\ntry:\n import SocketServer as socketserver\nexcept ImportError:\n import socketserver\n\n\nfrom dss.tools import thread, show\nfrom dss.config import config\nfrom .handler import Media...
python
edit
1
2
bsd-3-clause
ed279b7f2cfcfd4abdf1da36d8406a3f63603529
terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,terabit-software/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,hmoraes/dynamic-stream-server
dss/mobile/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make the package import both variants\n\nFavouring the C variant where it successfully imports. This commit also\nhandles generating the encoding dictionaries for the C variant from\nthose defined for the Python variant (this is much simpler...
python
new_file
1
9
mit
abebc8a1153a9529a0f805207492cf2f5edece62
agronholm/cbor2,agronholm/cbor2,agronholm/cbor2
cbor2/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport code\n\nfrom diesel import Application, Pipe, until\n\nDEFAULT_PROMPT = '>>> '\n\ndef readcb():\n print 'Diesel Console'\n cmd = ''\n prompt = DEFAULT_PROMPT\n while 1:\n sys.stdout.write(prompt)\n ...
python
edit
3
6
bsd-3-clause
0e69718b24fe24e898c605b1823db1939bcadcd4
dieseldev/diesel
examples/pipes-repl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom drf_multiple_model.mixins import FlatMultipleModelMixin, ObjectMultipleModelMixin\n\nfrom rest_framework.generics import GenericAPIView\n\n\nclass FlatMultipleModelAPIView(FlatMultipleModelMixin, GenericAPIView):\n def get(self, req...
python
edit
1
4
mit
0da65e9051ec6bf0c72f8dcc856a76547a1a125d
Axiologue/DjangoRestMultipleModels
drf_multiple_model/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom currencies.models import Currency\n\n\ndef currencies(request):\n currencies = Currency.objects.all()\n\n if not request.session.get('currency'):\n #request.session['currency'] = Currency.objects.get(code__exact='EUR')\n ...
python
edit
1
2
bsd-3-clause
40c5f5ec789cd820666596244d3e748fa9539732
panosl/django-currencies,bashu/django-simple-currencies,barseghyanartur/django-currencies,mysociety/django-currencies,marcosalcazar/django-currencies,pathakamit88/django-currencies,bashu/django-simple-currencies,jmp0xf/django-currencies,pathakamit88/django-currencies,ydaniv/django-currencies,ydaniv/django-currencies,my...
currencies/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom .models import AwareModel, NaiveModel\nfrom ..templatetags.boardinghouse import *\n\nclass TestTemplateTags(TestCase):\n def test_is_schema_aware_filter(self):\n self.assertTrue(is_schema_a...
python
edit
1
1
bsd-3-clause
a8283f5d2c1d970b7b676d491ad8c9472abfe667
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/tests/test_template_tag.py
rejected_duplicate
Near-duplicate of sample 3886
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom gi.repository import GObject\n\nfrom photoshell.config import Config\nfrom photoshell.library import Library\nfrom photoshell.views.slideshow import Slideshow\nfrom photoshell.views.window import Window\n\nc = Config({\n ...
python
edit
1
0
mit
a99d07e02f69961be5096ce8575007cec7ec213d
photoshell/photoshell,SamWhited/photoshell,campaul/photoshell
photoshell/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom daiquiri.core.serializers import JSONListField, JSONDictField\n\n\nclass DublincoreSerializer(serializers.Serializer):\n\n identifier = serializers.ReadOnlyField()\n title = serializers.R...
python
edit
1
1
apache-2.0
762147b8660a507ac5db8d0408162e8463b2fe8e
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
daiquiri/registry/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httplib2\nfrom apiclient.discovery import build\nfrom oauth2client.client import AccessTokenCredentials, AccessTokenCredentialsError\nfrom SnsManager.SnsBase import SnsBase\nfrom SnsManager import ErrorCode\n\nclass GoogleBase(SnsBas...
python
edit
4
3
bsd-3-clause
a43d461bf2d5c40b8d828873f9fa0b5e2048a0df
waveface/SnsManager
SnsManager/google/GoogleBase.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"aospy: management, analysis, and plotting of gridded climate data.\"\"\"\nfrom .__config__ import (user_path, LAT_STR, LON_STR, PFULL_STR, PHALF_STR,\n PLEVEL_STR, TIME_STR)\nfrom . import constants\nfrom .cons...
python
edit
23
0
apache-2.0
b1deec08fe23eb89dd51471c6f11e2e3da69a563
spencerkclark/aospy,spencerahill/aospy
aospy/__init__.py
rejected_lint
Too many lint violations: 23
true