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\nfrom axiom import attributes, item\nfrom twisted.cred import credentials\n\n\nclass UsernamePassword(item.Item):\n \"\"\"\n A stored username and password.\n \"\"\"\n username = attributes.bytes(allowNone=False)\n password = ...
python
edit
1
1
isc
f68b4b9b133d3c8ecb9826af9736c8c1fca64e49
lvh/maxims
maxims/credentials.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n adbwp\n ~~~~~\n\n Android Debug Bridge (ADB) Wire Protocol.\n\"\"\"\n# pylint: disable=wildcard-import\n\nfrom . import exceptions\nfrom .exceptions import *\nfrom . import header\nfrom .header import Header\nfrom . import...
python
edit
2
0
apache-2.0
4b659b7b2552da033753349e059eee172025e00e
adbpy/wire-protocol
adbwp/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='yargy',\n version='0.4.0',\n description='Tiny rule-based facts extraction package',\n url='https://github.com/bureaucratic-labs/yargy',\n author='Dmitry Veselov',...
python
edit
1
0
mit
28c52ee84f139b8fef912a5c04327e69d05dd098
bureaucratic-labs/yargy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport xml.etree.ElementTree as E\n\nfrom authorize.configuration import Configuration\nfrom authorize.address import Address\nfrom authorize.bank_account import BankAccount\nfrom authorize.batch import Batch\nfrom authorize.credit_card imp...
python
edit
15
2
mit
4803578ebb306e2e142b629d98cb82899c0b0270
aryeh/py-authorize,uglycitrus/py-authorize,vcatalano/py-authorize
authorize/__init__.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\nfrom django.db import models\nimport uuid\nimport os\n\n\ndef unique_file_name(instance, filename):\n path = 'benchmarkLogs/'\n name = str(uuid.uuid4()) + '.log'\n return os.path.join(path, name)\n\nclass Picture...
python
edit
1
1
bsd-2-clause
60837893bf12bc5476b050cdc689260e9695a297
ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark
fileupload/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\nfrom django.conf import settings\n\nfrom holonet.mappings.helpers import clean_address, split_address\n\nfrom .models import DomainBlacklist, DomainWhitelist, SenderBlacklist, SenderWhitelist\n\n\ndef is_blackliste...
python
edit
1
6
mit
0ee0650dfacf648982615be49cefd57f928a73ee
webkom/holonet,webkom/holonet,webkom/holonet
holonet/core/list_access.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\n# Use quickphotos.VERSION for version numbers\nversion_tuple = __import__('quickphotos').VERSION\nversion = '.'.join([str(v) for v in version_tuple])\n\nsetup(\n name=...
python
edit
1
0
bsd-3-clause
3032a68c560ec9ee5eaf6308ebc6f61b38f933ab
blancltd/django-quick-photos,kmlebedev/mezzanine-instagram-quickphotos
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\n\nPANEL_NAME = \"SublimeLinter Messages\"\nOUTPUT_PANEL = \"output.\" + PANEL_NAME\n\n\ndef plugin_unloaded():\n for window in sublime.windows():\n window.destroy_output_panel(PANEL_NAME)\n\n...
python
edit
1
2
mit
f1793ed8a494701271b4a4baff8616e9c6202e80
SublimeLinter/SublimeLinter3,SublimeLinter/SublimeLinter3
message_view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of SpaceVecAlg.\n#\n# SpaceVecAlg is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 o...
python
edit
2
0
bsd-2-clause
b50ef13cb25c795a1ad3b2bfdbbb47b709fcbd39
jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn
binding/python/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.parsers import JSONParser\n\nfrom api.base.renderers import JSONAPIRenderer\nfrom api.base.exceptions import JSONAPIException\n\nclass JSONAPIParser(JSONParser):\n \"\"\"\n Parses JSON-serialized data. Overrides me...
python
edit
1
4
apache-2.0
91229ab93609f66af866f7ef87b576a84546aeab
mluo613/osf.io,adlius/osf.io,alexschiller/osf.io,samanehsan/osf.io,doublebits/osf.io,Ghalko/osf.io,rdhyee/osf.io,GageGaskins/osf.io,erinspace/osf.io,samanehsan/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,amyshi188/osf.io,doublebits/osf.io,caseyrygt/osf.io,adlius/osf.io,caneruguz/osf.io,kwierman/osf.io,erinspace/osf.i...
api/base/parsers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nimport jingo\n\nfrom users.models import Profile\nfrom projects.models import Project\nfrom events.models import Event\nfrom feeds.models import Entry\n\n\ndef splash(request):\n \"\"\"Display splash page. With featured ...
python
edit
1
3
bsd-3-clause
be41ae0d987cd1408cb2db649a2eccd73bc272f3
mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm
apps/innovate/views.py
rejected_duplicate
Near-duplicate of sample 2466
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport codecs\nfrom setuptools import setup, find_packages\n\n\n# Utility function to read the README file.\n# Used for the long_description. It's nice, because now 1) we have a top level\n# README file ...
python
edit
1
1
bsd-3-clause
7bdb5b717560a147dc70b6c566cad6fa621a8902
pelme/rds-log,pelme/rds-log
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nclass Cache:\n \"\"\"\n Tra...
python
edit
1
3
apache-2.0
fbfeaaad959cd4ed9ef91cebbef847c5f1bf3fdb
uskudnik/ggrc-core,uskudnik/ggrc-core,vladan-m/ggrc-core,selahssea/ggrc-core,prasannav7/ggrc-core,VinnieJohns/ggrc-core,vladan-m/ggrc-core,josthkko/ggrc-core,j0gurt/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,hasanalom/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc...
src/ggrc/models/cache.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nMission simulation.\n\"\"\"\n\nfrom rover import Plateau, Rover, Heading, Command\n\n\nif __name__ == '__main__':\n instructions = open('instructions.txt', 'r')\n\n # Prepare the plateau to landings.\n da...
python
edit
1
0
mit
7cde727c5a1a5de652e6b1c3d207c5b51fe719cf
rodrigobraga/Mars-Rover-Challenge
mission.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom util import full_stack\nfrom util import check_nslookup\nfrom util import get_credentials_for\nfrom dbaas_dnsapi.models import DatabaseInfraDNSList\nfrom dbaas_credentials.models import Credenti...
python
edit
1
4
bsd-3-clause
4ee53117aa32b1ead7c979a49d7cb5709e18d8cc
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/util/deploy/check_dns.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Generates the *public* API documentation.\n# Remember to hide your private parts, people!\nimport os, re, sys\n\nproject = 'Exscript'\nbase_dir = os.path.join('..', 'src', project)\ndoc_dir = 'api'\n\n# Create the...
python
edit
4
0
mit
d3a2e344caa34f763f7e46710db5b9ddefe73c55
maximumG/exscript,knipknap/exscript,knipknap/exscript,maximumG/exscript
doc/mkapidoc.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom eve import Eve\n\napp = Eve()\n\nif __name__ == '__main__':\n app.run()\n\n```\n\nApply this change: Use port 80 to serve the API" }, { "role": "assistant", "content": "from eve import Eve\n\napp = Eve()\n\nif __name__ =...
python
edit
1
0
mit
96e3d70a7bd824b8265e8e67adc3996c4522dd57
waoliveros/historia
historia.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom bottle import route\nfrom textwrap import dedent\nfrom bottledaemon import daemon_run\n\n\"\"\" Simple AFP mock to allow testing the afp-cli. \"\"\"\n\n@route('/account')\ndef account():\n return \"\"\"{\"test...
python
edit
1
1
apache-2.0
c129b435a7759104feaaa5b828dc2f2ac46d5ab1
ImmobilienScout24/afp-cli,ImmobilienScout24/afp-cli,ImmobilienScout24/afp-cli
src/cmdlinetest/afp_mock.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='file2dna',\n version='0.1',\n author = 'Allan Inocencio de Souza Costa',\n a...
python
edit
1
1
mit
37f5d7e0648bbc4a6682395ab213c87965c12c23
allanino/DNA
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nimport os\nfrom setuptools import setup, find_packages\n\nfrom plugins import __version__\n\nrepo_directory = os.path.dirname(__file__)\ntry:\n long_description = open(os.path.join(repo_directory, 'README.rst'))...
python
edit
1
0
mit
8b25ce43c2d99876080d84674485ebad07ca4bc0
alphagov/nagios-plugins
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom endpoints import Controller, CorsMixin\nimport sqlite3\nfrom datetime import datetime\n\nconn = sqlite3.connect('CIUK.db')\ncur = conn.cursor()\n\nclass Default(Controller, CorsMixin):\n def GET(self):\n return \"CIUK\"\n\n def PO...
python
edit
1
1
mit
b8770a85e11c048fb0dc6c46f799b17add07568d
joykuotw/python-endpoints,joykuotw/python-endpoints,joykuotw/python-endpoints
productController.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='exchangerates',\n version='0.3.3',\n description=\"A module to make it easier to handle historical exchange rates\",\n long_description=\"\",\n classifiers=[\n ...
python
edit
1
0
mit
80001f7947c3fabac9d2c22613e0d73b652b8d5c
markbrough/exchangerates
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport entropy._entropy as _entropy\n\ndef entropy(data):\n\t\"\"\"Compute the Shannon entropy of the given string.\n\n\tReturns a floating point value indicating how many bits of entropy\n\tthere are per octet in the string.\"\"\"\n\tretur...
python
edit
2
1
bsd-3-clause
8d471b5b7a8f57214afe79783f09afa97c5d2bfc
chachalaca/py-entropy,billthebrute/py-entropy,chachalaca/py-entropy,billthebrute/py-entropy
entropy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport kindred\n\ndef test_pubannotation():\n\tcorpus = kindred.pubannotation.load('bionlp-st-gro-2013-development')\n\n\tassert isinstance(corpus,kindred.Corpus)\n\n\tfileCount = len(corpus.documents)\n\tentityCount = sum([ len(d.entitie...
python
edit
1
3
mit
ad276d549eebe9c6fe99a629a76f02fc04b2bd51
jakelever/kindred,jakelever/kindred
tests/test_pubannotation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport subprocess, os, sys\n\nif len(sys.argv) < 2:\n print('Must specify file names of 2 chess engines')\n for i in range(len(sys.argv)):\n print(str(i) + ': ' + sys.argv[i])\n sys.exit(1)\n\ngenerator ...
python
edit
1
0
mit
29061254e99f8e02e8285c3ebc965866c8c9d378
MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess
testing/chess_engine_fight.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom redis import Redis\nimport os\napp = Flask(__name__)\nredis = Redis(host='redis', port=6379)\n\n@app.route('/')\ndef hello():\n redis.incr('hits')\n return 'Hello World! I have been seen %s times.' % redi...
python
edit
3
1
apache-2.0
d2046bcf01d02ae9dee91363f61b6afcba3f882f
pessoa/guides,pessoa/guides
weave-and-docker-platform/app/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass LocalNodeMiddleware(object):\n \"\"\"\n Ensures a Node that represents the local server always exists.\n\n No other suitable hook for code that's run once and can access the server's host name\n was found. A migration was ...
python
edit
1
5
apache-2.0
108b0374d07ca33e90d963692f51e8a66e6d805c
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
common/middleware/local_node.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom rest_framework import serializers\n\nfrom apps.broadcasts.models import Broadcast, Raid, Series\nfrom apps.games.models import Game\n\n\nclass BroadcastSerializer(serializers.ModelSerializer):\n class Meta:\...
python
edit
1
0
apache-2.0
cc5cf942cc56f12e09c50c29b488f71504387b7f
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
avalonstar/apps/api/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# For reasons that I don't fully understand,\n# unless I include __file__ in here, the packaged version\n# of this module will just be a .egg file, not a .egg folder.\n# And if it's just a .egg file, it won't include the necessary\n# depend...
python
edit
1
0
mit
6b2202d0b7a4ef544b63e1692e40c5fec9c5930a
plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash
dash_renderer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport argparse\n\nfrom dx.dex import Dex\n\nfrom sha1 import update_signature\nfrom adler32 import update_checksum\n\ndef main():\n parser = argparse.ArgumentParser(description=\"Parse and reconstruct dex file\")\n\...
python
edit
2
1
bsd-3-clause
3122736e0eccd4d4b1f003faa1db6ec05710883f
strazzere/dexterity,strazzere/dexterity,rchiossi/dexterity,strazzere/dexterity,rchiossi/dexterity,rchiossi/dexterity
addstr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',...
python
edit
1
2
mit
e948500e45314f9ae7f11426e163e3f4fa760c51
Doist/todoist-python
setup.py
rejected_duplicate
Near-duplicate of sample 2235
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom .tasks import (\n update_wordpress_user as update_wordpress_user_task,\n update_wordpress_role as update_wordpress_role_task\n)\n\n\ndef update_wordpress_user(user):\n if not settings.ASYNC:...
python
edit
1
5
apache-2.0
d32ec29dfae5a3ea354266dfda0438d9c69398e3
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
daiquiri/wordpress/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# build.py\n#!/usr/bin/env python3\nimport os\nimport jinja2\n\n# Markdown to HTML library\n# https://pypi.org/project/Markdown/\nimport markdown\n\nfrom staticjinja import Site\n\nmarkdowner = markdown.Markdown(output_format=\"html5\")\nde...
python
edit
1
2
mit
33a3ebacabda376826f0470129e8583e4974fd9d
Ceasar/staticjinja,Ceasar/staticjinja
examples/markdown/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef delete_sync_logs(before_date, limit=1000):\n from casexml.apps.phone.dbaccessors.sync_logs_by_user import get_synclog_ids_before_date\n from casexml.apps.phone.models import SyncLog\n from dimagi.utils.couch.database import i...
python
edit
1
1
bsd-3-clause
306e0e38c148fed14cffd82ae0ede9b20ab30853
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/casexml/apps/phone/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration.\n\nYolapy.configuration provides a key-value store used by the Yola client.\n\nData is stored here in the module, benefits include:\n\n * Configuration is decoupled from application logic.\n\n * When instantiating multi...
python
edit
1
2
mit
172feb5997a826181a0ec381c171a0a2cc854e4c
yola/yolapy
yolapy/configuration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom collections import Counter\nfrom streamparse.bolt import Bolt\n\nclass WordCounter(Bolt):\n\n def initialize(self, conf, ctx):\n self.counts = Counte...
python
edit
1
1
apache-2.0
bdbff5ea5548067713951a85b05f3818e537c8d4
crohling/streamparse,petchat/streamparse,petchat/streamparse,eric7j/streamparse,msmakhlouf/streamparse,codywilbourn/streamparse,Parsely/streamparse,codywilbourn/streamparse,msmakhlouf/streamparse,scrapinghub/streamparse,Parsely/streamparse,petchat/streamparse,phanib4u/streamparse,petchat/streamparse,scrapinghub/streamp...
streamparse/bootstrap/project/src/bolts/wordcount.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or...
python
edit
1
0
apache-2.0
3ca11cd2ba0bcff8bbc4d01df2ba5b72f5b2e4b0
robhudson/warehouse,mattrobenolt/warehouse,techtonik/warehouse,techtonik/warehouse,mattrobenolt/warehouse,mattrobenolt/warehouse,robhudson/warehouse
warehouse/packaging/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n'''aiospamc package.\n\nAn asyncio-based library to communicate with SpamAssassin's SPAMD service.'''\n\nfrom aiospamc.client import Client\n\n__all__ = ('Client',\n 'MessageClassOption',\n 'Act...
python
edit
1
0
mit
95988fc4e5d7b5b5fa3235000ad9680c168c485c
mjcaley/aiospamc
aiospamc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport click\nfrom slugify import slugify\n\n\nclass SlugBranchGetter(object):\n def __init__(self, base_branch='master'):\n self.base_branch = base_branch\n\n def __call__(self, repo, issue):\n discriminator...
python
edit
1
8
mit
3d86b4473f66a9311a94b1def4c40189eae23990
GaretJax/lancet,GaretJax/lancet
lancet/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 Ansible, Inc.\n# All Rights Reserved.\n\nimport pprint\n\nfrom django.utils.encoding import smart_text\nfrom django.core.mail.backends.smtp import EmailBackend\n\nclass CustomEmailBackend(EmailBackend):\n\n init_para...
python
edit
1
2
apache-2.0
f286dc748670c67845df226ca7d400e745dd502f
wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx
awx/main/notifications/email_backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom rest_framework.response import Response\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.organization import OrganizationEndpoint\nfrom sentry.api.serializers import serialize\n...
python
edit
2
5
bsd-3-clause
8816d06381625938137d9fbf8aaee3d9ddabae72
ifduyue/sentry,ngonzalvez/sentry,jean/sentry,Kryz/sentry,nicholasserra/sentry,daevaorn/sentry,BayanGroup/sentry,mvaled/sentry,1tush/sentry,looker/sentry,mvaled/sentry,ngonzalvez/sentry,mvaled/sentry,zenefits/sentry,beeftornado/sentry,JackDanger/sentry,hongliang5623/sentry,daevaorn/sentry,JamesMura/sentry,gencer/sentry,...
src/sentry/api/endpoints/organization_projects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=18\nbranch=\"master\"\ntimestamp=1376526164.38\n```\n\nApply this change: Tag commit for v0.0.19-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=19\nbranc...
python
edit
1
0
mit
5eb765ee3ad9bdad53b76e07c2114121a56036f7
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport django\nfrom django.conf import settings\nfrom django.utils.importlib import import_module\nfrom django.utils.module_loading import module_has_submodule\n\n\ndef autodiscover():\n \"\"\"Auto-discover INS...
python
edit
1
4
bsd-3-clause
7cef87a81278c227db0cb07329d1b659dbd175b3
novafloss/django-mail-factory,novafloss/django-mail-factory
mail_factory/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\n\ndef fix_imports():\n here = os.path.dirname(__file__)\n dirs = [\n os.path.normpath(os.path.join(here, '..', '..')),\n os.path.normpath(os.path.join(here, 'babel')),\n os.path.normpath(os.path.joi...
python
edit
1
1
mit
317cf766f3fe1c55e5a57b7e38fb94222c6525d8
grow/grow,vitorio/pygrow,grow/grow,grow/pygrow,grow/pygrow,vitorio/pygrow,codedcolors/pygrow,grow/grow,codedcolors/pygrow,denmojo/pygrow,denmojo/pygrow,denmojo/pygrow,denmojo/pygrow,vitorio/pygrow,grow/pygrow,codedcolors/pygrow,grow/grow
grow/submodules/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\nfrom django.db import connection\n\n\ndef auto_close_db(f):\n \"Ensures the database connection is closed when the function returns.\"\n @wraps(f)\n def wrapper(*args, **kwargs):\n try:\n ...
python
edit
1
2
mit
cbdfc1b1cb4162256538576cabe2b6832aa83bca
smartfile/django-mysqlpool
django_mysqlpool/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom twisted.web.server import Site\nfrom webtest.session import RedisSessionFactory\nfrom webtest.request import RedisRequest\nfrom webtest import log\n\nlogger = log.get_logger()\n\nclass RedisSite(Site):\n ses...
python
edit
1
1
mit
2fe02384ba4d5a8dee493d8fa76a3d0a6c440c01
donalm/webtest,donalm/webtest
lib/python/webtest/site.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom lbtoolbox.download import download\n\nimport os\nimport inspect\nimport tarfile\n\n\ndef here(f):\n me = inspect.getsourcefile(here)\n return os.path.join(os.path.dirname(os.path.abspath(me)), f)\n\n\ndef...
python
edit
1
1
mit
84f4626a623283c3c4d98d9be0ccd69fe837f772
lucasb-eyer/BiternionNet
download_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add package docstring for skimage.future" }, { "role": "assistant", "content": "\"\"\"Functionality with an experimental API. Although you can count on the\nfunctions in this package being around in the future, the API may change...
python
new_file
1
0
bsd-3-clause
d2d50e93911693c326b057a4c48f0a47d520f0a1
ClinicalGraphics/scikit-image,ClinicalGraphics/scikit-image,newville/scikit-image,michaelaye/scikit-image,WarrenWeckesser/scikits-image,Hiyorimi/scikit-image,rjeli/scikit-image,chriscrosscutler/scikit-image,WarrenWeckesser/scikits-image,ofgulban/scikit-image,dpshelio/scikit-image,juliusbierk/scikit-image,newville/sciki...
skimage/future/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom config.experiment_config_lib import ControllerConfig\nfrom sts.topology import MeshTopology\nfrom sts.control_flow import Fuzzer\nfrom sts.input_traces.input_logger import InputLogger\nfrom sts.simulation_state import SimulationConfi...
python
edit
1
0
apache-2.0
c65b6adafcdf791030090a72f4490171012ce4fd
ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts
config/fuzz_pox_simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys\nfrom setuptools import setup\n\nsetup(\n name='reddit_comment_scraper',\n version='2.0.0',\n description='A simple Reddit-scraping script',\n url='https://github.com/jfarmer/reddit_comment_scraper',\n author='...
python
edit
4
0
mit
85e5ea5b4fcc7039a6d3441fcc65fc3d0825f16c
jfarmer/reddit_comment_scraper,chrisswk/reddit_comment_scraper
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport Command\n#~ import reicastControllers\nimport recalboxFiles\nfrom generators.Generator import Generator\nimport ppssppControllers\nimport shutil\nimport os.path\nimport ConfigParser\n\n\nclass PPSSPPGenerator(G...
python
edit
5
4
mit
888584a49e697551c4f680cc8651be2fe80fc65d
nadenislamarre/recalbox-configgen,recalbox/recalbox-configgen,digitalLumberjack/recalbox-configgen
configgen/generators/ppsspp/ppssppGenerator.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom datawire.views.util import JSONEncoder\n\n\nclass Store(object):\n\n def __init__(self, url):\n self.url = url\n\n def store(self, frame):\n urn = frame.get('urn')\n data = json.dumps(frame, cl...
python
edit
1
2
mit
3421fe2542a5b71f6b604e30f2c800400b5e40d8
arc64/datawi.re,arc64/datawi.re,arc64/datawi.re
datawire/store/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os.path\nimport sys\nimport unittest\n\n\nsys.path.append(os.path.join(os.path.dirname(__file__), '../'))\nsys.path.append(os.path.join(os.path.dirname(__file__), '../vCenterShell'))\nfrom vCenterShell.pycommon.logging_service impo...
python
edit
1
1
apache-2.0
ec04b842c21cddaef1cf010e419113e83f3be3f1
QualiSystems/vCenterShell,QualiSystems/vCenterShell
tests/test_logging_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom .models import Event, Place, PublicationStatus\nfrom django.utils.html import strip_tags\n\n\nclass EventIndex(indexes.SearchIndex, indexes.Indexable):\n text = indexes.CharField(document=True, use_temp...
python
edit
1
2
mit
521b4fbec142306fad2347a5dd3a56aeec2f9498
aapris/linkedevents,aapris/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,aapris/linkedevents
events/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: set fileencoding=utf-8 :\n\nfrom flask import flash\n\nfrom old_xml_import import old_xml_import\nfrom sml_import import sml_import\nimport gzip\nfrom model import db, Sample\nfrom sqlalchemy.sql import func\n\...
python
edit
1
10
mit
a68f3ea83c191478f6a7b0dc6a4b49ff6c297ae2
bwaldvogel/openmoves,marguslt/openmoves,marguslt/openmoves,bwaldvogel/openmoves,mourningsun75/openmoves,mourningsun75/openmoves,mourningsun75/openmoves,marguslt/openmoves,bwaldvogel/openmoves
imports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\n\n_d=collections.defaultdict(int)\n\n_d['a']+=1\n_d['a']+=2\n_d['b']+=4\n\nassert _d['a'] == 3\nassert _d['b'] == 4\n\ns = 'mississippi'\nfor k in s:\n _d[k] += 1\n\n_values=list(_d.values())\n_values.sort()\nassert _...
python
edit
1
0
bsd-3-clause
d07a7ad25f69a18c57c50d6c32df212e1f987bd4
kikocorreoso/brython,Mozhuowen/brython,Hasimir/brython,Isendir/brython,Isendir/brython,amrdraz/brython,jonathanverner/brython,kevinmel2000/brython,brython-dev/brython,Mozhuowen/brython,jonathanverner/brython,Hasimir/brython,rubyinhell/brython,Hasimir/brython,molebot/brython,Isendir/brython,JohnDenker/brython,olemis/bry...
www/tests/test_collections.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Create your views here.\nfrom django.http import HttpResponse\nfrom lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache\nfrom django.core import serializers\nfrom django.contrib.gis.geos import fromstr\n\ndef st...
python
edit
2
4
bsd-3-clause
7cd2f582c444c483b9f8a677063f03dfe9ce0e0a
underbluewaters/marinemap,underbluewaters/marinemap,underbluewaters/marinemap
lingcod/raster_stats/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom core.cachecontroller.BaseURLTasksProvider import BaseURLTasksProvider\nimport queue, threading\nfrom datetime import datetime, timedelta\nimport logging\n\nclass ArtPackages(BaseURLTasksProvider):\n\n BASIC_PRIORITY = 1\n lock = ...
python
edit
1
1
apache-2.0
605011cbb7953e8629f844d16d62f4632727b023
PanDAWMS/panda-bigmon-core,PanDAWMS/panda-bigmon-core,PanDAWMS/panda-bigmon-core,PanDAWMS/panda-bigmon-core
core/cachecontroller/schedinstances/ArtPackages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom configReader import ConfigReader\nimport sys\nimport os, os.path\nimport os.path\nfrom time import time\nfrom math import floor\nimport hashlib\nimport random\nimport requests\n\nf = open('adjectives.txt','r')\...
python
edit
4
0
mit
280c81a3990116f66de9af8e6fd6e71d0215a386
ollien/Screenshot-Uploader,ollien/Screenshot-Uploader
client.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Little helper application to improve django choices (for fields)\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom .choices import Choices\n\n__author__ = 'Stephane \"Twidi\" Ange;'\n__contact__ = \"<EMAIL>\"\n__homepage__ = \"...
python
edit
4
0
bsd-3-clause
07dcdb9de47ac88a2e0f3ecec257397a0272f112
twidi/django-extended-choices
extended_choices/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\nfrom distutils.command import build\n\n\nclass build(build.build):\n def _compile_parsers(self):\n import parsing\n\n import edgedb\n import edgedb.server.main\n\n edgedb.server.main.init_imp...
python
edit
1
2
apache-2.0
3446db734ce669e98f8cdeedbabf13dac62c777f
edgedb/edgedb,edgedb/edgedb,edgedb/edgedb
edgedb/lang/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom rest_framework.routers import DefaultRouter\n\nfrom .parking_area import PublicAPIParkingAreaViewSet\nfrom .parking_area_statistics import PublicAPIParkingAreaStatisticsViewSet\n\nrouter = Def...
python
edit
1
0
mit
27bf030df4c2f46eef8cdcd9441bd5d21a22e5cc
tuomas777/parkkihubi
parkings/api/public/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Sample extension: zoom a window to maximum height\n\nimport re\nimport sys\n\nclass ZoomHeight:\n\n menudefs = [\n ('windows', [\n ('_Zoom Height', '<<zoom-height>>'),\n ])\n ]\n\n windows_keydefs = {\n ...
python
edit
1
4
mit
21e15235b2cd767e0da56a2a0d224824fda58c42
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Tools/idle/ZoomHeight.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom pyhocon.config_tree import ConfigTree\nfrom pyhocon.exceptions import ConfigMissingException, ConfigWrongTypeException\n\n\nclass TestConfigParser(object):\n\n def test_config_tree_quoted_string(self):\n config...
python
edit
1
2
apache-2.0
faa67c81ad2ebb8ba8cb407982cbced72d1fa899
acx2015/pyhocon,chimpler/pyhocon,vamega/pyhocon,peoplepattern/pyhocon
tests/test_config_tree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport platform\n\nfrom .generic import MeshScript\nfrom ..constants import log\n\nfrom distutils.spawn import find_executable\n\n_search_path = os.environ['PATH']\nif platform.system() == 'Windows':\n # split existing path by...
python
edit
1
3
mit
fee245628d492f64f3fe02563d3059317d456ed6
mikedh/trimesh,mikedh/trimesh,mikedh/trimesh,dajusc/trimesh,dajusc/trimesh,mikedh/trimesh
trimesh/interfaces/vhacd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport json\nimport os\n\nimport requests\n\nBASE_URL = \"https://api.majestic.com/api/json\"\nBASE_PARAMS = {'app_api_key': os.environ.get('THEAPIKEY')}\n\n\ndef get(cmd, params):\n querydict = {'cmd': cmd}\n querydi...
python
edit
1
4
apache-2.0
a45942894ace282883da3afa10f6739d30943764
ohmygourd/dewbrick,ohmygourd/dewbrick,ohmygourd/dewbrick
dewbrick/majesticapi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Crypto.Hash import MD5\n\n\ndef derive_openssl_key(key, salt, hash=MD5):\n key = key[0:-16]\n openssl_key = bytes()\n prev = bytes()\n while len(openssl_key) < 32:\n prev = hash.new(prev + key + salt).digest()\n ...
python
edit
1
2
mit
78ca9c6b8393b1b4f4bddf41febc87696796d28a
openpassword/blimey,openpassword/blimey
openpassword/openssl_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport abc\nimport tensorflow as tf\n\n\n\nclass Model(metaclass=abc.ABCMeta):\n @abc.astractmethod\n def __init__(self, **hyperparameters_and_initial_parameters):\n return NotImplemented\n\n @abc.astractmethod\n def train(self, *inp...
python
edit
1
1
unlicense
9912974a283912acd31fa4ee85de2fb44c2cf862
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nfrom dj_experiment.tasks.tasks import longtime_add, netcdf_save\n\nif __name__ == '__main__':\n result = longtime_add.delay(1, 2)\n # at this time, our task is not finished, so it will return False\n print 'Task fini...
python
edit
9
0
mit
e0d909e25fbf47ebad35756032c9230fe3d3bdaa
francbartoli/dj-experiment,francbartoli/dj-experiment
example/example/tasksapp/run_tasks.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._array_object import ndarray\nfrom ._dtypes import float64\n\nimport numpy as np\n\ne = ndarray._new(np.array(np.e, dtype=float64))\ninf = ndarray._new(np.array(np.inf, dtype=float64))\nnan = ndarray._new(np.array(np.nan, dtype=float6...
python
edit
1
0
mit
5e9fda28089a11863dcc4610f5953dbe942165db
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
numpy/_array_api/_constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Helper classes \"\"\"\n\nimport facebook\nimport requests as r\n\n\nclass FacebookData:\n def __init__(self, token):\n \"\"\"\n :param token: Facebook Page token\n :param _api: Instance of the GraphAPI object\...
python
edit
1
3
mit
7f62587e099b9ef59731b6387030431b09f663f9
MichaelYusko/Bot-Chucky
bot_chucky/helpers.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.conf.urls import patterns, url\n\nfrom .views import HomePageView, FormHorizontalView, FormInlineView, PaginationView, FormWithFilesView, \\\n DefaultFormVie...
python
edit
1
0
bsd-3-clause
0ba063edc4aec690efca5c5ba9faf64042bb7707
dyve/django-bootstrap3,dyve/django-bootstrap3,zostera/django-bootstrap4,zostera/django-bootstrap4
demo/demo/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.views.generic import TemplateView\n\nurlpatterns = [\n url(r\"^$\", TemplateView.as_view(template_name=\"homepage.html\")),\n url(r\"^remote.html$\", TemplateView.as_view(template_name=\"r...
python
edit
1
0
bsd-3-clause
58f8f4881a9e97206ddf49ea6cfb7f48dd34bfb3
bashu/django-fancybox,bashu/django-fancybox
example/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new make_* fixtures to extension_course tests" }, { "role": "assistant", "content": "from events.tests.conftest import (administrative_division, administrative_division_type, data_source, event, # noqa\n ...
python
new_file
1
0
mit
8754f8b73b140fa597de1f70a0cf636d198fadb2
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
extension_course/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(name='wmtsproxy',\n version='0.1.2',\n description='WMTSProxy makes WMS/WMTS layers available as WMTS',\n author='Omniscale GmbH & Co. KG',\n ...
python
edit
1
0
apache-2.0
31544a73171c484ee57452d937f0ce040c2963be
CartoDB/wmtsproxy,CartoDB/wmtsproxy
wmtsproxy/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dateutil.relativedelta import relativedelta\nfrom django.apps import apps\nfrom django.utils import timezone\n\n\nuser_deletion_config = apps.get_app_config('user_deletion')\n\n\nclass UserDeletionManagerMixin:\n def users_to_notify...
python
edit
1
1
bsd-2-clause
7ce51c694e44e8503acd86de0f90dbc4078f4b82
incuna/django-user-deletion
user_deletion/managers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helper function for discovering processor plugins." }, { "role": "assistant", "content": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport os\nimport imp\nimp...
python
new_file
3
8
apache-2.0
694575e2707bdf7a2e042e2dd443a46481bc9d39
4degrees/segue
source/segue/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom rest_framework import serializers\n\nfrom landscapesim.models import Region\n\n\nclass ReportingUnitSerializer(serializers.Serializer):\n type = serializers.SerializerMethodField()\n properties = serializers.Serial...
python
edit
1
1
bsd-3-clause
1eb3df5ca3c86effa85ba76a8bdf549f3560f3a5
consbio/landscapesim,consbio/landscapesim,consbio/landscapesim
landscapesim/serializers/regions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom motobot import hook\nfrom time import sleep\n\n\n@hook('PING')\ndef handle_ping(bot, message):\n \"\"\" Handle the server's pings. \"\"\"\n bot.send('PONG :' + message.params[-1])\n\n\n@hook('NOTICE')\ndef handle_notice(bot, mess...
python
edit
1
4
mit
0e522a5cb9e2967de2a6f03badbe62e1c9c201a9
Motoko11/MotoBot
motobot/core_plugins/network_handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nfrom mopidy import config, ext\n\n__version__ = '0.3.0'\n\n\nclass Extension(ext.Extension):\n\n dist_name = 'Mopidy-SomaFM'\n ext_name = 'somafm'\n version = __version__\n\n ...
python
edit
1
1
mit
90265098d21fa900a4a2d86719efc95c352812f4
AlexandrePTJ/mopidy-somafm
mopidy_somafm/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom pyroSAR._dev_config import Storage, LOOKUP, URL, STORAGE\n\n\nclass TestStorage:\n def test_insert(self):\n storage = Storage(a=1, b=2)\n assert storage.a == 1\n assert storage.b == 2\n\nclass T...
python
edit
3
1
mit
040324578680a26f3816aef6f05a731be54a377d
johntruckenbrodt/pyroSAR,johntruckenbrodt/pyroSAR
pyroSAR/tests/test_dev_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport glob\nimport email\nimport itertools\nimport contextlib\n\n\nclass Distribution:\n def __init__(self, path):\n \"\"\"\n Construct a distribution from a path to the metadata dir\n \"\"\"\...
python
edit
1
2
apache-2.0
5eb8297b6da0b0cfd885975d5b9993a07acca426
python/importlib_metadata
importlib_metadata/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .test_algebra_initialisation import *\nfrom .test_clifford import *\nfrom .test_io import *\nfrom .test_g3c_tools import *\nfrom .test_tools import *\nfrom .test_g3c_CUDA import *\n\nimport unittest\n\n\ndef run_all_tests():\n unitt...
python
edit
1
1
bsd-3-clause
887cb1b1a021b6d4a1952fdeb178e602d8cabfdc
arsenovic/clifford,arsenovic/clifford
clifford/test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nimport logging\n\nfrom dotenv import load_dotenv, find_dotenv\nfrom grazer.config import Config\nfrom grazer.core import crawler\n\nlogger = logging.getLogger(\"Verata\")\n\n\n@click.command()\n@click.option(\"--env\", default...
python
edit
1
3
mit
c0bebbfe9247e367382008d35e98de894038d7f4
CodersOfTheNight/verata
grazer/run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial setup for solution" }, { "role": "assistant", "content": "class Pig_latin(object):\n vowels = [\"a\", \"e\" , \"i\", \"o\", \"u\"]\n\n\n def __init__(self, sentence):\n self.sentence = sentence\n\n def convert_s...
python
new_file
1
6
mit
a42bc9cfc862fd91a498b2738caabf7ca945168b
Bigless27/Python-Projects
Pig-Latin/pig_latin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom lightfm.cross_validation import random_train_test_split\nfrom lightfm.datasets import fetch_movielens\n\n\ndef _assert_disjoint(x, y):\n\n x = x.tocsr()\n y = y.tocoo()\n\n for (i, j) in zip(y.row, y.col):\n ...
python
edit
1
2
apache-2.0
0fa938a459293849761fe344c963c503e59e24df
lyst/lightfm,maciejkula/lightfm
tests/test_cross_validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nISIS_ROOT = os.environ.get('ISISROOT')\nif ISIS_ROOT is None:\n print 'Warning! ISISROOT is not defined. Bitch.'\n\n (ISIS_VERSION, ISIS_VERSION_MAJOR, ISIS_VERSION_MINOR,\n ISIS_VERSION_PA...
python
edit
3
8
bsd-3-clause
031d31c65b66dafe15470aeefe6b2a3240bb4969
wtolson/pysis,wtolson/pysis,michaelaye/Pysis,michaelaye/Pysis
pysis/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"astyle plugin for zazu\"\"\"\nimport zazu.styler\nimport zazu.util\n\n__author__ = \"Nicholas Wiles\"\n__copyright__ = \"Copyright 2017\"\n\n\nclass AstyleStyler(zazu.styler.Styler):\n \"\"\"Astyle plugin f...
python
edit
1
2
mit
66e2e3bee9996a0cb55c7b802a638e42bc72ccbe
stopthatcow/zazu,stopthatcow/zazu
zazu/plugins/astyle_styler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# From http://stackoverflow.com/questions/2687173/django-how-can-i-get-a-block-from-a-template\nfrom django.template import Context\nfrom django.template.loader_tags import BlockNode, ExtendsNode\n\n\nclass BlockNotFound(Exception):\n ...
python
edit
1
10
mit
4d9ae9a8041d56b0494fd94d7a14fead82a2e536
mypebble/django-templated-email,mypebble/django-templated-email
templated_email/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom ctypeslib.dynamic_module import include\nfrom ctypes import *\n\nif os.name == \"nt\":\n _libc = CDLL(\"msvcrt\")\nelse:\n _libc = CDLL(None)\n\ninclude(\"\"\"\\\n#include <stdio.h>\n\n#ifdef _MSC_VER\n# include <fcnt...
python
edit
4
0
mit
f4bf48ef24a6d3fcb15c0c86da0cfb48f1533f68
luzfcb/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib
ctypeslib/test/stdio.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mxnet as mx\nimport mxnet.ndarray as nd\n\n\nfor i in range(1000):\n noise = mx.random.normal(0,10,(i,i),ctx=mx.gpu())\n```\n\nApply this change: Update Bug for Normal Genrator" }, { "role": "assistant", "content": "im...
python
edit
1
0
apache-2.0
f8c9cb7d353680f48146d0b37e01ac6761ad7904
sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet
example/bayesian-dark-knowledge/random_num_generator_bug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app.dao.fees_dao import dao_update_fee, dao_get_fees, dao_get_fee_by_id\nfrom app.models import Fee\n\nfrom tests.db import create_fee\n\n\nclass WhenUsingFeesDAO(object):\n\n def it_creates_a_fee(self, db_session):\n fee = c...
python
edit
1
1
mit
c84aef2acef68d5feadb23aa045d9aa6e2f8512d
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
tests/app/dao/test_fees_dao.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n################################################################################\n# Created by Oscar Martinez #\n# <EMAIL> ...
python
edit
1
3
apache-2.0
46c63fea860217fecf4ca334149970e8df7fd149
nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search
webserver/webTermSuggester.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"restapp URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app imp...
python
edit
1
0
mit
acdf380a5463ae8bd9c6dc76ce02069371b6f5fd
TomaszGabrysiak/django-rest-angular-seed,TomaszGabrysiak/django-rest-angular-seed,TomaszGabrysiak/django-rest-angular-seed
backend/restapp/restapp/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport abc\n\n\nclass Automaton(metaclass=abc.ABCMeta):\n\n def __init__(self, states, symbols, transitions, initial_state,\n final_states):\n \"\"\"initialize a complete finite automaton\...
python
edit
1
1
mit
bf8d9fa8d309a1e1252acdcb8a6cfe785a27c859
caleb531/automata
automata/automaton.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\nfrom hamcrest import *\nimport unittest\n\nfrom .hamcrest i...
python
edit
13
1
bsd-3-clause
8a4a8cc351ae7fecd53932d0fb6ca0a7f9a83fbc
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/api/test/test_uris.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom src.TemperatureMonitor import TemperatureMonitor\nfrom src.temperature import TemperatureSensor\n\nSENSOR_ADDRESS = 0x48\n\ntempMonitor = TemperatureMonitor(TemperatureSensor(SENSOR_ADDRESS), observers=sys.argv[1:])\ntemp...
python
edit
3
0
mit
628d777e3751ec8e38f1b98f558799b28cda1569
IAPark/PITherm
src/services/TemperatureMonitor/TemperatureMonitor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Packages which Molly needs, but Pip can't handle\nPIP_PACKAGES = [\n ('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes\n ('django-compress', 'git+git://github.com/mollyproject/django-co...
python
edit
1
0
apache-2.0
d577545431c1e41a8987497ee116472f20404252
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
molly/installer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plugintypes\nimport tgl\n\nclass MediaPlugin(plugintypes.TelegramPlugin):\n \"\"\"\n Upload media files to chat when linked.\n \"\"\"\n patterns = [\n \"(https?://[\\w\\-\\_\\.\\?\\:\\/\\+\\=\\&]+\\.(gif|mp4|pdf|pd...
python
edit
1
2
mit
45cebb2ecd7b30bf33064701967e8690632b0c77
datamachine/telex,Thom7/telex,Thom7/telex,datamachine/telex
plugins/media.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom abc import abstractmethod\n\n\nclass PredictorBase(object):\n \"\"\"\"\n Abstract base class that implement the interface that we use for our\n predictors. Classic supervised learning.\n \n @author: Heiko\n \"\"\"\n\n...
python
edit
1
1
bsd-2-clause
a646bf7d791e84f4fa258e0c258e598c8d3f43d2
vincentadam87/gatsby-hackathon-seizure,vincentadam87/gatsby-hackathon-seizure
code/python/seizures/prediction/PredictorBase.py
accepted
null
true