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#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# (C) 2015 Jean Nassar\n# Released under BSD version 4\n\"\"\"\nReduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.\n\n\"\"\"\nimport rospy\nfrom sensor_msgs.msg import Image\n\n\nclass I...
python
edit
1
2
mit
db51cb32148a595f74eb4ed8cbcc5dc989db5786
masasin/spirit,masasin/spirit
src/reduce_framerate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Validate a GTFS file.\"\"\"\nimport argparse\nimport json\n\nimport feed\nimport validation\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser(description='GTFS Info and JSON export')\n parser.add_argument('filename'...
python
edit
3
0
mit
abf141415fb0c1fbb62c92db3afdc430218e2520
transitland/mapzen-gtfs,brechtvdv/mapzen-gtfs,brennan-v-/mapzen-gtfs
mzgtfs/validate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport teuthology.ls\n\n\ndef main():\n teuthology.ls.main(parse_args())\n\n\ndef parse_args():\n parser = argparse.ArgumentParser(description='List teuthology job results')\n parser.add_argument(\n '--archi...
python
edit
1
1
mit
5d192ed46c0ca76d2dd3aa25f7fac5ad7b61ad3e
t-miyamae/teuthology,dreamhost/teuthology,ktdreyer/teuthology,SUSE/teuthology,tchaikov/teuthology,ivotron/teuthology,ktdreyer/teuthology,t-miyamae/teuthology,SUSE/teuthology,dmick/teuthology,yghannam/teuthology,SUSE/teuthology,robbat2/teuthology,yghannam/teuthology,michaelsevilla/teuthology,dmick/teuthology,ceph/teutho...
scripts/ls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (C) Datadog, Inc. 2018\n# All rights reserved\n# Licensed under a 3-clause BSD style license (see LICENSE)\nfrom .__about__ import __version__\nfrom .disk import Disk\n\nall = [\n '__version__', 'Disk'\n]\n\n```\n\nApply this change: [Di...
python
edit
1
0
bsd-3-clause
be0a078aa004470a450dddfa5a8e770b2e0ad97c
DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core
disk/datadog_checks/disk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport tornado.httpserver\nimport tornado.ioloop\nimport tornado.options\nimport tornado.web\nimport tornado.escape\nimport tornado.template\n\nfrom tornado.options import define, options\n\ndefine(\"port\", default...
python
edit
1
1
bsd-3-clause
6db806c28f5e6e207e4f3a690f57f09ee1e3e7dd
fxtentacle/tilemill,nyimbi/tilemill,MappingKat/tilemill,paulovieira/tilemill-clima,tizzybec/tilemill,MappingKat/tilemill,fxtentacle/tilemill,Teino1978-Corp/Teino1978-Corp-tilemill,tizzybec/tilemill,makinacorpus/tilemill,paulovieira/tilemill-clima,paulovieira/tilemill-clima,Zhao-Qi/tilemill,Zhao-Qi/tilemill,tizzybec/til...
tilemill/tilemill.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\n\np1, p2 = sys.version_info[:2]\n\ncurpath = os.path.abspath( sys.argv[0] )\nif os.path.islink(curpath):\n curpath = os.readlink(curpath)\ncurrentdir = os.path.dirname( curpath )\n\nbuild_dir = os.path.abspath( os....
python
edit
1
0
mit
24c83c6a7a1981184545a72b3691a29121d81050
sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs,sergey-dryabzhinsky/dedupsqlfs
lib-dynload/lz4/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass uploadfile():\n\n def __init__(self, name, type=None, size=None, not_allowed_msg=''):\n self.name = name\n self.type = type\n self.size = size\n self.not_allowed_msg = not_allowed_msg\n self.url =...
python
edit
1
3
mit
42062493738a166ddc029d111024b17ffa5cda5f
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
dataviva/apps/scholar/upload_file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom qiprofile_rest_client.helpers import database\nfrom qiprofile_rest_client.model.subject import Subject\nfrom . import (clinical, imaging)\n\n\ndef sync_session(project, collection, subject, session, filename):\n \"\"\"\n Updates ...
python
edit
3
1
bsd-2-clause
d6dcd5ede1004b4f3dfbaba09e46a6728e8287a7
ohsu-qin/qipipe
qipipe/qiprofile/sync.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Cisco, 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# http:...
python
edit
1
1
apache-2.0
2a980eee73fb79b191126c9ec1c41963dcaf1d9c
noironetworks/aci-integration-module,noironetworks/aci-integration-module
aim/db/migration/alembic_migrations/versions/f0c056954eee_sg_rule_remote_group_id.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# test builtin range type\n\n# print\nprint(range(4))\n\n# bool\nprint(bool(range(0)))\nprint(bool(range(10)))\n\n# len\nprint(len(range(0)))\nprint(len(range(4)))\nprint(len(range(1, 4)))\nprint(len(range(1, 4, 2)))\nprint(len(range(1, 4, ...
python
edit
1
0
mit
2a8a564fbd48fba25c4876ff3d4317152a1d647c
torwag/micropython,TDAbboud/micropython,dinau/micropython,dmazzella/micropython,pramasoul/micropython,adafruit/micropython,danicampora/micropython,misterdanb/micropython,trezor/micropython,misterdanb/micropython,redbear/micropython,noahwilliamsson/micropython,adafruit/circuitpython,alex-robbins/micropython,torwag/micro...
tests/basics/builtin_range.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\n\n\ndef load_data_frame(data_frame_path, sort_reindex=False, class_labels=True):\n \"\"\"\n Load a sentence data set as pandas DataFrame from a given path.\n\n :param data_frame_path: the path to load the panda...
python
edit
1
4
mit
d159f8201b9d9aeafd24f07a9e39855fc537182d
JungeAlexander/cocoscore
cocoscore/tools/data_tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.words.protocols import irc\nfrom txircd.modbase import Command\n\nclass UserCommand(Command):\n\tdef onUse(self, user, params):\n\t\tif user.registered == 0:\n\t\t\tself.sendMessage(irc.ERR_ALREADYREGISTRED, \":Unauthorized com...
python
edit
4
5
bsd-3-clause
c4c71dd65675f904c34a0d86a80d5abe7bafdbb1
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
txircd/modules/cmd_user.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSHELL_PLUS = \"ipython\"\n\nSOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']\nSOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'\nSOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'\nSOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'\nSOCIAL_AUTH_NEW_USER_REDIRECT_UR...
python
edit
1
0
mit
fa0e95f5447947f3d2c01d7c5760ad9db53bb73d
prattl/wepickheroes,prattl/wepickheroes,prattl/wepickheroes,prattl/wepickheroes
api/wph/settings/third_party.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom moa.base import MoaBase\n\n\nclass Device(MoaBase):\n ''' By default, the device does not support multi-threading.\n '''\n\n _activated_set = None\n\n def __init__(self, **kwargs):\n super(Device, self).__init__(**...
python
edit
1
4
mit
0fdda1366b3657614ee76707e617af255634d50b
matham/moa
moa/device/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport unittest\nimport ghstats\n\n\nclass TestStats(unittest.TestCase):\n\n def test_cli(self):\n \"\"\"\n Test command line arguments.\n \"\"\"\n count = ghstats.main_cli([\"kefir5...
python
edit
1
1
mit
58976f0e63376d056c482b3cd0e103c0a0cccb9e
kefir500/ghstats
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 ZTE Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://ww...
python
edit
1
0
apache-2.0
cf7b2bb0569431e97cc316dc41924c78806af5a9
open-o/nfvo,open-o/nfvo,open-o/nfvo,open-o/nfvo,open-o/nfvo
drivers/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copy this file to development_environment.py\n# and replace OAuth credentials your dev credentials\nTOKENS = {\n '_foo_bucket': '_foo_bucket-bearer-token',\n 'bucket': 'bucket-bearer-token',\n 'foo': 'foo-bearer-token',\n 'foo...
python
edit
1
0
mit
5b66ef91a1f73563cf869ca455052b037ab9551f
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
backdrop/write/config/development_environment_sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2010 Eric Entzel <<EMAIL>>\n#\n\nfrom google.appengine.api import mail\nfrom google.appengine.ext.webapp import template\nimport os\n\n\nfrom_address = '\"EventBot\" <<EMAIL>>'\n\n\ndef send(to, templat...
python
edit
1
2
mit
41a83c6742f0e688dad5a98761c0f0415c77bac9
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
outgoing_mail.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kitten.server import KittenServer\n\nfrom gevent.pool import Group\n\nfrom mock import MagicMock\n\n\nclass TestPropagation(object):\n def setup_method(self, method):\n self.servers = Group()\n\n for port in range(4):\...
python
edit
1
2
mit
14546b0ba1dd7f5a9ea623fde85737fa95bd2843
thiderman/network-kitten
test/integration/test_node_propagation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport clr\n\nfrom System import *\nfrom System.Net import WebClient\nfrom System.Xml import XmlDocument\nfrom System.Diagnostics import Trace\n\nurl = \"http://pachube.com/api/\"\napiKey = \"40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff88...
python
edit
8
1
mit
fbdc69e218a71e984982a39fc36de19b7cf56f90
markallanson/sspe,markallanson/sspe
Publishers/SamplePachube.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom flask import Flask, render_template\nfrom flask_flatpages import FlatPages\nfrom flask_frozen import Freezer\n\nDEBUG = True\nFLATPAGES_AUTO_RELOAD = DEBUG\nFLATPAGES_EXTENSION = '.md'\nFREEZER_DESTINATION = 'dist'\n\napp...
python
edit
3
3
mit
ecb6f388ba3c0f17fcfd22a8cafcda974e7e0fc8
claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io
site.py
rejected_duplicate
Near-duplicate of sample 995
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n # # #### ##### # # ##### # # # #\n # # # # # ## ## # # # ## # #\n ### #### #### # # # # # # # # #####\n # # # # # # # # ## # # #\n...
python
edit
1
1
bsd-2-clause
d6ce218b0da869f6b4319751c1fe59ef02fba6b6
glasnost/kremlin,glasnost/kremlin,glasnost/kremlin
kremlin/imgutils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport sys\n_upper_dir = os.path.abspath(\n os.path.join(os.path.dirname(__file__), '..'))\nif _upper_dir not in sys.path:\n sys.path.append(_upper_dir)\n\nimport chdb\n\ndef sanity_check():\n s...
python
edit
1
1
mit
58c056894f0a2f5940a8ec9eb5fd30a57aade4aa
eggpi/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt
scripts/install_new_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView\n\n\nurlpatterns = [\n url(r'^sms/(?P<api_key>[\\w-]+)/?$', TrumpiaIncomingView.as_view(),\n name=TrumpiaIncomingView.url...
python
edit
1
0
bsd-3-clause
c52edc120f38acb079fa364cdb684fc2052d4727
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/messaging/smsbackends/trumpia/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_collection.management.commands import BaseXpressWebLookupCsvImporter\n\nclass Command(BaseXpressWebLookupCsvImporter):\n council_id = 'E07000079'\n addresses_name = 'CotswoldPropertyPostCodePollingStationWebLookup-2017-03-27...
python
edit
1
0
bsd-3-clause
1c939a99e377ff1dfe037c47dd99f635d3cb0a1f
chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_cotswold.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#\n#\n# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n# See https://llvm.org/LICENSE.txt for license infor...
python
edit
1
4
apache-2.0
80e98c2291689aca97427abb3b85c89dce1f0af5
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
lib/fuzzer/scripts/merge_data_flow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom concurrent.futures import ThreadPoolExecutor\nimport logging\n\nimport six\n\nlog = logging.getLogger(__name__)\n\n\nclass PoolMetaclass(type):\n\n __instances__ = dict()\n __blacklist__ = ...
python
edit
1
4
apache-2.0
3cd99c23099a625da711e3ac458a46a7b364d83c
wiliamsouza/hystrix-py,wiliamsouza/hystrix-py
hystrix/pool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEFAULT_CONFIG = {\n \"protocol\": \"json\",\n \"timeout\": 2,\n \"strict\": True\n}\n\n\ndef scrub_output(context, whitelist, strict=True):\n r = context.get(\"response\", None)\n if r is None:\n context[\"response\"]...
python
edit
1
4
mit
ee43ade86df9eb30455e6026671776b1e5be01e5
numberoverzero/pyservice
pyservice/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"fontTools.misc.timeTools.py -- miscellaneous routines.\"\"\"\n\n\nfrom __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nimport time\nimport calendar\n\n\n# OpenType timestamp handling\n\n...
python
edit
2
2
mit
ee425b43502054895986c447e4cdae2c7e6c9278
googlefonts/fonttools,fonttools/fonttools
Lib/fontTools/misc/timeTools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015, Matt Layman\n\nimport os\nimport tempfile\n\nfrom handroll.site import Site\nfrom handroll.tests import TestCase\n\n\nclass TestSite(TestCase):\n\n def test_finds_valid_site_root_from_templates(self):\n origi...
python
edit
1
1
bsd-2-clause
97e3b202bbe6726a4056facb8b4690b0710029a9
handroll/handroll
handroll/tests/test_site.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version__ = '2.1.0'\nprogram_name = 'bio_hansel'\nprogram_summary = 'Subtype microbial genomes using SNV targeting k-mer subtyping schemes.'\nprogram_desc = program_summary + '''\nIncludes schemes for Salmonella...
python
edit
1
0
apache-2.0
0353b9876967c0eb2fc742e8cbbd7a085a764312
phac-nml/bio_hansel
bio_hansel/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.db import migrations\nfrom django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor\nfrom django.db.migrations.state import StateApps\n\n\ndef rename_zu...
python
edit
1
5
apache-2.0
3a9568b4d4de969b1e2031e8d2d3cdd7bd56824f
brainwane/zulip,andersk/zulip,hackerkid/zulip,synicalsyntax/zulip,andersk/zulip,hackerkid/zulip,punchagan/zulip,shubhamdhama/zulip,showell/zulip,zulip/zulip,synicalsyntax/zulip,kou/zulip,rht/zulip,showell/zulip,brainwane/zulip,punchagan/zulip,shubhamdhama/zulip,hackerkid/zulip,andersk/zulip,kou/zulip,brainwane/zulip,br...
zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from .client import *\n from .qt_widget import *\nexcept ImportError:\n import warnings\n warnings.warn(\"Could not import ginga plugin, since ginga is required\")\n\n# Register qt client\nfrom ...config import qt_client\...
python
edit
4
0
bsd-3-clause
d919c1e29645a52e795e85686de6de8f1e57196e
JudoWill/glue,stscieisenhamer/glue,saimn/glue,JudoWill/glue,saimn/glue,stscieisenhamer/glue
glue/plugins/ginga_viewer/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Configuration for the will database\n#\n\nimport dbconfig\n\nclass dbConfigBock7k ( dbconfig.dbConfig ):\n\n # cubedim is a dictionary so it can vary \n # size of the cube at resolution\n cubedim = { 0: [128, 128, 16] }\n\n #infor...
python
edit
1
0
apache-2.0
9c7ff0d98d324e3a52664f9dcd6fe64334778e00
neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome
web/dbconfig/dbconfigbock7k.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sympy import symbols, cos, sin, latex\nfrom mathdeck import rand, answer\n\nmetadata = {\n 'author': 'Bob Hope',\n 'institution': 'University of Missouri',\n 'subject': 'algebra',\n 'minor subject': 'polynomial equations',\n 'tags...
python
edit
1
0
apache-2.0
b532ffff18e95b6014921d88b6df075e8ac2c4ec
patrickspencer/mathdeck,patrickspencer/mathdeck
problib/example1/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport fire_rs.firemodel.propagation as propagation\n\n\nclass TestPropagation(unittest.TestCase):\n\n def test_propagate(self):\n env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind...
python
edit
3
1
bsd-2-clause
d82111c5415176ea07674723151f14445e4b52ab
fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop
fire_rs/firemodel/test_propagation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mock import patch\n\nfrom breach.tests.base import RuptureTestCase\nfrom breach.strategy import Strategy\n\n\nclass StrategyTestCase(RuptureTestCase):\n @patch('breach.strategy.Sniffer')\n def test_first_round(self, Sniffer):\n ...
python
edit
1
1
mit
1a871cf3bf1fd40342e490599361d57017cdcc65
dionyziz/rupture,dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dimriou/rupture,dimriou/rupture...
backend/breach/tests/test_strategy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport timer\nimport sys\nimport utils\n\n\ndef simulate():\n # A set of files already in the storage\n seen = set()\n\n # The size of the all uploads combined (deduplicated or not)\n total_in = 0\n\n ...
python
edit
1
4
apache-2.0
b4a92b80d2cfe316d89dbecdf1026486d5288fe0
sjakthol/dedup-simulator,sjakthol/dedup-simulator
simulator-perfect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\r\nfrom dateutil.parser import parse\r\nfrom ...common import run, chdir\r\n\r\n\r\ndef check_dates(spec_id, username, spec, basedir):\r\n \"\"\" Port of the CheckDates program from C++\r\n Finds the first submission dat...
python
edit
1
4
mit
eca659b789cc80c7d99bc38e551def972af11607
StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit
cs251tk/student/markdownify/check_submit_date.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport libvtd.trusted_system\n\n\ndef UpdateTrustedSystem(file_name):\n \"\"\"Make sure the TrustedSystem object is up to date.\"\"\"\n global my_system\n my_system = libvtd.trusted_system.TrustedSystem()\n my_system.AddFile(fil...
python
edit
1
2
apache-2.0
29a964a64230e26fca550e81a1ecba3dd782dfb1
chiphogg/vim-vtd
python/vtd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\nUnit tests for the base gate.\n\"\"\"\nfrom unittest.mock import MagicMock, mock_open, patch\nimport smdba.postgresqlgate\n\n\nclass TestPgGt:\n \"\"\"\n Test suite for base gate.\n \"\"\"\n @patch(\"os....
python
edit
1
2
mit
603aacd06b99326d7dbab28e750b34589c51fa05
SUSE/smdba,SUSE/smdba
tests/test_postgresqlgate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test `osf clone` command.\"\"\"\n\nimport os\n\nfrom mock import patch, mock_open, call\n\nfrom osfclient import OSF\nfrom osfclient.cli import clone\n\nfrom osfclient.tests.mocks import MockProject\nfrom osfclient.tests.mocks import ...
python
edit
1
4
bsd-3-clause
78136c619ebafb54e4bd65af3cfd85a8ff67766b
betatim/osf-cli,betatim/osf-cli
osfclient/tests/test_cloning.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os; # needed for opening/compiling file\nimport time; # needed for delay\ndef getPath(allowCancel = True):\n \"\"\"Ask the user for lilypond file path and return it as string.\n\nTakes one boolean argument as to whether message ...
python
edit
6
2
unlicense
9b5542836c85ba6c17be907ff3cb011b3e98b63a
RainCity471/lyCompiler
basic.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''Test that the window caption can be set.\n\nExpected behaviour:\n Two windows will be opened, one with the caption \"Window caption 1\"\n counting up every second; the other with a Unicode string including\...
python
edit
1
4
bsd-3-clause
f17baf70d08f47dc4ebb8e0142ce0a3566aa1e9a
regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations
tests/window/WINDOW_CAPTION.py
rejected_duplicate
Near-duplicate of sample 1892
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom plone.dexterity.interfaces import IDexterityContent\nfrom plone.dexterity.interfaces import IFormFieldProvider\nfrom plone.server.api.service import Service\nfrom plone.supermodel import model\nfrom zope impo...
python
edit
1
1
bsd-2-clause
08d838e87bd92dacbbbfe31b19c628b9d3b271a8
plone/plone.server,plone/plone.server
src/plone.example/plone/example/todo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom astropy.samp import conf\nfrom astropy.samp.hub import SAMPHubServer\nfrom astropy.samp.hub_proxy import SAMPHubProxy\n\n\ndef setup_module(module):\n conf.use_internet = False\n\n\nclass TestHubProxy:\n\n def setup_method(self, ...
python
edit
1
2
bsd-3-clause
ad42da9cb3c944f5bd5e953f947a0be96a4b8e17
pllim/astropy,mhvk/astropy,lpsinger/astropy,lpsinger/astropy,mhvk/astropy,larrybradley/astropy,pllim/astropy,lpsinger/astropy,lpsinger/astropy,lpsinger/astropy,astropy/astropy,pllim/astropy,astropy/astropy,larrybradley/astropy,pllim/astropy,astropy/astropy,mhvk/astropy,larrybradley/astropy,larrybradley/astropy,astropy/...
astropy/samp/tests/test_hub_proxy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n#\n# Copyright 2013 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 th...
python
edit
1
1
apache-2.0
ac44332d53736f1ac3e067eecf1064bcef038b3a
oulan/oppia,directorlive/oppia,google-code-export/oppia,oulan/oppia,michaelWagner/oppia,edallison/oppia,terrameijar/oppia,Dev4X/oppia,amitdeutsch/oppia,zgchizi/oppia-uc,virajprabhu/oppia,won0089/oppia,sunu/oppia,mit0110/oppia,sanyaade-teachings/oppia,kennho/oppia,BenHenning/oppia,CMDann/oppia,whygee/oppia,gale320/oppia...
core/platform/transactions/django_transaction_services.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Common imports for generated storage client library.\"\"\"\n# pylint:disable=wildcard-import\n\nimport pkgutil\n\nfrom apitools.base.py import *\nfrom storage_v1 import *\nfrom storage_v1_client import *\nfrom storage_v1_messages impo...
python
edit
5
0
apache-2.0
09d780474d00f3a8f4c2295154d74dae2023c1d3
cherba/apitools,craigcitro/apitools,b-daniels/apitools,betamos/apitools,kevinli7/apitools,houglum/apitools,pcostell/apitools,thobrla/apitools,google/apitools
samples/storage_sample/storage/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Script to automate logging into Perforce.\n\nUse P4API to log in to the server.\n\n\"\"\"\n\nimport P4\n\n\ndef main():\n \"\"\"Log in to the Perforce server.\"\"\"\n # Yep, pretty much that easy.\n p4...
python
edit
1
1
bsd-3-clause
28add39cbd964d9a26ff8f12c1ee3668b765c7a7
nlfiedler/devscripts,nlfiedler/devscripts
perforce/p4login.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport html\n\nfrom webob.exc import HTTPInternalServerError\n\n\nclass ConfigurationError(Exception):\n\n \"\"\"Exception used to indicate a configuration error.\"\"\"\n\n\nclass DebugHTTPInternalServerError(HTTPInterna...
python
edit
1
1
mit
b4d3bae4223671ddda05e864fcd34bd71e188f05
TangledWeb/tangled.web
tangled/web/exc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.tools.reading.readers.core import EmptyReader\n\nfrom indra.sources import trips\n\n\nclass TripsReader(EmptyReader):\n \"\"\"A stand-in for TRIPS reading.\n\n Currently, we do not run TRIPS (more specifically DRUM) regular...
python
edit
3
3
bsd-2-clause
979d84f965b0118f86a8df7aa0311f65f8e36170
sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,bgyori/indra
indra/tools/reading/readers/trips/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nimport pytest\nimport salt.client.ssh.shell as shell\n\n\n@pytest.fixture\ndef keys(tmp_path):\n pub_key = tmp_path / \"ssh\" / \"testkey.pub\"\n priv_key = tmp_path / \"ssh\" / \"testkey\"\n yield {...
python
edit
1
1
apache-2.0
0a13a9a8a779102dbcb2beead7d8aa9143f4c79b
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/unit/client/ssh/test_shell.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nfrom flask import Flask, render_template\n\n\ndef channels_json(station, escaped=False):\n channels = [{\"name\": channel} for channel in station.channels()]\n jsonbody = json.dumps(channels)\n if escaped:...
python
edit
3
2
mit
0e2e30382def1f911987ca22fce5adc6c6b73fb6
richo/airship,richo/airship,richo/airship
airship/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import AuthenticationBase\n\n\nclass Social(AuthenticationBase):\n\n def __init__(self, domain):\n self.domain = domain\n\n def login(self, client_id, access_token, connection):\n \"\"\"Login using a social pr...
python
edit
1
1
mit
e53e214b97a9a4c7ad2dbca88b01798dcc614b6a
auth0/auth0-python,auth0/auth0-python
auth0/v2/authentication/social.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport configparser\nimport time\nimport RPIO as GPIO\n\nfrom client import MumbleClient\n\nclass InterCom:\n\n def __init__(self):\n config = configparser.ConfigParser()\n config.read('intercom.ini')\n self.mumble_c...
python
edit
3
3
mit
1608134ea633c0fe8cd4636b11dc5a931d02e024
pkronstrom/intercom
intercom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\nimport webbrowser\n\ndef cleanPackage(pkgURI):\n\tpkg = pkgURI.split('.com/')[1]\n\treturn pkg\n\nclass GoDocGetCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\tview = self.view\n\t\t\...
python
edit
3
4
mit
511abf77f16a7a92dde93a9f1318967b1d237635
lowellmower/go_doc_get
go_doc_get.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom decimal import Decimal\nimport simplejson\n\nfrom django.core.serializers.json import DjangoJSONEncoder\n\n\ntry:\n simplejson.dumps([42], use_decimal=True)\nexcept TypeError:\n raise Exception('simplejson>=2.1 with support for u...
python
edit
3
3
bsd-3-clause
3f2b4236bdb5199d4830a893c7b511f7875dc501
allink/plata,armicron/plata,armicron/plata,armicron/plata,stefanklug/plata
plata/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport MySQLdb\nimport mwparserfromhell\n\nclass Plugin():\n\n def get_wikicode(self, title):\n # TODO Make this a conf\n db = MySQLdb.connect(host=\"localhost\", user=\"root\", passwd=\"\", db=\"BigData\")\n cursor ...
python
edit
1
1
mit
dae26a54aff5ada572b047869e83b098511bffbf
dMaggot/ArtistGraph
src/artgraph/plugins/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Tests for the garbage collection of Scene objects.\n\"\"\"\n# Authors: Deepak Surti, Ioannis Tziakos\n# Copyright (c) 2015, Enthought, Inc.\n# License: BSD Style.\n\nimport unittest\nimport weakref\nimport gc\n\nfrom traits.etsconfig...
python
edit
1
1
bsd-3-clause
c9980756dcee82cc570208e73ec1a2112aea0155
alexandreleroux/mayavi,dmsurti/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,liulion/mayavi,liulion/mayavi
tvtk/tests/test_scene.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import encoder\nfrom . import decoder\n\n\ndef decode(tile, y_coord_down=False):\n vector_tile = decoder.TileData()\n message = vector_tile.getMessage(tile, y_coord_down)\n return message\n\n\ndef encode(layers, quantize_bou...
python
edit
1
3
mit
b3391187cb87ae33d4b8dd6e55f5edfdb695ea53
mapzen/mapbox-vector-tile
mapbox_vector_tile/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto3\n\nfrom os import path\nfrom lambda_uploader import uploader, config\nfrom moto import mock_s3\n\nEX_CONFIG = path.normpath(path.join(path.dirname(__file__),\n '../test/configs'))\n\n\n@mock_s3\ndef tes...
python
edit
1
1
apache-2.0
92c024c2112573e4c4b2d1288b1ec3c7a40bc670
rackerlabs/lambda-uploader,dsouzajude/lambda-uploader
test/test_uploader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nsimplified mongodb integration\n\n\n1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )\n\n import python_mongodb\n def main(global_config, **settings):\n ## ...\n # Initialize...
python
edit
1
3
mit
8ddbd0b39687f46637041848ab7190bcefd57b68
niallo/pyramid_mongodb
pyramid_mongodb/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n minimongo\n ~~~~~~~~~\n\n Minimongo is a lightweight, schemaless, Pythonic Object-Oriented\n interface to MongoDB.\n'''\nfrom minimongo.index import Index\nfrom minimongo.collection import Collecti...
python
edit
1
0
bsd-2-clause
37069b80e9ab17f7d3cdbe8baf7085ff67780914
terianil/minimongo,slacy/minimongo,terianil/minimongo
minimongo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Improve reloading of the module" }, { "role": "assistant", "content": "if 'loaded' in locals():\n import imp\n imp.reload(blendergltf)\n from .blendergltf import *\nelse:\n loaded = True\n from .blendergltf import ...
python
new_file
4
0
apache-2.0
762ba71537cebac83970fbfb19725054b127191b
Kupoman/blendergltf,lukesanantonio/blendergltf
__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\" To test if the new code produces the same precision values on the published results.\"\"\"\n\nfrom __future__ import division, print_function\nimport pytest\nimport numpy as np\n\nimport eniric.Qcalculator as Q\nimport eniric.IOmod...
python
edit
4
2
mit
42ec5ed6d56fcc59c99d175e1c9280d00cd3bef1
jason-neal/eniric,jason-neal/eniric
tests/test_published_results.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nhttpbin.runner\n~~~~~~~~~~~~~~\n\nThis module serves as a command-line runner for httpbin, powered by\ngunicorn.\n\n\"\"\"\n\nimport sys\n\nfrom gevent.wsgi import WSGIServer\nfrom httpbin import app\n\n\n...
python
edit
2
2
isc
ad8d69e4c5447297db535f8ca9d1ac00e85f01e8
ewdurbin/httpbin,luhkevin/httpbin,Jaccorot/httpbin,yemingm/httpbin,shaunstanislaus/httpbin,mozillazg/bustard-httpbin,postmanlabs/httpbin,logonmy/httpbin,admin-zhx/httpbin,vscarpenter/httpbin,Lukasa/httpbin,Lukasa/httpbin,ashcoding/httpbin,yangruiyou85/httpbin,pestanko/httpbin,luosam1123/httpbin,mansilladev/httpbin,moja...
httpbin/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n''' commands for the manager cli '''\n\nfrom uuid import uuid4\n\nimport requests\n\n\ndef command_puzzleboard_consume(**kwargs):\n url = kwargs['--consume-url']\n name = kwargs['--name']\n size = kwargs['--size']\n data = f'{{\...
python
edit
1
1
mit
208a48a8af8228bffc85db601f4eb2423981a6ec
klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords,klmcwhirter/huntwords
manager/commands_puzzleboard.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Error class as base for error codes\n\nAdd docstrings to error class" }, { "role": "assistant", "content": "from collections import namedtuple\n\n\nclass Error(namedtuple('Error', ['file', 'line_number', 'code', 'message'])):...
python
new_file
1
1
bsd-3-clause
6b0049978f2a7e59146abbc9b6a265061bbe00c4
mandeep/conda-verify
conda_verify/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import makedirs\nfrom os.path import abspath, dirname, exists, join\nfrom shutil import rmtree\n\nfrom tvrenamr.config import Config\nfrom tvrenamr.main import TvRenamr\nfrom tvrenamr.tests import urlopenmock\n\n\nclass BaseTest(obj...
python
edit
3
3
mit
b20d59211701cbcb4d7600bce2d64e7f0f614ec0
ghickman/tvrenamr,wintersandroid/tvrenamr
tvrenamr/tests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, request\n\napp = Flask(__name__)\n\n\n@app.route('/', methods=['GET'])\ndef home():\n return render_template('home.html')\n\nif __name__ == '__main__':\n app.run(debug=True)\n\n```\n\nApply th...
python
edit
3
1
mit
71f062a6db2a87fba57353f5a11ec2e63620a7dd
WhiteHatCP/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,WhiteHatCP/wrath-ctf-framework,DeltaHeavy/wrath-ctf-framework
ctf-app.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 __future__ import absolute_import, unicode_literals\n\nimport requests\n\n\ndef check(url):\n try:\n response = requests.get(\n \"https://isitup.org/{0}.json\".form...
python
edit
1
7
mit
078a4d36c1dc088937b242ca63b88b4c03f33fa0
lord63/isitup
isitup/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8\n\n\"\"\"\nAssertions that sort of follow Python unittest/Django test cases\n\"\"\"\n\nfrom django.test.testcases import TestCase\n\nimport re\n\n## Python\n\nfrom nose i...
python
edit
1
2
bsd-3-clause
19af4b621a50639a0c1156bab1c97c7b827b89a8
brilliant-org/django-nose,franciscoruiz/django-nose,sociateru/django-nose,millerdev/django-nose,fabiosantoscode/django-nose-123-fix,dgladkov/django-nose,aristiden7o/django-nose,krinart/django-nose,aristiden7o/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,franciscoruiz/django-nose,millerdev/django-...
django_nose/tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport redis\nimport re\nfrom common import get_db\nfrom datetime import datetime\n\nMSGPATTERN = re.compile('^(\\w+)\\|(\\d)\\|([\\s\\S]*)$')\nCHANNEL = 'logfire'\n\ndef listen(args):\n\n global MSGPATTERN\n\n rserver = redis.Redis('lo...
python
edit
3
4
mit
29eb3661ace0f3dd62d210621ebd24ef95261162
jay3sh/logfire,jay3sh/logfire
src/listen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Jinja2 extensions.\"\"\"\n\nimport json\n\nfrom jinja2.ext import Extension\n\n\nclass JsonifyExtension(Extension):\n \"\"\"Jinja2 extension to convert a python object to json.\"\"\"\n\n def __init__(s...
python
edit
1
1
bsd-3-clause
b4247769fcaa67d09e0f38d1283cf4f28ddc350e
michaeljoseph/cookiecutter,dajose/cookiecutter,audreyr/cookiecutter,hackebrot/cookiecutter,audreyr/cookiecutter,hackebrot/cookiecutter,luzfcb/cookiecutter,pjbull/cookiecutter,dajose/cookiecutter,pjbull/cookiecutter,luzfcb/cookiecutter,michaeljoseph/cookiecutter
cookiecutter/extensions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom seleniumbase import BaseCase\nfrom seleniumbase.common import decorators\n\n\nclass MyTestClass(BaseCase):\n\n @decorators.rate_limited(3.5) # The arg is max calls per second\n def print_item(self, item):\n print(item)\n\...
python
edit
2
2
mit
3f236d74615dced53c57628ae1b5f2c74f9e1de5
seleniumbase/SeleniumBase,possoumous/Watchers,possoumous/Watchers,mdmintz/SeleniumBase,possoumous/Watchers,ktp420/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBase,mdmintz/SeleniumBase,ktp420/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/seleniumspot,ktp420/SeleniumBa...
examples/rate_limiting_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. import factories\nfrom . import CoreFixturesTestCase\n\n\nclass AnalysisFactoryTestCase(CoreFixturesTestCase):\n\n def test_new_factory_with_Experiments(self):\n\n experiments = factories.ExperimentFactory.create_batch(3)\...
python
edit
1
1
bsd-3-clause
e9fc291faca8af35398b958d046e951aa8471cbf
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
apps/core/tests/test_factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom sqlalchemy import (\n Column,\n Date,\n Integer,\n MetaData,\n Numeric,\n String,\n Table,\n)\n\n\ndef define_tables(metadata):\n Table('measurement', metadata,\n Column('id', I...
python
edit
1
1
mit
93380d1574438f4e70145e0bbcde4c3331ef5fd3
jaapverloop/massa
massa/domain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import Flask, render_template\nfrom flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface\nimport configparser\nfrom .momentjs import momentjs\n\napp = Flask(__name__)\n# Security\nWTF_CSR...
python
edit
3
1
mit
8d50750ae94e2c94059dcbf1009dd46441d44842
rdempsey/weight-tracker,rdempsey/weight-tracker,rdempsey/weight-tracker
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 AnsibleWorks, Inc.\n# All Rights Reserved.\n\n\nfrom django.db import models\n\nclass ActivityStream(models.Model):\n '''\n Model used to describe activity stream (audit) events\n '''\n OPERATION_CHOICES = [...
python
edit
1
0
apache-2.0
f4e36132448a4a55bff5660b3f5a669e0095ecc5
wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx
awx/main/models/activity_stream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.conf import settings\nfrom django.core import urlresolvers\nfrom django.template import Context, Template\nfrom django.utils.translation import get_language, ugettext_lazy as _\nfrom satchmo.configur...
python
edit
10
3
bsd-3-clause
b8bc10e151f12e2bfe2c03765a410a04325a3233
Ryati/satchmo,ringemup/satchmo,Ryati/satchmo,dokterbob/satchmo,twidi/satchmo,twidi/satchmo,dokterbob/satchmo,ringemup/satchmo
satchmo/product/templatetags/satchmo_product.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\nfrom mapApp.models import Incident, Theft, Hazard, Official, AlertArea\nfrom mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm\nimport datetime\n\ndef index(request, lat=N...
python
edit
3
2
mit
5057b70a59c1a3c8301928c0297d4012bd96b21a
SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps
mapApp/views/index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport psutil\nimport os\nimport time\nimport math\n\nblocks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']\n\ndef create_bar(filled):\n if filled > 1:\n low = str(int(filled))\n high = str(int(filled + ...
python
edit
1
5
mit
2b9d702b6efd922069ceb44540b1ea7118e3f84b
wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar
gensysinfo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis import admin\nfrom uscampgrounds.models import *\n\nclass CampgroundAdmin(admin.OSMGeoAdmin):\n list_display = ('name', 'campground_code', 'campground_type', 'phone', 'sites', 'elevation', 'hookups', 'amenities')\...
python
edit
3
0
bsd-3-clause
143b74a2c6f99d2d92ac85310351327ffb630c1e
adamfast/geodjango-uscampgrounds,adamfast/geodjango-uscampgrounds
uscampgrounds/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport glob\nimport os\nimport platform\nimport subprocess\nimport sys\n\ncx_path = sys.argv[1] if len(sys.argv) > 1 else \"cx\"\n\nos.chdir(os.path.dirname(__file__))\n\nfor file in glob.glob(\"*.cx\"):\n if pla...
python
edit
1
0
mit
c0596310d9281fc07d4db6e6fd2ed8433335edb9
delta-lang/delta,delta-lang/delta,delta-lang/delta,delta-lang/delta
examples/build_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractUser\nfrom django.utils.encoding import python_2_unicode_compatible\n\n\n@python_2_unicode_compatible\nclass Role(models...
python
edit
1
1
mit
3307bfb7075a527dc7805da2ff735f461f5fc02f
neosergio/allstars
employees/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014-2015 Hewlett-Packard Development Company, L.P.\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 Lice...
python
edit
1
1
apache-2.0
0720397d5c47e2af33dbe9fdf8f25b95ce620106
openstack/octavia,openstack/octavia,openstack/octavia
octavia/common/base_taskflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom future.standard_library import install_aliases\ninstall_aliases() # noqa\nfrom urllib.parse import urlparse\n\nfrom celery.task import Task\nfrom django.conf import settings\nfrom seed_services_client import IdentityStoreApiClient\n\n...
python
edit
1
4
bsd-3-clause
fb01aa54032b7ab73dcd5a3e73d4ece5f36517e2
praekelt/familyconnect-registration,praekelt/familyconnect-registration
locations/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport itertools\nfrom tests.support.test_helpers import d_tz\n\n\ndef ceg_volumes(rows):\n def ceg_keys(rows):\n return [\n \"_timestamp\", \"timeSpan\", \"relicensing_web\", \"relicensin...
python
edit
1
4
mit
cd1c3645d733ab16355fe516bb2e505f87d49ace
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
backdrop/contrib/evl_upload.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport inspect\n\ndef argspec_set(func):\n if not hasattr(func, 'argspec'):\n func.argspec = inspect.getargspec(func)\n\ndef argspec_iscompat(func, lenargs):\n spec = func.argspec\n minargs = len(spec.args) - len(spec.defaul...
python
edit
1
3
mit
039a19032bebd1e6852990f8aacf05042f000070
infogulch/pyspades-events
args.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow modules that use dudebot to just import dudebot..." }, { "role": "assistant", "content": "from core import BotAI\nfrom core import Connector\n\nfrom decorators import message_must_begin_with\nfrom decorators import message_...
python
new_file
7
0
bsd-2-clause
7ad0e624e4bccab39b56152e9d4c6d5fba8dc528
sujaymansingh/dudebot
dudebot/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom openerp import fields, models\n\nclass Session(models.Model):\n _name = 'openacademy.session'\n\n name = fields.Char(required=True)\n start_date = fields.Date()\n duration = fields.Float(digits=(6, 2), help=\"Duration in days...
python
edit
1
0
apache-2.0
bdfc87ff9f9b67f038248052805327278309e558
mapuerta/openacademy-proyect
openacademy/model/openacademy_session.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Base classes.\"\"\"\n\nimport time\n\n\nclass Result(object):\n \"\"\"Provides results of a Check.\n\n Attributes:\n availability (bool): Availability, usually reflects outcome of a check.\n ...
python
edit
1
1
bsd-3-clause
dd9dfa86fe0f7cb8d95b580ff9ae62753fb19026
dargasea/gefion
gefion/checks/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom itertools import combinations\n\n\nclass ClusterUtility(object):\n @staticmethod\n def get_geometric_mean(weights):\n multiplication = 1\n for weight in weights:\n multiplication = multiplication * weight...
python
edit
1
4
mit
42701f0ba5147bbd1aeeb2871f1b9970bcb7e01e
studiawan/pygraphc
pygraphc/clustering/ClusterUtility.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gi.repository import Gtk, GdkPixbuf, GLib\nimport cv2\n\nclass View(Gtk.Window):\n\tdef __init__(self, title, camera, interval=200):\n\t\tGtk.Window.__init__(self)\n\t\tself.set_title(title)\n\t\tself.cam = camera\n\t\tself.img = Gtk.I...
python
edit
1
2
mit
b2069b2b4a07d82cc6831dde0e396d7dae79d23e
fkmclane/AutoPidact
autopidact/view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nimport pytest\n\nfrom tests.helpers import http_client\n\n\ndef test_homepage(site_app, site):\n with http_client(site_...
python
edit
3
1
bsd-3-clause
7a04bb7692b4838e0abe9ba586fc4748ed9cd5d4
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
tests/integration/blueprints/site/test_homepage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Displays currently active gpu by optimus-manager\nRequires the following packages:\n\n * optimus-manager\n\n\"\"\"\n\nimport subprocess\n\nimport core.module\nimport core.widget\n\n\nclass Module(core.module.Module):\n def __ini...
python
edit
1
4
mit
4485b65722645d6c9617b5ff4aea6d62ee8a9adf
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee_status/modules/contrib/optman.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpx\n\nfrom linguee_api.downloaders.interfaces import DownloaderError, IDownloader\n\n\nclass HTTPXDownloader(IDownloader):\n \"\"\"\n Real downloader.\n\n Sends request to linguee.com to read the page.\n \"\"\"\n\n ...
python
edit
1
4
mit
def9d7037a3c629f63e1a0d8c1721501abc110cd
imankulov/linguee-api
linguee_api/downloaders/httpx_downloader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom shmitter.likes import services as likes_services\nfrom .models import Tweet\nfrom . import services as tweets_services\n\n\nclass TweetSerializer(serializers.ModelSerializer):\n owner = seri...
python
edit
1
1
mit
123875153e81253a44d0e8b2d8de5abee195362a
apirobot/shmitter,apirobot/shmitter,apirobot/shmitter
backend/shmitter/tweets/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport shlex\nimport exceptions\nimport subprocess\n\ndef bytefmt(num):\n for unit in [ \"\", \"Ki\", \"Mi\", \"Gi\" ]:\n if num < 1024.0:\n return \"{:.2f}{}B\".format(num, unit)\n num /= 1024.0\n return \"{:...
python
edit
4
3
mit
28a4f4ab9d6b7c3ea14d48c002273acfe05d7246
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/util.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 Intel Corp.\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# ht...
python
edit
1
2
apache-2.0
c62e1b325a536294b3285f8cbcad7d66a415ee23
noironetworks/heat,openstack/heat,openstack/heat,cwolferh/heat-scratch,noironetworks/heat,cwolferh/heat-scratch
heat/objects/base.py
accepted
null
true