messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom contextlib import contextmanager\nfrom pyroSAR._dev_config import ExamineExe\nfrom pyroSAR.snap.auxil import ExamineSnap\n\n@contextmanager\ndef not_raises(ExpectedException):\n try:\n yield\n\n except Expec...
python
edit
1
3
mit
3d5d6d093420294ed7b5fa834285d1d55da82d5d
johntruckenbrodt/pyroSAR,johntruckenbrodt/pyroSAR
pyroSAR/tests/test_snap_exe.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve all test cases but 2" }, { "role": "assistant", "content": "from collections import deque\n\n\nclass Sieve(object):\n\n def __init__(self, upper_bound):\n self.upper_bound = upper_bound + 1\n self.primes = ...
python
new_file
1
4
mit
e0d811f5146ba2c97af3da4ac904db4d16b5d9bb
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/ctci_big_o.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Adafruit_MotorHAT import Adafruit_MotorHAT\n\n\nclass Vehicle:\n def __init__(self, motor_hat=None):\n self.motor_hat = motor_hat\n self.motors = []\n\n def release(self):\n self.motor_hat.getMotor(1).run(Ada...
python
edit
1
3
mit
3031bcfda01a55c70f3af860bb5620a5530e654a
misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot
Motor/src/main/python/vehicles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom falcon.util.uri import parse_query_string\nimport json\nfrom api.actions import pos_tagging\n\nclass ApiResource(object):\n def parse_request_data(self, raw_post_data):\n try:\n raw_correct_encoded = str(raw_post_d...
python
edit
1
6
mit
18796393fa18590d9de6c67ccb9ac6fd958855fc
EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger
api/api_resource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom colorama import Fore\nfrom pkgutil import iter_modules\n\n\ndef check_import(packagename):\n \"\"\"\n Checks that a package is present. Returns true if it is available, and\n false if not available.\n \"\"\"\n if package...
python
edit
1
3
mit
34960807eac1818a8167ff015e941c42be8827da
ericmjl/data-testing-tutorial,ericmjl/data-testing-tutorial
checkenv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass InvalidData(Exception):\n \"\"\"\n Raised for by step validation process\n \"\"\"\n pass\n\n\nclass Step(object):\n \"\"\"\n A single step in a multistep process\n \"\"\"\n def validate(self):\n raise No...
python
edit
1
3
bsd-3-clause
d57844d1d6b2172fe196db4945517a5b3a68d343
taedori81/satchless
satchless/process/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom pybib import __version__\n\nsetup(name='pybib',\n version=__version__,\n description='Fetch citation information, given a Digital Object Identifier',\n url='https://github.com/jgilchrist/p...
python
edit
1
0
bsd-3-clause
6a84b18f584c7f9b8a3d7d53605bce5be919b056
jgilchrist/pybib
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom distutils.core import setup\n\nif sys.version_info < (3,):\n print('\\nSorry, but Adventure can only be installed under Python 3.\\n')\n sys.exit(1)\n\nREADME_PATH = os.path.join(os.path.dirname(__file__), ...
python
edit
1
0
apache-2.0
0f18b3ff63bf6183247e7bce25160547f8cfc21d
devinmcgloin/advent,devinmcgloin/advent
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom physical.tests.factory import PlanFactory, DatabaseInfraFactory, InstanceFactory\n\n\nclass TestBaseStep(TestCase):\n\n def setUp(self):\n self.plan = PlanFactory()\n self.environment = s...
python
edit
1
1
bsd-3-clause
4268f8194bd93bd7f4be24c34938ca343e457c34
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom fabric.api import run\n\nfrom braid import package, fails\n\n\ndef install():\n package.install('bzr')\n\n\ndef branch(branch, location):\n if fails('[ -d {}/.bzr ]'.format(location)):\n run('mkdir -p {}'.form...
python
edit
1
2
mit
db8e02661df65e1a50c5810968afef7ecd44db42
alex/braid,alex/braid
braid/bazaar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.7.3'\n\n```\n\nApply this change: Increment patch version to 0.7.4" }, { "role": "assistant", "content": "\"\"\"yolk.\n\nA...
python
edit
1
0
bsd-3-clause
9d3c2946106a7d40281df0038cbc9d81704b3ee7
myint/yolk,myint/yolk
yolk/__init__.py
rejected_duplicate
Near-duplicate of sample 99
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import Http404\nfrom django.http import HttpResponse\nfrom django.shortcuts import render\nfrom django.template import RequestContext, loader\nfrom .models import Theater\n\n# Default first page. Should be the search page....
python
edit
4
1
apache-2.0
c487dfc63e71abb0e11534c42591c216def5c433
Plaudenslager/ITDB,Plaudenslager/ITDB,Plaudenslager/ITDB
ITDB/ITDB_Main/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 The T5X Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.ap...
python
edit
3
0
apache-2.0
58734468f027ddff31bfa7dc685f4af177e8dbb1
google-research/t5x
t5x/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages\n\nimport os.path as op\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nhere = op.abspath(op.dirname(__file__))\n\n# Get metadata from the AFQ/vers...
python
edit
16
0
bsd-2-clause
60b8e2ce0196b44321d847f6610a29218ebb91b2
yeatmanlab/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ,arokem/pyAFQ
setup.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nimport pytest\nfrom kbkdna.dna import *\n\ndef test_reverse_complement():\n assert reverse_complement('ATGC') == 'GCAT'\n\ndef test_gc_content():\n assert gc_content('ATGC') == 0.5\n\n\n```\n\nApply this chan...
python
edit
3
1
mit
5c0282810f298762bdd00c260f40e2ceb7914eb0
kalekundert/kbkdna
tests/test_dna.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name = 'PyFVCOM',\n packages = ['PyFVCOM'],\n version = '2.0.0',\n description = (\"PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot i...
python
edit
1
0
mit
9d53f0b11c53127d556bc1027b82491d71a1a381
pwcazenave/PyFVCOM
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nConfiguration, plugins and fixtures for `pytest`.\n\"\"\"\n\nfrom typing import Iterator\n\nimport pytest\nfrom mock_vws import MockVWS\nfrom mock_vws.database import VuforiaDatabase\n\nfrom vws import VWS\n\npytest_plugins = [ # p...
python
edit
1
1
mit
f7fc79ac56b94e2e54d14360b0f9a5ab97d28a3b
adamtheturtle/vws-python,adamtheturtle/vws-python
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport os\nimport subprocess\n\nfrom telemetry.internal.platform import p...
python
edit
3
2
bsd-3-clause
9697010c909e3a4777bdef7c2889813ae3decad7
benschmaus/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,sahiljain/catapult,SummerLW/Perf...
telemetry/telemetry/internal/platform/profiler/android_screen_recorder_profiler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom tests.utils import is_postgresql_env_with_json_field\n\n\n@pytest.mark.skipif(not is_postgresql_env_with_json_field(),\n reason=\"requires postgresql and Django 1.9+\")\n@pytest.mark.django_db\ndef t...
python
edit
1
1
bsd-3-clause
14e000acafe7c374294a7de6ffe295c9d56df68f
jdotjdot/django-dirtyfields,romgar/django-dirtyfields,smn/django-dirtyfields
tests/test_postgresql_specific.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport inspect\nfrom django.utils.encoding import force_bytes, python_2_unicode_compatible\nfrom enum import Enum as BaseEnum, EnumMeta as BaseEnumMeta\nimport six\n\n\nclass EnumMeta(BaseEnumMeta):\n def __new__(cls, name, bases, attrs)...
python
edit
1
6
mit
5c3900e12216164712c9e7fe7ea064e70fae8d1b
suutari-ai/django-enumfields,jackyyf/django-enumfields,bxm156/django-enumfields,jessamynsmith/django-enumfields
enumfields/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django import forms\nfrom django.forms import widgets\n\nfrom . import models\n\n\nclass ThreadCreateForm(forms.ModelForm):\n\n class Meta:\n model = models.Thread\n fields = ['title']\n\n\nclass MessageCreateForm(fo...
python
edit
1
0
mit
f6e8907b0e742b47425de140cc7b308c3815ffce
funkybob/django-dequorum,funkybob/django-dequorum,funkybob/django-dequorum
dequorum/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='jupyterhub-kubespawner',\n version='0.5.1',\n install_requires=[\n 'jupyterhub',\n 'pyYAML',\n 'kubernetes==2.*',\n 'escapism',\n 'jup...
python
edit
1
0
bsd-3-clause
fa874329f57899eee34182f20b0621bf488cae5e
yuvipanda/jupyterhub-kubernetes-spawner,ktong/kubespawner,jupyterhub/kubespawner
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core.management import call_command\nfrom django.conf import settings\nfrom django.db import connection\nfrom django.db.models import Q\nfrom django.template.loa...
python
edit
15
2
apache-2.0
1caace2631f8e9c38cf0adfb1179a5260dcd3c33
cmunk/protwis,fosfataza/protwis,fosfataza/protwis,fosfataza/protwis,cmunk/protwis,protwis/protwis,cmunk/protwis,cmunk/protwis,fosfataza/protwis,protwis/protwis,protwis/protwis
tools/management/commands/output_all_uniprot.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dao.client import Client\nimport sys\n\ndef update_entry(clientName, createKeyOpt):\n newKey = Client(clientName).update(createKey = createKeyOpt)\n print \"%s: %s\" % (clientName, newKey)\n\nif __name__ == '__main__':\n # Deal with...
python
edit
3
1
bsd-3-clause
f4ee715a5bd6ea979cf09fb847a861f621d42c7b
sunil07t/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,sdsingh/e-mission-server,shankari/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-missi...
CFC_WebApp/utils/update_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Retrieve file from Facebook\n\nimport urllib, convert, re, os\n# from speech_py import speech_to_text_offline as STT_o\n# from speech_py import speech_to_text_google as STT\nfrom speech_py import speech_to_text_ibm_rest as STT\n\ndef tran...
python
edit
1
2
mit
52584725e462ab304bc2e976fa691f0d830e7efb
hungtraan/FacebookBot,hungtraan/FacebookBot,hungtraan/FacebookBot
Speech/processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 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 ...
python
edit
1
1
apache-2.0
4a711a2709ec5d8a8e04bb0f735fcfaa319cffdf
tonyli71/designate,openstack/designate,ionrock/designate,ionrock/designate,ramsateesh/designate,grahamhayes/designate,cneill/designate-testing,muraliselva10/designate,muraliselva10/designate,cneill/designate-testing,openstack/designate,tonyli71/designate,muraliselva10/designate,grahamhayes/designate,ionrock/designate,t...
designate/objects/validation_error.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass DomainsConfig(AppConfig):\n name = \"domains\"\n\n```\n\nApply this change: Fix DomainsConfig.name to fix rtfd build" }, { "role": "assistant", "content": "from django.apps import ...
python
edit
1
0
mit
5d188a71ae43ec8858f985dddbb0ff970cd18e73
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/domains/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rq\nimport redis\nimport django\n\nfrom django.conf import settings\n\n\nREDIS_CLIENT = redis.Redis(settings.REDIS_HOST, settings.REDIS_PORT, db=0)\n\n\nclass CustomJob(rq.job.Job):\n def _unpickle_data(self):\n django.setu...
python
edit
1
1
mit
06eabe9986edfb3c26b2faebb9e07ede72e4781d
theju/wush
wush/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a small detail view for videodiscs." }, { "role": "assistant", "content": "from django.views.generic import DetailView\n\nfrom .models import Videodisc\n\n\nclass VideodiscDetailView(DetailView):\n model = Videodisc\n ...
python
new_file
1
0
apache-2.0
0ddbea23c8703576e260fa5b57474930393e7d1a
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/components/merchandise/media/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='autograd',\n version='1.4',\n description='Efficiently computes derivatives of numpy code.',\n author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',\n author_email=\"...
python
edit
1
0
mit
c6d81ce7eede6db801d4e9a92b27ec5d409d0eab
HIPS/autograd,HIPS/autograd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nfrom .manager import database\nfrom .webserver.web import get_app\n\n@click.group()\ndef main():\n pass\n\n@main.command()\ndef update():\n \"\"\"Update PyUniProt data\"\"\"\n database.update()\n\n@main.command()\ndef...
python
edit
1
1
apache-2.0
66cfb6f42cf681d848f944af5bbb7d472280d895
cebel/pyuniprot,cebel/pyuniprot
src/pyuniprot/cli.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 import forms\nfrom django.conf import settings\n\nfrom opps.db.models.fields.jsonf import JSONFormField\nfrom opps.fields.widgets import JSONField\nfrom opps.fields.models import F...
python
edit
1
5
mit
70f0e1b1112713a95f6d22db95fbb0368f079a18
williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps
opps/containers/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nimport gevent.queue\n\n\nclass MessageDispatcher(object):\n def __init__(self, stats):\n self.consumers = {}\n self.stats = stats\n\n def get_connection_count(self):\n return sum(len(sockets) for ...
python
edit
1
7
bsd-3-clause
f096225138afff2a722b1b019eb94e14f8d18fc3
spladug/sutro,spladug/sutro
sutro/dispatcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import *\nfrom mockito import *\nimport unittest\n\nfrom source.server import *\nfrom source.exception import *\nfrom source.commands.system import *\n\nclass MyTestCase(unittest.TestCase):\n\n def createCommandResponse(sel...
python
edit
12
2
mit
92b7a5463e505f84862dd96e07c9caa5a97107a9
CaminsTECH/owncloud-test
client/test/server_tests.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nClasses and functions for writing Host Records.\n\nHost Records are IndicatorRecords with a record type of \"HR.\"\n\"\"\"\nimport dateutil.parser\n\nfrom pivoteer.writer.core import CsvWriter\nfrom core.lookups import geolocate_ip\...
python
edit
4
2
mit
9d1a53fea17dfc8d48324e510273259615fbee01
LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID
pivoteer/writer/hosts.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ninstall_requires = open('requirements.txt').read().split()\n\nsetup(\n name='mocurly',\n version='0.0.1',\n description='A library that allows your python tests to easily mock out the ...
python
edit
1
0
mit
3b59809abe755954787482fd3112862dd54019eb
Captricity/mocurly
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport time\nimport json\n\nfrom videolog.core import Videolog\n\nclass User(Videolog):\n def find_videos(self, user):\n content = self._make_request('GET', '/usuario/%s/videos.json' % user)\n ...
python
edit
1
4
mit
d495d9500377bad5c7ccfd15037fb4d03fd7bff3
rcmachado/pyvideolog
videolog/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test cases for Zinnia's admin forms\"\"\"\nfrom django.test import TestCase\nfrom django.contrib.admin.widgets import RelatedFieldWidgetWrapper\n\nfrom zinnia.models import Category\nfrom zinnia.admin.forms import EntryAdminForm\nfrom...
python
edit
1
1
bsd-3-clause
d01b09256f8fda4b222f3e26366817f4ac5b4c5a
extertioner/django-blog-zinnia,Maplecroft/django-blog-zinnia,Zopieux/django-blog-zinnia,ghachey/django-blog-zinnia,dapeng0802/django-blog-zinnia,bywbilly/django-blog-zinnia,dapeng0802/django-blog-zinnia,Zopieux/django-blog-zinnia,aorzh/django-blog-zinnia,Zopieux/django-blog-zinnia,bywbilly/django-blog-zinnia,aorzh/djan...
zinnia/tests/test_admin_forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport json\n\n# Get Steam settings\nsteamData = open(\"steam.json\")\nsteamConfig = json.load(steamData)\nsteamSDKDir = steamConfig[\"sdkDir\"]\nsteamBuilder = steamConfig[\"builder\"]\nsteamCommand = steamConfig[\"command\"]\...
python
edit
1
0
bsd-3-clause
3ecfdf41da3eb3b881c112254b913ff907424bd7
arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain
Scripts/2-Upload.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport time\n\nfrom watchdog.observers import Observer\n\nfrom specchio.handlers import SpecchioEventHandler\nfrom specchio.utils import init_logger, logger\n\n\ndef main():\n ...
python
edit
2
4
mit
761fbb68f72ff8f425ad40670ea908b4959d3292
brickgao/specchio
specchio/main.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 import template\nfrom django.conf import settings\nfrom ..generate import image_url as url\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef image_url(image_url, **...
python
edit
1
12
mit
daf4a6fd35811210c546782a771c6ddef8641f25
YACOWS/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,williamroot/opps,opps/opps,jeanmask/opps
opps/images/templatetags/images_tags.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nShortcuts for common development check tasks\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom invoke import task\n\n@task(name='blacken', iterable=['folder'])\ndef blacken(c, line_length=79, folder=None):\n \"\"\"Run bl...
python
edit
1
2
bsd-2-clause
f9d4fae5dd16c6bc386f6ef0453d2713d916a9f5
pyinvoke/invocations
invocations/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport sys\nimport os\nfrom setuptools import setup\nfrom pathlib import Path\nthis_dir = Path(__file__).absolute().parent\n\nif sys.argv[-1].startswith('publish'):\n if os.system(\"pip li...
python
edit
1
0
mit
ec91dc2fec8da044737c08db257f621d75016d3d
igordejanovic/parglare,igordejanovic/parglare
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport glob\nimport unittest\nfrom time import sleep\nfrom selenium import webdriver\n\n\nclass TestAndroidWebView(unittest.TestCase):\n\n def setUp(self):\n app = os.path.abspath(\n glob.glob(os.path.join(\n...
python
edit
3
1
apache-2.0
7ee8bbc5cb1527c55a04aff1421f043fdfa292cf
appium/appium,Sw0rdstream/appium,appium/appium,appium/appium,appium/appium,appium/appium,appium/appium
sample-code/examples/python/android_web_view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Powerline(object):\n\tdef __init__(self, segments):\n\t\t'''Create a new Powerline.\n\n\t\tSegments that aren't filler segments and whose contents aren't None are\n\t\tdropped from the segment array.\n\t\t...
python
edit
1
4
mit
1cb6aeab0d86ce79ecbb26ecc705902a0b360b93
seanfisk/powerline,EricSB/powerline,darac/powerline,dragon788/powerline,QuLogic/powerline,keelerm84/powerline,xxxhycl2010/powerline,blindFS/powerline,junix/powerline,cyrixhero/powerline,IvanAli/powerline,keelerm84/powerline,xxxhycl2010/powerline,Luffin/powerline,s0undt3ch/powerline,DoctorJellyface/powerline,Luffin/powe...
powerline/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom spec import Spec, skip, ok_, eq_, raises\n\nfrom invoke.parser import Parser, Context, Argument\nfrom invoke.collection import Collection\n\n\nclass Parser_(Spec):\n def has_and_requires_initial_context(self):\n c = Context()...
python
edit
5
1
bsd-2-clause
cd5bfa0fb09835e4e33236ec4292a16ed5556088
mattrobenolt/invoke,frol/invoke,sophacles/invoke,pyinvoke/invoke,tyewang/invoke,frol/invoke,mattrobenolt/invoke,pfmoore/invoke,singingwolfboy/invoke,kejbaly2/invoke,pfmoore/invoke,pyinvoke/invoke,mkusz/invoke,alex/invoke,mkusz/invoke,kejbaly2/invoke
tests/parser.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n website.services\n ~~~~~~~~~~~~~~~~\n\n top level services api.\n\n :copyright: (c) 2014 by xiong.xiaox(<EMAIL>).\n\"\"\"\n\n\nimport subprocess\n\nfrom threading import Timer\n\n\ndef exec_comm...
python
edit
1
1
bsd-3-clause
14ac1f7f4cec2f461f9e2df136bc3cf9894a9359
alibaba/FlexGW,alibaba/FlexGW,alibaba/FlexGW,alibaba/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW
website/services.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Tag(models.Model):\n name = models.CharField(\n max_length=31, unique=True)\n slug = models.SlugFi...
python
edit
1
0
bsd-2-clause
159d09e18dc3b10b7ba3c104a2761f300d50ff28
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Store various constants here\n\n# Maximum file upload size (in bytes).\nMAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024\n\n# Authentication constants\nPWD_HASH_ALGORITHM = 'pbkdf2_sha256'\nSALT_SIZE = 24\nMIN_PASSWORD_LENGTH = 8\nMAX_PASSWORD...
python
edit
1
0
mit
f2071eb5781f4dfa4cacbcd9f0d1c71412ba80b1
RuddockHouse/RuddockWebsite,RuddockHouse/RuddockWebsite,RuddockHouse/RuddockWebsite
constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\nimport os\n\nfrom telemetry.test import tab_test_case\n\nclass Inspecto...
python
edit
1
1
bsd-3-clause
fef260c3731408592fd88e73817fe0f0cd7fe769
benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult-csm,benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,sahiljain/catap...
telemetry/telemetry/core/chrome/inspector_memory_unittest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT\n# All rights reserved. This work is under a BSD license, see LICENSE.TXT.\n\nimport os, re\nfrom os.path import join as jp\n\nfrom .config import flow_graph_root_dir\n\n\n_http...
python
edit
1
2
bsd-3-clause
be517c8df23826d343b187a4a5cc3d1f81a06b53
lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow
test/framework/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\nfrom django.conf import settings\nfrom django.http import HttpResponse\nfrom django.contrib.auth import authenticate, login\n\n\ndef get_token(request):\n return request.REQUEST.get('token', '')\n\n\ndef chec...
python
edit
1
5
bsd-2-clause
c24a7287d0ac540d6ef6dcf353b06ee42aaa7a43
chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night,chop-dbhi/serrano
serrano/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.trial.unittest import TestCase\nimport vumi.blinkenlights.message20110818 as message\nimport time\n\n\nclass TestMessage(TestCase):\n\n def test_to_dict(self):\n now = time.time()\n datapoint = (\"vumi.w1.a_met...
python
edit
1
1
bsd-3-clause
43350965e171e6a3bfd89af3dd192ab5c9281b3a
TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi
vumi/blinkenlights/tests/test_message20110818.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cProfile\nfrom sklearn.svm import LinearSVC\nfrom sklearn.datasets import load_svmlight_file\nfrom sklearn.metrics import accuracy_score\n\n\nX, y = load_svmlight_file(\"data.txt\")\n\nsvc = LinearSVC()\n\ncProfile.runctx('svc.fit(X,...
python
edit
1
0
mit
93903d065cd1ff8f3f0c715668f05c804c5561f9
JuliaPackageMirrors/SoftConfidenceWeighted.jl,IshitaTakeshi/SoftConfidenceWeighted.jl
profile/linearsvc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Render Jinja2 template.\"\"\"\nimport logging\nimport os\n\nimport jinja2\n\nLOG = logging.getLogger(__name__)\n\n\ndef get_template(template_file='', **kwargs):\n \"\"\"Get the Jinja2 template and renders with dict _kwargs_.\n\n ...
python
edit
1
2
apache-2.0
f5198851aebb000a6107b3f9ce34825da200abff
gogoair/foremast,gogoair/foremast
src/foremast/utils/get_template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django_evolution.mutations import AddField\nfrom django.db import models\n\n\nMUTATIONS = [\n AddField('ChangeDescription', 'user', models.ForeignKey, blank=True,\n related_mode...
python
edit
1
0
mit
e31099e964f809a8a6ebcb071c7c2b57e17248c2
sgallagher/reviewboard,chipx86/reviewboard,chipx86/reviewboard,chipx86/reviewboard,sgallagher/reviewboard,davidt/reviewboard,brennie/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,davidt/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,brennie/reviewboard,brennie/reviewboar...
reviewboard/changedescs/evolutions/changedesc_user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which shou...
python
edit
7
8
mit
880b5257d549c2150d8888a2f062acd9cc948480
derekmpham/interview-prep,derekmpham/interview-prep
array/is-crypt-solution.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom frigg.builds.serializers import BuildInlineSerializer\n\nfrom .models import Project\n\n\nclass ProjectSerializer(serializers.ModelSerializer):\n builds = BuildInlineSerializer(read_only=Tru...
python
edit
1
2
mit
9aa17b90b8f3413f0621cc25a686774dd809dc84
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
frigg/projects/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# A hacky script to do dynamic snippets.\n\nimport sys\nimport os\nimport datetime\n\nsnippet_map = {\n 'date' : datetime.datetime.now().strftime('%b %d %G %I:%M%p '),\n 'time' : datetime.datetime.now().strftime...
python
edit
3
0
mit
37cb987503f336362d629619f6f39165f4d8e212
sam33r/dotfiles,sam33r/dotfiles,sam33r/dotfiles,sam33r/dotfiles
utils/snippets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-...
python
edit
1
1
apache-2.0
0003ee31f78d7861713a2bb7daacb9701b26a1b9
Datera/cinder,phenoxim/cinder,mahak/cinder,openstack/cinder,j-griffith/cinder,Datera/cinder,j-griffith/cinder,mahak/cinder,openstack/cinder,phenoxim/cinder
cinder/wsgi/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nose.plugins.attrib\nimport time as _time\nimport subprocess\nimport sys\nimport redisdl\nimport unittest\nimport json\nimport os.path\nfrom . import util\nfrom . import big_data\n\n@nose.plugins.attrib.attr('slow')\nclass RaceDeleti...
python
edit
5
2
bsd-2-clause
23d4081392f84f2d5359f44ed4dde41611bb4cd2
p/redis-dump-load,hyunchel/redis-dump-load,p/redis-dump-load,hyunchel/redis-dump-load
tests/race_deleting_keys_test.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nhyper/common/util\n~~~~~~~~~~~~~~~~~\n\nGeneral utility functions for use with hyper.\n\"\"\"\nfrom hyper.compat import unicode, bytes, imap\n\ndef to_bytestring(element):\n \"\"\"\n Converts a single ...
python
edit
1
3
mit
d6b7cccb14cd1f82bb3a6b070999204fafacf07e
Lukasa/hyper,lawnmowerlatte/hyper,irvind/hyper,Lukasa/hyper,lawnmowerlatte/hyper,fredthomsen/hyper,irvind/hyper,plucury/hyper,fredthomsen/hyper,plucury/hyper
hyper/common/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# MIT licensed\n# Copyright (c) 2013-2017 lilydjwg <<EMAIL>>, et al.\n\nimport atexit\nimport aiohttp\nconnector = aiohttp.TCPConnector(limit=20)\n\n__all__ = ['session', 'HTTPError']\n\nclass HTTPError(Exception):\n def __init__(self, c...
python
edit
1
4
mit
c1e5822f07e2fe4ca47633ed3dfda7d7bee64b6c
lilydjwg/nvchecker
nvchecker/source/aiohttp_httpclient.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Routine to \"compile\" a .py file to a .pyc file.\n# This has intimate knowledge of how Python/import.c does it.\n# By Sjoerd Mullender (I forced him to write it :-).\n\nimport imp\nMAGIC = imp.get_magic()\n\ndef wr_long(f, x):\n\tf.write...
python
edit
2
5
mit
e4f28d43eb62791b9679bc775c7bbbeb5944a1d1
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/py_compile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport webapp2\n\nIS_DEV = os.environ[\"SERVER_SOFTWARE\"][:3] == \"Dev\"\nallowed_users = set()\nif IS_DEV:\n allowed_users.add(\"dev-instance\")\n\nclass LoggingHandler(webapp2.RequestHandler):\n\n def post(self):\n ...
python
edit
3
3
mit
0c0b163d6454134595fb8ba794281afe56bc0100
misterwilliam/gae-firebase-event-proxy,misterwilliam/gae-firebase-event-proxy
gae-firebase-listener-python/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport codecs\nimport tempfile\nfrom django.core.management.commands.makemessages import Command as BaseCommand\n\n\nclass Command(BaseCommand):\n \"\"\" Extend the makemessages to include some of the fixtures \"\"\"\n\n ...
python
edit
3
4
bsd-3-clause
f3c1e5bdf25b46e96a77221ace7438eb3b55cb05
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/common/management/commands/makemessages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nLogan\n======\n\nLogan is a toolkit for running standalone Django applications. It provides you\nwith tools to create a CLI runner, manage settings, and the ability to bootstrap\nthe process.\n\n:copyright: (c...
python
edit
1
0
apache-2.0
fac395f86a1fbe9a8c64a0f178b4dcaa3a218fb1
dcramer/logan
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"General utilities.\"\"\"\n\nimport urlparse\nimport logging\n\ndef ConstantTimeIsEqual(a, b):\n \"\"\"Securely compare two strings without leaking timing information.\"\"\"\n if len(a) != len(b):\n return False\n acc = 0\n for ...
python
edit
1
8
apache-2.0
f26e6fb7e7fbf9eedd181bea65d091f24262a14f
Rio517/pledgeservice,MayOneUS/pledgeservice,Rio517/pledgeservice,Rio517/pledgeservice,MayOneUS/pledgeservice
backend/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS\nfrom corehq.apps.hqcase.utils import update_case\n\n\ndef escalate_tech_issue(case, rule):\n if case.type != 'tech_issue'\n return CaseRuleAct...
python
edit
null
null
bsd-3-clause
628f9edd7aefda1f9cf29cd5a3d04342877a5c38
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/icds/rules/custom_actions.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\n\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url('^', include('dja...
python
edit
1
0
mit
80a08e9f5720e60536a74af6798d1126341ac158
OpenFurry/honeycomb,makyo/honeycomb,makyo/honeycomb,OpenFurry/honeycomb,OpenFurry/honeycomb,makyo/honeycomb,OpenFurry/honeycomb,makyo/honeycomb
honeycomb/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tqdm import tqdm\n\nfrom .data_pack import DataPack\nfrom matchzoo import processor_units\n\n\ndef build_unit_from_data_pack(\n unit: processor_units.StatefulProcessorUnit,\n data_pack: DataPack, flatten: bool = True,\n verbos...
python
edit
1
3
apache-2.0
83cc9a5304e41e4ce517cfc739238a37f13f626a
faneshion/MatchZoo,faneshion/MatchZoo
matchzoo/data_pack/build_unit_from_data_pack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gratipay import wireup\n\nenv = wireup.env()\ndb = wireup.db(env)\n\nparticipants = []\n\nwith open('./sql/emails.txt') as f:\n emails = [line.rstrip() for line in f]\n participants = db.all(\"\"\"\n SELECT p.*::participan...
python
edit
1
0
mit
ea416504c287bc5a3716289b57ebfd15bb770b9d
eXcomm/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,studio666/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,studio666/gratipay.com,studio666...
sql/branch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.9.0\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\n...
python
edit
1
0
mit
1cba9aec784e54efc647db227a665fa9f88cab27
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport h5py\n\ninfiles = sys.argv[1:]\n\nfor infile in infiles:\n with h5py.File(infile, 'a') as h5:\n print(infile)\n if 'format-version' in h5.attrs and h5.attrs['format-version'] < 1:\n...
python
edit
1
0
bsd-3-clause
b0254fd4090c0d17f60a87f3fe5fe28c0382310e
mirnylab/cooler
scripts/v0to1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom celery.signals import setup_logging\nimport orchestrator.logger\n\n__version__ = '0.3.8'\n__author__ = 'sukrit'\n\norchestrator.logger.init_logging()\nsetup_logging.connect(orchestrator.logger.in...
python
edit
1
0
mit
4426fe1b6c77bb3c38a4324470a3d46461ef4661
totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator
orchestrator/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import (\n cd,\n env,\n put,\n run,\n sudo,\n task\n)\n\n\nPRODUCTION_IP = '54.154.235.243'\nPROJECT_DIRECTORY = '/home/ubuntu/ztm/'\nCOMPOSE_FILE = 'compose-production.yml'\n\n\n@task\ndef production():\n ...
python
edit
1
1
mit
b9b9382a62b00aa00255fbc9271ef5ec2db8c295
prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n# vim:fenc=utf-8\n#\n# Copyright © 2017 Malcolm Ramsay <<EMAIL>>\n#\n# Distributed under terms of the MIT license.\n\n\"\"\"Create functions to colourize figures.\"\"\"\n\nimport logging\n\ni...
python
edit
1
3
mit
42cb96833b71365745aa2a5a741bfe5eeb506098
malramsay64/MD-Molecules-Hoomd,malramsay64/MD-Molecules-Hoomd
statdyn/figures/colour.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ephem\nfrom datetime import datetime\n\ndef const(planet_name): # function name and parameters \n planet_class = getattr(ephem, planet_name) # sets ephem object class\n date_class = datetime.now()\n planet = plan...
python
edit
11
1
mit
9e4c34ee1e2de5fb8611d2c4b540e55d9872d0ae
bennettscience/PySky
astro.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n MoinMoin - Ref Macro\n\n Collect and emit footnotes. Note that currently footnote\n text cannot contain wiki markup.\n\n @copyright: 2011 Jason L. Wright <<EMAIL>>\n @license: BSD\n\"\"\"\n\nfrom MoinMoin import conf...
python
edit
8
1
bsd-2-clause
6f995fbe0532fc4ea36f3f7cd24240d3525b115f
wrigjl/moin-ref-bibtex
Ref.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom fix_getpass import fixGetpass\nimport os\nfrom django.core import management\nimport sys\n\ntry:\n from runpy import run_module\nexcept ImportError:\n from runpy_compat import run_module\n\n\ndef run(working_di...
python
edit
3
3
apache-2.0
f5e6ba58fa29bd89722c1e4bf4ec743eb1125f75
retomerz/intellij-community,adedayo/intellij-community,muntasirsyed/intellij-community,samthor/intellij-community,michaelgallacher/intellij-community,SerCeMan/intellij-community,apixandru/intellij-community,lucafavatella/intellij-community,wreckJ/intellij-community,caot/intellij-community,signed/intellij-community,hurr...
python/helpers/pycharm/django_manage_shell.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport setuptools\n\n\nsetuptools.setup(\n name='remoteconfig',\n version='0.2.4',\n\n author='Max Zheng',\n author_email='maxzheng.os @t gmail.com',\n\n description=open('README.rst').read(),\n\n i...
python
edit
3
0
mit
17e774c1c59411fd8b33d597b54f872466ec4fe7
maxzheng/remoteconfig
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Touhou Community Reliant Automatic Patcher\n# Scripts\n#\n# ----\n#\n\"\"\"Utility functions shared among all the scripts.\"\"\"\n\nfrom collections import OrderedDict\nimport json\nimport os\n\njson_load_params ...
python
edit
1
3
unlicense
d0919465239399f1ab6d65bbd8c42b1b9657ddb6
VBChunguk/thcrap,thpatch/thcrap,VBChunguk/thcrap,thpatch/thcrap,thpatch/thcrap,thpatch/thcrap,thpatch/thcrap,VBChunguk/thcrap
scripts/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"Context processors for adding current sections and placements in the context.\"\n\nimport re\n\nfrom .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY\nfrom .models import Section, Placement\n\n\ndef current_placements(request):\n ...
python
edit
1
4
bsd-2-clause
9172166ee492e73865c69f76d76690034ef5a402
mlavin/django-ad-code,mlavin/django-ad-code
adcode/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Handles all imports from jnius to prevent conflicts resulting from attempts\nto set JVM options while the VM is already running.\"\"\"\n\nimport jnius_config\n\nif '-Xmx4g' not in jnius_config.get_options():\n if not jnius_config.v...
python
edit
6
0
bsd-2-clause
6203fcb19fa8b8ca39d419d7f0cf482a1a718a02
johnbachman/indra,pvtodorov/indra,sorgerlab/indra,jmuhlich/indra,sorgerlab/belpy,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,bgyori/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,jmuhlich/indra,johnbachman/belpy,sorgerlab/belpy,so...
indra/java_vm.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n\nimport mdk_tracing\nimport time\n\nimport quark\n\ntracer = mdk_tracing.Tracer.withURLsAndToken(\"ws://localhost:52690/ws\", None, None)\n# tracer = mdk_tracing.Tracer.withURLsAndT...
python
edit
3
2
apache-2.0
de82b44979f3e3b1c7e73594cd2138d00add4e47
datawire/mdk,datawire/mdk,datawire/mdk,datawire/mdk
test-console.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom frame_receiver.ipc_channel import IpcChannel, IpcChannelException\nfrom frame_receiver.ipc_message import IpcMessage, IpcMessageException\nfrom frame_processor_config import FrameProcessorConfig\n\nimport time\n\nclass FrameProcessor(o...
python
edit
3
2
apache-2.0
1510d5657e6084cb94de514d1ba05e3b30f0ce5f
odin-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,percival-det...
tools/python/frame_processor/frame_processor.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\nclass MainListener(SwiftListener):\n\n def enterClassName(self, ctx):\n className = ctx.getText()\n if not isUppe...
python
edit
1
2
mit
77c114925fb45fa56c1da358ed47d8222775f99f
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# Get a reference to the Application class.\nfrom web.core import Application\n\n\n# This is our WSGI application instance.\napp = Application(\"Hi.\")\n\n\n# If we're run as the \"main script\", serve our application over HTTP.\nif __name_...
python
edit
1
0
mit
d347f8a42bdf66eeb0e56b3de1ad941b65ba1681
amcgregor/WebCore-Tutorial
web/app/wiki/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThe setup package to install TensorPy dependencies\n*> This does NOT include TensorFlow installation\n*> To install TensorFlow, use \"./install_tensorflow.sh\"\n\"\"\"\n\nfrom setuptools import setup, find_packages # noqa\n\nsetup(...
python
edit
1
0
mit
f22945907bafb189645800db1e9ca804104b06db
TensorPy/TensorPy,TensorPy/TensorPy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..kernel import Kernel\nfrom scannerpy import DeviceType\n\n\nclass TensorFlowKernel(Kernel):\n def __init__(self, config):\n import tensorflow as tf\n\n # If this is a CPU kernel, tell TF that it should not use\n ...
python
edit
1
4
apache-2.0
dfaffd1e2c189a9d85c493db76b9751b4c802bce
scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner
python/scannerpy/stdlib/tensorflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conjureup import controllers\nfrom conjureup.app_config import app\n\n\nclass BaseVSphereSetupController:\n def __init__(self):\n # Assign current datacenter\n app.provider.login()\n for dc in app.provider.get_d...
python
edit
1
3
mit
74652fd620f33231e4e3086d4b461c2cdf18bfba
Ubuntu-Solutions-Engineering/conjure,Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,conjure-up/conjure-up,ubuntu/conjure-up,conjure-up/conjure-up
conjureup/controllers/vspheresetup/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n ydf/yaml_ext\n ~~~~~~~~~~~~\n\n Contains extensions to existing YAML functionality.\n\"\"\"\n\nimport collections\n\nfrom ruamel import yaml\nfrom ruamel.yaml import resolver\n\n\nclass OrderedLoader(yaml.Loader):\n \"\...
python
edit
3
1
apache-2.0
13ba6bf5c12c46aa43c0060d40458fe453df9c33
ahawker/ydf
ydf/yaml_ext.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom plugins.categories import ISilentCommand\n\ntry:\n import requests_pyopenssl\n from requests.packages.urllib3 import connectionpool\n connectionpool.ssl_wrap_socket = requests_pyopenssl.ssl_wrap_socket\nexcept ImportError:\n ...
python
edit
4
6
isc
18ad742656f8ef0b47e4e8d810939ea93528aee4
ComSSA/KhlavKalash
plugins/urlgrabber.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .citation import cite_me_please\nfrom .fluxes import measure_fluxes\nfrom .gapfill_from_roles import gapfill_from_roles\nfrom .assigned_functions_to_reactions import to_reactions\nfrom .fba_from_reactions import run_the_fba\nfrom .gapf...
python
edit
1
0
mit
1d4777f810388ee87cceb01c2b53367723fb3a71
linsalrob/PyFBA
PyFBA/cmd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('icekit', '0002_layout'),\n ('eventkit_fluente...
python
edit
1
0
mit
e20dc134911ad7b99014fdbf77dacd498cecce19
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events
eventkit/plugins/fluentevent/migrations/0002_fluentevent_layout.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-*- encoding: utf-8 -*-\n\nimport base\n\nclass SnippetParser(base.SnippetParserBase):\n def strip_template(self, template, normalize, collapse):\n if template.name.matches('unité'):\n return ' '.join(map(unicode, temp...
python
edit
5
7
mit
4021d27a7bd15a396b637beb57c10fc95936cb3f
Stryn/citationhunt,jhsoby/citationhunt,Stryn/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,Stryn/citationhunt
snippet_parser/fr.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass ErrorResponse(ModuleData):\n implements(IPlugin, IModuleData)\n \n name = \"errorRespon...
python
edit
1
1
bsd-3-clause
07a04f63da897ae687fd90039d379482a13372e2
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/rfc/response_error.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom functools import wraps\n\nfrom flask import Blueprint\nfrom flask import Response\n\nfrom ..models import Tag\n\n\napi_views = Blueprint('api', __name__, url_prefix='/api/')\n\n\ndef jsonify(func):\n @wraps(func)\n d...
python
edit
1
2
mit
98925a82dfb45a4c76496cd11af8d1483a678e6e
kxxoling/Programmer-Sign,kxxoling/Programmer-Sign,kxxoling/Programmer-Sign
sigh/views/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__author__ = 'jakub'\n\n\nCONFIG_DIR = os.path.expanduser('~/.httpie')\n\n```\n\nApply this change: Use %APPDATA% for data on Windows." }, { "role": "assistant", "content": "import os\nfrom requests.compat import i...
python
edit
1
0
bsd-3-clause
9b586b953bfe3c94adb40d0a804de3d46fca1887
codingjoe/httpie,konopski/httpie,Bogon/httpie,fontenele/httpie,aredo/httpie,GrimDerp/httpie,vietlq/httpie,paran0ids0ul/httpie,gnagel/httpie,fontenele/httpie,lingtalfi/httpie,rschmidtz/httpie,alexeikabak/httpie,konopski/httpie,PKRoma/httpie,GrimDerp/httpie,PKRoma/httpie,bright-sparks/httpie,marklap/httpie,fritaly/httpie...
httpie/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nProto type that does the following:\n\ninput:Excel file in language A\noutput 1:Copy of input file, with original strings replaced with serial numbers\noutput 2:Single xlsx file that contains serial numbers and original texts from i...
python
edit
3
0
apache-2.0
73e4f2c333e7b4f02dbb0ec344a3a671ba97cac3
iku000888/Excel_Translation_Helper
library-examples/read-replace-export-excel.py
accepted
null
true