prompt
listlengths
1
1
compression_prompt
listlengths
1
1
target
stringlengths
1.03k
828k
[ { "content": "Reconstruct the code exactly:\n```python\n'''\nThe Salt Console, this system is used to display a curses console that posts\nevent and job data as it happens from within Salt\n'''\n\n# Import python libs\nimport curses\n\n# Import salt libs\nimport salt.utils.event\n\n\nclass SaltConsole(object):\...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n'''\nThe Salt Console, this system is used to display a curses console that posts\nevent and job data as it happens from within Salt\n'''\n\n# Import python libs\nimport curses\n\n# Import salt libs\nimport salt.utils.event\n\n\nclass SaltC...
```python ''' The Salt Console, this system is used to display a curses console that posts event and job data as it happens from within Salt ''' # Import python libs import curses # Import salt libs import salt.utils.event class SaltConsole(object): ''' ''' def __init__(self, opts): self.opts = ...
[ { "content": "Here is some code:\n```python\nfrom merc import message\n\n\nclass BaseError(Exception, message.Reply):\n pass\n\n\nclass Error(Exception, message.Message):\n NAME = \"ERROR\"\n FORCE_TRAILING = True\n\n def __init__(self, reason):\n self.reason = reason\n\n def as_params(self, client):\n ...
[ { "content": "Here is some code:\n<|memory_start|>```python\nfrom merc import message\n\n\nclass BaseError(Exception, message.Reply):\n pass\n\n\nclass Error(Exception, message.Message):\n NAME = \"ERROR\"\n FORCE_TRAILING = True\n\n def __init__(self, reason):\n self.reason = reason\n\n def as_params(s...
```python from merc import message class BaseError(Exception, message.Reply): pass class Error(Exception, message.Message): NAME = "ERROR" FORCE_TRAILING = True def __init__(self, reason): self.reason = reason def as_params(self, client): return [self.reason] class LinkError(Error): NAME = "...
[ { "content": "Provide an exact copy of the source code:\n```python\nfrom setuptools import setup, find_packages\n\nimport taggit\n\n\nwith open('README.rst') as f:\n readme = f.read()\n\nsetup(\n name='django-taggit',\n version='.'.join(str(i) for i in taggit.VERSION[:3]) + ((\"+\" + taggit.VERSION[3])...
[ { "content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nfrom setuptools import setup, find_packages\n\nimport taggit\n\n\nwith open('README.rst') as f:\n readme = f.read()\n\nsetup(\n name='django-taggit',\n version='.'.join(str(i) for i in taggit.VERSION[:3]) + ((\"+\" + ta...
```python from setuptools import setup, find_packages import taggit with open('README.rst') as f: readme = f.read() setup( name='django-taggit', version='.'.join(str(i) for i in taggit.VERSION[:3]) + (("+" + taggit.VERSION[3]) if len(taggit.VERSION) > 3 else ""), description='django-taggit is a reus...
[ { "content": "```python\nfrom django.contrib.sessions.middleware import SessionMiddleware\nfrom django.utils import six\nfrom rest_framework import status\n\nfrom djet import assertions, restframework\nimport djoser.social.views\nfrom social_core.exceptions import AuthException\n\nfrom ..common import create_us...
[ { "content": "<|memory_start|>```python\nfrom django.contrib.sessions.middleware import SessionMiddleware\nfrom django.utils import six\nfrom rest_framework import status\n\nfrom djet import assertions, restframework\nimport djoser.social.views\nfrom social_core.exceptions import AuthException\n\nfrom ..common ...
```python from django.contrib.sessions.middleware import SessionMiddleware from django.utils import six from rest_framework import status from djet import assertions, restframework import djoser.social.views from social_core.exceptions import AuthException from ..common import create_user, mock class ProviderAuthVi...
[ { "content": "Repeat the code exactly:\n```python\nfrom __future__ import absolute_import\n\nimport sys\nimport datetime as dt\nfrom collections import OrderedDict, defaultdict, Iterable\n\ntry:\n import itertools.izip as zip\nexcept ImportError:\n pass\n\nimport numpy as np\n\nfrom .dictionary import Dic...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\nfrom __future__ import absolute_import\n\nimport sys\nimport datetime as dt\nfrom collections import OrderedDict, defaultdict, Iterable\n\ntry:\n import itertools.izip as zip\nexcept ImportError:\n pass\n\nimport numpy as np\n\nfrom .dicti...
```python from __future__ import absolute_import import sys import datetime as dt from collections import OrderedDict, defaultdict, Iterable try: import itertools.izip as zip except ImportError: pass import numpy as np from .dictionary import DictInterface from .interface import Interface, DataError from .....
[ { "content": "Here is the source code:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n# copyright 2016 twitter. all rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a co...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n# copyright 2016 twitter. all rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You...
```python #!/usr/bin/env python # -*- encoding: utf-8 -*- # copyright 2016 twitter. all rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
[ { "content": "Here is some code:\n```python\n#!/usr/bin/env python\n\n#\n# $File: SelfMating.py $\n#\n# This file is part of simuPOP, a forward-time population genetics\n# simulation environment. Please visit http://simupop.sourceforge.net\n# for details.\n#\n# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderso...
[ { "content": "Here is some code:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n#\n# $File: SelfMating.py $\n#\n# This file is part of simuPOP, a forward-time population genetics\n# simulation environment. Please visit http://simupop.sourceforge.net\n# for details.\n#\n# Copyright (C) 2004 - 2010 Bo Peng ...
```python #!/usr/bin/env python # # $File: SelfMating.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can re...
[ { "content": "Output the full code verbatim (no extra comments):\n```python\n'''\nPUMA560AKB Load kinematic and dynamic data for a Puma 560 manipulator\n\n\tfrom robot.puma560akb import *\n\nDefines the object 'p560m' in current workspace which describes the \nkinematic and dynamic characterstics of a Unimation...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n'''\nPUMA560AKB Load kinematic and dynamic data for a Puma 560 manipulator\n\n\tfrom robot.puma560akb import *\n\nDefines the object 'p560m' in current workspace which describes the \nkinematic and dynamic characterstic...
```python ''' PUMA560AKB Load kinematic and dynamic data for a Puma 560 manipulator from robot.puma560akb import * Defines the object 'p560m' in current workspace which describes the kinematic and dynamic characterstics of a Unimation Puma 560 manipulator modified DH conventions and using the data and conventions ...
[ { "content": "Repeat the following code:\n```python\nfrom __future__ import print_function\nimport argparse\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torch.utils.data\nimport torchvision.dat...
[ { "content": "Repeat the following code:\n<|memory_start|>```python\nfrom __future__ import print_function\nimport argparse\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torch.utils.data\nimport...
```python from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms imp...
[ { "content": "Provide a verbatim copy of the code:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 United States Government as represented by the\n# Administrator of the National Aeronautics and Space Administration.\n# All Rights Reserved.\n#\n# Copyright 2011 Fourth Paradigm Develo...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 United States Government as represented by the\n# Administrator of the National Aeronautics and Space Administration.\n# All Rights Reserved.\n#\n# Copyright 2011 Fourth...
```python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Fourth Paradigm Development, Inc. # # Licensed under the Apache License, Version 2.0 (...
[ { "content": "Repeat the code exactly:\n```python\nfrom multiprocessing import Process, Pipe\nfrom os import getpid, urandom, path\nfrom time import sleep\nfrom enum import Enum\nimport binascii, json, signal, sys\nfrom random import randint\n\nfrom telegram.ext import Updater\nfrom telegram.ext.dispatcher impo...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\nfrom multiprocessing import Process, Pipe\nfrom os import getpid, urandom, path\nfrom time import sleep\nfrom enum import Enum\nimport binascii, json, signal, sys\nfrom random import randint\n\nfrom telegram.ext import Updater\nfrom telegram.ext...
```python from multiprocessing import Process, Pipe from os import getpid, urandom, path from time import sleep from enum import Enum import binascii, json, signal, sys from random import randint from telegram.ext import Updater from telegram.ext.dispatcher import run_async from telegram.update import Update class Co...
[ { "content": "```python\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Aug 29 00:09:26 2010\r\n\r\n@author: Charles Law\r\n\"\"\"\r\n\r\nimport math\r\n\r\ndef fft(fin, inverse):\r\n nfft = len(fin)\r\n twiddles, factors = fft_alloc(nfft, inverse)\r\n \r\n fout = []\r\n for i in xrange(nfft...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Aug 29 00:09:26 2010\r\n\r\n@author: Charles Law\r\n\"\"\"\r\n\r\nimport math\r\n\r\ndef fft(fin, inverse):\r\n nfft = len(fin)\r\n twiddles, factors = fft_alloc(nfft, inverse)\r\n \r\n fout = []\r\n for ...
```python # -*- coding: utf-8 -*- """ Created on Sun Aug 29 00:09:26 2010 @author: Charles Law """ import math def fft(fin, inverse): nfft = len(fin) twiddles, factors = fft_alloc(nfft, inverse) fout = [] for i in xrange(nfft): fout.append((0, 0)) fout_ind_s...
[ { "content": "Here is a code snippet:\n```python\nimport os\r\nimport sys\r\nfrom gooey.gui.windows import layouts\r\nfrom gooey.python_bindings import argparse_to_json\r\nfrom gooey.gui.util.quoting import quote\r\n\r\n\r\ndef create_from_parser(parser, source_path, cmd_args, **kwargs):\r\n auto_start = kwarg...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\nimport os\r\nimport sys\r\nfrom gooey.gui.windows import layouts\r\nfrom gooey.python_bindings import argparse_to_json\r\nfrom gooey.gui.util.quoting import quote\r\n\r\n\r\ndef create_from_parser(parser, source_path, cmd_args, **kwargs):\r\n au...
```python import os import sys from gooey.gui.windows import layouts from gooey.python_bindings import argparse_to_json from gooey.gui.util.quoting import quote def create_from_parser(parser, source_path, cmd_args, **kwargs): auto_start = kwargs.get('auto_start', False) if hasattr(sys, 'frozen'): ...
[ { "content": "Here is the snippet:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.5 on 2017-12-30 09:19\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('api', '0007_mentor_organize...
[ { "content": "Here is the snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.5 on 2017-12-30 09:19\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('api', '0007...
```python # -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-12-30 09:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0007_mentor_organizer_volunteer'), ] operations = [ migrat...
[ { "content": "```python\nimport urllib, shutil\n\nfrom ConfigParser import SafeConfigParser\nimport pyGeno.configuration as conf\nfrom pyGeno.SNP import *\nfrom pyGeno.tools.ProgressBar import ProgressBar\nfrom pyGeno.tools.io import printf\nfrom Genomes import _decompressPackage, _getFile\n\nfrom pyGeno.tools....
[ { "content": "<|memory_start|>```python\nimport urllib, shutil\n\nfrom ConfigParser import SafeConfigParser\nimport pyGeno.configuration as conf\nfrom pyGeno.SNP import *\nfrom pyGeno.tools.ProgressBar import ProgressBar\nfrom pyGeno.tools.io import printf\nfrom Genomes import _decompressPackage, _getFile\n\nfr...
```python import urllib, shutil from ConfigParser import SafeConfigParser import pyGeno.configuration as conf from pyGeno.SNP import * from pyGeno.tools.ProgressBar import ProgressBar from pyGeno.tools.io import printf from Genomes import _decompressPackage, _getFile from pyGeno.tools.parsers.CasavaTools import SNPsT...
[ { "content": "Output the full code verbatim (no extra comments):\n```python\nfrom functools import total_ordering\n\n\ndef _less_than(first, second):\n\tif first == second:\n\t\treturn False\n\tif first is None:\n\t\treturn True\n\tif second is None:\n\t\treturn False\n\treturn first < second\n\n\ndef _score_di...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\nfrom functools import total_ordering\n\n\ndef _less_than(first, second):\n\tif first == second:\n\t\treturn False\n\tif first is None:\n\t\treturn True\n\tif second is None:\n\t\treturn False\n\treturn first < second\n\...
```python from functools import total_ordering def _less_than(first, second): if first == second: return False if first is None: return True if second is None: return False return first < second def _score_difference_multiplier(old, new): new = 0 if new is None else new old = 1 if old is None or old == ...
[ { "content": "Repeat the code exactly:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport argparse\n\nfrom avoin.scraper.scraper import DefaultScraper, xpath_parser, ScraperMissingElementError\nfrom avoin.data.utils import read, write\n\ndef main(args):\n if args.command == 'xpa...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport argparse\n\nfrom avoin.scraper.scraper import DefaultScraper, xpath_parser, ScraperMissingElementError\nfrom avoin.data.utils import read, write\n\ndef main(args):\n if args...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse from avoin.scraper.scraper import DefaultScraper, xpath_parser, ScraperMissingElementError from avoin.data.utils import read, write def main(args): if args.command == 'xpath': scraper = DefaultScraper() xpath = arg...
[ { "content": "```python\n# -*- encoding: utf-8 -*-\n\"\"\"Test class for Foreman Discovery Rules\n\n@Requirement: Discoveryrule\n\n@CaseAutomation: Automated\n\n@CaseLevel: Acceptance\n\n@CaseComponent: UI\n\n@TestType: Functional\n\n@CaseImportance: High\n\n@Upstream: No\n\"\"\"\nfrom fauxfactory import gen_in...
[ { "content": "<|memory_start|>```python\n# -*- encoding: utf-8 -*-\n\"\"\"Test class for Foreman Discovery Rules\n\n@Requirement: Discoveryrule\n\n@CaseAutomation: Automated\n\n@CaseLevel: Acceptance\n\n@CaseComponent: UI\n\n@TestType: Functional\n\n@CaseImportance: High\n\n@Upstream: No\n\"\"\"\nfrom fauxfacto...
```python # -*- encoding: utf-8 -*- """Test class for Foreman Discovery Rules @Requirement: Discoveryrule @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ from fauxfactory import gen_integer, gen_ipaddr, gen_string from nailgun imp...
[ { "content": "Write the code verbatim:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nfrom pyNastran.gui.qt_version import qt_version\nif qt_version == 4:\n #from PyQt4 import QtCore, QtGui\n from PyQt4.QtGui import (\n QDialog, QLineEdit, QPushButto...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nfrom pyNastran.gui.qt_version import qt_version\nif qt_version == 4:\n #from PyQt4 import QtCore, QtGui\n from PyQt4.QtGui import (\n QDialog, QLine...
```python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from pyNastran.gui.qt_version import qt_version if qt_version == 4: #from PyQt4 import QtCore, QtGui from PyQt4.QtGui import ( QDialog, QLineEdit, QPushButton, QGridLayout, QVBoxLayout, QHBoxLayout, QApplication, ...
[ { "content": "Recreate the original code text:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ { "content": "Recreate the original code text:\n<|memory_start|>```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
```python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distri...
[ { "content": "Here is the code block:\n```python\nfrom xml.etree.ElementTree import XMLParser\n\n\nclass GuestXmlParser:\n\n int_tags = [\"currentMemory\", \"memory\"]\n int_attribs = [\"index\", \"port\", \"startport\", \"vram\"]\n\n def __init__(self):\n self.json = {}\n self.stack = [s...
[ { "content": "Here is the code block:\n<|memory_start|>```python\nfrom xml.etree.ElementTree import XMLParser\n\n\nclass GuestXmlParser:\n\n int_tags = [\"currentMemory\", \"memory\"]\n int_attribs = [\"index\", \"port\", \"startport\", \"vram\"]\n\n def __init__(self):\n self.json = {}\n ...
```python from xml.etree.ElementTree import XMLParser class GuestXmlParser: int_tags = ["currentMemory", "memory"] int_attribs = ["index", "port", "startport", "vram"] def __init__(self): self.json = {} self.stack = [self.json] self.catogory = None def start(self, tag, attri...
[ { "content": "Repeat the code exactly:\n```python\n# -*- coding: utf-8 -*-\n# IDD3 - Propositional Idea Density from Dependency Trees\n# Copyright (C) 2014-2015 Andre Luiz Verucci da Cunha\n#\n# This program is free software: you can redistribute it and/or modify it\n# under the terms of the GNU General Public...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# IDD3 - Propositional Idea Density from Dependency Trees\n# Copyright (C) 2014-2015 Andre Luiz Verucci da Cunha\n#\n# This program is free software: you can redistribute it and/or modify it\n# under the terms of the GN...
```python # -*- coding: utf-8 -*- # IDD3 - Propositional Idea Density from Dependency Trees # Copyright (C) 2014-2015 Andre Luiz Verucci da Cunha # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundatio...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n```python\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\n\n# CUSTOM FILE SI...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\n\n...
```python from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver # CUSTOM FILE SIZE VALIDATOR def validate_image(fieldfile_obj): """ Limit image size uploa...
[ { "content": "Return the code unaltered:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport os\nimport argparse\nsys.path.append(os.path.join(os.path.dirname(__file__), '../..'))\nfrom utils.argparsers.simulationargparser import SimulationArgumentParser\n\n\nclass MultileaveArgumentParser(SimulationArgum...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport os\nimport argparse\nsys.path.append(os.path.join(os.path.dirname(__file__), '../..'))\nfrom utils.argparsers.simulationargparser import SimulationArgumentParser\n\n\nclass MultileaveArgumentParser...
```python # -*- coding: utf-8 -*- import sys import os import argparse sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from utils.argparsers.simulationargparser import SimulationArgumentParser class MultileaveArgumentParser(SimulationArgumentParser): def __init__(self, description=None, set_ar...
[ { "content": "Here is a code file:\n```python\n# -*- coding: utf-8 -*-\nfrom south.utils import datetime_utils as datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n\n # Changing fie...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom south.utils import datetime_utils as datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n\n ...
```python # -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Visit.service' db.alter_column(u'clinics_vis...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n```python\n# Copyright 2021 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a ...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# Copyright 2021 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# Y...
```python # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ { "content": "Write the code verbatim:\n```python\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack',\n 'stack', 'vstack']\n\nimport functools\nimport operator\nimport warnings\n\nfrom . import numeric as _nx\nfro...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack',\n 'stack', 'vstack']\n\nimport functools\nimport operator\nimport warnings\n\nfrom . import num...
```python from __future__ import division, absolute_import, print_function __all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'block', 'hstack', 'stack', 'vstack'] import functools import operator import warnings from . import numeric as _nx from . import overrides from ._asarray import array, asanyarra...
[ { "content": "Write the code verbatim:\n```python\nimport wx, os\nfrom functools import partial\n\nfrom fr0stlib.decorators import *\n\ndef LoadIcon(*path):\n # Check for an icons dir in app base path first for development\n filename = os.path.join(wx.GetApp().AppBaseDir, 'icons', *path) + '.png'\n\n i...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\nimport wx, os\nfrom functools import partial\n\nfrom fr0stlib.decorators import *\n\ndef LoadIcon(*path):\n # Check for an icons dir in app base path first for development\n filename = os.path.join(wx.GetApp().AppBaseDir, 'icons', *path) +...
```python import wx, os from functools import partial from fr0stlib.decorators import * def LoadIcon(*path): # Check for an icons dir in app base path first for development filename = os.path.join(wx.GetApp().AppBaseDir, 'icons', *path) + '.png' if not os.path.exists(filename): # Not there, check...
[ { "content": "Here is the script:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport jsonfield.fields\nimport django_docker_processes.models\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependen...
[ { "content": "Here is the script:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport jsonfield.fields\nimport django_docker_processes.models\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):...
```python # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import jsonfield.fields import django_docker_processes.models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settin...
[ { "content": "```python\n#!/usr/bin/env python\n\n# copy pasta from https://github.com/matthiasplappert/keras-rl/blob/master/examples/dqn_cartpole.py\n# with some extra arg parsing\n\nimport numpy as np\nimport gym\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Flatten\nfrom...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python\n\n# copy pasta from https://github.com/matthiasplappert/keras-rl/blob/master/examples/dqn_cartpole.py\n# with some extra arg parsing\n\nimport numpy as np\nimport gym\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activatio...
```python #!/usr/bin/env python # copy pasta from https://github.com/matthiasplappert/keras-rl/blob/master/examples/dqn_cartpole.py # with some extra arg parsing import numpy as np import gym from keras.models import Sequential from keras.layers import Dense, Activation, Flatten from keras.optimizers import Adam fr...
[ { "content": "Return the code unaltered:\n```python\n#!/usr/bin/env python\n# coding=utf8\n\n\"\"\"\nAdd suite options for overrides and control-suite to DB\n\n@contact: Debian FTP Master <ftpmaster@debian.org>\n@copyright: 2011 Mark Hymers <mhy@debian.org>\n@license: GNU General Public License version 2 or lat...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n#!/usr/bin/env python\n# coding=utf8\n\n\"\"\"\nAdd suite options for overrides and control-suite to DB\n\n@contact: Debian FTP Master <ftpmaster@debian.org>\n@copyright: 2011 Mark Hymers <mhy@debian.org>\n@license: GNU General Public License ...
```python #!/usr/bin/env python # coding=utf8 """ Add suite options for overrides and control-suite to DB @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2011 Mark Hymers <mhy@debian.org> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute ...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\n# coding:utf-8\r\nfrom importlib import import_module\r\nfrom django.http import HttpResponse\r\nfrom . import settings as USettings\r\nimport os\r\nimport json\r\nfrom django.views.decorators.csrf import csrf_exempt\r\nimport date...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# coding:utf-8\r\nfrom importlib import import_module\r\nfrom django.http import HttpResponse\r\nfrom . import settings as USettings\r\nimport os\r\nimport json\r\nfrom django.views.decorators.csrf import csrf_exemp...
```python # coding:utf-8 from importlib import import_module from django.http import HttpResponse from . import settings as USettings import os import json from django.views.decorators.csrf import csrf_exempt import datetime import random import urllib from django.utils import six if six.PY3: long = i...
[ { "content": "Return the code exactly, with no changes:\n```python\n#!/usr/bin/env python\nimport dns\nfrom dnsdisttests import DNSDistTest\n\nclass TestSpoofingSpoof(DNSDistTest):\n\n _config_template = \"\"\"\n addAction(makeRule(\"spoofaction.spoofing.tests.powerdns.com.\"), SpoofAction({\"192.0.2.1\",...
[ { "content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n#!/usr/bin/env python\nimport dns\nfrom dnsdisttests import DNSDistTest\n\nclass TestSpoofingSpoof(DNSDistTest):\n\n _config_template = \"\"\"\n addAction(makeRule(\"spoofaction.spoofing.tests.powerdns.com.\"), SpoofAction...
```python #!/usr/bin/env python import dns from dnsdisttests import DNSDistTest class TestSpoofingSpoof(DNSDistTest): _config_template = """ addAction(makeRule("spoofaction.spoofing.tests.powerdns.com."), SpoofAction({"192.0.2.1", "2001:DB8::1"})) addAction(makeRule("spoofaction-aa.spoofing.tests.powerdns...
[ { "content": "```python\nfrom pypif import pif\nfrom pypif.obj.common.pio import Pio\nfrom pypif.util.serializable import Serializable\nfrom six import string_types\n\n\nclass PifSearchHit(Serializable):\n \"\"\"\n Class to store a single PIF search hit.\n \"\"\"\n\n def __init__(self, id=None, data...
[ { "content": "<|memory_start|>```python\nfrom pypif import pif\nfrom pypif.obj.common.pio import Pio\nfrom pypif.util.serializable import Serializable\nfrom six import string_types\n\n\nclass PifSearchHit(Serializable):\n \"\"\"\n Class to store a single PIF search hit.\n \"\"\"\n\n def __init__(sel...
```python from pypif import pif from pypif.obj.common.pio import Pio from pypif.util.serializable import Serializable from six import string_types class PifSearchHit(Serializable): """ Class to store a single PIF search hit. """ def __init__(self, id=None, dataset=None, dataset_version=None, score=No...
[ { "content": "Recreate the original code text:\n```python\nimport py\nfrom rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr\nfrom rpython.jit.metainterp.history import ResOperation, TargetToken,\\\n JitCellToken\nfrom rpython.jit.metainterp.history import (ConstInt, ConstPtr, Const,\n ...
[ { "content": "Recreate the original code text:\n<|memory_start|>```python\nimport py\nfrom rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr\nfrom rpython.jit.metainterp.history import ResOperation, TargetToken,\\\n JitCellToken\nfrom rpython.jit.metainterp.history import (ConstInt, ConstPtr, ...
```python import py from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr from rpython.jit.metainterp.history import ResOperation, TargetToken,\ JitCellToken from rpython.jit.metainterp.history import (ConstInt, ConstPtr, Const, BasicFailDescr, BasicFinalD...
[ { "content": "Repeat the code exactly:\n```python\n\"\"\"\nSynfirechain-like example\n\"\"\"\n#!/usr/bin/python\nimport os\nimport spynnaker.pyNN as p\nimport spynnaker_external_devices_plugin.pyNN as q\nimport numpy, pylab\n\np.setup(timestep=1.0, min_delay = 1.0, max_delay = 144.0)\nnNeurons = 3 # number of n...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\n\"\"\"\nSynfirechain-like example\n\"\"\"\n#!/usr/bin/python\nimport os\nimport spynnaker.pyNN as p\nimport spynnaker_external_devices_plugin.pyNN as q\nimport numpy, pylab\n\np.setup(timestep=1.0, min_delay = 1.0, max_delay = 144.0)\nnNeurons =...
```python """ Synfirechain-like example """ #!/usr/bin/python import os import spynnaker.pyNN as p import spynnaker_external_devices_plugin.pyNN as q import numpy, pylab p.setup(timestep=1.0, min_delay = 1.0, max_delay = 144.0) nNeurons = 3 # number of neurons in each population max_delay = 50 cell_params_lif = {'c...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n# Copyright (c) 2014 by Ecreall under licence AGPL terms \n# available on http://www.gnu.org/licenses/agpl.html \n\n# licence: AGPL\n# author: Amen Souissi\n\nfrom pyramid.view import view_config\nfrom pyramid.ht...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n# Copyright (c) 2014 by Ecreall under licence AGPL terms \n# available on http://www.gnu.org/licenses/agpl.html \n\n# licence: AGPL\n# author: Amen Souissi\n\nfrom pyramid.view import view_config\...
```python # Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from dace.util import getSite from dace.processinstance.core import DEFAUL...
[ { "content": "Here is the script:\n```python\n#!/usr/bin/env python3\n\n'''\n@file rpctest.py\n@author Gabriele Tozzi <gabriele@tozzi.eu>\n@package DoPhp\n@brief Simple RPC JSON client in python for tetsing methods\n'''\n\nimport sys\nimport argparse\nimport re\nimport hashlib\nimport http.client, urllib.parse\...
[ { "content": "Here is the script:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\n'''\n@file rpctest.py\n@author Gabriele Tozzi <gabriele@tozzi.eu>\n@package DoPhp\n@brief Simple RPC JSON client in python for tetsing methods\n'''\n\nimport sys\nimport argparse\nimport re\nimport hashlib\nimport http.clien...
```python #!/usr/bin/env python3 ''' @file rpctest.py @author Gabriele Tozzi <gabriele@tozzi.eu> @package DoPhp @brief Simple RPC JSON client in python for tetsing methods ''' import sys import argparse import re import hashlib import http.client, urllib.parse import gzip, zlib import json import logging class Param...
[ { "content": "Here is the snippet:\n```python\nfrom genshi.builder import tag\n\nfrom trac.core import Component, implements\nfrom trac.ticket.api import ITicketActionController, TicketSystem\nfrom trac.perm import IPermissionRequestor\n\nrevision = \"$Rev: 6326 $\"\nurl = \"$URL: https://svn.edgewall.org/repos...
[ { "content": "Here is the snippet:\n<|memory_start|>```python\nfrom genshi.builder import tag\n\nfrom trac.core import Component, implements\nfrom trac.ticket.api import ITicketActionController, TicketSystem\nfrom trac.perm import IPermissionRequestor\n\nrevision = \"$Rev: 6326 $\"\nurl = \"$URL: https://svn.ed...
```python from genshi.builder import tag from trac.core import Component, implements from trac.ticket.api import ITicketActionController, TicketSystem from trac.perm import IPermissionRequestor revision = "$Rev: 6326 $" url = "$URL: https://svn.edgewall.org/repos/trac/tags/trac-0.12.2/sample-plugins/workflow/StatusFi...
[ { "content": "```python\n#!/usr/bin/env python\n\nfrom nose.tools import *\nfrom utilities import Todo\nfrom utilities import execution_path\nimport tempfile\n\nimport os, sys, glob, mapnik2\n\ndef setup():\n # All of the paths used are relative, if we run the tests\n # from another directory we need to c...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python\n\nfrom nose.tools import *\nfrom utilities import Todo\nfrom utilities import execution_path\nimport tempfile\n\nimport os, sys, glob, mapnik2\n\ndef setup():\n # All of the paths used are relative, if we run the tests\n # from another direct...
```python #!/usr/bin/env python from nose.tools import * from utilities import Todo from utilities import execution_path import tempfile import os, sys, glob, mapnik2 def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\n# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\nimport gfm\n\...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\...
```python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import gfm from test_case import TestCase class TestMultilineLink(TestCase): def setUp(sel...
[ { "content": "Here is some code:\n```python\n#!/usr/bin/python\n\nimport MySQLdb\nimport json\nfrom ConfigParser import ConfigParser\n\nLIMIT = 7\nuser_and_client_stat_columns = ('TOTAL_CONNECTIONS', 'CONCURRENT_CONNECTIONS', 'CONNECTED_TIME', 'BUSY_TIME', 'CPU_TIME', 'BYTES_RECEIVED', 'BYTES_SENT', 'BINLOG_BYT...
[ { "content": "Here is some code:\n<|memory_start|>```python\n#!/usr/bin/python\n\nimport MySQLdb\nimport json\nfrom ConfigParser import ConfigParser\n\nLIMIT = 7\nuser_and_client_stat_columns = ('TOTAL_CONNECTIONS', 'CONCURRENT_CONNECTIONS', 'CONNECTED_TIME', 'BUSY_TIME', 'CPU_TIME', 'BYTES_RECEIVED', 'BYTES_SE...
```python #!/usr/bin/python import MySQLdb import json from ConfigParser import ConfigParser LIMIT = 7 user_and_client_stat_columns = ('TOTAL_CONNECTIONS', 'CONCURRENT_CONNECTIONS', 'CONNECTED_TIME', 'BUSY_TIME', 'CPU_TIME', 'BYTES_RECEIVED', 'BYTES_SENT', 'BINLOG_BYTES_WRITTEN', 'ROWS_READ', 'ROWS_SENT', 'ROWS_DELET...
[ { "content": "```python\nimport numpy as np\nfrom scipy.misc import imsave\n\nfrom libcore import Img\nfrom libcore import DistortionCorrection, DistortionCorrectionPoint\n\nimage_path = '../schraegbild_tempelhof.jpg'\n\n\ndef main():\n b1()\n\n\ndef b1():\n image = Img.load_image(image_path)\n\n targe...
[ { "content": "<|memory_start|>```python\nimport numpy as np\nfrom scipy.misc import imsave\n\nfrom libcore import Img\nfrom libcore import DistortionCorrection, DistortionCorrectionPoint\n\nimage_path = '../schraegbild_tempelhof.jpg'\n\n\ndef main():\n b1()\n\n\ndef b1():\n image = Img.load_image(image_pa...
```python import numpy as np from scipy.misc import imsave from libcore import Img from libcore import DistortionCorrection, DistortionCorrectionPoint image_path = '../schraegbild_tempelhof.jpg' def main(): b1() def b1(): image = Img.load_image(image_path) target_image_size_height = 900 target_im...
[ { "content": "Provide a verbatim copy of the code:\n```python\nimport base64\nimport hashlib\nimport hmac\nimport imghdr\nfrom wsgiref.util import FileWrapper\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured, PermissionDenied\nfrom django.http import HttpResponse, Htt...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\nimport base64\nimport hashlib\nimport hmac\nimport imghdr\nfrom wsgiref.util import FileWrapper\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured, PermissionDenied\nfrom django.http import H...
```python import base64 import hashlib import hmac import imghdr from wsgiref.util import FileWrapper from django.conf import settings from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.http import HttpResponse, HttpResponsePermanentRedirect, StreamingHttpResponse from django.shortcu...
[ { "content": "Here is a code snippet:\n```python\n#!/usr/bin/env python\n\"\"\"This file contains a helper class for the flows.\n\nThis flow context class provides all the methods for handling flows (i.e.,\ncalling clients, changing state, ...).\n\nEach flow must have a flow runner before it can be executed. Th...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n#!/usr/bin/env python\n\"\"\"This file contains a helper class for the flows.\n\nThis flow context class provides all the methods for handling flows (i.e.,\ncalling clients, changing state, ...).\n\nEach flow must have a flow runner before it can...
```python #!/usr/bin/env python """This file contains a helper class for the flows. This flow context class provides all the methods for handling flows (i.e., calling clients, changing state, ...). Each flow must have a flow runner before it can be executed. The flow runner is responsible for queuing messages and mai...
[ { "content": "Here is the source code:\n```python\n# -*- coding: utf-8 -*-\n# <nbformat>3.0</nbformat>\n\n# <codecell>\n\nfrom __future__ import division\nimport os, os.path\nimport sys\nsys.path.append('/home/will/PySeqUtils/')\nfrom collections import Counter\nos.chdir('/home/will/HIVCpG/')\nfrom GeneralSeqTo...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# <nbformat>3.0</nbformat>\n\n# <codecell>\n\nfrom __future__ import division\nimport os, os.path\nimport sys\nsys.path.append('/home/will/PySeqUtils/')\nfrom collections import Counter\nos.chdir('/home/will/HIVCpG/')\nf...
```python # -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from __future__ import division import os, os.path import sys sys.path.append('/home/will/PySeqUtils/') from collections import Counter os.chdir('/home/will/HIVCpG/') from GeneralSeqTools import fasta_reader # <codecell> from itertools import...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n########\n# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the L...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n########\n# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compl...
```python ######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
[ { "content": "```python\n\"\"\"proyecto_DAI URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app import views\n 2. Add a URL to urlpatterns...
[ { "content": "<|memory_start|>```python\n\"\"\"proyecto_DAI URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app import views\n 2. Add a UR...
```python """proyecto_DAI URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
[ { "content": "Here is the code block:\n```python\nfrom django.shortcuts import render\nfrom django.views.generic import ListView\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.http import HttpResponse, HttpResponseRedirect\n# IMPORT REST\nfrom rest_framework import status, generics, mixins, ...
[ { "content": "Here is the code block:\n<|memory_start|>```python\nfrom django.shortcuts import render\nfrom django.views.generic import ListView\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.http import HttpResponse, HttpResponseRedirect\n# IMPORT REST\nfrom rest_framework import status, ge...
```python from django.shortcuts import render from django.views.generic import ListView from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseRedirect # IMPORT REST from rest_framework import status, generics, mixins, viewsets from rest_framework.decorators import api_vi...
[ { "content": "Provide a verbatim copy of the code:\n```python\nfrom __future__ import division\nfrom math import pi\nimport numpy as np\nimport random\n# import matplotlib.pyplot as plt\n\nclass SineOsc:\n\n def __init__(self):\n self.sample_rate = 44100\n\n def wave(self, frequency, length, rate):...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\nfrom __future__ import division\nfrom math import pi\nimport numpy as np\nimport random\n# import matplotlib.pyplot as plt\n\nclass SineOsc:\n\n def __init__(self):\n self.sample_rate = 44100\n\n def wave(self, frequency...
```python from __future__ import division from math import pi import numpy as np import random # import matplotlib.pyplot as plt class SineOsc: def __init__(self): self.sample_rate = 44100 def wave(self, frequency, length, rate): """produces sine across np array""" length = int(lengt...
[ { "content": "Here is the script:\n```python\n# Copyright (c) James Percent, Byron Galbraith and Unlock contributors.\n# All rights reserved.\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# 1. Redistrib...
[ { "content": "Here is the script:\n<|memory_start|>```python\n# Copyright (c) James Percent, Byron Galbraith and Unlock contributors.\n# All rights reserved.\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n#...
```python # Copyright (c) James Percent, Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyr...
[ { "content": "Here is the snippet:\n```python\nfrom .ut_utils import ForgeTestCase\nfrom forge import InvalidEntryPoint\n\nclass TestedClass(object):\n def entry_point(self):\n self.f()\n self.g(1, 2, 3)\n self.h(a=1, b=2)\n self.class_method()\n self.static_method()\n d...
[ { "content": "Here is the snippet:\n<|memory_start|>```python\nfrom .ut_utils import ForgeTestCase\nfrom forge import InvalidEntryPoint\n\nclass TestedClass(object):\n def entry_point(self):\n self.f()\n self.g(1, 2, 3)\n self.h(a=1, b=2)\n self.class_method()\n self.static...
```python from .ut_utils import ForgeTestCase from forge import InvalidEntryPoint class TestedClass(object): def entry_point(self): self.f() self.g(1, 2, 3) self.h(a=1, b=2) self.class_method() self.static_method() def set_value(self): self.value = 2 def f(se...
[ { "content": "Provide an exact copy of the source code:\n```python\n# Copyright 2014 Andreas Riegg - t-h-i-n-x.net\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# ...
[ { "content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# Copyright 2014 Andreas Riegg - t-h-i-n-x.net\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 L...
```python # Copyright 2014 Andreas Riegg - t-h-i-n-x.net # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ { "content": "```python\n# -*- coding: UTF-8 -*-\n\n# COPYRIGHT (c) 2016 Cristóbal Ganter\n#\n# GNU AFFERO GENERAL PUBLIC LICENSE\n# Version 3, 19 November 2007\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as publish...
[ { "content": "<|memory_start|>```python\n# -*- coding: UTF-8 -*-\n\n# COPYRIGHT (c) 2016 Cristóbal Ganter\n#\n# GNU AFFERO GENERAL PUBLIC LICENSE\n# Version 3, 19 November 2007\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public Li...
```python # -*- coding: UTF-8 -*- # COPYRIGHT (c) 2016 Cristóbal Ganter # # GNU AFFERO GENERAL PUBLIC LICENSE # Version 3, 19 November 2007 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Found...
[ { "content": "Here is a code snippet:\n```python\nfrom helperFunctions.data_conversion import make_bytes\nfrom test.common_helper import TEST_FW, TEST_FW_2, TEST_TEXT_FILE\nfrom test.unit.web_interface.base import WebInterfaceTest\n\n\nclass TestAppShowAnalysis(WebInterfaceTest):\n\n def test_app_show_analys...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\nfrom helperFunctions.data_conversion import make_bytes\nfrom test.common_helper import TEST_FW, TEST_FW_2, TEST_TEXT_FILE\nfrom test.unit.web_interface.base import WebInterfaceTest\n\n\nclass TestAppShowAnalysis(WebInterfaceTest):\n\n def test...
```python from helperFunctions.data_conversion import make_bytes from test.common_helper import TEST_FW, TEST_FW_2, TEST_TEXT_FILE from test.unit.web_interface.base import WebInterfaceTest class TestAppShowAnalysis(WebInterfaceTest): def test_app_show_analysis_get_valid_fw(self): result = self.test_clien...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\nfrom unittest import TestCase, main\nimport os\nimport time\nimport sys\nimport tempfile\nimport difflib\nimport svtools.sv_classifier\nimport gzip\n\nclass IntegrationTest_sv_classify(TestCase):\n\n def test_chromosome_prefix(s...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\nfrom unittest import TestCase, main\nimport os\nimport time\nimport sys\nimport tempfile\nimport difflib\nimport svtools.sv_classifier\nimport gzip\n\nclass IntegrationTest_sv_classify(TestCase):\n\n def test_chr...
```python from unittest import TestCase, main import os import time import sys import tempfile import difflib import svtools.sv_classifier import gzip class IntegrationTest_sv_classify(TestCase): def test_chromosome_prefix(self): self.assertEqual(svtools.sv_classifier.chromosome_prefix('chrBLAH'), 'BLAH')...
[ { "content": "Here is a code file:\n```python\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom decimal import Decimal\nfrom urllib.request import urlopen\nfrom urllib.error import HTTPError\nfrom xml.sax import handler, make_parser\nimport xml.etree.ElementTree\nimport json\nimport re\n...
[ { "content": "Here is a code file:\n<|memory_start|>```python\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom decimal import Decimal\nfrom urllib.request import urlopen\nfrom urllib.error import HTTPError\nfrom xml.sax import handler, make_parser\nimport xml.etree.ElementTree\nimport j...
```python from collections import OrderedDict from datetime import datetime from decimal import Decimal from urllib.request import urlopen from urllib.error import HTTPError from xml.sax import handler, make_parser import xml.etree.ElementTree import json import re import time from typing import Any, Callable, ClassVar...
[ { "content": "Here is some code:\n```python\n#!/usr/bin/env python3\n\nimport math\nfrom numbers import Number\n\nimport torch\nfrom torch.distributions import constraints\nfrom torch.nn import Module as TModule\n\nfrom ..utils.cholesky import psd_safe_cholesky\nfrom .prior import Prior\n\n\nclass LKJPrior(Prio...
[ { "content": "Here is some code:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\nimport math\nfrom numbers import Number\n\nimport torch\nfrom torch.distributions import constraints\nfrom torch.nn import Module as TModule\n\nfrom ..utils.cholesky import psd_safe_cholesky\nfrom .prior import Prior\n\n\ncla...
```python #!/usr/bin/env python3 import math from numbers import Number import torch from torch.distributions import constraints from torch.nn import Module as TModule from ..utils.cholesky import psd_safe_cholesky from .prior import Prior class LKJPrior(Prior): r"""LKJ prior over n x n (positive definite) cor...
[ { "content": "Repeat the code precisely:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport glob\nimport time\nimport shutil\n\ntry:\n from PyQt4.QtGui import *\n from PyQt4.QtCore import *\nexcept ImportError, err:\n sys.stderr.write(\"Error: %s%s\" % (str(err)...
[ { "content": "Repeat the code precisely:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport glob\nimport time\nimport shutil\n\ntry:\n from PyQt4.QtGui import *\n from PyQt4.QtCore import *\nexcept ImportError, err:\n sys.stderr.write(\"Error: %s...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import glob import time import shutil try: from PyQt4.QtGui import * from PyQt4.QtCore import * except ImportError, err: sys.stderr.write("Error: %s%s" % (str(err), os.linesep)) sys.exit(1) try: from comicutils.ui.cc_ui ...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n```python\n# ----------------------------------------------------------------------------\n# pyglet\n# Copyright (c) 2006-2008 Alex Holkner\n# Copyright (c) 2008-2021 pyglet contributors\n# All rights reserved.\n#\n# Redistribution a...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# ----------------------------------------------------------------------------\n# pyglet\n# Copyright (c) 2006-2008 Alex Holkner\n# Copyright (c) 2008-2021 pyglet contributors\n# All rights reserved.\n#\n# ...
```python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2021 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n```python\n#!/usr/bin/env python\nimport os\nimport unittest\nimport sys\n\nfrom test_common import TestCommon\n\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'library'))\nfrom fastly_service import FastlyConfiguration\n\nclass...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\n#!/usr/bin/env python\nimport os\nimport unittest\nimport sys\n\nfrom test_common import TestCommon\n\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'library'))\nfrom fastly_service import FastlyConfig...
```python #!/usr/bin/env python import os import unittest import sys from test_common import TestCommon sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'library')) from fastly_service import FastlyConfiguration class TestFastlyGzip(TestCommon): GZIP_NAME = 'gzip-config-name' @TestCommon.vcr.u...
[ { "content": "```python\n#!/usr/bin/env python3\n\nimport os\n\nfrom gi.repository import Gtk\n\nfrom src.Constants import MAIN_FOLDER\nfrom src.Constants import UI_FOLDER\n\nfrom src.Common import createTag\nfrom src.Common import createCategory\n\nfrom src.Interface.Utils import BasicInterface\nfrom src.Inter...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python3\n\nimport os\n\nfrom gi.repository import Gtk\n\nfrom src.Constants import MAIN_FOLDER\nfrom src.Constants import UI_FOLDER\n\nfrom src.Common import createTag\nfrom src.Common import createCategory\n\nfrom src.Interface.Utils import BasicInterface...
```python #!/usr/bin/env python3 import os from gi.repository import Gtk from src.Constants import MAIN_FOLDER from src.Constants import UI_FOLDER from src.Common import createTag from src.Common import createCategory from src.Interface.Utils import BasicInterface from src.Interface.Utils import acceptInterfaceSig...
[ { "content": "Here is the script:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Copyright (C) 2010-2012 Associazione OpenERP Italia\n# (<http://www.openerp-italia.org>).\n# Copyright(c)2008-2010 SIA \"KN dati\"....
[ { "content": "Here is the script:\n<|memory_start|>```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Copyright (C) 2010-2012 Associazione OpenERP Italia\n# (<http://www.openerp-italia.org>).\n# Copyright(c)2008-2010 ...
```python #!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Associazione OpenERP Italia # (<http://www.openerp-italia.org>). # Copyright(c)2008-2010 SIA "KN dati".(http://kndati.lv) All Rights Reserved. # ...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n```python\nfrom .util import TestCase, load_json_fixture\nfrom babbage.model import Model\n\n\nclass ModelTestCase(TestCase):\n\n def setUp(self):\n super(ModelTestCase, self).setUp()\n self.simple_model_data = load_...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\nfrom .util import TestCase, load_json_fixture\nfrom babbage.model import Model\n\n\nclass ModelTestCase(TestCase):\n\n def setUp(self):\n super(ModelTestCase, self).setUp()\n self.simple_mo...
```python from .util import TestCase, load_json_fixture from babbage.model import Model class ModelTestCase(TestCase): def setUp(self): super(ModelTestCase, self).setUp() self.simple_model_data = load_json_fixture('models/simple_model.json') self.simple_model = Model(self.simple_model_dat...
[ { "content": "```python\n##\n# Copyright 2009-2017 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentru...
[ { "content": "<|memory_start|>```python\n##\n# Copyright 2009-2017 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (http...
```python ## # Copyright 2009-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Fou...
[ { "content": "```python\nimport imp\nfrom io import StringIO\nfrom pluggdapps.plugin import Plugin, implements\nfrom tayra import BaseTTLPlugin\n\ndef __traceback_decorator__( frames ):\n from copy import deepcopy\n from os.path import basename\n\n def _map2...
[ { "content": "<|memory_start|>```python\nimport imp\nfrom io import StringIO\nfrom pluggdapps.plugin import Plugin, implements\nfrom tayra import BaseTTLPlugin\n\ndef __traceback_decorator__( frames ):\n from copy import deepcopy\n from os.path import basename\...
```python import imp from io import StringIO from pluggdapps.plugin import Plugin, implements from tayra import BaseTTLPlugin def __traceback_decorator__( frames ): from copy import deepcopy from os.path import basename def _map2ttl( frame ): filename =...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"The CLI tools classes.\"\"\"\n\nimport abc\nimport datetime\nimport locale\nimport logging\nimport os\nimport sys\n\ntry:\n import win32api\n import win32console\nexcept ImportErr...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"The CLI tools classes.\"\"\"\n\nimport abc\nimport datetime\nimport locale\nimport logging\nimport os\nimport sys\n\ntry:\n import win32api\n import win32console\n...
```python # -*- coding: utf-8 -*- """The CLI tools classes.""" import abc import datetime import locale import logging import os import sys try: import win32api import win32console except ImportError: win32console = None import plaso from plaso.cli import views from plaso.lib import errors from plaso.lib impor...
[ { "content": "Here is the source code:\n```python\n# -*- encoding: utf-8 -*-\n##############################################################################\n# \n# Copyright (C) 2013-2016 Didotech SRL\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n# -*- encoding: utf-8 -*-\n##############################################################################\n# \n# Copyright (C) 2013-2016 Didotech SRL\n#\n# This program is free software: you can redistribute it and/or modify\n# it un...
```python # -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2016 Didotech SRL # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by ...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n```python\n# -*- coding: utf-8 -*-\n\nfrom datetime import datetime\nimport itertools\nimport logging\nimport math\nimport re\nimport uuid\nfrom werkzeug.exceptions import Forbidden\n\nfrom openerp import _\nfrom openerp import api, ...
[ { "content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nfrom datetime import datetime\nimport itertools\nimport logging\nimport math\nimport re\nimport uuid\nfrom werkzeug.exceptions import Forbidden\n\nfrom openerp import _\nfrom open...
```python # -*- coding: utf-8 -*- from datetime import datetime import itertools import logging import math import re import uuid from werkzeug.exceptions import Forbidden from openerp import _ from openerp import api, fields, models from openerp import http from openerp import modules from openerp import tools from ...
[ { "content": "Repeat the code precisely:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n__author__ = 'Michal Szczepanski'\n\n\nfrom sqlalchemy.sql.schema import Column, ForeignKey\nfrom sqlalchemy.orm import relationship\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy impo...
[ { "content": "Repeat the code precisely:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n__author__ = 'Michal Szczepanski'\n\n\nfrom sqlalchemy.sql.schema import Column, ForeignKey\nfrom sqlalchemy.orm import relationship\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michal Szczepanski' from sqlalchemy.sql.schema import Column, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Integer, String, Boolean, Binary Base = declarative_bas...
[ { "content": "Reconstruct the code exactly:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"setup.py: setuptools control.\"\"\"\n\nimport re\nfrom setuptools import setup\n\n#import sys\n#if not sys.version_info[0] == 3:\n# print(\"\\n \\\n# sys.exit(\"\\n \\\n# *********************************...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n\"\"\"setup.py: setuptools control.\"\"\"\n\nimport re\nfrom setuptools import setup\n\n#import sys\n#if not sys.version_info[0] == 3:\n# print(\"\\n \\\n# sys.exit(\"\\n \\\n# *****************...
```python # -*- coding: utf-8 -*- """setup.py: setuptools control.""" import re from setuptools import setup #import sys #if not sys.version_info[0] == 3: # print("\n \ # sys.exit("\n \ # ****************************************************************\n \ # * The CLI has only been te...
[ { "content": "Write the code verbatim:\n```python\n# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright (C) 2016-2019 Canonical Ltd\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by ...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\n# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright (C) 2016-2019 Canonical Ltd\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\...
```python # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distr...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n\"\"\" crypto.passwords.passwordfactory\n\n Python classes to create and recover passwords. Currently contains\n simple password generation. <need to merge the dictionary based pws>\n\n Copyright © (c) 2002 by Paul A. Lambert\n Read LICENSE.txt for...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\" crypto.passwords.passwordfactory\n\n Python classes to create and recover passwords. Currently contains\n simple password generation. <need to merge the dictionary based pws>\n\n Copyright © (c) 2002 by Paul A. Lambert\n Read...
```python # -*- coding: utf-8 -*- """ crypto.passwords.passwordfactory Python classes to create and recover passwords. Currently contains simple password generation. <need to merge the dictionary based pws> Copyright © (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. August...
[ { "content": "Here is a code file:\n```python\n# Copyright 2021 The FedLearner Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.a...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n# Copyright 2021 The FedLearner Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
```python # Copyright 2021 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ { "content": "```python\n'''\nA MLP network for MNIST digits classification\n\nProject: https://github.com/roatienza/dl-keras\nUsage: python3 <this file>\n'''\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# numpy package\nimport numpy as np\...
[ { "content": "<|memory_start|>```python\n'''\nA MLP network for MNIST digits classification\n\nProject: https://github.com/roatienza/dl-keras\nUsage: python3 <this file>\n'''\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# numpy package\nimp...
```python ''' A MLP network for MNIST digits classification Project: https://github.com/roatienza/dl-keras Usage: python3 <this file> ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function # numpy package import numpy as np from keras.models import Sequential...
[ { "content": "Repeat the code precisely:\n```python\n__author__ = 'yueli'\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom config.config import *\n\n# Import the targeted raw CSV file\nrawCSV_file1 = os.path.join(\n CSV_FILE_DESTDIR,\n 'For_different_5_VP',\n 'Delete...
[ { "content": "Repeat the code precisely:\n<|memory_start|>```python\n__author__ = 'yueli'\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom config.config import *\n\n# Import the targeted raw CSV file\nrawCSV_file1 = os.path.join(\n CSV_FILE_DESTDIR,\n 'For_different_5_V...
```python __author__ = 'yueli' import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from config.config import * # Import the targeted raw CSV file rawCSV_file1 = os.path.join( CSV_FILE_DESTDIR, 'For_different_5_VP', 'Deleted_database', 'EID-153.16.47.16-MR-198.6.255.37', "lie...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n#\n# This file is part of INSPIRE.\n# Copyright (C) 2014-2017 CERN.\n#\n# INSPIRE is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# This file is part of INSPIRE.\n# Copyright (C) 2014-2017 CERN.\n#\n# INSPIRE is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, eit...
```python # -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
[ { "content": "Write the code verbatim:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nSimple app for converting between float, double, and IEEE754 binary\nrepresentations.\n\"\"\"\n\n__author__ = \"Zachary Sturgeon <zws258@email.vccs.edu>\"\n\nimport struct\nfrom kivy.app import App\nfrom kivy.uix.widget import W...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n\"\"\"\nSimple app for converting between float, double, and IEEE754 binary\nrepresentations.\n\"\"\"\n\n__author__ = \"Zachary Sturgeon <zws258@email.vccs.edu>\"\n\nimport struct\nfrom kivy.app import App\nfrom kivy.uix...
```python #!/usr/bin/env python """ Simple app for converting between float, double, and IEEE754 binary representations. """ __author__ = "Zachary Sturgeon <zws258@email.vccs.edu>" import struct from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.boxlayout import BoxLayout from kivy.uix.checkbo...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\nimport re\nimport collections\n\nfrom enum import Enum\n\nfrom ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum\nfrom ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict\nfro...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\nimport re\nimport collections\n\nfrom enum import Enum\n\nfrom ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum\nfrom ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, Fi...
```python import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE...
[ { "content": "```python\n# Copyright 2011 Nicholas Bray\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.org/licenses/LICENSE-2.0\n#\n# Unless require...
[ { "content": "<|memory_start|>```python\n# Copyright 2011 Nicholas Bray\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.org/licenses/LICENSE-2.0\n#\n...
```python # Copyright 2011 Nicholas Bray # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
[ { "content": "```python\nfrom collections import (\n Iterable,\n Mapping,\n MutableMapping,\n Sequence,\n MutableSequence\n)\nimport sys\nimport imp\nimport functools\nimport itertools\nfrom numbers import Number\nimport operator\nimport re\n\nfrom pyrsistent import (\n v, pvector, m, pmap, s,...
[ { "content": "<|memory_start|>```python\nfrom collections import (\n Iterable,\n Mapping,\n MutableMapping,\n Sequence,\n MutableSequence\n)\nimport sys\nimport imp\nimport functools\nimport itertools\nfrom numbers import Number\nimport operator\nimport re\n\nfrom pyrsistent import (\n v, pvec...
```python from collections import ( Iterable, Mapping, MutableMapping, Sequence, MutableSequence ) import sys import imp import functools import itertools from numbers import Number import operator import re from pyrsistent import ( v, pvector, m, pmap, s, pset, b, pbag, dq, pdeque, l, plis...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n```python\n#!/usr/bin/env python2\n# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai\nfrom __future__ import print_function\n\n__license__ = 'GPL v3'\n__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'\n__docformat__ = 'restructuredt...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\n#!/usr/bin/env python2\n# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai\nfrom __future__ import print_function\n\n__license__ = 'GPL v3'\n__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'\n__docformat__ ...
```python #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import print_function __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os, errno from threading import Thread, Event from PyQt5.Qt import...
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n```python\n\"\"\"Test for registration view.\"\"\"\n\nfrom bs4 import BeautifulSoup\nfrom django.contrib.auth.models import User\nfrom django.core import mail\nfrom django.test import Client\nfrom django.test import RequestFactory\nfrom django....
[ { "content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\n\"\"\"Test for registration view.\"\"\"\n\nfrom bs4 import BeautifulSoup\nfrom django.contrib.auth.models import User\nfrom django.core import mail\nfrom django.test import Client\nfrom django.test import RequestFacto...
```python """Test for registration view.""" from bs4 import BeautifulSoup from django.contrib.auth.models import User from django.core import mail from django.test import Client from django.test import RequestFactory from django.test import TestCase from django.urls import reverse from imagersite.views import home_vie...
[ { "content": "Here is the script:\n```python\n#!/usr/bin/env python\n#\n#\tx12c.c\n#\n#\tBar chart demo.\n\nimport sys\nimport os\n\nmodule_dir = \"@MODULE_DIR@\"\n\nif module_dir[0] == '@':\n\tmodule_dir = os.getcwd ()\n\nsys.path.insert (0, module_dir)\n\n# main\n#\n# Does a simple bar chart, using color fill...
[ { "content": "Here is the script:\n<|memory_start|>```python\n#!/usr/bin/env python\n#\n#\tx12c.c\n#\n#\tBar chart demo.\n\nimport sys\nimport os\n\nmodule_dir = \"@MODULE_DIR@\"\n\nif module_dir[0] == '@':\n\tmodule_dir = os.getcwd ()\n\nsys.path.insert (0, module_dir)\n\n# main\n#\n# Does a simple bar chart, ...
```python #!/usr/bin/env python # # x12c.c # # Bar chart demo. import sys import os module_dir = "@MODULE_DIR@" if module_dir[0] == '@': module_dir = os.getcwd () sys.path.insert (0, module_dir) # main # # Does a simple bar chart, using color fill. If color fill is # unavailable, pattern fill is used instead (au...
[ { "content": "Repeat the full code snippet:\n```python\nfrom Screens.Screen import Screen\nfrom Components.ConfigList import ConfigListScreen\nfrom Components.config import config, configfile, getConfigListEntry\nfrom Components.Sources.StaticText import StaticText\nfrom Components.SystemInfo import SystemInfo\...
[ { "content": "Repeat the full code snippet:\n<|memory_start|>```python\nfrom Screens.Screen import Screen\nfrom Components.ConfigList import ConfigListScreen\nfrom Components.config import config, configfile, getConfigListEntry\nfrom Components.Sources.StaticText import StaticText\nfrom Components.SystemInfo im...
```python from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, configfile, getConfigListEntry from Components.Sources.StaticText import StaticText from Components.SystemInfo import SystemInfo from Tools.Directories import fileExists from os import pa...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\nfrom src.todoMelvin import settings\nfrom datetime import datetime\nfrom subprocess import check_output\n\nlogSender = None\n\nclass WarningLevels:\n Debug = {'level' : 0, 'tag' : 'DEBUG'} \n Info = ...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\nfrom src.todoMelvin import settings\nfrom datetime import datetime\nfrom subprocess import check_output\n\nlogSender = None\n\nclass WarningLevels:\n Debug = {'level' : 0, 'tag' : 'DEBUG'} ...
```python from src.todoMelvin import settings from datetime import datetime from subprocess import check_output logSender = None class WarningLevels: Debug = {'level' : 0, 'tag' : 'DEBUG'} Info = {'level' : 1, 'tag' : 'INFO'} Warn = {'level' : 2, 'tag' : 'WARNING'} Fatal = {'level' : 3, 't...
[ { "content": "```python\n########################################################################\n# $HeadURL$\n# File : JobCleaningAgent.py\n# Author : A.T.\n########################################################################\n\"\"\"\nThe Job Cleaning Agent controls removing jobs from the WMS in the e...
[ { "content": "<|memory_start|>```python\n########################################################################\n# $HeadURL$\n# File : JobCleaningAgent.py\n# Author : A.T.\n########################################################################\n\"\"\"\nThe Job Cleaning Agent controls removing jobs from ...
```python ######################################################################## # $HeadURL$ # File : JobCleaningAgent.py # Author : A.T. ######################################################################## """ The Job Cleaning Agent controls removing jobs from the WMS in the end of their life cycle. """ fro...
[ { "content": "```python\nfrom django.conf.urls import include, url, patterns\nfrom django.contrib import admin\nfrom HealthApp import views\n\n\"\"\"\nThe urlpatterns is how we map the site urls to specific views in the views.py. The first part is\na regular expression to describe the url pattern, followed by t...
[ { "content": "<|memory_start|>```python\nfrom django.conf.urls import include, url, patterns\nfrom django.contrib import admin\nfrom HealthApp import views\n\n\"\"\"\nThe urlpatterns is how we map the site urls to specific views in the views.py. The first part is\na regular expression to describe the url patter...
```python from django.conf.urls import include, url, patterns from django.contrib import admin from HealthApp import views """ The urlpatterns is how we map the site urls to specific views in the views.py. The first part is a regular expression to describe the url pattern, followed by the view that should be called. L...
[ { "content": "Here is the snippet:\n```python\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-------...
[ { "content": "Here is the snippet:\n<|memory_start|>```python\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this sof...
```python #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------------...
[ { "content": "```python\nfrom __future__ import print_function\nfrom array import array\nfrom itertools import islice\n\ndef lcs_cut2(s1, s2, lcs_low_bound=0, bg=None, debug=False):\n \"\"\"Compule the length of the LCS 2 sequences s1 and s2.\n \n lcs_low_bound : (int), hint of lower bound for the leng...
[ { "content": "<|memory_start|>```python\nfrom __future__ import print_function\nfrom array import array\nfrom itertools import islice\n\ndef lcs_cut2(s1, s2, lcs_low_bound=0, bg=None, debug=False):\n \"\"\"Compule the length of the LCS 2 sequences s1 and s2.\n \n lcs_low_bound : (int), hint of lower bo...
```python from __future__ import print_function from array import array from itertools import islice def lcs_cut2(s1, s2, lcs_low_bound=0, bg=None, debug=False): """Compule the length of the LCS 2 sequences s1 and s2. lcs_low_bound : (int), hint of lower bound for the lenght of the lcs to search for. ...
[ { "content": "Replicate the source code:\n```python\n# -*- coding: utf8 -*-\n## Copyright (c) 2013 Stefan Thesing\n##\n##This file is part of Podstatty.\n##\n##Podstatty is free software: you can redistribute it and/or modify\n##it under the terms of the GNU General Public License as published by\n##the Free So...
[ { "content": "Replicate the source code:\n<|memory_start|>```python\n# -*- coding: utf8 -*-\n## Copyright (c) 2013 Stefan Thesing\n##\n##This file is part of Podstatty.\n##\n##Podstatty is free software: you can redistribute it and/or modify\n##it under the terms of the GNU General Public License as published b...
```python # -*- coding: utf8 -*- ## Copyright (c) 2013 Stefan Thesing ## ##This file is part of Podstatty. ## ##Podstatty is free software: you can redistribute it and/or modify ##it under the terms of the GNU General Public License as published by ##the Free Software Foundation, either version 3 of the License, or ##(...
[ { "content": "Repeat the code exactly:\n```python\n# -*- coding: UTF-8 -*-\n# Copyright 2011-2018 Rumma & Ko Ltd\n# License: BSD (see file COPYING for details)\n\n\n# This is a masterpiece of untransparent code, difficult to understand\n# and maintain. But I didn't find a better solution. Maybe an XSLT\n# exp...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\n# -*- coding: UTF-8 -*-\n# Copyright 2011-2018 Rumma & Ko Ltd\n# License: BSD (see file COPYING for details)\n\n\n# This is a masterpiece of untransparent code, difficult to understand\n# and maintain. But I didn't find a better solution. Mayb...
```python # -*- coding: UTF-8 -*- # Copyright 2011-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) # This is a masterpiece of untransparent code, difficult to understand # and maintain. But I didn't find a better solution. Maybe an XSLT # expert might help us to rewrite this from scratch. The purp...
[ { "content": "Here is a code file:\n```python\n# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\n\nimport unittest\n\nimport numpy as np\nfrom monty.os.path import which\n\nfrom pymatgen.core.lattice import Lattice\nfrom pymatgen.core.structure imp...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\n\nimport unittest\n\nimport numpy as np\nfrom monty.os.path import which\n\nfrom pymatgen.core.lattice import Lattice\nfrom pymatgen.co...
```python # coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import numpy as np from monty.os.path import which from pymatgen.core.lattice import Lattice from pymatgen.core.structure import Structure, Molecule from pymatgen.transformations.si...
[ { "content": "Here is the source code:\n```python\nfrom filterDb import *\r\n#from queriesDb import *\r\nclass Filter():\r\n\t\"\"\"\r\n\tpermette di definire una serie di condizioni che il pv deve soddisfare, il metodo test applicato\r\n\tsul singolo pv verifica che questo le rispetti, in particolare la logic...
[ { "content": "Here is the source code:\n<|memory_start|>```python\nfrom filterDb import *\r\n#from queriesDb import *\r\nclass Filter():\r\n\t\"\"\"\r\n\tpermette di definire una serie di condizioni che il pv deve soddisfare, il metodo test applicato\r\n\tsul singolo pv verifica che questo le rispetti, in part...
```python from filterDb import * #from queriesDb import * class Filter(): """ permette di definire una serie di condizioni che il pv deve soddisfare, il metodo test applicato sul singolo pv verifica che questo le rispetti, in particolare la logica dei filtri prevede che piu' parametri della stessa classe sia...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n```python\n# Copyright 2014-2016 The ODL development group\n#\n# This file is part of ODL.\n#\n# ODL is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Fr...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n# Copyright 2014-2016 The ODL development group\n#\n# This file is part of ODL.\n#\n# ODL is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as publis...
```python # Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
[ { "content": "Write the code verbatim:\n```python\n# -*- coding: utf-8 -*-\n\nfrom gettext import gettext as _\n\nNAME = _('Bolivia')\n\nSTATES = [\n (_('Pando'), 254, 136, 124, 0),\n (_('Beni'), 253, 283, 292, 0),\n (_('La Paz'), 252, 124, 431, 0),\n (_('Oruro'), 251, 146, 609, 0),\n (_('Potosí'...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nfrom gettext import gettext as _\n\nNAME = _('Bolivia')\n\nSTATES = [\n (_('Pando'), 254, 136, 124, 0),\n (_('Beni'), 253, 283, 292, 0),\n (_('La Paz'), 252, 124, 431, 0),\n (_('Oruro'), 251, 146, 609, 0),\...
```python # -*- coding: utf-8 -*- from gettext import gettext as _ NAME = _('Bolivia') STATES = [ (_('Pando'), 254, 136, 124, 0), (_('Beni'), 253, 283, 292, 0), (_('La Paz'), 252, 124, 431, 0), (_('Oruro'), 251, 146, 609, 0), (_('Potosí'), 250, 204, 745, 0), (_('Cochabamba'), 249, 279, 503, 0...
[ { "content": "Here is a code snippet:\n```python\n# TODO: fix and check allcommand-line arguments\n\nfrom util import debug_print\nfrom pygame import image, Rect, Surface\nfrom pygame.locals import KEYDOWN, KEYUP, USEREVENT\nimport pygame\nimport sys\nimport random\nimport json\nimport os\nfrom collections impo...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n# TODO: fix and check allcommand-line arguments\n\nfrom util import debug_print\nfrom pygame import image, Rect, Surface\nfrom pygame.locals import KEYDOWN, KEYUP, USEREVENT\nimport pygame\nimport sys\nimport random\nimport json\nimport os\nfrom ...
```python # TODO: fix and check allcommand-line arguments from util import debug_print from pygame import image, Rect, Surface from pygame.locals import KEYDOWN, KEYUP, USEREVENT import pygame import sys import random import json import os from collections import namedtuple from functools import partial import argpars...
[ { "content": "Recreate the original code text:\n```python\n# Copyright 2017 Yahoo Inc.\n# Licensed under the terms of the Apache 2.0 license.\n# Please see LICENSE file in the project root for terms.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import nested_scopes...
[ { "content": "Recreate the original code text:\n<|memory_start|>```python\n# Copyright 2017 Yahoo Inc.\n# Licensed under the terms of the Apache 2.0 license.\n# Please see LICENSE file in the project root for terms.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ impo...
```python # Copyright 2017 Yahoo Inc. # Licensed under the terms of the Apache 2.0 license. # Please see LICENSE file in the project root for terms. from __future__ import absolute_import from __future__ import division from __future__ import nested_scopes from __future__ import print_function from multiprocessing.ma...
[ { "content": "Here is the code block:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n\nDIRAC and GridPP: perform a query on the CERN@school frames.\n\n\"\"\"\n\n#...for the operating system stuff.\nimport os\n\n#...for parsing the arguments.\nimport argparse\n\n#...for the logging.\nimpor...
[ { "content": "Here is the code block:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n\nDIRAC and GridPP: perform a query on the CERN@school frames.\n\n\"\"\"\n\n#...for the operating system stuff.\nimport os\n\n#...for parsing the arguments.\nimport argparse\n\n#...for the...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- """ DIRAC and GridPP: perform a query on the CERN@school frames. """ #...for the operating system stuff. import os #...for parsing the arguments. import argparse #...for the logging. import logging as lg # Import the JSON library. import json # The DIRAC i...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\n# -*- coding: utf-8 -*-\n\n__author__ = 'Patrick Michl'\n__email__ = 'patrick.michl@gmail.com'\n__license__ = 'GPLv3'\n\nimport nemoa\nimport qdeep.objects.common\nfrom PySide import QtGui, QtCore\n\nclass Editor(qdeep.objects.c...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n__author__ = 'Patrick Michl'\n__email__ = 'patrick.michl@gmail.com'\n__license__ = 'GPLv3'\n\nimport nemoa\nimport qdeep.objects.common\nfrom PySide import QtGui, QtCore\n\nclass Editor...
```python # -*- coding: utf-8 -*- __author__ = 'Patrick Michl' __email__ = 'patrick.michl@gmail.com' __license__ = 'GPLv3' import nemoa import qdeep.objects.common from PySide import QtGui, QtCore class Editor(qdeep.objects.common.Editor): objType = 'script' def createCentralWidget(self): self.te...