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\"\"\"\n\nVery basic implementation of an event loop\n==========================================\n\nThe eventloop is a singleton to schedule and run events.\n\nExports\n-------\n\n- ``EventLoop``: the basic eventloop\n\n\"\"\"\n\nimport que...
python
edit
4
1
mit
a4825083c9a18fe8665d750bfad00a9d6fa40944
waltermoreira/tartpy
tartpy/eventloop.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport sys\n\nimport gym\n\nlogger = logging.getLogger(__name__)\n\nroot_logger = logging.getLogger()\nrequests_logger = logging.getLogger('requests')\n\n# Set up the default handler\nformatter = logging.Formatter('[%(asctim...
python
edit
1
1
mit
d831826ec23114a3f56b5f327205257c7ca4ac58
dianchen96/gym,Farama-Foundation/Gymnasium,Farama-Foundation/Gymnasium,dianchen96/gym
gym/configuration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Moksha.\n#\n# Moksha is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or...
python
edit
1
0
apache-2.0
da51183e64875119377d3dd5ffe85c958c23fc16
lmacken/moksha,ralphbean/moksha,pombredanne/moksha,ralphbean/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha,lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha
moksha/api/widgets/flot/flot.py
rejected_duplicate
Near-duplicate of sample 2034
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# third party\nfrom sqlalchemy.engine import Engine\n\n# relative\nfrom ..node_table.node_route import NodeRoute\nfrom .database_manager import DatabaseManager\n\n\nclass NodeRouteManager(DatabaseManager):\n schema = NodeRoute\n\n def...
python
edit
1
4
apache-2.0
0b80b573049b771f551b2fa47e570d849cd14ea4
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/syft/src/syft/core/node/common/node_manager/node_route_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\nimport os\nimport unittest\n\nimport ptn\n\n\nclass ParseTest(unittest.TestCase):\n\n def test_parser(self):\n with open('files/input.json') as input_file:\n torrents = json.load(input_file)...
python
edit
1
2
mit
3d5c68421b889abb4f56319b082aaff554ebaa0e
divijbindlish/parse-torrent-name,nivertech/parse-torrent-name
tests/test_parse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for coverage.data\"\"\"\n\nimport unittest\nfrom coverage.data import CoverageData\n\nclass DataTest(unittest.TestCase):\n def test_reading(self):\n covdata = CoverageData()\n covdata.read()\n self.assert...
python
edit
1
1
apache-2.0
57e66ae6cd833b1b0da5b71e1c4b6e223c8ca062
7WebPages/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,jayhetee/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,blueyed/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,larsbutler/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,hugovk/coveragepy,hugovk/coverage...
test/test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Go API action dispatcher for dialogue conversations.\"\"\"\n\nfrom go.api.go_api.action_dispatcher import ConversationActionDispatcher\n\n\nclass DialogueActionDispatcher(ConversationActionDispatcher):\n def handle_get_poll(self, c...
python
edit
1
1
bsd-3-clause
99be93029ecec0ed4c1e17e0fc2f199c2ad0f6c6
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/apps/dialogue/dialogue_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
1
apache-2.0
9bb0e3b082b509b5498d25df248d4c74be53bcc3
sunu/oppia,directorlive/oppia,michaelWagner/oppia,jestapinski/oppia,kennho/oppia,mit0110/oppia,himanshu-dixit/oppia,zgchizi/oppia-uc,won0089/oppia,brianrodri/oppia,leandrotoledo/oppia,fernandopinhati/oppia,rackstar17/oppia,aldeka/oppia,Dev4X/oppia,amgowano/oppia,oulan/oppia,raju249/oppia,aldeka/oppia,dippatel1994/oppia...
oppia/tests/javascript_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom slumber.connector.ua import get\n\nfrom django.test import TestCase\n\nfrom pubsubpull.models import *\n\n\nclass TestConfiguration(TestCase):\n def test_slumber(self):\n response, json = get('/slumber/')\n self.asser...
python
edit
2
1
mit
6b1ebf85ec2b76bee889936726c3caac45203675
KayEss/django-pubsubpull,KayEss/django-pubsubpull,KayEss/django-pubsubpull
pubsubpull/tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Module providing standard output classes \"\"\"\r\n\r\nfrom abc import ABCMeta, abstractmethod\r\nfrom mako.template import Template\r\nfrom mako.lookup import TemplateLookup\r\n\r\nclass Output(object):\r\n \"\"\" Abstract class ...
python
edit
3
2
mit
bee8527854577f2c663cd43719bbb2cd05cdbf1a
pecet/pytosg,pecet/pytosg
TwitterStatsLib/Output.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom ..base import Resource\n\nfrom .agency import Agency\n\n\nclass Agent(Resource):\n _resource_name = 'agents'\n _is_listable = False\n\n _as_is_fields = [\n 'id', 'href', 'role'...
python
edit
1
0
mit
dfdcbda02ad2fcc744e90d437051afe911e47c60
gadventures/gapipy
gapipy/resources/booking/agent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management import call_command\nfrom django.test import TestCase\n\n\nclass ServerTest(TestCase):\n def test_update_game_info(self):\n call_command('update_game_info')\n\n```\n\nApply this change: Fix testing on u...
python
edit
1
1
bsd-3-clause
9014dfde50d5f54cf79c544ce01e81266effa87d
Azelphur-Servers/django-game-info
game_info/tests/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport postcodeinfo\nimport pc_fallback\n\n\nclass GeocoderError(Exception):\n pass\n\n\nclass PostcodeNotFound(GeocoderError):\n def __init__(self, postcode, *args, **kwargs):\n super(PostcodeNotFound, self).__init_...
python
edit
3
5
mit
f9223d3e12881dd638a2815bb1019071d1857541
ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api
laalaa/apps/advisers/geocoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom .Rule import Rule\n\n\nclass IsMethodsRuleExtension(Rule):\n @classmethod\n def is_regular(cls):\n ...
python
edit
1
1
mit
28cf62f316e2e726331f9b0773270db64c4869c8
PatrikValkovic/grammpy
grammpy/IsMethodsRuleExtension.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Leetcode 340. Longest Substring with At Most K Distinct Characters\nHard\n\nURL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/\n\nGiven a string, find the length of the longest substring T that co...
python
edit
3
4
bsd-2-clause
e99c63af5c0143c95f9af10e3a79083235bb7da4
bowen0701/algorithms_data_structures
lc0340_longest_substring_with_at_most_k_distinct_characters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Solution(object):\n def findTheDifference(self, s, t):\n \"\"\"\n :type s: str\n :type t: str\n :rtype: str\n \"\"\"\n chrs = {}\n res = 0\n for w in t:\n if w not ...
python
edit
1
4
mit
a3425b010cb252db7dcb19ca6023f1e09999912e
Chasego/codi,Chasego/cod,cc13ny/algo,Chasego/codi,Chasego/codirit,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/cod,Chasego/cod,Chasego/codirit,cc13ny/Allin,Chasego/codirit,Chasego/cod,cc13ny/algo,cc13ny/algo,cc13ny/algo,Chasego/cod,Chasego/codirit,Chasego/codirit,cc...
leetcode/389-Find-the-Difference/FindtheDifference_Bit_and_Hash.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.httpexceptions import HTTPNotFound\nfrom pyramid.view import view_config\nfrom random import randint\nfrom ..contentbase import (\n Root,\n location_root,\n)\n\n\ndef includeme(config):\n # Random processid so etags ar...
python
edit
3
2
mit
07c7f18733bad651ef110b529422fd42bdcf27aa
T2DREAM/t2dream-portal,kidaa/encoded,T2DREAM/t2dream-portal,ENCODE-DCC/encoded,4dn-dcic/fourfront,ENCODE-DCC/encoded,ClinGen/clincoded,philiptzou/clincoded,hms-dbmi/fourfront,kidaa/encoded,4dn-dcic/fourfront,ClinGen/clincoded,T2DREAM/t2dream-portal,kidaa/encoded,kidaa/encoded,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,...
src/encoded/views/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nIn this module we define the interface between the cli input provided\nby the user and the analytics required by the user\n\"\"\"\nfrom edx_data_research.reporting.basic import (user_info, ip_to_country,\n ...
python
edit
3
1
mit
53c751e86b6ca2dd5076e0a09e7c0e4663c1fcbc
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research
edx_data_research/cli/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hoomd\n\n\ndef test_before_attaching():\n filt = hoomd.filter.All()\n thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0)\n assert thermoHMA._filter == filt\n assert thermoHMA.temperature == 1.0\n assert thermoHMA.harmon...
python
edit
1
1
bsd-3-clause
c1d27fba7097c4b0521512e83c2bef4b3df57735
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
hoomd/md/pytest/test_thermoHMA.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nfrom unittest import defaultTestLoader, TextTestRunner, TestSuite\n\nTESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n')\n\ndef make_suit...
python
edit
1
3
bsd-3-clause
a4184edab35890673b8b6a67e68a73e6ab7f0b89
jmagnusson/wtforms,cklein/wtforms,Xender/wtforms,pawl/wtforms,Aaron1992/wtforms,pawl/wtforms,subyraman/wtforms,wtforms/wtforms,skytreader/wtforms,hsum/wtforms,Aaron1992/wtforms,crast/wtforms
tests/runtests.py
rejected_duplicate
Near-duplicate of sample 4430
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unit test suite for HXL proxy.\"\"\"\n\nimport os\nimport re\nimport hxl\nimport unittest.mock\n\nTEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql')\n\n#\n# Mock URL access for local testing\n#\n\ndef mock_open_...
python
edit
3
2
unlicense
b0fd7fc1866cd85e9d68d5716d8f5aeaff1218c1
HXLStandard/hxl-proxy,HXLStandard/hxl-proxy,HXLStandard/hxl-proxy,HXLStandard/hxl-proxy
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\n\nfrom django.core.management.base import NoArgsCommand\nfrom django.conf import settings\n\nclass Command(NoArgsCommand):\n \n can_import_settings = True\n\n def handle_noargs(self, **options):\n ...
python
edit
4
6
apache-2.0
186d3c637760668d960c50c9f94fad7ff4769598
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
molly/utils/management/commands/generate_cache_manifest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2017 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\nimport sys\nimport unittest\n\nfrom . import symbo...
python
edit
1
4
bsd-3-clause
bd8b0c2c47c1a9433c38123f2533c796fd7f8521
catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult
tracing/tracing/extras/symbolizer/symbolize_trace_macho_reader_unittest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nTEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml')\n\n# Check to make sure that the test config file is being used. If not, don't run the tests\nif os.environ['COSMO_CONFIG'] != TEST...
python
edit
1
3
bsd-3-clause
0b4562d15c1c8b544847e7988d26120556a3110d
justincely/cos_monitoring
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBraubuddy Dummy thermometer unit tests.\n\"\"\"\n\nimport unittest\nfrom mock import patch, call, MagicMock\nfrom braubuddy.thermometer import auto \nfrom braubuddy.thermometer import dummy \nfrom braubuddy.thermometer import ds18b2...
python
edit
5
1
bsd-3-clause
223c268d58645fbecdddb24ff84587dc803bfc87
amorphic/braubuddy,amorphic/braubuddy,amorphic/braubuddy
braubuddy/tests/thermometer/test_auto.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=21\nbranch=\"master\"\ntimestamp=1376526439.16\n```\n\nApply this change: Tag commit for v0.0.22-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=22\nbranc...
python
edit
1
0
mit
f137f5b6f5453938e0cc858268a79ee5ef8283d0
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom celery import Celery\nfrom django.conf import settings\nfrom django.db import connection\n\n\nclass SmokeTests(unittest.TestCase):\n\n def setUp(self):\n pass\n\n def test_can_access_db(self):\n \...
python
edit
1
2
mit
0bfee1fff698a984130a99c7ccbff4a787a68eca
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/status/tests/smoketests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Basic test of dynamic code generation\nimport unittest\nimport os, glob\n\nimport stdio\nfrom ctypes import POINTER, c_int\n\nclass DynModTest(unittest.TestCase):\n def tearDown(self):\n for fnm in glob.glob(stdio._gen_basename ...
python
edit
5
1
mit
c0cecdc7e754090f25f48637de88d2d07a3ef58f
sugarmanz/ctypeslib
ctypeslib/test/test_dynmodule.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# -*- coding: utf-8 -*-\n\"\"\"\nUpdate to the latest CAL-ACCESS snapshot and bake static website pages.\n\"\"\"\nimport logging\nfrom django.core.management import call_command\nfrom calaccess_raw.management.commands...
python
edit
1
2
mit
84aaf1b99c609cffe4f2a9d8825f20fa585fc3d9
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
calaccess_website/management/commands/updatedownloadswebsite.py
rejected_duplicate
Near-duplicate of sample 17089
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\narr1 = np.array([[1,2],[3,4]])\narr2 = np.array([[5,6],[7,8]])\narr3 = np.array([[1,2],[3,4],[5,6]])\narr4 = np.array([7,8])\n\n# 列出矩陣的維度\n# print(arr1.shape)\n# print(arr1.shape[0])\n\n# 矩陣乘積\n# print(np.dot(arr1,arr2...
python
edit
1
0
mit
dbbbb763db09fdf777558b781a29d4b8a71b3e62
KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice
src/DeepLearn/venv/Lab/Array.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.cpanel import ControlPanel\n\n\nclass TestPage(BaseTestCase):\n\n @httpretty.activate\n def test_fetch_payment_session_timeout(self):\n ...
python
edit
1
1
mit
8063e3b863ff4944f95ac27ff4329716fa03efc8
andela-sjames/paystack-python
paystackapi/tests/test_cpanel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n## Copyright (C) 2011 Aldebaran Robotics\n\"\"\"Display the current config \"\"\"\n\nimport os\n\nimport qitools\n\ndef configure_parser(parser):\n \"\"\"Configure parser for this action \"\"\"\n qitools.qiworktree.work_tree_parser(pa...
python
edit
3
5
bsd-3-clause
26b2ed8c6f47eb87a2851c746e10f2bbe331dc4c
dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild
python/qibuild/actions/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nfrom flask import request, render_template, flash, redirect, url_for\nfrom flask_login import login_user\n\nfrom ..models import User\nfrom ..utils.auth import is_safe_url\n\nfrom ..auth_provider import KnowledgeAuthProvider\n...
python
edit
1
4
apache-2.0
bdb7da410d6085a783fdb3cca55b9353fad9b9ed
airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo
knowledge_repo/app/auth_providers/debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is the interface for interacting w/ Catalyst GradeBook\n\"\"\"\n\nfrom restclients.catalyst import Catalyst\nfrom restclients.exceptions import DataFailureException\nfrom restclients.dao import Catalyst_DAO\n\nclass GradeBook(o...
python
edit
1
2
apache-2.0
439f57419d861b7e180453263e413ed2b3c56826
uw-it-aca/uw-restclients,uw-it-aca/uw-restclients,UWIT-IAM/uw-restclients,UWIT-IAM/uw-restclients,uw-it-cte/uw-restclients,jeffFranklin/uw-restclients,UWIT-IAM/uw-restclients,jeffFranklin/uw-restclients,uw-it-cte/uw-restclients,jeffFranklin/uw-restclients,uw-it-cte/uw-restclients
restclients/catalyst/gradebook.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint\n\nfrom . import v0\n\nbp = Blueprint('api', __name__)\nv0.api.init_app(bp)\n\ndef errorpage(e):\n code = getattr(e, 'code', 500)\n if code == 404:\n return jsonify(msg=str(e))\n return jsonify(ms...
python
edit
1
1
apache-2.0
9756366d7bca75c0ea89ce1fface6a7d224f54f7
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft
web/api/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..helpers import *\n\n\ndef test_honcho_start_joins_stderr_into_stdout():\n ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start'])\n\n assert_equal(ret, 0)\n\n assert_in('some normal output', out)\n assert_in...
python
edit
11
1
mit
29aa1a440a9ff225d3f9a4773f9097a5efcbd0de
janusnic/honcho,xarisd/honcho,myyk/honcho,gratipay/honcho,nickstenning/honcho,nickstenning/honcho,gratipay/honcho
test/integration/test_output.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Red Hat, Inc.\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#\n# htt...
python
edit
1
3
apache-2.0
e1068913bf56d9a8b3bc763eb15673c81d23c85b
openstack/oslo.reports,citrix-openstack-build/oslo.reports,DirectXMan12/oslo.reports
openstack/common/report/utils.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 sys\n\nif __name__ == '__main__':\n\n ref_name = sys.argv[1]\n old_commit = sys.argv[2]\n new_commit = sys.argv[3]\n # no need to check if old_commit or new_commit a...
python
edit
1
0
mit
755e4c5ca84072d9983de0b1a0e76419cde77f66
benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,benjaminvialle/Markus,benjaminvialle/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Marku...
lib/repo/git_hooks/update.d/02-block_change_top_level_master.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis module implements the class that deals with sections.\n\n.. :copyright: (c) 2014 by Jelte Fennema.\n :license: MIT, see License for more details.\n\"\"\"\n\n\nfrom . import Container, Command\n\n\nc...
python
edit
1
2
mit
cc7319fa8ac99049b3fcc86c7f2f075ebd2e7124
bjodah/PyLaTeX,JelteF/PyLaTeX,bjodah/PyLaTeX,ovaskevich/PyLaTeX,ovaskevich/PyLaTeX,JelteF/PyLaTeX
pylatex/base_classes/section.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom image import ImageWithWCS\nimport numpy as np\nfrom os import path\n\n\ndef shift_images(files, source_dir, output_file='_shifted'):\n \"\"\"Align images based on astrometry.\"\"\"\n\n ref = files[0] # TODO: make reference image...
python
edit
1
2
bsd-3-clause
6af3c515a98ac1be7f6acf5ddb6a2d114ac1336c
mwcraig/msumastro
shifter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Mirantis\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#\n# http://w...
python
edit
1
1
apache-2.0
88592970d58eeff43837a5e175bba95386a8491b
openstack/neutron,huntxu/neutron,cloudbase/neutron,sebrandon1/neutron,mahak/neutron,noironetworks/neutron,openstack/neutron,cloudbase/neutron,openstack/neutron,mahak/neutron,huntxu/neutron,noironetworks/neutron,mahak/neutron,eayunstack/neutron,eayunstack/neutron,sebrandon1/neutron
neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = VERSION = (0, 5, 1)\n\nfrom humanize.time import *\nfrom humanize.number import *\nfrom humanize.filesize import *\nfrom humanize.i18n import activate, deactivate\n\n__all__ = ['__version__', 'VERSION', 'naturalday', 'naturalt...
python
edit
14
0
mit
2794f71e1a4c9ac8aa70f22ce3c9d01bf2d7737a
jmoiron/humanize,jmoiron/humanize
humanize/__init__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass Semaphore(object):\n\n \"\"\"docstring for Semaphore\"\"\"\n def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'):\n self._db = db\n self._name = collection_name\n self._id = ...
python
edit
1
2
mit
f1c414d91d9b1d9ed90a6b5c676cdc2fb60c4fe4
rick446/MongoTools
mongotools/semaphore/semaphore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport web\nfrom os import path\n\nrootdir = path.abspath('./build')\ndef getFile(filename):\n filename = path.join(rootdir, filename)\n print filename\n if (not filename.startswith(rootdir)):\n return None\n if (not path...
python
edit
2
3
bsd-2-clause
dd110868f3c4fa373e9aeaced58ebcb626d1187b
rictic/reconciliation_ui,rictic/reconciliation_ui,rictic/reconciliation_ui
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom runcommands import command\nfrom runcommands.commands import local as _local\n\n\n@command\ndef format_code(check=False):\n _local(f\"black . {'--check' if check else ''}\")\n\n\n@command\ndef lint():\n _local(\"flake8 .\")\n\n\n...
python
edit
1
4
mit
3640a8c6057ffac8f8d0f7cd6af8954b4169543d
wylee/django-local-settings
commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2020 Google LLC. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at...
python
edit
3
1
apache-2.0
3bc8aa5499d111e66a6e71882a95bd6c357ac6f6
tensorflow/cloud,tensorflow/cloud
src/python/tensorflow_cloud/core/tests/examples/multi_file_example/create_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" General regression tests for fixed bugs.\n\"\"\"\n\nimport gc\nimport unittest\nimport sys\n\nfrom traits.has_traits import HasTraits\n\n\ndef _create_subclass():\n class Subclass(HasTraits):\n pass\n return Subclass\n\n...
python
edit
2
1
bsd-3-clause
e8ff222331d9fe6ea5b91a7c673e631effe3d9ec
burnpanck/traits,burnpanck/traits
traits/tests/test_regression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom django.conf import settings\n\nfrom appconf import AppConf\n\nclass DJOAuth2Conf(AppConf):\n class Meta:\n prefix = 'djoauth2'\n\n ACCESS_TOKEN_LENGTH = 30\n ACCESS_TOKEN_LIFETIME = 3600\n ACCESS_TOKENS_REFRESHA...
python
edit
3
0
mit
53a3c61a9facf246810b8be7638b62eda5214a47
Locu/djoauth2,vden/djoauth2-ng,Locu/djoauth2,seler/djoauth2,seler/djoauth2,vden/djoauth2-ng
djoauth2/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom config import colors, icons\n\n# TODO properties instead of GETs/SETs\n\nclass Widget:\n '''\n Abstrac class for all lemonbar widgets.\n '''\n\n def __init__(self, name):\n '''\n Para...
python
edit
null
null
mit
7ff1f860f9cff5dcec86588485b9f2ce992fdd7c
alberand/lemonbar,alberand/lemonbar,alberand/lemonbar
widget.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test that importing modules in C++ works as expected.\"\"\"\n\nfrom __future__ import print_function\n\n\nfrom distutils.version import StrictVersion\nimport unittest2\nimport os\nimport time\nimport lldb\nimport platform\n\nfrom lldb...
python
edit
14
1
apache-2.0
d27f5e92d6a0fef27b903f75de59c1d85ca35430
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb
packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom .conf import BREAKPOINTS\n\n\ndef _get_device_type(width):\n \"Returns the type based on set breakpoints.\"\n sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1])\n default_...
python
edit
1
5
bsd-2-clause
18e0a57f133779b2001b93f9d16ef500f449ebd9
mlavin/django-responsive,mlavin/django-responsive,mlavin/django-responsive
responsive/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\nfrom django.core.exceptions import PermissionDenied\n\n\ndef permission_required(permissions):\n def decorator(func):\n @wraps(func)\n def wrapper(*args, **kwargs):\n info = args[1]...
python
edit
1
2
bsd-3-clause
6ee135dc454b7ae13dbd4603de60b5eba12cc5c9
UITools/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor,UITools/saleor
saleor/graphql/core/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015 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...
python
edit
1
1
apache-2.0
72ed5473c1b530357bd518149fcfafdea1bc3987
NeCTAR-RC/murano,satish-avninetworks/murano,DavidPurcell/murano_temp,satish-avninetworks/murano,olivierlemasle/murano,olivierlemasle/murano,openstack/murano,DavidPurcell/murano_temp,DavidPurcell/murano_temp,NeCTAR-RC/murano,NeCTAR-RC/murano,openstack/murano,satish-avninetworks/murano,NeCTAR-RC/murano,satish-avninetwork...
murano_tempest_tests/tests/api/service_broker/test_service_broker_negative.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os import path\n\nimport nose\n\ndef run_all(argv=None):\n sys.exitfunc = lambda: sys.stderr.write('Shutting down....\\n')\n # always insert coverage when running tests\n if argv is None:\n ...
python
edit
1
4
apache-2.0
5557fbff1e6843261a902f260ef9415e1e795879
prinsherbert/elasticsearch-py,veatch/elasticsearch-py,gardsted/elasticsearch-py,AlexMaskovyak/elasticsearch-py,Garrett-R/elasticsearch-py,elastic/elasticsearch-py,konradkonrad/elasticsearch-py,chrisseto/elasticsearch-py,liuyi1112/elasticsearch-py,kelp404/elasticsearch-py,brunobell/elasticsearch-py,tailhook/elasticsearc...
test_elasticsearch/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nfrom pprint import pprint\n\nimport ystockquote\n\n\nfor quote in sys.argv[1:]:\n print 'Finding quote for %s' % quote\n\n # First thing we want is some basic information on the quote.\n details = y...
python
edit
3
0
mit
8fbc125eb242716873d5c8cb0420206077f6acc5
johndavidback/stock-picker
stocks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\nimport datetime\n\nfrom trovebox import Trovebox\n\ndef main():\n try:\n client = Trovebox()\n client.configure(api_version=2)\n\n except IOError, e:\n print\n print '!! Could not init...
python
edit
7
6
mit
5a252090eb8fe75a5faf058151009bccd3645e70
nip3o/trovebox-uploader
upload.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Increase version for 0.3.1 release" }, { "role": "assistant", "content": "__version__ = '0.3.1'\n\nfrom dicomweb_client.api import DICOMWebClient\n" } ]
python
new_file
3
0
mit
093f8971b09dec696da94ccf5f14f191cbf3d672
MGHComputationalPathology/dicomweb-client
src/dicomweb_client/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n'''\nGiven:\n1. status code: (0 - OK, other value - BAD)\n2. terminal window width\n\nshows red/green bar to visualize return code of previous command\n'''\n\nimport sys\n\ndef main():\n if len(sys.argv) >= 2:\n...
python
edit
1
5
mit
5086a41e9aae7da16e4b189285613c2dade2b95a
kwadrat/rgb_tdd
common_rg_bar.py
rejected_duplicate
Near-duplicate of sample 951
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nfrom datetime import timedelta\nfrom subprocess import Popen\nfrom time import time, sleep\n\n\ndef red(text):\n RED = '\\033[91m'\n END = '\\033[0m'\n return RED + text + END\n\n\nclass H...
python
edit
1
2
apache-2.0
390fc84183c0f680c5fb1a980ee3c1227b187611
mattjegan/HowLong
HowLong/HowLong.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .batch import Batch\nfrom .example import Example\nfrom .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField\nfrom .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool)\nfrom .pipeline ...
python
edit
1
0
bsd-3-clause
b4aee8dc8e582940fa5a983ea0a90ab9b4e4f9e6
pytorch/text,pytorch/text,pytorch/text,pytorch/text
torchtext/legacy/data/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function, unicode_literals, division\n\nimport sys\nimport time\nimport argparse\n\nfrom websocket import create_connection\n\n\ndef translate(batch, port=8080):\n ws = create_connect...
python
edit
3
1
mit
89b23ce8abd259ace055c35b0da47428bdcbc37a
marian-nmt/marian-train,emjotde/amunn,amunmt/marian,emjotde/amunmt,emjotde/amunmt,emjotde/amunmt,marian-nmt/marian-train,marian-nmt/marian-train,marian-nmt/marian-train,amunmt/marian,amunmt/marian,emjotde/amunn,emjotde/amunn,marian-nmt/marian-train,emjotde/amunmt,emjotde/amunn,emjotde/Marian,emjotde/Marian
scripts/server/client_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n#\n# offsets in struct _IO_FILE\n#\n_IO_FILE = {\n 'X86': {\n 'fd': 0x38,\n },\n 'X64': {\n 'fd': 0x70,\n },\n}\n```\n\nApply this change: Rename X64 to AMD64 in libc SimProcedures to be consistent with architect...
python
edit
1
0
bsd-2-clause
2804ac090444e20f1a4899234a49cae8c3142003
tyb0807/angr,angr/angr,axt/angr,f-prettyland/angr,f-prettyland/angr,tyb0807/angr,iamahuman/angr,axt/angr,chubbymaggie/simuvex,axt/angr,iamahuman/angr,chubbymaggie/angr,chubbymaggie/angr,angr/angr,f-prettyland/angr,schieb/angr,angr/angr,schieb/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/simuvex,iamahuman/angr,schie...
simuvex/procedures/libc___so___6/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin, webbrowser\n\n\nQD_URL = \"http://app.quantifieddev.org\"\n\nclass GoToQuantifiedDevDashboardCommand(sublime_plugin.TextCommand):\n def run(self,edit):\n SETTINGS = {}\n SETTINGS_FILE = \"Quan...
python
edit
1
1
apache-2.0
f8e89b105a69e624ef853d102310284f5441bae5
1self/sublime-text-plugin,1self/sublime-text-plugin,1self/sublime-text-plugin
QuantifiedDevOpenDashboardCommand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib2\nimport re\nfrom Malcom.model.datatypes import Hostname, Evil\nfrom feed import Feed\nimport Malcom.auxiliary.toolbox as toolbox\n\nclass MalwareDomains(Feed):\n\tdef __init__(self, name):\n\t\tsuper(MalwareDomains, self).__i...
python
edit
4
4
apache-2.0
929909513e71282de388cf4e93476ba614e6c0c5
yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti
Malcom/feeds/malwaredomains.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom anycluster import views\nfrom django.conf import settings\n\nurlpatterns = patterns('',\n url(r'^grid/(\\d+)/(\\d+)/$', views.getGrid, name='getGrid'),\n url(r'^kmeans/(\\d+)/(\\d+)/$',...
python
edit
3
0
mit
9a49ce93428d6e7bdfeebbed906a1868dd844169
biodiv/anycluster,biodiv/anycluster,biodiv/anycluster,biodiv/anycluster,biodiv/anycluster
anycluster/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setup.create_teams import migrate_teams\nfrom setup.create_divisions import create_divisions\nfrom setup.create_players import migrate_players\nfrom setup.create_player_seasons import c...
python
edit
1
0
mit
6590f92c1423ab37570857e2c6cc726e1a7fede7
leaffan/pynhldb
_setup_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tailor.swift.swiftlistener import SwiftListener\nfrom tailor.utils.charformat import isUpperCamelCase\n\n\nclass MainListener(SwiftListener):\n\n def enterClassName(self, ctx):\n self.__verify_upper_camel_case(ctx, 'Class nam...
python
edit
1
2
mit
aa8611e43d31e07b9105cca13e4cb9c80479679b
sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor
tailor/listeners/mainlistener.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"One-line documentation for backend_helper module.\n\nA detailed description of backend_helper.\n\"\"\"\n\nfrom taskflow.jobs import backends as job_backends\nfrom taskflow.persistence import backends as persistence_backends\n\n# Defau...
python
edit
1
1
apache-2.0
c9449516bc3bfd15873347d1233001c51939a5e6
ethanbao/artman,ethanbao/artman,googleapis/artman,googleapis/artman,shinfan/artman,googleapis/artman
pipeline/utils/backend_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cProfile import label\nimport marshal\n\nfrom _line_profiler import LineProfiler as CLineProfiler\n\n\nclass LineProfiler(CLineProfiler):\n \"\"\" A subclass of the C version solely to provide a decorator since Cython\n does not ...
python
edit
2
2
bsd-3-clause
fe0867e5499b627e776d132d300d17b40858dcab
amegianeg/line_profiler,jstasiak/line_profiler,dreampuf/lprofiler,dreampuf/lprofiler,eblur/line_profiler,jstasiak/line_profiler,ymero/line_profiler,eblur/line_profiler,certik/line_profiler,certik/line_profiler,amegianeg/line_profiler,Doctorhoenikker/line_profiler,jsalva/line_profiler,Doctorhoenikker/line_profiler,ymero...
line_profiler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.contrib import admin\nfrom django.db import models\nfrom django.db.models.signals import post_save\n\nfrom activity.models import broadcast\n\n\nclass Entry(models.Model):\n title = models.CharField(max_len...
python
edit
1
2
bsd-3-clause
7106dd7d9fb9a4df94ac6694cf52f16a5b6677e7
mozilla/mozilla-ignite,mozilla/betafarm,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/mozilla-ignite
apps/feeds/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# import nacl.exceptions\n# import nacl.signing\nfrom flask import Blueprint, current_app, render_template\n\"\"\"The OCSPdash homepage UI blueprint.\"\"\"\n\n# from nacl.encoding import URLSafeBase64Encoder\n# fr...
python
edit
1
1
mit
117e8c717e4555aa9ee015336c36af186c1b0a85
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
src/ocspdash/web/blueprints/ui.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\n\ndef hash_str(a_str, table_size):\n\t\"\"\"Hash a string by the folding method.\n \n - Get ordinal number for each char.\n - Sum all of the ordinal numbers.\n - Return the remainder of the ...
python
edit
1
2
bsd-2-clause
4375e1d72832f9672eaba87019be9b769eb69e78
bowen0701/algorithms_data_structures
alg_hash_string.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport logging\n\nfrom django.conf import settings\nfrom django.shortcuts import render, redirect, render_to_response\nfrom django.template import RequestContext\n\nlogger = logging.getLogger(__name__)\n\n\ndef allocations(request):\n ...
python
edit
4
2
apache-2.0
5c0937993fdf34c96ccde3226c8e2a81efb381ce
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/views/allocations.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.httpexceptions import HTTPUnauthorized, HTTPNotFound\nfrom pyramid.security import forget\nfrom pyramid.response import Response\nfrom pyramid.view import view_config, forbidden_view_config\n\n\n@forbidden_view_config()\ndef ba...
python
edit
1
2
mit
a86ca24eba556580a68695f4e0c2a55c8f5f3df1
ant30/s3authbasic
s3authbasic/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport platform\nimport sys\n\nNODE_VERSION = 'v0.11.13'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'ea1a7e85a3de1878e5656110c76f4d2d8af41c6e'\n\nARCH...
python
edit
1
0
mit
d874ba80db5bedb67b0b50cea431321c77b10f5d
icattlecoder/electron,ervinb/electron,pandoraui/electron,jlord/electron,Rokt33r/electron,fireball-x/atom-shell,michaelchiche/electron,gamedevsam/electron,tonyganch/electron,noikiy/electron,nicobot/electron,leftstick/electron,bobwol/electron,maxogden/atom-shell,bobwol/electron,GoooIce/electron,soulteary/electron,jcblw/e...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 6588
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nOperations with Rsync.\n'''\n\nimport salt.utils\n\n\ndef __virtual__():\n '''\n Only if Rsync is available.\n\n :return:\n '''\n return salt.utils.which('rsync') and 'rsync' or False\n\n\ndef sy...
python
edit
4
3
apache-2.0
4ea0cb50353b3d7cb7ee3dd4d16397db95d75223
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/rsync.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for plugin.py.\"\"\"\nimport pytest\n\nfrom ckan.tests import factories\nimport ckan.tests.helpers as helpers\nfrom ckan.plugins.toolkit import NotAuthorized\n\n@pytest.mark.ckan_config('ckan.plugins', 'apicatalog_routes')\n@pyt...
python
edit
1
1
mit
01eece3984534dcd124df5d753f461f276fd6b53
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/tests/test_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nNODE_VERSION = 'v0.11.10'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = '9c654df782c77449e7d8fa741843143145260aeb'\n\n```\n\nApply this change: Update li...
python
edit
1
0
mit
1c057c8ea1e75909e90992784cff177ea1cb294b
leolujuyi/electron,Zagorakiss/electron,noikiy/electron,the-ress/electron,Neron-X5/electron,JussMee15/electron,Jacobichou/electron,iftekeriba/electron,webmechanicx/electron,michaelchiche/electron,bobwol/electron,mjaniszew/electron,aliib/electron,trankmichael/electron,saronwei/electron,xiruibing/electron,jjz/electron,lee...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 1583
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom django.db import models\n\n\nclass User(models.Model):\n MALE = -1\n UNDEFINED = 0\n FEMALE = 1\n GENDER_CHOICES = (\n (MALE, 'Male'),\n (UNDEF...
python
edit
1
0
mit
e3079cdf31f6fb13ca9d91de313301c8a76d3cd8
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
backend/unichat/models/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport http.client\n\nclass TestStringMethods(unittest.TestCase):\n\n def test_404NoConfig(self):\n connRouter = http.client.HTTPConnection(\"localhost\", 8666)\n connConfig = http.client.HTTPConnection(\"l...
python
edit
2
1
apache-2.0
4953021eedbd73dc3d66455c5dff352a852d6474
dhiaayachi/dynx,dhiaayachi/dynx
test/test_integration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCoda Replication Model factories for test fixtures.\n\"\"\"\nfrom datetime import datetime\n\nimport factory\nfrom factory import fuzzy\n\nfrom . import models\n\n\nclass QueueEntryFactory(factory.django.DjangoModelFactory):\n\n ...
python
edit
7
0
bsd-3-clause
da86340568ff03c6e612aa68a5cd9f275cbf3375
unt-libraries/coda,unt-libraries/coda,unt-libraries/coda,unt-libraries/coda
coda/coda_replication/factories.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\"\"\"\nExample usage:\n snbuild data/models.yaml data/scraped.yaml \\\n > standard_names/data/standard_names.yaml\n\"\"\"\n\nimport os\nfrom . import (from_model_file, FORMATTERS, Collection)\n\n\ndef ...
python
edit
4
2
mit
20fce7b482fd11a65494014e14aabecbe4e87683
csdms/standard_names,csdms/standard_names
src/cmt/standard_names/snbuild.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# making a bet that factory_boy will pan out as we get more data\nimport factory\n\nfrom supplements.models import Ingredient, Measurement, IngredientComposition, Supplement\n\nDEFAULT_INGREDIENT_NAME = 'Leucine'\nDEFAULT_INGREDIENT_HL_MINU...
python
edit
1
4
mit
72ec6a22f94ca1744d2241202f33c0bc777521ca
jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself
supplements/fixtures/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport shutil\nfrom string import Template\n\n\nPIKE_DIR = os.path.dirname(__file__)\nSAMPLES_DIR = os.path.join(PIKE_DIR, 'samples')\n\ndef sample_path(sample):\n path = os.path.join(SAMPLES_DIR, sample)\n return os.p...
python
edit
1
1
mit
ab14f4c86fca6daab9d67cc9b4c3581d76d5635a
hugollm/foster,hugollm/foster
foster/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# gflags raises DuplicateFlagError when defining default flags from packages\n# with different names, so this pseudo-package must mimic the core gflags\n# package name.\n__name__ += \".gflags\" # i.e. \"third_party.py.gflags.gflags\"\n\nfr...
python
edit
2
0
apache-2.0
4d0e6265911199b1376d0f52e249625180a0500d
meteorcloudy/bazel,perezd/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,akira-baruah/bazel,davidzchen/bazel,akira-baruah/bazel,ulfjack/bazel,twitter-forks/bazel,safarmer/bazel,aehlig/bazel,dslomov/bazel-windows,katre/bazel,bazelbuild/bazel,twitter-forks/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,ButterflyNetwork/b...
third_party/py/gflags/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport docker\nfrom djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase\n\n\nlog = logging.getLogger()\n\n\nclass DockerExecutor(DjangoCmdBase):\n\n def add_arguments(self, parser):\n # Positi...
python
edit
1
1
bsd-3-clause
e3505746e0f09c103fd875a24ded85290272cfb9
weijia/django-local-apps,weijia/django-local-apps
django_local_apps/management/commands/docker_exec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Backward compatible behaviour with primary key 'Id'.\"\"\"\nfrom __future__ import absolute_import\nfrom django.conf import settings\nfrom django.test import TestCase\nfrom salesforce.backend import sf_alias\nfrom tests.test_compatibi...
python
edit
3
3
mit
3e1f1e515b4392d98fe221ce4c14daefc531a1fe
philchristensen/django-salesforce,hynekcer/django-salesforce,django-salesforce/django-salesforce,chromakey/django-salesforce,philchristensen/django-salesforce,django-salesforce/django-salesforce,hynekcer/django-salesforce,chromakey/django-salesforce,django-salesforce/django-salesforce,hynekcer/django-salesforce,chromak...
tests/test_compatibility/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nclass Table:\n\n class InputStrContainsCarriageReturn ...
python
edit
1
3
bsd-3-clause
abdfef81c3146b720c561eaedf8592cd640262a0
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/table.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Django settings for c10kdemo project.\n\nimport os\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n },\n}\n\nDEBUG = True\n\nINSTALLED_APPS = (\n 'c10ktools',\n 'g...
python
edit
1
0
bsd-3-clause
2a80bcdc9fd7ad85888ac9edf53ece8d784db632
aaugustin/django-c10k-demo,gogobook/django-c10k-demo,phamvanhung2e123/django-c10k-demo,phamvanhung2e123/django-c10k-demo,gogobook/django-c10k-demo,aaugustin/django-c10k-demo,aaugustin/django-c10k-demo,gogobook/django-c10k-demo,phamvanhung2e123/django-c10k-demo
c10kdemo/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport pkg_resources\n\npkg_resources.declare_namespace(__name__)\n\nVERSION = (0, 2, 0)\n\n__version__ = \".\".join(map(str, VERSION))\n__status__ = \"Development\"\n__description__ = u\"Open...
python
edit
1
0
mit
cf5b3e76f89e2430fa482a1fb4a163e6b367928f
williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps
opps/__init__.py
rejected_duplicate
Near-duplicate of sample 2619
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# django\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\n# standard library\n\n\ndef paginate(request, objects, page_size=25):\n paginator = Paginator(objects, page_size)\n page = request.GET.get('p')\n\n ...
python
edit
1
6
mit
26ffa0cdd1389e2a364531cd20e9f37ee1565cce
magnet-cl/django-project-template-py3,Angoreher/xcero,Angoreher/xcero,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,Angoreher/xcero,Angoreher/xcero
base/view_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom enum import Enum\n\n\nclass Status(Enum):\n unknown = 0\n queued = 1\n in_progress = 2\n finished = 3\n collecting_results = 4\n\n def __str__(self):\n return STATUS_LABELS[self]\n\n\nclass Result(Enum):\n u...
python
edit
1
1
apache-2.0
b973c6abe4d325b08278822f85f72ebc1761a825
bowlofstew/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes
changes/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2\n\nimport optparse\nimport subprocess\nimport sys\nfrom gporca import GporcaCommon\n\ndef make():\n return subprocess.call([\"make\",\n \"-j\" + str(num_cpus())], cwd=\"gpdb_src\")\n\ndef ins...
python
edit
1
7
apache-2.0
c83e2383ea38dc8a0b5ce8e24bdfc2e9c2ba62bd
ashwinstar/gpdb,kaknikhil/gpdb,xuegang/gpdb,kaknikhil/gpdb,xinzweb/gpdb,lisakowen/gpdb,ahachete/gpdb,randomtask1155/gpdb,janebeckman/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,Chibin/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,janebeckman/gpdb,rvs/gpdb,royc1/gpdb,chrishajas/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,50wu/gpdb,zaksoup/gpdb,g...
concourse/scripts/build_with_orca.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.conf import settings\n\nVERSION = (0, 1, 2)\n\n__version__ = \".\".join(map(str, VERSION))\n__status__ = \"Development\"\n__description__ = u\"Opps CMS websites magazines and high-...
python
edit
1
0
mit
d3bcd6426bc323a876ffab6ac46fe117f9e5ab13
YACOWS/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,opps/opps
opps/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\n\nfrom ds_min_priority_queue_tuple import MinPriorityQueue\n\n\ndef prim():\n\t\"\"\"Prim's algorithm for ...
python
edit
2
4
bsd-2-clause
b16e9e2f3a349b53505a3f60409b65e139c62356
bowen0701/algorithms_data_structures
alg_prim_minimum_spanning_tree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the Lice...
python
edit
1
1
apache-2.0
0207b0ea61050d8728e084277b14015bd92a8beb
pplu/botocore,boto/botocore
tests/integration/test_kinesis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"A Flask app to visualize the infection algorithm.\"\"\"\n\nfrom flask import Flask, request, abort, jsonify\nfrom werkzeug.exceptions import BadRequest\nfrom infection import User, total_infection, limited_inf...
python
edit
4
7
mit
fba94685ed3934196c4c36557578849aa2c7aeb0
nickfrostatx/infection,nickfrostatx/infection
app.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom ConfigParser import ConfigParser\nimport logging\nimport getpass\n\nfrom bot.bot import Bot\n\nlogging.basicConfig(level=logging.DEBUG,\n format=u'%(asctime)s - %(name)s - %(levelname)s - %(mes...
python
edit
2
0
mit
ffe584928616607be9685e1df4437a9715ce68be
LipuFei/team-hipchat-bot,LipuFei/team-hipchat-bot
bot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add multiple settings for bluesky\n\n- Define a data validator to run at the end of a scan.\n- Set up default detectors and plot and table settles for SPEC API." }, { "role": "assistant", "content": "# Configure bluesky default d...
python
new_file
12
4
bsd-2-clause
5c9b98319b3537ef6287bc28353cd72748f9e1a8
NSLS-II-XPD/ipython_ophyd,pavoljuhas/ipython_ophyd,NSLS-II-XPD/ipython_ophyd,pavoljuhas/ipython_ophyd
profile_collection/startup/99-bluesky.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .protocoltreenode import ProtocolTreeNode\nimport unittest, time\nclass ProtocolEntity(object):\n __ID_GEN = -1\n\n def __init__(self, tag):\n self.tag = tag\n\n def getTag(self):\n return self.tag\n\n def isT...
python
edit
1
2
mit
55d0fa9b834e6400d48293c80e557c27f5cc4181
biji/yowsup,ongair/yowsup
yowsup/structs/protocolentity.py
accepted
null
true