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": "Write python code for the following: Add A new Folder and file @AnaniSkywalker" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Jul 16 15:53:32 2017\n\n@author: Anani Assoutovi\n\"\"\"\n\nimport numpy as ...
python
new_file
4
0
mit
0ac7a79dda372763c88b237e269aa9f955b88fdd
AnaniSkywalker/UDACITY_Machine_Learning,AnaniSkywalker/UDACITY_Machine_Learning
Titanic_Survival_Exploration/Titanic_Surv_Expl.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tool to extract routing from planning debug" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n###############################################################################\n# Copyright 2017 The Apollo Authors....
python
new_file
2
1
apache-2.0
189ec6dabc25eb91335568a7e6547483f9ec2960
ApolloAuto/apollo,ycool/apollo,ApolloAuto/apollo,xiaoxq/apollo,xiaoxq/apollo,ycool/apollo,ycool/apollo,ycool/apollo,jinghaomiao/apollo,wanglei828/apollo,wanglei828/apollo,ycool/apollo,ApolloAuto/apollo,jinghaomiao/apollo,jinghaomiao/apollo,jinghaomiao/apollo,xiaoxq/apollo,wanglei828/apollo,wanglei828/apollo,xiaoxq/apol...
modules/tools/extractor/extractor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an auto-generated missing migration" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.9 on 2016-11-07 15:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations,...
python
new_file
1
0
bsd-2-clause
55017eadf948fb951e6303cd4c914c968d6f60b2
maccesch/cmsplugin-contact,maccesch/cmsplugin-contact
cmsplugin_contact/migrations_django/0003_auto_20161107_1614.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to ensure sourceless specs are falsy\n\nCurrently failing; related to #187" }, { "role": "assistant", "content": "from imagekit.cachefiles import ImageCacheFile\nfrom nose.tools import assert_false\nfrom .imagegenerators...
python
new_file
1
1
bsd-3-clause
190153d06864b64275fbd515c2f1a2b8c8a5cdba
tawanda/django-imagekit,FundedByMe/django-imagekit,FundedByMe/django-imagekit,tawanda/django-imagekit
tests/test_specs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Refactor of migration script for migrating invalid Guid objects\n\n- Remove import side effects\n- Add tests" }, { "role": "assistant", "content": "\"\"\"Removes legacy Tag objects from the Guid namespace.\n\nTags were once GuidS...
python
new_file
5
3
apache-2.0
c831bfb8e5e28fdcf0dff818dd08274fa2fdb5cd
lyndsysimon/osf.io,binoculars/osf.io,doublebits/osf.io,rdhyee/osf.io,arpitar/osf.io,brandonPurvis/osf.io,abought/osf.io,erinspace/osf.io,chennan47/osf.io,felliott/osf.io,aaxelb/osf.io,Ghalko/osf.io,leb2dg/osf.io,cldershem/osf.io,mattclark/osf.io,SSJohns/osf.io,baylee-d/osf.io,cslzchen/osf.io,felliott/osf.io,zamattiac/o...
scripts/consistency/fix_tag_guids.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to clean Wikipedia categories" }, { "role": "assistant", "content": "import re\ndef clean_categories(text):\n \"\"\"Replace Wikipedia category links with the name of the category in the\n text of an article.\n\n ...
python
new_file
1
1
apache-2.0
ce9657eec421eb626f22405ab744f1554d8c376f
tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes
src/utils/clean_categories.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a new util function that computes precision for floating-point quantization.\n\nPiperOrigin-RevId: 395302655" }, { "role": "assistant", "content": "# coding=utf-8\n# Copyright 2021 The Google Research Authors.\n#\n# Licens...
python
new_file
1
1
apache-2.0
efc21569590e90bddaf9d06ea3747f3dd3476253
google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,...
aqt/utils/common.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for saving paired posture/jacobian arrays." }, { "role": "assistant", "content": "import climate\nimport joblib\nimport numpy as np\n\n\ndef extract(trial, output, frames):\n dirname = os.path.join(output, trial.s...
python
new_file
8
4
mit
087ba4c6bb7f268eb11584e4dbcf449e08fcaf0b
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/10-extract-jacobian-chunks.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Remove Duplicates from Sorted Array II" }, { "role": "assistant", "content": "class Solution:\n def removeDuplicates(self, nums):\n \"\"\"\n :type nums: List[int]\n :rtype: int\n \"\"\"\n \n ...
python
new_file
1
5
apache-2.0
883707309447fa4edd47459b4f2d8e7d449afd41
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
array/80.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a redis_check management command\n\n(imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)" }, { "role": "assistant", "content": "from __future__ import absolute_import\n\nfrom zephyr.models import UserProfile, get_u...
python
new_file
2
4
apache-2.0
23b4ad3b028e674307fdc6cc7a72953150fd0be3
bitemyapp/zulip,cosmicAsymmetry/zulip,mahim97/zulip,jessedhillon/zulip,esander91/zulip,Diptanshu8/zulip,JPJPJPOPOP/zulip,akuseru/zulip,RobotCaleb/zulip,m1ssou/zulip,ApsOps/zulip,AZtheAsian/zulip,themass/zulip,vabs22/zulip,zhaoweigg/zulip,wangdeshui/zulip,rishig/zulip,alliejones/zulip,ashwinirudrappa/zulip,Gabriel0402/z...
zephyr/management/commands/check_redis.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 20" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import factorial\n\nfact = str(factorial(100))\n\nresult = 0\nfor i in range(len(fact)):\n result += int(fact[i])\n\nprint(resul...
python
new_file
1
0
mit
29ed484c77ab1c68c5e81f06a527da49713ee427
cifvts/PyEuler
euler020.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement Prim's MST in Python" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\nfrom queue import PriorityQueue\n\n\nclass Graph(object):\n \"\"\"\n Represents a graph using an adjacency list.\n ...
python
new_file
1
5
mit
75f69d02100e4f804fd6e742841c0e5ecb1731d2
andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms
algorithms/graph-theory/prims-mst-special-subtree/prims-mst.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration (autogenerated via `manage.py makemigrations`)" }, { "role": "assistant", "content": "# Generated by Django 2.1.7 on 2019-03-14 17:44\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migra...
python
new_file
1
0
bsd-3-clause
073bcb1f6f495305c9d02300646e269fcd2b920e
healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks
hc/api/migrations/0059_auto_20190314_1744.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Queue implementation using two stacks" }, { "role": "assistant", "content": "'''\nImplement Queue data structure using two stacks\n\n'''\n\nfrom stack import Stack\n\nclass QueueUsingTwoStacks(object):\n\tdef __init__(self):\...
python
new_file
1
3
mit
0f72c4bf32986aae7a59b2380c5a314038c7ed61
ueg1990/aids
aids/stack/queue_two_stacks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the build media storage" }, { "role": "assistant", "content": "import os\nimport shutil\nimport tempfile\n\nfrom django.test import TestCase\n\nfrom readthedocs.builds.storage import BuildMediaFileSystemStorage\n\n\...
python
new_file
1
1
mit
a29540ea36ab4e73ba3d89fc8ed47022af28b482
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
readthedocs/rtd_tests/tests/test_build_storage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the object factory with various permutations" }, { "role": "assistant", "content": "import unittest\nimport groundstation.objects.object_factory as object_factory\nfrom groundstation.objects.root_object import RootO...
python
new_file
1
1
mit
0a6f6db77dd888b810089659100158ed4e8e3cee
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_object_factory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for vaccine appointment update." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2018-10-31 23:52\nfrom __future__ import unicode_literals\n\nimport datetime\nfrom djang...
python
new_file
1
0
mit
7ed7cab1cc41fea7665d9e9c05cbb2eb097486a3
SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools
appointment/migrations/0002_vaccineappointment_20181031_1852.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions" }, { "role": "assistant", "content": "\"\"\"Tests for the optional typing-extensions dependency.\"\"\"\n\nimport sys\nimport types\nimport ins...
python
new_file
1
4
bsd-3-clause
c46731098c6a8f26e4de899d2d2e083734f6772f
pdebuyl/numpy,rgommers/numpy,charris/numpy,anntzer/numpy,numpy/numpy,rgommers/numpy,mhvk/numpy,seberg/numpy,pdebuyl/numpy,endolith/numpy,jakirkham/numpy,mattip/numpy,mhvk/numpy,simongibbons/numpy,numpy/numpy,endolith/numpy,simongibbons/numpy,pdebuyl/numpy,simongibbons/numpy,endolith/numpy,anntzer/numpy,seberg/numpy,num...
numpy/typing/tests/test_typing_extensions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TESTS: Add crypto listing management qa test and test listings index." }, { "role": "assistant", "content": "import requests\nimport json\nimport time\nfrom collections import OrderedDict\nfrom test_framework.test_framework impor...
python
new_file
3
9
mit
5b29eaacb363501c9596061a1bd197c49bb00db3
OpenBazaar/openbazaar-go,gubatron/openbazaar-go,hoffmabc/openbazaar-go,hoffmabc/openbazaar-go,OpenBazaar/openbazaar-go,hoffmabc/openbazaar-go,gubatron/openbazaar-go,OpenBazaar/openbazaar-go,gubatron/openbazaar-go
qa/manage_crypto_listings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test module of hangul." }, { "role": "assistant", "content": "import hangul\n\ns = 'ㅎㅏㄴㅅㅓㅁㄱㅣ'\nprint(hangul.conjoin(s))\n\ns = '한섬기'\nprint(hangul.conjoin(s))\n\nprint(ord('ㅎ'))\nprint(ord(u'\\u1112'))\nprint(chr(12622))\npr...
python
new_file
1
0
mit
3b519b6ce6319797ef0544ea2567e918fa4df1b3
iandmyhand/python-utils
hangul_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class for symbolic ranges\n\nCompared with PySLATA, this definition is a lot more simplified. All\nthe ranges are assumed to be atomic and disjoint. No need to implement\nthe range arithmetic." }, { "role": "assistant", "co...
python
new_file
1
5
mit
93bc13af093186b3a74570882135b81ddeeb6719
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
drudge/term.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
88d87f4051629c6a32e458077c543275eed0243e
yuvipanda/jupyterhub-kubernetes-spawner,jupyterhub/kubespawner,ktong/kubespawner
setup.py
rejected_duplicate
Near-duplicate of sample 1306
true
[ { "role": "user", "content": "Write python code for the following: Add management command to run SQL on form dbs\n\nThis is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases.\n\n[ci skip] tested locally" }, { "role": "assistant", ...
python
new_file
1
8
bsd-3-clause
fe760be64eac3290a358e4a488af9946ea6f2a1d
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/form_processor/management/commands/run_sql.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add generate Latvia bank registry script" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport json\nimport xlrd\nimport requests\n\nURL = \"https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01....
python
new_file
1
2
mit
c689a03dcc84315ff5c3796615a80146f8e74d1f
figo-connect/schwifty
scripts/get_bank_registry_lv.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to determine and plot tshirt size distribution" }, { "role": "assistant", "content": "import csv\nimport plotly.plotly as py\nimport sys\n\nfrom collections import defaultdict\nfrom plotly.graph_objs import *\n\ncity =...
python
new_file
10
0
mit
57c4bcff678d65262463f94ea7996367a1c1ec35
wearhacks/wearhacks_analytics
analytics/tshirt_size_distribution.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add a script for combining graphs" }, { "role": "assistant", "content": "#!/usr/bin/env python2.7\n#\n# Copyright 2011-2013 Colin Scott\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th...
python
new_file
2
0
apache-2.0
9f48522c385c81200f04a027e0299ddf7c81ef84
jmiserez/sts,ucb-sts/sts,ucb-sts/sts,jmiserez/sts
runtime_stats/combine_graphs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing widget info element" }, { "role": "assistant", "content": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>...
python
new_file
1
1
apache-2.0
1f80b634596bfaa8c4b538a5e8011399bcad6253
josthkko/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggr...
test/selenium/src/lib/element/widget_info.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utilities to work with LaTeX files" }, { "role": "assistant", "content": "\"\"\"\nUtilities to work with LaTeX files.\n\"\"\"\n\nimport argparse\nimport re\n\ndef read_tex_file(tex_file, encoding=\"utf-8\"):\n with open(te...
python
new_file
1
1
mit
bec07279b0e14a9a0e3f11efc7ecbc6e908aa1ef
teunzwart/latex-production-tools
latex_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code for LSTM based MNIST\n\nTraining takes time but accuracy is great after few\niterations." }, { "role": "assistant", "content": "import tensorflow as tf\nimport numpy as np\n\ntf.set_random_seed(5)\n\nn_inputs = 28\nn_neu...
python
new_file
3
0
mit
334695484d61693c41c8a30aea6cf753b9ed8267
KT12/hands_on_machine_learning
lstm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport traceback\n\nclass BaseBackend(object):\n \"\"\"Provides a base class that custom backends can subclass. Also provides basic\n traceback and message parsing.\n \n The ``__init__`` takes these keyword arguments...
python
edit
1
2
mit
0da81aee8d1d1c1badee561c594e191dbbffdc9c
binarydud/pyres,guaijiao/pyres,TylerLubeck/pyres,Affectiva/pyres
pyres/failure/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for action_runner.BeginInteraction and action_runner.EndInteraction.\n\nBUG=368767\n\nReview URL: https://codereview.chromium.org/294943006\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f...
python
new_file
1
3
bsd-3-clause
dc0a1b2777acc4b9b97de6c471eb8e35dcac2254
PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chrom...
tools/telemetry/telemetry/page/actions/action_runner_unittest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a utility to parse the BJCP 2015 Styles csv" }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nimport csv\nimport pprint\nimport string\n\n\"\"\"\nParse the BJCP 2015 Styles CSV file\n\"\"\"\n\n\ndef main():\n ...
python
new_file
1
8
mit
6a3d0ae17efd09bbfc184a4c28115cb61b2006e7
chrisgilmerproj/brewdata,chrisgilmerproj/brewdata
bjcp/style_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add BSSRDF render widget file." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom .image_widget import ImageWidget\n\nclass BSSRDFRenderWidget(ImageWidget):\n def __init__(self, parent=None):\n super...
python
new_file
1
1
mit
5c3a54a79a763b3b761f053f7360ad2d670ae5cb
tatsy/bssrdf-estimate,tatsy/bssrdf-estimate
bssrdf_estimate/interface/bssrdf_redner_widget.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add doc fragment for new OpenStack modules" }, { "role": "assistant", "content": "# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistrib...
python
new_file
1
0
mit
9b17918bc992481efb51d8df972b879499424e79
thaim/ansible,thaim/ansible
lib/ansible/utils/module_docs_fragments/openstack.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Django migrations for statement text max length" }, { "role": "assistant", "content": "from django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('django_chatterb...
python
new_file
1
0
bsd-3-clause
a4845aff79b1efb89a210b3b2cc57739cc27bebf
gunthercox/ChatterBot,vkosuri/ChatterBot
chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test case for lldbutil.lldb_iter() which returns an iterator object\nfor lldb objects which can contain other lldb objects. Examples are:\nSBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains\nSBThread, SBThread...
python
new_file
3
7
apache-2.0
f25364ba8dbbd7924e068146599f56e5bd797c4e
apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
test/python_api/lldbutil/TestLLDBIterator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a password hasher for opers" }, { "role": "assistant", "content": "import sys\nsys.path.append(\"..\") # This needs to work from the setup-utils subdirectory\nfrom txircd.modules.hash_pbkdf2 import HashPBKDF2\n\nif len(sys.ar...
python
new_file
1
0
bsd-3-clause
aa837386f4cce1ff23fbdf58a633d0e4bf1cc846
ElementalAlchemist/txircd,Heufneutje/txircd
setup-utils/passhash_pbkdf2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 682. Baseball Game\n\n682. Baseball Game: https://leetcode.com/problems/baseball-game/" }, { "role": "assistant", "content": "class Solution(object):\n def calPoints(self, ops):\n \"\"\"\n :ty...
python
new_file
3
6
apache-2.0
3763078a5a9a1973b17fd1c11411c29e176a034f
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/baseball-game.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add means to dump model for manual classification" }, { "role": "assistant", "content": "\nimport pickle\nimport numpy as np\nimport random\nimport os\nimport struct\n\nfrom config import *\n\ndef binary(num):\n \"\"\"\n ...
python
new_file
6
6
mit
d116c4013ebf8b5831d450ae12932446056e7a84
hptruong93/MouseGestureRecognition,hptruong93/MouseGestureRecognition
dump_model.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Print sequence of bytes that comprise the class file" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport argparse\nimport sys\n\nclass MyParser(argparse.ArgumentParser):\n def error(self, message):\n sys....
python
new_file
2
1
apache-2.0
a49adce8b7822d972bfef5046d69366a4b26e0bb
justinccdev/jjvm
jjvm.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple script for generating session keys\n\nSigned-off-by: Robbie Harwood <<EMAIL>>\nReviewed-by: Simo Sorce <<EMAIL>>\nCloses #105" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Works with both python2 and ...
python
new_file
1
0
mit
0c4d113b7379ac4eea6a51f1c510881095caf9e8
frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi
contrib/session_generator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to installer/tools to dump a shortcut's property bag.\n\nThis is required to verify DualMode and AppUserModelId properties which\nare not otherwise visible in Windows shortcut properties UI.\n\nBUG=501166\n\nReview URL: https://...
python
new_file
6
3
bsd-3-clause
4eb18bb737cd878fb684d7ce4a0718ff88a1238d
ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/...
chrome/installer/tools/shortcut_properties.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a function can convert number to Hangul string." }, { "role": "assistant", "content": "##-*- coding: utf-8 -*- \n#!/usr/bin/python\n'''\nNumber to Hangul string util.\n'''\n\n__author__ = 'SeomGi, Han'\n__credits__ = ['SeomGi...
python
new_file
1
7
mit
bee9396a4a8bdef3a22b2010cf873637d5bf56db
iandmyhand/python-utils
numberutils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for comparing rankings" }, { "role": "assistant", "content": "\"\"\"\nCopyright 2017 Ronald J. Nowling\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in complianc...
python
new_file
2
2
apache-2.0
b096b3aee871596a535b05266a63fe2655883e91
rnowling/asaph,rnowling/asaph,rnowling/aranyani
compare_rankings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add loader for singleton apps" }, { "role": "assistant", "content": "import fudge\nfrom bottling.factory import BottleSingletonAppLoader\n\n\nclass describe_init:\n\n def it_initializes_with_given_options(self):\n ref =...
python
new_file
1
1
mit
4ed4baae070cd6be5164e03369aa28c75e7684f2
datamora/datamora,datamora/datamora
spec/bottling_specs/factory_specs/BottleSingletonAppLoader_specs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic test of data_checksums" }, { "role": "assistant", "content": "\"\"\" test data_checksums\"\"\"\nfrom nose.tools import assert_equal\n\n\ndef test_data_checksums():\n from pyne.data import data_checksums\n assert_e...
python
new_file
1
1
bsd-3-clause
26c413ca10550454c773829d4fa7fceafe2e9504
pyne/simplesim
tests/test_data_checksums.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add database revision which adds `stores_managers` table" }, { "role": "assistant", "content": "\"\"\"Add `stores_managers` table\n\nRevision ID: 4fe474604dbb\nRevises: 5a0e003fafb2\nCreate Date: 2013-06-28 22:18:42.292040\n\n\"\...
python
new_file
1
1
mit
5496ccfc164a235521d2b6412b836c3ad84eebc1
beni55/overholt,mattupstate/overholt,RohithKP/overholt,beni55/overholt,jstacoder/overholt,alexmerser/overholt,jstacoder/overholt,bbuneci/overholt,jstacoder/overholt,qpxu007/overholt,mattupstate/overholt,qpxu007/overholt,qpxu007/overholt,alexmerser/overholt,RohithKP/overholt,jamesblunt/overholt,manhtuhtk/overholt,Rohith...
alembic/versions/4fe474604dbb_add_stores_managers_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add linting for bare six imports" }, { "role": "assistant", "content": "import os\nimport botocore\nimport ast\n\n\nROOTDIR = os.path.dirname(botocore.__file__)\n\n\ndef test_no_bare_six_imports():\n for rootdir, dirnames, fil...
python
new_file
3
5
apache-2.0
5ca2e6cbb7056d0bc25ee52815e0742b4f13a703
pplu/botocore,boto/botocore
tests/functional/test_six_imports.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a little support for ejdb." }, { "role": "assistant", "content": "\"\"\"EJDB driver for Magpy.\nCurrently does not do much except support certain command line scripts.\n\"\"\"\nimport pyejdb\n\n\nclass Database(object):\n ...
python
new_file
1
2
bsd-3-clause
c172d9a13e3abde902f743b2179bc396248d9fa9
zeth/magpy,catsmith/magpy,zeth/magpy,catsmith/magpy
magpy/server/_ejdb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests/integration/cli: Add CLI tests session scoped fixture.\n\nThe test fixture starts the blockchain with preconfigured\nsmoketest network, retrieves contract addresses and returns\nan object to be accessed by test cases.\n\nRefs: #1408" ...
python
new_file
1
1
mit
1757b2fef3d617338bfc07802eaa8ac6e75c14e9
hackaugusto/raiden,hackaugusto/raiden
raiden/tests/integration/cli/conftest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for a recursive directory lister." }, { "role": "assistant", "content": "#Test to see recursive directory lister\nimport os\ndef lister(dir_name):\n os.chdir(dir_name)\n dirs = os.listdir(os.getcwd())\n for file in ...
python
new_file
1
3
mit
0eb9964f42f74596b38d9031b329f8ce2e0c1e9f
cvhariharan/Offline,cvhariharan/Offline,cvhariharan/Offline
directory_lister.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Introduce the LockQueue into the broker.\n\nThe aquilon.server.locks module instantiates a lock_queue for use\nby the broker.\n\nIt also defines a number of keys that can be used by the broker.\nEach of these keys carve out a swath of the na...
python
new_file
4
4
apache-2.0
717dc2de1c605190127067263bd8fb1581d7d57d
quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,stdweird/aquilon,quattor/aquilon
lib/python2.6/aquilon/server/locks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add an example that uses filterReactions AND pdep at the same time" }, { "role": "assistant", "content": "# Data sources\ndatabase(\n thermoLibraries = ['primaryThermoLibrary'],\n reactionLibraries = [],\n seedMechanisms...
python
new_file
12
0
mit
eb429be1fdc7335bec5ba036fcece309778b23f0
pierrelb/RMG-Py,nyee/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,chatelak/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py
examples/rmg/heptane-filterReactions/input.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Write python code for the following: Add some tests on download.py" }, { "role": "assistant", "content": "import os\nimport unittest\n\nfrom chainer import dataset\nfrom chainer import testing\n\n\nclass TestGetSetDatasetRoot(unittest.TestCase):\n\n def test_set_...
python
new_file
1
2
mit
4f2f5c5e8bfda8a2ca383843e604c2faf6fcb817
wkentaro/chainer,niboshi/chainer,jnishi/chainer,okuta/chainer,cupy/cupy,niboshi/chainer,ysekky/chainer,cupy/cupy,pfnet/chainer,kashif/chainer,cupy/cupy,delta2323/chainer,chainer/chainer,anaruse/chainer,chainer/chainer,cupy/cupy,keisuke-umezawa/chainer,wkentaro/chainer,kikusu/chainer,ktnyt/chainer,chainer/chainer,keisuk...
tests/chainer_tests/dataset_tests/test_download.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Introduce templatetag for fetching image thumbnails" }, { "role": "assistant", "content": "import logging\nimport warnings\n\nfrom django.template.context_processors import static\nfrom django import template\nfrom django.conf im...
python
new_file
1
6
bsd-3-clause
5c91a2c8dda69d37fd3cd0989ff6c3883851eaef
tfroehlich82/saleor,itbabu/saleor,UITools/saleor,maferelo/saleor,tfroehlich82/saleor,tfroehlich82/saleor,car3oon/saleor,KenMutemi/saleor,KenMutemi/saleor,jreigel/saleor,maferelo/saleor,car3oon/saleor,KenMutemi/saleor,mociepka/saleor,car3oon/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,maferelo/saleor,UI...
saleor/product/templatetags/product_images.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [placement] Add functional test to verify presence of policy\n\nAdd a test that traverses all available placement URLs at the latest\nmicroversion and tries to access them as non-admin. If something other\nthan a 403 response is given a fail...
python
new_file
1
4
apache-2.0
3a240005142da25aa49938a15d39ddf68dd7cead
mahak/nova,rahulunair/nova,klmitch/nova,openstack/nova,mikalstill/nova,rahulunair/nova,gooddata/openstack-nova,mikalstill/nova,gooddata/openstack-nova,rahulunair/nova,klmitch/nova,mikalstill/nova,klmitch/nova,mahak/nova,openstack/nova,klmitch/nova,openstack/nova,mahak/nova,gooddata/openstack-nova,gooddata/openstack-nov...
nova/tests/functional/api/openstack/placement/test_verify_policy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a nose plugin to clear the database after every test." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2010-2012 Cidadania S. Coop. Galega\n#\n# This file is part of e-cidadania.\n#\n# e-cida...
python
new_file
3
1
apache-2.0
7598bb04c2826f5f6bbcf8ff26f9a799ded7cbe3
cidadania/e-cidadania,cidadania/e-cidadania
tests/nose_plugins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command to populate last_modified fields" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom corehq.apps.commtrack.models import Product, Program\nfrom dimagi.utils.couc...
python
new_file
3
13
bsd-3-clause
fdb8f36fd4eed11d5d757d8477b3c2b8619aae8a
qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttara...
corehq/apps/commtrack/management/commands/product_program_last_modified.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write python code for the following: Add new module to statically host an arbitrary directory" }, { "role": "assistant", "content": "import flask\n\n\n__author__ = '<EMAIL>'\n\n\nclass StaticDirectoryHost (flask.Blueprint):\n \"\"\"\n Module that will host a g...
python
new_file
1
2
bsd-3-clause
8f6db5945348879a7340f8a4c7da6111a06cd062
Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK
python/smqtk/web/search_app/modules/static_host.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command to load all version fixtures\n\nBecause life's too short" }, { "role": "assistant", "content": "import os\nimport re\n\nfrom django.conf import settings\nfrom django.core.management import call_command, Bas...
python
new_file
1
4
bsd-2-clause
761ec2bd6492b041eb658ee836a63ffb877469d5
refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector
cbv/management/commands/load_all_django_versions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for Problem063 written in Python" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright © Manoel Vilela 2017\n#\n# @team: DestructHub\n# @project: ProjectEu...
python
new_file
1
0
mit
b45b6256b442942564ba447913ad4a1bec77db19
DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectE...
Problem063/Python/solution_1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a demo app to illustrate the result" }, { "role": "assistant", "content": "import wx\n#import matplotlib\n\nclass AnalysisDemo(wx.Frame):\n def __init__(self, *args, **kw):\n super(AnalysisDemo, self).__init__(*args...
python
new_file
1
1
mit
e0770c4a671c650f4569036350b4047fcf925506
plumer/codana,plumer/codana
AnalysisDemo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cmd to force send of cancelled repeat records" }, { "role": "assistant", "content": "import csv\nimport datetime\nimport re\nimport time\n\nfrom django.core.management.base import BaseCommand\n\nfrom corehq.motech.repeaters.c...
python
new_file
7
7
bsd-3-clause
a6c8176e3f4602e846888293093fc64b7b20233b
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/motech/repeaters/management/commands/send_cancelled_records.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add migration to modify on_delete" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.27 on 2020-03-26 12:52\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mod...
python
new_file
1
0
bsd-2-clause
c131e6108a72c57af4d3bdbe67d182d6c0ddb1eb
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin
geotrek/feedback/migrations/0008_auto_20200326_1252.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to delete couch phone numbers" }, { "role": "assistant", "content": "from corehq.apps.sms.mixin import VerifiedNumber\nfrom corehq.apps.sms.models import PhoneNumber\nfrom dimagi.utils.couch.database import iter_docs_w...
python
new_file
5
2
bsd-3-clause
78bc96307fb52d95e36eab1da6fa57a66af736e8
qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/sms/management/commands/delete_messaging_couch_phone_numbers.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Create a state for add an object" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# encoding=utf8\n\nimport json\nimport requests\nfrom flexbe_core import EventState, Logger\n\n\nclass Wonderland_Add_Object(EventStat...
python
new_file
2
5
bsd-3-clause
bbc4351a5611a035bbee1f18cb55b74d9583cdcd
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/Wonderland_Add_Object.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial tests for the concordance view\n\nThese tests can be run simply using `python test_concordance.py`.\nThe test suite is currently very limited. It is a tool to refactoring\nthe current code." }, { "role": "assistant", ...
python
new_file
4
1
mit
efb6072e097a816bb46fdd83541c763e222816c9
CentreForResearchInAppliedLinguistics/clic,CentreForResearchInAppliedLinguistics/clic,CentreForCorpusResearch/clic,CentreForCorpusResearch/clic,CentreForResearchInAppliedLinguistics/clic,CentreForCorpusResearch/clic
clic/dickens/test_concordance.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is meant to be run inside lldb as a command after\n# the attach_linux.dylib dll has already been loaded to settrace for all threads.\ndef __lldb_init_module(debugger, internal_dict):\n # Command Initialization code goes here\...
python
edit
1
9
apache-2.0
bf66372b2b5b49ba4a93d8ac4f573ceb7857f5b8
kool79/intellij-community,da1z/intellij-community,retomerz/intellij-community,blademainer/intellij-community,SerCeMan/intellij-community,retomerz/intellij-community,ol-loginov/intellij-community,holmes/intellij-community,kool79/intellij-community,lucafavatella/intellij-community,xfournet/intellij-community,adedayo/inte...
python/helpers/pydev/pydevd_attach_to_process/linux/lldb_threads_settrace.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sanity tests for baremetal power state commands\n\nAdd sanity testcases for commands:\nopenstack baremetal node reboot,\nopenstack baremetal node power on,\nopenstack baremetal node power off.\n\nChange-Id: I24bc2dcd1ef27d918b072ea686d53...
python
new_file
1
1
apache-2.0
b42c13de01a49e7fe3fb7caa22089ea1cd87f7bf
openstack/python-ironicclient,openstack/python-ironicclient
ironicclient/tests/functional/osc/v1/test_baremetal_node_power_states.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Increase text index property size\n\nThe index property size should support strings of the same length as\ncustom attribute definition titles." }, { "role": "assistant", "content": "# Copyright (C) 2017 Google Inc.\n# Licensed un...
python
new_file
1
1
apache-2.0
cbaf4e86c4409735a8f011f5a8f801a34278c21c
VinnieJohns/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,plamut/ggrc-core
src/ggrc/migrations/versions/20170112013716_421b2179c02e_update_fulltext_index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for run docker mgmt command" }, { "role": "assistant", "content": "from StringIO import StringIO\n\nfrom django.test import TestCase\nfrom mock import patch\n\nfrom core.management.commands import run_docker\nfrom proje...
python
new_file
1
2
mit
9aeb9d35cd49ccd7ab1ede87d70666e34b80320c
Tazer/readthedocs.org,rtfd/readthedocs.org,soulshake/readthedocs.org,davidfischer/readthedocs.org,takluyver/readthedocs.org,sid-kap/readthedocs.org,sunnyzwh/readthedocs.org,pombredanne/readthedocs.org,laplaceliu/readthedocs.org,takluyver/readthedocs.org,espdev/readthedocs.org,sils1297/readthedocs.org,wijerasa/readthedo...
readthedocs/rtd_tests/tests/test_core_management.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for fqdn thread leak\n\nI wasn't positive what other errors could be raised here, but we did\nhave a user reporting thread leaks, and the existing code *could* have\nthread leaks if unhandled exceptions are raised on the ThreadPool....
python
new_file
1
1
apache-2.0
c3a83ed6158fcd9335f9253417ca4b24e9ab7934
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/unit/modules/test_network.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add plugin for Nova server state metrics" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom argparse import ArgumentParser\nimport socket\nimport time\n\nfrom novaclient.v3 import Client\n\nDEFAULT_SCHEME = '{}.no...
python
new_file
2
4
mit
f627f04ebe0186b19d58619cab8b7098f5ca2e4c
giorgiosironi/sensu-community-plugins,Squarespace/sensu-community-plugins,zerOnepal/sensu-community-plugins,lfdesousa/sensu-community-plugins,maoe/sensu-community-plugins,aryeguy/sensu-community-plugins,royalj/sensu-community-plugins,lenfree/sensu-community-plugins,new23d/sensu-community-plugins,tuenti/sensu-community-...
plugins/openstack/nova/nova-server-state-metrics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [AC-6516] Add datamigration to create staff clearances" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.8 on 2019-06-12 19:38\nfrom __future__ import unicode_literals\n\nfrom django.db im...
python
new_file
1
2
mit
a62dc18745f952b3fcb05ddf4768758e25883698
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0058_grant_staff_clearance_for_existing_staff_members.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Summarization API code for blog post" }, { "role": "assistant", "content": "import indicoio\nimport csv\n\nindicoio.config.api_key = 'YOUR_API_KEY'\n\ndef clean_article(article):\n return article.replace(\"\\n\", \" \").de...
python
new_file
4
3
mit
241ac6d844febf829f6442897ebf547a291e5db4
IndicoDataSolutions/SuperCell
summarization/summarization.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration for expert bid [WAL-976]" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.1 on 2017-07-07 15:09\nfrom __future__ import unicode_literals\n\nfrom decimal import Decimal\nimpo...
python
new_file
1
0
mit
6df873a26ff71b07e68dcb2e9fa9c4b1725a70ce
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
src/nodeconductor_assembly_waldur/experts/migrations/0003_expertbid.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set students current flag based on enrolled and attending" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport logging\nfrom datetime import date\n\nfrom django.core.management.base import BaseCommand, CommandError\...
python
new_file
4
1
mit
8e983472134817c1312e3713ca45c7359300dedf
rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps
academics/management/commands/set_student_current.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add script for generating test certificates" }, { "role": "assistant", "content": "import trustme\n\n# Create a CA\nca = trustme.CA()\n\n# Issue a cert signed by this CA\nserver_cert = ca.issue_cert(u\"www.good.com\")\n\n# Save t...
python
new_file
1
0
mit
dfb4c5422c79fcd413d0d9a028cb5548e2678454
datatheorem/TrustKit,datatheorem/TrustKit,datatheorem/TrustKit,datatheorem/TrustKit
generate_test_certificates.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file to write templates to json" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport rethinkdb as r\nfrom optparse import OptionParser\nimport json\nimport os\n\nif __name__ == \"__main__\":\n parser = Op...
python
new_file
1
0
mit
2d18583309a189e263bda13e19f7a05ba832c14d
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/templates/templates2file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for the chipseq pipeline code" }, { "role": "assistant", "content": "\"\"\"\n.. Copyright 2017 EMBL-European Bioinformatics Institute\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not us...
python
new_file
1
2
apache-2.0
8601790648a17dd1794be4f88d61e4af01349a80
Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq
tests/test_pipeline_chipseq.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add soft margin SVM and added kernels and class" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Soft Margin SVM classification with kernels for machine learning.\n\nSoft margin SVM is basically an SVM (see f...
python
new_file
3
2
mit
339fdd927f9da0f7e15726d087c9916301aef935
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
softMarginSVMwithKernels/howItWorksSoftMarginSVM.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add microservice plugin for adding static attributes to responses." }, { "role": "assistant", "content": "import os\n\nimport yaml\n\nfrom satosa.internal_data import DataConverter\nfrom satosa.micro_service.service_base import R...
python
new_file
1
2
apache-2.0
55fa30c236095006e6f9c970ef668598c4348a96
irtnog/SATOSA,irtnog/SATOSA,SUNET/SATOSA,its-dirg/SATOSA,SUNET/SATOSA
src/satosa/micro_service/attribute_modifications.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Migrate database for model changes." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n...
python
new_file
1
0
unlicense
4155d6ca5db149d8b213cc4078580fc2e85d7f4d
rcutmore/vinotes-api,rcutmore/vinotes-api
vinotes/apps/api/migrations/0002_auto_20150325_1104.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create database column class (DBCol)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\n dbcol.py: DBCol is a struct describing an sqlite database table column\n\"\"\"\n\n\n# ----------------------------DATA...
python
new_file
1
1
mit
00cdcceb131814b24546c36810682ed78ba866c6
rlinguri/pyfwk
pyfwk/struc/dbcol.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add low level Gemini serial command script" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"\nA simple script for sending raw serial commands to Gemini.\n\"\"\"\n\nimport time\nimport serial\nimport readline...
python
new_file
3
9
mit
7ab37e931a836faa78a78f5d8358d845f72cdf49
bgottula/point
point/gemini_cmd.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to \"untie\" tied model weights.\n\nMight need some more work in updating \"layers\" parameter.\n\nCould help address issue #39." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport climate\nimport ...
python
new_file
1
7
mit
b0d50f52f45d8f1c7de261c7fe8d15e621d0e641
lmjohns3/theanets,devdoer/theanets,chrinide/theanets
scripts/theanets-untie.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a handler for performing client load testing.\n\nReview URL: http://codereview.appspot.com/3844044\n\ngit-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4" }, { "role": "assistant", "c...
python
new_file
2
3
bsd-3-clause
51466e360320267afab41704caecebac0dff1dc2
XiaonuoGantan/pywebsocket,XiaonuoGantan/pywebsocket
src/example/bench_wsh.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add task files for celery async process" }, { "role": "assistant", "content": "# -*- encoding: utf-8 -*-\n\n#app_mail/tasks.py\nimport requests\nimport simplejson as json\n\nfrom django_backend_test.celery import app\nfrom django...
python
new_file
3
2
mit
21d931e35d9e0b32415a408f28e45894f0c3e800
semorale/backend-test,semorale/backend-test,semorale/backend-test
django_backend_test/noras_menu/tasks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test mobile set password form" }, { "role": "assistant", "content": "from collections import namedtuple\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\nfrom corehq.apps.users.forms import SetUse...
python
new_file
1
1
bsd-3-clause
f531eb7d1734d6d715893356a50d11eee6bc009a
dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq
corehq/apps/users/tests/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to build plugin." }, { "role": "assistant", "content": "import os\nUnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'\nUATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')\nFullPluginFi...
python
new_file
1
0
mit
b5568053325bd78c277d4bc0adff59cd12e10f48
qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv
build-plugin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for float->int symbols (esp for 32-bit windows and linux)" }, { "role": "assistant", "content": "from __future__ import print_function\nimport numba.unittest_support as unittest\nfrom numba.compiler import compile_isola...
python
new_file
1
1
bsd-2-clause
d9b4b0d913304b19365854b0ffceab179237d8f8
numba/numba,stonebig/numba,stefanseefeld/numba,sklam/numba,seibert/numba,pitrou/numba,GaZ3ll3/numba,IntelLabs/numba,pombredanne/numba,stonebig/numba,gdementen/numba,pitrou/numba,pombredanne/numba,pitrou/numba,sklam/numba,ssarangi/numba,numba/numba,cpcloud/numba,stuartarchibald/numba,pombredanne/numba,seibert/numba,jrie...
numba/tests/test_floatsyms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Introduce hades test fixtures and first tests." }, { "role": "assistant", "content": "from datetime import datetime, timedelta\n\nfrom pycroft.model import session\nfrom pycroft.model.hades import radgroup_property_mappings, radc...
python
new_file
1
4
apache-2.0
b7c22cddecb743e9597c92160e3aa0100e149e19
agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft
tests/model/test_hades.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for lead price" }, { "role": "assistant", "content": "import unittest\nimport datetime\nimport json\nimport sys\n\nsys.path.append('..')\nimport sabre_dev_studio\nimport sabre_dev_studio.sabre_exceptions as sabre_except...
python
new_file
4
1
mit
e04bf5dd12a1f5e28258541dcf9d2eb8c5567ad0
Jamil/sabre_dev_studio
tests/lead_price_tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Migrate listings.syndication, FeedType.content_type should not be unique." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django...
python
new_file
4
1
mit
4f3854eaf8d6e4b0ad9a77e871a946916ab3fec6
wtrevino/django-listings,wtrevino/django-listings
listings/syndication/migrations/0002_auto__del_unique_feedtype_content_type.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a standalone simulation script (really a duplicate of sensitivity.py)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis script runs stand-alone simulation on an RMG job. Th...
python
new_file
1
1
mit
ee169acf82eff08daa40c461263712f2af2a1131
chatelak/RMG-Py,pierrelb/RMG-Py,chatelak/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,nickvandewiele/RMG-Py
scripts/simulate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to assign appropriate sheets to Transnational CountryRegion" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import ObjectDoesNot...
python
new_file
1
4
apache-2.0
849a29b22d656c8079b4ccaf922848fb057c80c5
Code4SA/gmmp,Code4SA/gmmp,Code4SA/gmmp
forms/migrations/0023_assign_sheets_to_transnational.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to test HOTS\n\nAdd Python script to test Higher-Order Encoder Time Stamping with\nsampled data." }, { "role": "assistant", "content": "import numpy as np\n\n\nevents = [\n (1162704874, -5547),\n (1179727586, -55...
python
new_file
1
0
bsd-2-clause
eeb9b9877f1aa5bc1f22ac4883fe58a57ee0474a
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
scripts/test_hots.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Read Temperature from DS18B20. Post the data to data.sparkfun.com" }, { "role": "assistant", "content": "from machine import Pin\nfrom ds18x20 import DS18X20\nimport onewire\nimport time\nimport machine\nimport ujson\nimport ureq...
python
new_file
3
1
mit
eeb0187b9d474b9b5d1710e8f45f8116894eb15c
fuzzyhandle/esp8266hangout,fuzzyhandle/esp8266hangout,fuzzyhandle/esp8266hangout
temp-sensor02/main.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the different input variations." }, { "role": "assistant", "content": "import unittest\n\nfrom shapely.geometry import LineString, Point\n\nfrom directions.base import _parse_points\n\nclass DirectionsTest(unittest....
python
new_file
1
1
bsd-3-clause
c5fba0cc8acb482a0bc1c49ae5187ebc1232dba3
asfaltboy/directions.py,jwass/directions.py,samtux/directions.py
tests/test_directions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update driver value in Seat model." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef populate_driver_in_seats(apps, schema...
python
new_file
3
2
mit
0c3107739671398de1a206cfbb7673c25c543e60
SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27
driver27/migrations/0009_populate_driver_in_seats.py
accepted
null
true