prompt
listlengths
1
1
compression_prompt
listlengths
1
1
target
stringlengths
1.03k
828k
[ { "content": "Here is a code snippet:\n```python\n# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.\n#\n# This file is part of kiwi.\n#\n# kiwi 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 Foundatio...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.\n#\n# This file is part of kiwi.\n#\n# kiwi 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...
```python # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 opti...
[ { "content": "Here is a code snippet:\n```python\nfrom pelican import signals\nimport re\nimport html5lib\n\nRAW_FOOTNOTE_CONTAINERS = [\"code\"]\n\ndef getText(node, recursive = False):\n \"\"\"Get all the text associated with this node.\n With recursive == True, all text from child nodes is retrieved...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\nfrom pelican import signals\nimport re\nimport html5lib\n\nRAW_FOOTNOTE_CONTAINERS = [\"code\"]\n\ndef getText(node, recursive = False):\n \"\"\"Get all the text associated with this node.\n With recursive == True, all text from child no...
```python from pelican import signals import re import html5lib RAW_FOOTNOTE_CONTAINERS = ["code"] def getText(node, recursive = False): """Get all the text associated with this node. With recursive == True, all text from child nodes is retrieved.""" L = [''] for n in node.childNodes: if n....
[ { "content": "Return the code exactly, with no changes:\n```python\n#\n# Copyright 2017 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
[ { "content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n#\n# Copyright 2017 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Lice...
```python # # Copyright 2017 the original author or authors. # # 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 applica...
[ { "content": "Here is the script:\n```python\n#\n# Extended VT100 terminal text editor, etc. widgets\n# Copyright (c) 2015 Paul Sokolovsky\n# Distributed under MIT License\n#\nimport sys\nimport os\nfrom .editor import *\n\n\n# Edit single line, quit on Enter/Esc\nclass LineEditor(Editor):\n\n def handle_cur...
[ { "content": "Here is the script:\n<|memory_start|>```python\n#\n# Extended VT100 terminal text editor, etc. widgets\n# Copyright (c) 2015 Paul Sokolovsky\n# Distributed under MIT License\n#\nimport sys\nimport os\nfrom .editor import *\n\n\n# Edit single line, quit on Enter/Esc\nclass LineEditor(Editor):\n\n ...
```python # # Extended VT100 terminal text editor, etc. widgets # Copyright (c) 2015 Paul Sokolovsky # Distributed under MIT License # import sys import os from .editor import * # Edit single line, quit on Enter/Esc class LineEditor(Editor): def handle_cursor_keys(self, key): if super().handle_cursor_key...
[ { "content": "Here is the source code:\n```python\nimport os \nimport re\nimport pandas as pd\nimport string\nimport itertools\nimport numpy as np\nimport sys\nimport argparse\nfrom collections import OrderedDict\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser(description='Create GO annotati...
[ { "content": "Here is the source code:\n<|memory_start|>```python\nimport os \nimport re\nimport pandas as pd\nimport string\nimport itertools\nimport numpy as np\nimport sys\nimport argparse\nfrom collections import OrderedDict\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser(description='Cr...
```python import os import re import pandas as pd import string import itertools import numpy as np import sys import argparse from collections import OrderedDict if __name__ == '__main__': parser = argparse.ArgumentParser(description='Create GO annotation and enrichment file') parser.add_argument('-i',type=s...
[ { "content": "Produce an exact reconstruction of the code:\n```python\nfrom __future__ import absolute_import, print_function, division\n\nimport netlib.utils\n\n\npkg_data = netlib.utils.Data(__name__)\n\n\nclass LRUCache:\n\n \"\"\"\n A simple LRU cache for generated values.\n \"\"\"\n\n def _...
[ { "content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\nfrom __future__ import absolute_import, print_function, division\n\nimport netlib.utils\n\n\npkg_data = netlib.utils.Data(__name__)\n\n\nclass LRUCache:\n\n \"\"\"\n A simple LRU cache for generated values.\n \"\...
```python from __future__ import absolute_import, print_function, division import netlib.utils pkg_data = netlib.utils.Data(__name__) class LRUCache: """ A simple LRU cache for generated values. """ def __init__(self, size=100): self.size = size self.cache = {} self.ca...
[ { "content": "Recreate the entire code block with identical formatting:\n```python\n# -*- encoding: utf-8 -*-\n##############################################################################\n#\n# Copyright (c) 2014 Didotech SRL (info at didotech.com)\n# All Rights Reserved.\n#\n# WARNIN...
[ { "content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n# -*- encoding: utf-8 -*-\n##############################################################################\n#\n# Copyright (c) 2014 Didotech SRL (info at didotech.com)\n# All Rights Reserv...
```python # -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Didotech SRL (info at didotech.com) # All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take th...
[ { "content": "Repeat the full code snippet:\n```python\nfrom datetime import datetime\n\nfrom dateutil.tz import gettz\nimport numpy as np\nimport pytest\nimport pytz\nfrom pytz import utc\n\nfrom pandas._libs.tslibs import (\n NaT,\n Timedelta,\n Timestamp,\n conversion,\n to_offset,\n)\nfrom pa...
[ { "content": "Repeat the full code snippet:\n<|memory_start|>```python\nfrom datetime import datetime\n\nfrom dateutil.tz import gettz\nimport numpy as np\nimport pytest\nimport pytz\nfrom pytz import utc\n\nfrom pandas._libs.tslibs import (\n NaT,\n Timedelta,\n Timestamp,\n conversion,\n to_off...
```python from datetime import datetime from dateutil.tz import gettz import numpy as np import pytest import pytz from pytz import utc from pandas._libs.tslibs import ( NaT, Timedelta, Timestamp, conversion, to_offset, ) from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG import pandas.ut...
[ { "content": "```python\nfrom __future__ import print_function\n\nimport struct\nimport itertools\nfrom collections import namedtuple, OrderedDict\n\nimport _tcldis\nprintbc = _tcldis.printbc\ndef getbc(*args, **kwargs):\n \"\"\"\n Accepts a keyword argument of:\n - `tcl_code` - a string of valid Tcl ...
[ { "content": "<|memory_start|>```python\nfrom __future__ import print_function\n\nimport struct\nimport itertools\nfrom collections import namedtuple, OrderedDict\n\nimport _tcldis\nprintbc = _tcldis.printbc\ndef getbc(*args, **kwargs):\n \"\"\"\n Accepts a keyword argument of:\n - `tcl_code` - a stri...
```python from __future__ import print_function import struct import itertools from collections import namedtuple, OrderedDict import _tcldis printbc = _tcldis.printbc def getbc(*args, **kwargs): """ Accepts a keyword argument of: - `tcl_code` - a string of valid Tcl to compile - `tclobj_ptr` - a ra...
[ { "content": "Write the code verbatim:\n```python\nfrom setuptools import setup, find_packages\r\n\r\nsetup(\r\n name='BCalc',\r\n\r\n # Versions should comply with PEP440. For a discussion on single-sourcing\r\n # the version across setup.py and the project code, see\r\n # https://packaging.python...
[ { "content": "Write the code verbatim:\n<|memory_start|>```python\nfrom setuptools import setup, find_packages\r\n\r\nsetup(\r\n name='BCalc',\r\n\r\n # Versions should comply with PEP440. For a discussion on single-sourcing\r\n # the version across setup.py and the project code, see\r\n # https://...
```python from setuptools import setup, find_packages setup( name='BCalc', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version='0.1.0',...
[ { "content": "Here is the script:\n```python\nimport os,sys,xmpp\n\ncurrentUser = None\nxmppClient = None\nnicks = {}\n\n###### Bot Command\ndef commandNick():\n pass\n \ndef commandHelp(client, user):\n message = \"\"\"\n !help - See this menu.\n !nick <new name> - Change nick name.\n \"\"\"\n client.se...
[ { "content": "Here is the script:\n<|memory_start|>```python\nimport os,sys,xmpp\n\ncurrentUser = None\nxmppClient = None\nnicks = {}\n\n###### Bot Command\ndef commandNick():\n pass\n \ndef commandHelp(client, user):\n message = \"\"\"\n !help - See this menu.\n !nick <new name> - Change nick name.\n \"\...
```python import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logic def parseComman...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\nimport pytest\nimport tempfile\n\nfrom sklearn.utils.testing import assert_array_equal\nfrom sklearn.utils.testing import assert_equal\nfrom sklearn.utils.testing import assert_true\n\nimport numpy as np\n\nfrom skopt ...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\nimport pytest\nimport tempfile\n\nfrom sklearn.utils.testing import assert_array_equal\nfrom sklearn.utils.testing import assert_equal\nfrom sklearn.utils.testing import assert_true\n\nimport numpy as n...
```python import pytest import tempfile from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true import numpy as np from skopt import gp_minimize from skopt import load from skopt import dump from skopt import expected_minimum f...
[ { "content": "Here is the source code:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2017 Google Inc.\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 the source code:\n<|memory_start|>```python\n#!/usr/bin/env python\n#\n# Copyright 2017 Google Inc.\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 #!/usr/bin/env python # # Copyright 2017 Google Inc. # # 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 appli...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nfrom __future__ import absolute_import\nfrom flask import ...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nfrom __future__ import absolute_import\nfr...
```python # -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import from flask import current_app from typing impor...
[ { "content": "Here is some code:\n```python\nimport numpy as np\nfrom scipy.signal import butter, lfilter, freqz\nimport matplotlib.pyplot as plt\nfrom clean_bad_trace import clean_bad_trace\n\n\nfile = open(\"processing/save_to_file/data.txt\")\ntrace = file.readlines()\n\ntrace_clean = clean_bad_trace(trace)\...
[ { "content": "Here is some code:\n<|memory_start|>```python\nimport numpy as np\nfrom scipy.signal import butter, lfilter, freqz\nimport matplotlib.pyplot as plt\nfrom clean_bad_trace import clean_bad_trace\n\n\nfile = open(\"processing/save_to_file/data.txt\")\ntrace = file.readlines()\n\ntrace_clean = clean_b...
```python import numpy as np from scipy.signal import butter, lfilter, freqz import matplotlib.pyplot as plt from clean_bad_trace import clean_bad_trace file = open("processing/save_to_file/data.txt") trace = file.readlines() trace_clean = clean_bad_trace(trace) print(trace_clean) plt.plot(trace_clean, label='Noisy...
[ { "content": "Here is a code file:\n```python\nimport os\nfrom collections import defaultdict\nimport numpy as np\n\ntry:\n import matplotlib\n if not os.environ.get('DISPLAY'):\n # Use non-interactive Agg backend\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\nexcept ImportErr...
[ { "content": "Here is a code file:\n<|memory_start|>```python\nimport os\nfrom collections import defaultdict\nimport numpy as np\n\ntry:\n import matplotlib\n if not os.environ.get('DISPLAY'):\n # Use non-interactive Agg backend\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n...
```python import os from collections import defaultdict import numpy as np try: import matplotlib if not os.environ.get('DISPLAY'): # Use non-interactive Agg backend matplotlib.use('Agg') import matplotlib.pyplot as plt except ImportError: import platform if platform.python_implemen...
[ { "content": "Here is the source code:\n```python\n#!/usr/bin/python\n\n# interpolate scalar gradient onto nedelec space\nfrom dolfin import *\n\nimport petsc4py\nimport sys\n\npetsc4py.init(sys.argv)\n\nfrom petsc4py import PETSc\nPrint = PETSc.Sys.Print\n# from MatrixOperations import *\nimport numpy as np\n#...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n#!/usr/bin/python\n\n# interpolate scalar gradient onto nedelec space\nfrom dolfin import *\n\nimport petsc4py\nimport sys\n\npetsc4py.init(sys.argv)\n\nfrom petsc4py import PETSc\nPrint = PETSc.Sys.Print\n# from MatrixOperations import *\nimpor...
```python #!/usr/bin/python # interpolate scalar gradient onto nedelec space from dolfin import * import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc Print = PETSc.Sys.Print # from MatrixOperations import * import numpy as np #import matplotlib.pylab as plt import PETScIO as IO import comm...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\n# Copyright Dytech Solutions, 2005.\n\n# This module is provided 'commercial-in-confidence' and may not be reproduced nor redistributed without\n# express written permission from the copyright holder.\n\n# Author: Adam Eijdenberg, ...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# Copyright Dytech Solutions, 2005.\n\n# This module is provided 'commercial-in-confidence' and may not be reproduced nor redistributed without\n# express written permission from the copyright holder.\n\n# Author: A...
```python # Copyright Dytech Solutions, 2005. # This module is provided 'commercial-in-confidence' and may not be reproduced nor redistributed without # express written permission from the copyright holder. # Author: Adam Eijdenberg, Dytech Solutions <adam.eijdenberg@dytech.com.au> # Note: This is a very basic ODBC ...
[ { "content": "Reconstruct the code exactly:\n```python\n#!/usr/bin/env python\n# Licensed to Cloudera, Inc. under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. Cloudera, Inc. licenses this file\n# t...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n#!/usr/bin/env python\n# Licensed to Cloudera, Inc. under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. Cloudera, Inc. license...
```python #!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License...
[ { "content": "Repeat the following code:\n```python\n# Copyright (c) 2014 Thales Services SAS\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#...
[ { "content": "Repeat the following code:\n<|memory_start|>```python\n# Copyright (c) 2014 Thales Services SAS\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of t...
```python # Copyright (c) 2014 Thales Services SAS # 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": "Here is a code snippet:\n```python\nfrom extract_and_vector.dbi.downloads.extract import process_download_for_extractor\nfrom .setup_test_extract import TestExtractDB\n\n\nclass TestProcessDownloadForExtractor(TestExtractDB):\n\n def test_process_download_for_extractor(self):\n # Make su...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\nfrom extract_and_vector.dbi.downloads.extract import process_download_for_extractor\nfrom .setup_test_extract import TestExtractDB\n\n\nclass TestProcessDownloadForExtractor(TestExtractDB):\n\n def test_process_download_for_extractor(self):\n ...
```python from extract_and_vector.dbi.downloads.extract import process_download_for_extractor from .setup_test_extract import TestExtractDB class TestProcessDownloadForExtractor(TestExtractDB): def test_process_download_for_extractor(self): # Make sure nothing's extracted yet and download text is not to ...
[ { "content": "Here is a code snippet:\n```python\nimport requests\nimport time\nimport re\n\nimport praw\n\nfrom cms.util import BeautifulSoup, _FAKE_HEADERS\n\nSUBMITTED_FMT = 'https://www.reddit.com/user/%s/submitted/'\nSUBREDDIT_FMT = 'https://www.reddit.com/r/%s/'\nUSER_AGENT='sheenrocks\\' user agent'\nRAT...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\nimport requests\nimport time\nimport re\n\nimport praw\n\nfrom cms.util import BeautifulSoup, _FAKE_HEADERS\n\nSUBMITTED_FMT = 'https://www.reddit.com/user/%s/submitted/'\nSUBREDDIT_FMT = 'https://www.reddit.com/r/%s/'\nUSER_AGENT='sheenrocks\\' ...
```python import requests import time import re import praw from cms.util import BeautifulSoup, _FAKE_HEADERS SUBMITTED_FMT = 'https://www.reddit.com/user/%s/submitted/' SUBREDDIT_FMT = 'https://www.reddit.com/r/%s/' USER_AGENT='sheenrocks\' user agent' RATE_LIMIT = 1 class Reddit(object): def __init__(self, u...
[ { "content": "Here is the source code:\n```python\n# -*- coding: utf-8 -*-\nfrom ui.informform import MainDialog\n\n\nclass MainClass(object):\n\n def to_log(\n self,\n type_message='info',\n MESSAGE='info',\n level=None,\n ):\n\n sent_to_log = False\n self.last_l...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom ui.informform import MainDialog\n\n\nclass MainClass(object):\n\n def to_log(\n self,\n type_message='info',\n MESSAGE='info',\n level=None,\n ):\n\n sent_to_log = False\n ...
```python # -*- coding: utf-8 -*- from ui.informform import MainDialog class MainClass(object): def to_log( self, type_message='info', MESSAGE='info', level=None, ): sent_to_log = False self.last_logger = {} if self.logger: type_message = ...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n#!/usr/bin/env python\n#\n# License: BSD\n# https://raw.githubusercontent.com/stonier/py_trees/devel/LICENSE\n#\n##############################################################################\n# Imports\n######...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n#!/usr/bin/env python\n#\n# License: BSD\n# https://raw.githubusercontent.com/stonier/py_trees/devel/LICENSE\n#\n##############################################################################\n#...
```python #!/usr/bin/env python # # License: BSD # https://raw.githubusercontent.com/stonier/py_trees/devel/LICENSE # ############################################################################## # Imports ############################################################################## # enable some python3 compatibi...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n```python\n# encoding:utf8\nimport sys\nimport os\nimport json\nfrom optparse import OptionParser\n\nclass Transformer(object):\n def __init__(self, idir, prefixs, start):\n self.idir = idir.decode(\"utf8\")\n self.prefixs...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n# encoding:utf8\nimport sys\nimport os\nimport json\nfrom optparse import OptionParser\n\nclass Transformer(object):\n def __init__(self, idir, prefixs, start):\n self.idir = idir.decode(\"utf8\")\n ...
```python # encoding:utf8 import sys import os import json from optparse import OptionParser class Transformer(object): def __init__(self, idir, prefixs, start): self.idir = idir.decode("utf8") self.prefixs = prefixs self.start = start def loadRecs(self, xaxis, yaxis): self.xax...
[ { "content": "```python\n# importing libraries:\nimport maya.cmds as cmds\nimport dpBaseControlClass as BaseControl\nreload(BaseControl)\n\n# global variables to this module: \nCLASS_NAME = \"ClipStraight\"\nTITLE = \"m109_clipStraight\"\nDESCRIPTION = \"m099_cvControlDesc\"\nICON = \"/Icons/dp_clipStraight....
[ { "content": "<|memory_start|>```python\n# importing libraries:\nimport maya.cmds as cmds\nimport dpBaseControlClass as BaseControl\nreload(BaseControl)\n\n# global variables to this module: \nCLASS_NAME = \"ClipStraight\"\nTITLE = \"m109_clipStraight\"\nDESCRIPTION = \"m099_cvControlDesc\"\nICON = \"/Icons/...
```python # importing libraries: import maya.cmds as cmds import dpBaseControlClass as BaseControl reload(BaseControl) # global variables to this module: CLASS_NAME = "ClipStraight" TITLE = "m109_clipStraight" DESCRIPTION = "m099_cvControlDesc" ICON = "/Icons/dp_clipStraight.png" dpClipStraightVersion = 1.1 clas...
[ { "content": "Repeat the code precisely as written (spacing intact):\n```python\n# Copyright 2012 VMware, Inc.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of ...
[ { "content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# Copyright 2012 VMware, Inc.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\...
```python # Copyright 2012 VMware, Inc. # 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 re...
[ { "content": "Here is a code file:\n```python\n# -*- coding: utf-8 -*-\n\n# AwesomeTTS text-to-speech add-on for Anki\n# Copyright (C) 2010-Present Anki AwesomeTTS Development Team\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...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# AwesomeTTS text-to-speech add-on for Anki\n# Copyright (C) 2010-Present Anki AwesomeTTS Development Team\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Genera...
```python # -*- coding: utf-8 -*- # AwesomeTTS text-to-speech add-on for Anki # Copyright (C) 2010-Present Anki AwesomeTTS Development Team # # 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 Foundation, ei...
[ { "content": "Here is a code snippet:\n```python\n#! python3 # noqa: E265\n\n\n# ----------------------------------------------------------------------------\n# Name: Infos Rasters\n# Purpose: Use GDAL library to extract informations about\n# geographic rasters data. It permits a...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n#! python3 # noqa: E265\n\n\n# ----------------------------------------------------------------------------\n# Name: Infos Rasters\n# Purpose: Use GDAL library to extract informations about\n# geographic rasters da...
```python #! python3 # noqa: E265 # ---------------------------------------------------------------------------- # Name: Infos Rasters # Purpose: Use GDAL library to extract informations about # geographic rasters data. It permits a more friendly use as # submodule. #...
[ { "content": "Here is the code content:\n```python\nimport tweepy\nfrom pymongo import MongoClient\n\nclass RaffleSlave:\n \"The class responsbile for a single raffle, a new instance for each individual raffle\"\n\n Params = None\n\n api = None\n\n alive = True\n\n def __init__(self, hashtag, max...
[ { "content": "Here is the code content:\n<|memory_start|>```python\nimport tweepy\nfrom pymongo import MongoClient\n\nclass RaffleSlave:\n \"The class responsbile for a single raffle, a new instance for each individual raffle\"\n\n Params = None\n\n api = None\n\n alive = True\n\n def __init__(se...
```python import tweepy from pymongo import MongoClient class RaffleSlave: "The class responsbile for a single raffle, a new instance for each individual raffle" Params = None api = None alive = True def __init__(self, hashtag, max, id, owner ): self.Params = {} self.Params['max...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\nfrom webapp.services import db\nfrom datetime import datetime\nimport urllib2,re\n\nclass Stock(db.Model):\n __tablename__ = 'stock_basic'\n\n id = db.Column(db.Integer, primary_key=True)\n code = db.Column(db...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\nfrom webapp.services import db\nfrom datetime import datetime\nimport urllib2,re\n\nclass Stock(db.Model):\n __tablename__ = 'stock_basic'\n\n id = db.Column(db.Integer, primary_key=True)\n cod...
```python from webapp.services import db from datetime import datetime import urllib2,re class Stock(db.Model): __tablename__ = 'stock_basic' id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(255)) name = db.Column(db.String(255)) flag = db.Column(db.String(5)) industry ...
[ { "content": "Reconstruct the code exactly:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom compat import python_2_unicode_compatible\nfrom compat.models import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom django.db import models\nfrom django.utils import timezone...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom compat import python_2_unicode_compatible\nfrom compat.models import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom django.db import models\nfrom django.utils...
```python # -*- coding: utf-8 -*- import os from compat import python_2_unicode_compatible from compat.models import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils import timezone from background_task.models import Task class CompletedTas...
[ { "content": "Here is the source code:\n```python\nimport cv2\nimport dlib\nimport numpy\n\nimport sys\n\n# https://pan.baidu.com/s/1dGIcuvZ\nPREDICTOR_PATH = \"./shape_predictor_68_face_landmarks.dat\"\nSCALE_FACTOR = 1 \nFEATHER_AMOUNT = 11\n\nFACE_POINTS = list(range(17, 68))\nMOUTH_POINTS = list(range(48, 6...
[ { "content": "Here is the source code:\n<|memory_start|>```python\nimport cv2\nimport dlib\nimport numpy\n\nimport sys\n\n# https://pan.baidu.com/s/1dGIcuvZ\nPREDICTOR_PATH = \"./shape_predictor_68_face_landmarks.dat\"\nSCALE_FACTOR = 1 \nFEATHER_AMOUNT = 11\n\nFACE_POINTS = list(range(17, 68))\nMOUTH_POINTS = ...
```python import cv2 import dlib import numpy import sys # https://pan.baidu.com/s/1dGIcuvZ PREDICTOR_PATH = "./shape_predictor_68_face_landmarks.dat" SCALE_FACTOR = 1 FEATHER_AMOUNT = 11 FACE_POINTS = list(range(17, 68)) MOUTH_POINTS = list(range(48, 61)) RIGHT_BROW_POINTS = list(range(17, 22)) LEFT_BROW_POINTS = ...
[ { "content": "Here is a code file:\n```python\n\"\"\"\nDecorators\n~~~~~~~~~~\n\nA collection of decorators for identifying the various types of route.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport odin\n\nfrom odin.exceptions import ValidationError\nfrom odin.utils import force_tuple, lazy_proper...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n\"\"\"\nDecorators\n~~~~~~~~~~\n\nA collection of decorators for identifying the various types of route.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport odin\n\nfrom odin.exceptions import ValidationError\nfrom odin.utils import force_tu...
```python """ Decorators ~~~~~~~~~~ A collection of decorators for identifying the various types of route. """ from __future__ import absolute_import import odin from odin.exceptions import ValidationError from odin.utils import force_tuple, lazy_property, getmeta from .constants import HTTPStatus, Method, Type fr...
[ { "content": "```python\n#!/usr/bin/env python\r\n# $Id: Filters.py,v 1.1 2006-09-06 09:50:08 skyostil Exp $\r\n\"\"\"Filters for the #filter directive; output filters Cheetah's $placeholders .\r\n\r\nFilters may now be used standalone, for debugging or for use outside Cheetah.\r\nClass DummyTemplate, instance ...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python\r\n# $Id: Filters.py,v 1.1 2006-09-06 09:50:08 skyostil Exp $\r\n\"\"\"Filters for the #filter directive; output filters Cheetah's $placeholders .\r\n\r\nFilters may now be used standalone, for debugging or for use outside Cheetah.\r\nClass DummyTem...
```python #!/usr/bin/env python # $Id: Filters.py,v 1.1 2006-09-06 09:50:08 skyostil Exp $ """Filters for the #filter directive; output filters Cheetah's $placeholders . Filters may now be used standalone, for debugging or for use outside Cheetah. Class DummyTemplate, instance _dummyTemplateObj and class NoDefaul...
[ { "content": "Repeat the following code:\n```python\n# ===============================================================================\n# Copyright 2014 Jake Ross\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 ma...
[ { "content": "Repeat the following code:\n<|memory_start|>```python\n# ===============================================================================\n# Copyright 2014 Jake Ross\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Li...
```python # =============================================================================== # Copyright 2014 Jake Ross # # 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....
[ { "content": "Output the full code verbatim (no extra comments):\n```python\n#! /usr/bin/env python\n# Copyright(c) 2014, The mtSet developers (Francesco Paolo Casale, Barbara Rakitsch, Oliver Stegle)\n# All rights reserved.\n\nfrom optparse import OptionParser\nfrom limix.mtSet.core.iset_utils import calc_emp_...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n#! /usr/bin/env python\n# Copyright(c) 2014, The mtSet developers (Francesco Paolo Casale, Barbara Rakitsch, Oliver Stegle)\n# All rights reserved.\n\nfrom optparse import OptionParser\nfrom limix.mtSet.core.iset_utils ...
```python #! /usr/bin/env python # Copyright(c) 2014, The mtSet developers (Francesco Paolo Casale, Barbara Rakitsch, Oliver Stegle) # All rights reserved. from optparse import OptionParser from limix.mtSet.core.iset_utils import calc_emp_pv_eff import pandas as pd import glob import os import time import sys def ent...
[ { "content": "Repeat the code exactly:\n```python\n# Copyright (C) 2015 Stefan C. Mueller\n\nimport unittest\nfrom twisted.internet import defer\nimport twistit\n\nclass TestExtract(unittest.TestCase):\n \n def test_success(self):\n d = defer.succeed(42)\n self.assertEqual(42, twistit.extrac...
[ { "content": "Repeat the code exactly:\n<|memory_start|>```python\n# Copyright (C) 2015 Stefan C. Mueller\n\nimport unittest\nfrom twisted.internet import defer\nimport twistit\n\nclass TestExtract(unittest.TestCase):\n \n def test_success(self):\n d = defer.succeed(42)\n self.assertEqual(42...
```python # Copyright (C) 2015 Stefan C. Mueller import unittest from twisted.internet import defer import twistit class TestExtract(unittest.TestCase): def test_success(self): d = defer.succeed(42) self.assertEqual(42, twistit.extract(d)) def test_fail(self): d = defer.f...
[ { "content": "Here is some code:\n```python\n#!/usr/bin/env python\n\n#\n# bgp_default-originate_route-map.py\n# Part of NetDEF Topology Tests\n#\n# Copyright (c) 2019 by\n# Donatas Abraitis <donatas.abraitis@gmail.com>\n#\n# Permission to use, copy, modify, and/or distribute this software\n# for any purpose wi...
[ { "content": "Here is some code:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n#\n# bgp_default-originate_route-map.py\n# Part of NetDEF Topology Tests\n#\n# Copyright (c) 2019 by\n# Donatas Abraitis <donatas.abraitis@gmail.com>\n#\n# Permission to use, copy, modify, and/or distribute this software\n# fo...
```python #!/usr/bin/env python # # bgp_default-originate_route-map.py # Part of NetDEF Topology Tests # # Copyright (c) 2019 by # Donatas Abraitis <donatas.abraitis@gmail.com> # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that ...
[ { "content": "```python\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version ...
[ { "content": "<|memory_start|>```python\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache L...
```python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you ...
[ { "content": "Output the full code verbatim (no extra comments):\n```python\n# -*- coding: utf-8 -*-\nimport logging\nimport httplib as http\nimport math\nfrom itertools import islice\n\nfrom flask import request\nfrom modularodm import Q\nfrom modularodm.exceptions import ModularOdmException, ValidationValueEr...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport logging\nimport httplib as http\nimport math\nfrom itertools import islice\n\nfrom flask import request\nfrom modularodm import Q\nfrom modularodm.exceptions import ModularOdmException, V...
```python # -*- coding: utf-8 -*- import logging import httplib as http import math from itertools import islice from flask import request from modularodm import Q from modularodm.exceptions import ModularOdmException, ValidationValueError from framework import status from framework.utils import iso8601format from fr...
[ { "content": "Here is a code file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n'''\nAnotações da aula 1:\n\nToda função que apresenta parâmetros não é exposta:\nEx:\n def soma(x, y):\n return x + y\n\nExiste no objeto request variáveis vars, post_vars e get_vars separadas.\n\nUtilize r...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n'''\nAnotações da aula 1:\n\nToda função que apresenta parâmetros não é exposta:\nEx:\n def soma(x, y):\n return x + y\n\nExiste no objeto request variáveis vars, post_vars e get_vars separad...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- ''' Anotações da aula 1: Toda função que apresenta parâmetros não é exposta: Ex: def soma(x, y): return x + y Existe no objeto request variáveis vars, post_vars e get_vars separadas. Utilize redirect('http://www.google.com') para redirecionar para o...
[ { "content": "Here is the source code:\n```python\n#!/usr/bin/python\n#\n# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n#!/usr/bin/python\n#\n# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the L...
```python #!/usr/bin/python # # Copyright 2014 Google Inc. 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 ...
[ { "content": "Repeat the code precisely:\n```python\nimport os\nimport urlparse\n\nfrom lib import gdata\nimport lib.gdata.youtube.client\nimport secrets\n\nGDATA_API_CLIENT_ID = 'CrowdTube-Connector'\n\nclass YouTubeCaptionEditor(object):\n\n def __init__(self, google_email, google_password, youtube_usernam...
[ { "content": "Repeat the code precisely:\n<|memory_start|>```python\nimport os\nimport urlparse\n\nfrom lib import gdata\nimport lib.gdata.youtube.client\nimport secrets\n\nGDATA_API_CLIENT_ID = 'CrowdTube-Connector'\n\nclass YouTubeCaptionEditor(object):\n\n def __init__(self, google_email, google_password,...
```python import os import urlparse from lib import gdata import lib.gdata.youtube.client import secrets GDATA_API_CLIENT_ID = 'CrowdTube-Connector' class YouTubeCaptionEditor(object): def __init__(self, google_email, google_password, youtube_username): self.youtube_username = youtube_username s...
[ { "content": "```python\nfrom __future__ import print_function\nfrom Screens.InfoBar import InfoBar\nfrom enigma import eServiceReference\nfrom Components.ActionMap import HelpableActionMap\nfrom Screens.EpgSelectionChannel import EPGSelectionChannel\nfrom Screens.EpgSelectionBase import EPGServiceZap\nfrom Scr...
[ { "content": "<|memory_start|>```python\nfrom __future__ import print_function\nfrom Screens.InfoBar import InfoBar\nfrom enigma import eServiceReference\nfrom Components.ActionMap import HelpableActionMap\nfrom Screens.EpgSelectionChannel import EPGSelectionChannel\nfrom Screens.EpgSelectionBase import EPGServ...
```python from __future__ import print_function from Screens.InfoBar import InfoBar from enigma import eServiceReference from Components.ActionMap import HelpableActionMap from Screens.EpgSelectionChannel import EPGSelectionChannel from Screens.EpgSelectionBase import EPGServiceZap from Screens.TimerEntry import addTim...
[ { "content": "Return the code exactly, with no changes:\n```python\n# -*- coding: utf-8 -*-\n# This file is part of pygal\n#\n# A python svg graph plotting library\n# Copyright © 2012-2016 Kozea\n#\n# This library is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser Ge...
[ { "content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# This file is part of pygal\n#\n# A python svg graph plotting library\n# Copyright © 2012-2016 Kozea\n#\n# This library is free software: you can redistribute it and/or modify it under\n# the terms of t...
```python # -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2016 Kozea # # This library is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, eith...
[ { "content": "Recreate the entire code block with identical formatting:\n```python\nclass Solution(object):\n def bursthelper(self,memo,nums,left,right):\n if left+1==right: return 0\n if memo[left][right]>0: return memo[left][right]\n res=0\n for i in xrange(left+1,right):\n ...
[ { "content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\nclass Solution(object):\n def bursthelper(self,memo,nums,left,right):\n if left+1==right: return 0\n if memo[left][right]>0: return memo[left][right]\n res=0\n for i in xrange(left+...
```python class Solution(object): def bursthelper(self,memo,nums,left,right): if left+1==right: return 0 if memo[left][right]>0: return memo[left][right] res=0 for i in xrange(left+1,right): res=max(res,nums[left]*nums[i]*nums[right]+self.bursthelper(memo,nums,left,i)+\ ...
[ { "content": "Output the full code verbatim (no extra comments):\n```python\n#!/usr/bin/env python3\nimport logging\nimport os\n\nimport time\n\nfrom gi.repository import Gtk, GLib\nimport lib.connection as Connection\n\nfrom lib.config import Config\n\n\nclass BlinderToolbarController(object):\n \"\"\"Manag...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n#!/usr/bin/env python3\nimport logging\nimport os\n\nimport time\n\nfrom gi.repository import Gtk, GLib\nimport lib.connection as Connection\n\nfrom lib.config import Config\n\n\nclass BlinderToolbarController(object):\...
```python #!/usr/bin/env python3 import logging import os import time from gi.repository import Gtk, GLib import lib.connection as Connection from lib.config import Config class BlinderToolbarController(object): """Manages Accelerators and Clicks on the Composition Toolbar-Buttons""" # set resolution of t...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\nfrom BasePage import BasePage\nfrom Equal_Experts.Constants import EE_Constants\nfrom BasePage import IncorrectPageException\nfrom Equal_Experts.UIMap import LoggedInPoductPageMa...
[ { "content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\nfrom BasePage import BasePage\nfrom Equal_Experts.Constants import EE_Constants\nfrom BasePage import IncorrectPageException\nfrom Equal_Experts.UIMap import Logg...
```python from BasePage import BasePage from Equal_Experts.Constants import EE_Constants from BasePage import IncorrectPageException from Equal_Experts.UIMap import LoggedInPoductPageMap from NewSnippetPage import NewSnippetPage from UploadPage import UploadPage ...
[ { "content": "Return the code unaltered:\n```python\n# Encoding: UTF-8\n\n# Run tests with \"py.test\" in the project root dir\nimport os, sys\nimport pytest\nimport datetime\n\nsys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),\"../\")))\n\nimport sc2reader\nfrom sc2re...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n# Encoding: UTF-8\n\n# Run tests with \"py.test\" in the project root dir\nimport os, sys\nimport pytest\nimport datetime\n\nsys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),\"../\")))\n\nimport sc2re...
```python # Encoding: UTF-8 # Run tests with "py.test" in the project root dir import os, sys import pytest import datetime sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)),"../"))) import sc2reader from sc2reader.exceptions import ParseError # Tests for build 17811 replay...
[ { "content": "```python\nfrom itertools import chain\nfrom random import shuffle\nimport numpy as np\nfrom jax import numpy as jnp, test_util as jtu\nfrom jax.util import safe_map, safe_zip\nfrom jax.tree_util import tree_multimap, tree_flatten, tree_map\n\nfrom fastar import lazy_eval, lazy_eval_fixed_point, L...
[ { "content": "<|memory_start|>```python\nfrom itertools import chain\nfrom random import shuffle\nimport numpy as np\nfrom jax import numpy as jnp, test_util as jtu\nfrom jax.util import safe_map, safe_zip\nfrom jax.tree_util import tree_multimap, tree_flatten, tree_map\n\nfrom fastar import lazy_eval, lazy_eva...
```python from itertools import chain from random import shuffle import numpy as np from jax import numpy as jnp, test_util as jtu from jax.util import safe_map, safe_zip from jax.tree_util import tree_multimap, tree_flatten, tree_map from fastar import lazy_eval, lazy_eval_fixed_point, LazyArray map = safe_map zip =...
[ { "content": "```python\n# Generated by Django 2.0.1 on 2018-01-17 11:30\n\nimport crypsis.models\nfrom django.db import migrations, models\nimport django.utils.timezone\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('crypsis_tests', '0007_auto_20171222_1155'),\n ]\n\n opera...
[ { "content": "<|memory_start|>```python\n# Generated by Django 2.0.1 on 2018-01-17 11:30\n\nimport crypsis.models\nfrom django.db import migrations, models\nimport django.utils.timezone\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('crypsis_tests', '0007_auto_20171222_1155'),\n ...
```python # Generated by Django 2.0.1 on 2018-01-17 11:30 import crypsis.models from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('crypsis_tests', '0007_auto_20171222_1155'), ] operations = [ migrations.AlterMo...
[ { "content": "Recreate the entire code block with identical formatting:\n```python\n# coding: utf-8\n\nfrom datetime import datetime, timedelta\nimport time\n\nfrom django import template\nfrom django.db.models import Q, F\n\nfrom zds.article.models import Reaction, ArticleRead\nfrom zds.forum.models import Top...
[ { "content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n# coding: utf-8\n\nfrom datetime import datetime, timedelta\nimport time\n\nfrom django import template\nfrom django.db.models import Q, F\n\nfrom zds.article.models import Reaction, ArticleRead\nfrom zds.forum.m...
```python # coding: utf-8 from datetime import datetime, timedelta import time from django import template from django.db.models import Q, F from zds.article.models import Reaction, ArticleRead from zds.forum.models import TopicFollowed, never_read as never_read_topic, Post, TopicRead from zds.mp.models import Priva...
[ { "content": "Produce an exact reconstruction of the code:\n```python\n#!/usr/bin/env python\n\n'''\nBulk add docs to an elasticsearch index.\n'''\n\nimport sys\nimport os\nimport json\nimport logging\nimport subprocess\n#import time\n\nLOGGER = logging.getLogger(__name__)\nLOGGER.setLevel(logging.INFO)\nLOGGER...
[ { "content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n'''\nBulk add docs to an elasticsearch index.\n'''\n\nimport sys\nimport os\nimport json\nimport logging\nimport subprocess\n#import time\n\nLOGGER = logging.getLogger(__name__)\nLOGGER.setLevel(loggi...
```python #!/usr/bin/env python ''' Bulk add docs to an elasticsearch index. ''' import sys import os import json import logging import subprocess #import time LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.INFO) LOGGER.addHandler(logging.StreamHandler(sys.stderr)) #def shell(cmd, max_attempts=7): de...
[ { "content": "Return the code unaltered:\n```python\n#!/usr/bin/python2\n# Julien Michel june 2007\n# usage is getAverageProfile.py file1.dat file2.dat file3.dat\n# where fileX can be an electron density profile, or a lateral pressure profile.\n# can probably be used for other outputs like electron pressure pr...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n#!/usr/bin/python2\n# Julien Michel june 2007\n# usage is getAverageProfile.py file1.dat file2.dat file3.dat\n# where fileX can be an electron density profile, or a lateral pressure profile.\n# can probably be used for other outputs like elec...
```python #!/usr/bin/python2 # Julien Michel june 2007 # usage is getAverageProfile.py file1.dat file2.dat file3.dat # where fileX can be an electron density profile, or a lateral pressure profile. # can probably be used for other outputs like electron pressure profile etc... import os,sys averages = [] resized = F...
[ { "content": "Here is a code snippet:\n```python\n# -*- coding: utf-8 -*-\n\nfrom datetime import datetime\n\nfrom sqlalchemy.ext.declarative import declared_attr\n\nfrom nbs.models import db\n\n\nclass TimestampMixin(object):\n\n created = db.Column(db.DateTime, default=datetime.now)\n modified = db.Colu...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\nfrom datetime import datetime\n\nfrom sqlalchemy.ext.declarative import declared_attr\n\nfrom nbs.models import db\n\n\nclass TimestampMixin(object):\n\n created = db.Column(db.DateTime, default=datetime.now)\n mo...
```python # -*- coding: utf-8 -*- from datetime import datetime from sqlalchemy.ext.declarative import declared_attr from nbs.models import db class TimestampMixin(object): created = db.Column(db.DateTime, default=datetime.now) modified = db.Column(db.DateTime, default=datetime.now, ...
[ { "content": "Repeat the code precisely:\n```python\n\"\"\"\n/**********************************************************\n\n Organization :AsymptopiaSoftware | Software@theLimit\n\n Website :www.asymptopia.org\n\n Author :Charles B. Cosse\n\n Email :ccosse@asymptopia.or...
[ { "content": "Repeat the code precisely:\n<|memory_start|>```python\n\"\"\"\n/**********************************************************\n\n Organization :AsymptopiaSoftware | Software@theLimit\n\n Website :www.asymptopia.org\n\n Author :Charles B. Cosse\n\n Email :ccos...
```python """ /********************************************************** Organization :AsymptopiaSoftware | Software@theLimit Website :www.asymptopia.org Author :Charles B. Cosse Email :ccosse@asymptopia.org Copyright :(C) 2006-2011 Asymptopia Software ...
[ { "content": "Provide a verbatim copy of the code:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"\n==================\nPyOrganism Package\n==================\n\n:Authors:\n Moritz Emanuel Beber\n:Date:\n 2012-05-22\n:Copyright:\n Copyright(c) 2012 Jacobs University of Bremen. Al...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"\n==================\nPyOrganism Package\n==================\n\n:Authors:\n Moritz Emanuel Beber\n:Date:\n 2012-05-22\n:Copyright:\n Copyright(c) 2012 Jacobs Universi...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- """ ================== PyOrganism Package ================== :Authors: Moritz Emanuel Beber :Date: 2012-05-22 :Copyright: Copyright(c) 2012 Jacobs University of Bremen. All rights reserved. :File: setup.py """ import sys from os.path import jo...
[ { "content": "Repeat the full code snippet:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n flaskbb.configs.default\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n This is the default configuration for FlaskBB that every site should have.\n You can override these configuration variables in another class.\n\n :copyri...
[ { "content": "Repeat the full code snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\n flaskbb.configs.default\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n This is the default configuration for FlaskBB that every site should have.\n You can override these configuration variables in another class...
```python # -*- coding: utf-8 -*- """ flaskbb.configs.default ~~~~~~~~~~~~~~~~~~~~~~~ This is the default configuration for FlaskBB that every site should have. You can override these configuration variables in another class. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE...
[ { "content": "```python\nimport scipy as s\nimport scipy.fftpack as fft\nimport scipy.integrate\nimport sys\n\n\ndef integrate(t, x, input, potential, delta, pump, loss, absorber):\n nt = len(t)\n nx = len(x)\n\n dx = x[1] - x[0]\n\n k = 2*s.pi * fft.fftfreq(nx, dx)\n d = - delta - 1/2 * k**2\n\n...
[ { "content": "<|memory_start|>```python\nimport scipy as s\nimport scipy.fftpack as fft\nimport scipy.integrate\nimport sys\n\n\ndef integrate(t, x, input, potential, delta, pump, loss, absorber):\n nt = len(t)\n nx = len(x)\n\n dx = x[1] - x[0]\n\n k = 2*s.pi * fft.fftfreq(nx, dx)\n d = - delta ...
```python import scipy as s import scipy.fftpack as fft import scipy.integrate import sys def integrate(t, x, input, potential, delta, pump, loss, absorber): nt = len(t) nx = len(x) dx = x[1] - x[0] k = 2*s.pi * fft.fftfreq(nx, dx) d = - delta - 1/2 * k**2 spectrum = fft.fft(input) spec...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2016-02-07 02:45\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n initial = True\n\n dependencies = []\n\n ...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2016-02-07 02:45\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n initial = True\n\n depend...
```python # -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-07 02:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations....
[ { "content": "Recreate the original code text:\n```python\nfrom django.http import HttpResponse\n\nfrom .models import Company, CompanyType\nfrom .serializers_company import CompanySerializer\nfrom .helper import auth_decorator\nfrom rest_framework import status\nfrom rest_framework.response import Response\nfr...
[ { "content": "Recreate the original code text:\n<|memory_start|>```python\nfrom django.http import HttpResponse\n\nfrom .models import Company, CompanyType\nfrom .serializers_company import CompanySerializer\nfrom .helper import auth_decorator\nfrom rest_framework import status\nfrom rest_framework.response imp...
```python from django.http import HttpResponse from .models import Company, CompanyType from .serializers_company import CompanySerializer from .helper import auth_decorator from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from django.db.mode...
[ { "content": "```python\n\"\"\"\nDjango settings for snippod boilerplate project.\n\nThis is a base starter for snippod.\n\nFor more information on this file, see\nhttps://github.com/shalomeir/snippod-boilerplate\n\n\"\"\"\nfrom .common import *\n# from snippod_boilerplate.settings.config_dev import *\n\n\n# SE...
[ { "content": "<|memory_start|>```python\n\"\"\"\nDjango settings for snippod boilerplate project.\n\nThis is a base starter for snippod.\n\nFor more information on this file, see\nhttps://github.com/shalomeir/snippod-boilerplate\n\n\"\"\"\nfrom .common import *\n# from snippod_boilerplate.settings.config_dev im...
```python """ Django settings for snippod boilerplate project. This is a base starter for snippod. For more information on this file, see https://github.com/shalomeir/snippod-boilerplate """ from .common import * # from snippod_boilerplate.settings.config_dev import * # SECURITY WARNING: keep the secret key used i...
[ { "content": "```python\n#!/usr/bin/env python\n###\n# (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software with...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python\n###\n# (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in t...
```python #!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
[ { "content": "Here is the code block:\n```python\n# -*- coding: utf-8 -*-\n\n# ####################################################################\n# Copyright (C) 2005-2010 by the FIFE team\n# http://www.fifengine.net\n# This file is part of FIFE.\n#\n# FIFE is free software; you can redistribute it and/o...
[ { "content": "Here is the code block:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# ####################################################################\n# Copyright (C) 2005-2010 by the FIFE team\n# http://www.fifengine.net\n# This file is part of FIFE.\n#\n# FIFE is free software; you can redis...
```python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2010 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Genera...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\ncaracteres = input(\"Saississez des caractères: \")\n# Exemple avec aA019éà@#`{\n\nfor caractere in caracteres:\n print(\"Le caractère {} a pour ordinal {}\".format(caractere, ord(caractere)))\n\n\n# Le caractère a ...
[ { "content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\ncaracteres = input(\"Saississez des caractères: \")\n# Exemple avec aA019éà@#`{\n\nfor caractere in caracteres:\n print(\"Le caractère {} a pour ordinal {}\".format(caractere, ord(caractere)))\n\n\n#...
```python caracteres = input("Saississez des caractères: ") # Exemple avec aA019éà@#`{ for caractere in caracteres: print("Le caractère {} a pour ordinal {}".format(caractere, ord(caractere))) # Le caractère a a pour ordinal 97 # Le caractère A a pour ordinal 65 # Le caractère 0 a pour ordinal 48 # Le caractère ...
[ { "content": "Here is some code:\n```python\n# Version info: $Id: ListAllStandardEquations_2D.py 1 2012-01-07 22:20:43Z zunzun.com@gmail.com $\n\nimport os, sys, inspect\n\nif os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..') not in sys.path:\n sys.path.append(os.path.join(sys.path[0][:sys.pa...
[ { "content": "Here is some code:\n<|memory_start|>```python\n# Version info: $Id: ListAllStandardEquations_2D.py 1 2012-01-07 22:20:43Z zunzun.com@gmail.com $\n\nimport os, sys, inspect\n\nif os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..') not in sys.path:\n sys.path.append(os.path.join(sys...
```python # Version info: $Id: ListAllStandardEquations_2D.py 1 2012-01-07 22:20:43Z zunzun.com@gmail.com $ import os, sys, inspect if os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..') not in sys.path: sys.path.append(os.path.join(sys.path[0][:sys.path[0].rfind(os.sep)], '../..')) import pyeq2, py...
[ { "content": "```python\n\"\"\"\nImplementation of the algorithm for calculating the matrix representation of\na Fermionic operator/term in occupation number representation.\n\"\"\"\n\n\nimport numpy as np\nfrom numba import jit, int64, uint64\nfrom scipy.sparse import csr_matrix\n\nfrom HamiltonianPy.quantumop...
[ { "content": "<|memory_start|>```python\n\"\"\"\nImplementation of the algorithm for calculating the matrix representation of\na Fermionic operator/term in occupation number representation.\n\"\"\"\n\n\nimport numpy as np\nfrom numba import jit, int64, uint64\nfrom scipy.sparse import csr_matrix\n\nfrom Hamilto...
```python """ Implementation of the algorithm for calculating the matrix representation of a Fermionic operator/term in occupation number representation. """ import numpy as np from numba import jit, int64, uint64 from scipy.sparse import csr_matrix from HamiltonianPy.quantumoperator.constant import CREATION __all_...
[ { "content": "Here is the code content:\n```python\n#!/usr/bin/env python2.5\n# Copyright 2006 Google, Inc. All Rights Reserved.\n# Licensed to PSF under a Contributor Agreement.\n\n\"\"\"Refactoring framework.\n\nUsed as a main program, this can refactor any number of files and/or\nrecursively descend down dir...
[ { "content": "Here is the code content:\n<|memory_start|>```python\n#!/usr/bin/env python2.5\n# Copyright 2006 Google, Inc. All Rights Reserved.\n# Licensed to PSF under a Contributor Agreement.\n\n\"\"\"Refactoring framework.\n\nUsed as a main program, this can refactor any number of files and/or\nrecursively ...
```python #!/usr/bin/env python2.5 # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Refactoring framework. Used as a main program, this can refactor any number of files and/or recursively descend down directories. Imported as a module, this provides infrastructur...
[ { "content": "```python\nfrom httputils import post\nfrom utils import ProgressBar\nfrom urlparse import urljoin\n\nclass Filemanager:\n def __init__(self, url, username, password):\n self.headers = {'Accept': 'application/json'}\n self.username = username\n self.password = password\n ...
[ { "content": "<|memory_start|>```python\nfrom httputils import post\nfrom utils import ProgressBar\nfrom urlparse import urljoin\n\nclass Filemanager:\n def __init__(self, url, username, password):\n self.headers = {'Accept': 'application/json'}\n self.username = username\n self.password...
```python from httputils import post from utils import ProgressBar from urlparse import urljoin class Filemanager: def __init__(self, url, username, password): self.headers = {'Accept': 'application/json'} self.username = username self.password = password self.url = url def lis...
[ { "content": "Here is the script:\n```python\nimport bottle\r\nimport pymongo\r\nimport book\r\n\r\n\"\"\"\r\nRuta por defecto para el index\r\n\"\"\"\r\n@bottle.route('/')\r\ndef book_index():\r\n\tmynames_list = book.find_names()\r\n\treturn bottle.template('index', dict(mynames = mynames_list))\r\n\r\n\r\n\"...
[ { "content": "Here is the script:\n<|memory_start|>```python\nimport bottle\r\nimport pymongo\r\nimport book\r\n\r\n\"\"\"\r\nRuta por defecto para el index\r\n\"\"\"\r\n@bottle.route('/')\r\ndef book_index():\r\n\tmynames_list = book.find_names()\r\n\treturn bottle.template('index', dict(mynames = mynames_list...
```python import bottle import pymongo import book """ Ruta por defecto para el index """ @bottle.route('/') def book_index(): mynames_list = book.find_names() return bottle.template('index', dict(mynames = mynames_list)) """ Postea las nuevas entrada para ser insertadas a MongoDB """ @bottle.route...
[ { "content": "Reconstruct the code exactly:\n```python\n#!/usr/bin/python\n\n# Combat Simulator Project\n# Copyright (C) 2002-2009 The Combat Simulator Project\n# http://csp.sourceforge.net\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n#!/usr/bin/python\n\n# Combat Simulator Project\n# Copyright (C) 2002-2009 The Combat Simulator Project\n# http://csp.sourceforge.net\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GN...
```python #!/usr/bin/python # Combat Simulator Project # Copyright (C) 2002-2009 The Combat Simulator Project # http://csp.sourceforge.net # # 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 Foundation; eith...
[ { "content": "```python\n\"\"\"\n * pyPOS\n * \n * Python Version Copyright 2011 Thomas Winningham\n * Javascript Version and Comments Copyright 2010, Percy Wegmann\n * Licensed under the LGPLv3 license\n * http://www.opensource.org/licenses/lgpl-3.0.html\n\nParts of Speech Tagger\n\n\"\"\"\n\nfrom Lexicon impo...
[ { "content": "<|memory_start|>```python\n\"\"\"\n * pyPOS\n * \n * Python Version Copyright 2011 Thomas Winningham\n * Javascript Version and Comments Copyright 2010, Percy Wegmann\n * Licensed under the LGPLv3 license\n * http://www.opensource.org/licenses/lgpl-3.0.html\n\nParts of Speech Tagger\n\n\"\"\"\n\nf...
```python """ * pyPOS * * Python Version Copyright 2011 Thomas Winningham * Javascript Version and Comments Copyright 2010, Percy Wegmann * Licensed under the LGPLv3 license * http://www.opensource.org/licenses/lgpl-3.0.html Parts of Speech Tagger """ from Lexicon import POSTAGGER_LEXICON def is_number(s): ...
[ { "content": "Here is the script:\n```python\n# coding: utf-8\n#\n# This file is part of Progdupeupl.\n#\n# Progdupeupl is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published by\n# the Free Software Foundation, either version 3 of the ...
[ { "content": "Here is the script:\n<|memory_start|>```python\n# coding: utf-8\n#\n# This file is part of Progdupeupl.\n#\n# Progdupeupl is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published by\n# the Free Software Foundation, either v...
```python # coding: utf-8 # # This file is part of Progdupeupl. # # Progdupeupl 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 Foundation, either version 3 of the License, or # (at your option) any later version. ...
[ { "content": "Here is the code block:\n```python\nimport json\nimport logging\nfrom pathlib import Path\nfrom threading import RLock\nfrom uuid import uuid4\n\nfrom azure.common.client_factory import get_client_from_cli_profile\nfrom msrestazure.azure_active_directory import MSIAuthentication\nfrom azure.mgmt.c...
[ { "content": "Here is the code block:\n<|memory_start|>```python\nimport json\nimport logging\nfrom pathlib import Path\nfrom threading import RLock\nfrom uuid import uuid4\n\nfrom azure.common.client_factory import get_client_from_cli_profile\nfrom msrestazure.azure_active_directory import MSIAuthentication\nf...
```python import json import logging from pathlib import Path from threading import RLock from uuid import uuid4 from azure.common.client_factory import get_client_from_cli_profile from msrestazure.azure_active_directory import MSIAuthentication from azure.mgmt.compute import ComputeManagementClient from azure.mgmt.ne...
[ { "content": "```python\n#!/usr/bin/env python\n\n\"\"\"\ntest_pacman-mirrors\n----------------------------------\n\nTests for `pacman-mirrors` module.\n\"\"\"\n\nimport unittest\nfrom unittest.mock import patch\n\nfrom pacman_mirrors.functions import cliFn\nfrom pacman_mirrors.functions import configFn\nfrom p...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/env python\n\n\"\"\"\ntest_pacman-mirrors\n----------------------------------\n\nTests for `pacman-mirrors` module.\n\"\"\"\n\nimport unittest\nfrom unittest.mock import patch\n\nfrom pacman_mirrors.functions import cliFn\nfrom pacman_mirrors.functions import ...
```python #!/usr/bin/env python """ test_pacman-mirrors ---------------------------------- Tests for `pacman-mirrors` module. """ import unittest from unittest.mock import patch from pacman_mirrors.functions import cliFn from pacman_mirrors.functions import configFn from pacman_mirrors.pacman_mirrors import PacmanM...
[ { "content": "Here is the source code:\n```python\n# -*- coding: utf8 -*-\n\n\"\"\"Flask endpoints provide the URL endpoints for the auth system.\n\n:license: AGPL v3, see LICENSE for more details\n:copyright: 2014-2021 Joe Doherty\n\n\"\"\"\n\n# 3rd party imports\nfrom flask import (\n current_app as app, f...
[ { "content": "Here is the source code:\n<|memory_start|>```python\n# -*- coding: utf8 -*-\n\n\"\"\"Flask endpoints provide the URL endpoints for the auth system.\n\n:license: AGPL v3, see LICENSE for more details\n:copyright: 2014-2021 Joe Doherty\n\n\"\"\"\n\n# 3rd party imports\nfrom flask import (\n curre...
```python # -*- coding: utf8 -*- """Flask endpoints provide the URL endpoints for the auth system. :license: AGPL v3, see LICENSE for more details :copyright: 2014-2021 Joe Doherty """ # 3rd party imports from flask import ( current_app as app, flash, redirect, render_template, request, url_for, session, js...
[ { "content": "Output the full code verbatim (no extra comments):\n```python\n#!/import/monstrum/Applications/epd-7.1/bin/python\nfrom nipype.interfaces import fsl\nimport xnatmaster30 as xnatmaster\nimport argparse\nimport sys\nimport array\nimport subprocess\nimport os\nimport fnmatch\nimport shutil\nimport uu...
[ { "content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n#!/import/monstrum/Applications/epd-7.1/bin/python\nfrom nipype.interfaces import fsl\nimport xnatmaster30 as xnatmaster\nimport argparse\nimport sys\nimport array\nimport subprocess\nimport os\nimport fnmatch\nimport s...
```python #!/import/monstrum/Applications/epd-7.1/bin/python from nipype.interfaces import fsl import xnatmaster30 as xnatmaster import argparse import sys import array import subprocess import os import fnmatch import shutil import uuid ''' By Chadtj V1 Initial Version V2 Uses new bbl:bet datatype and checks for exist...
[ { "content": "Recreate the entire code block with identical formatting:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 19 21:23:22 2015\n\n@author: htelg\n\"\"\"\n\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pylab as plt\nfrom scipy import stats\n\nfrom atmPy.tools impor...
[ { "content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 19 21:23:22 2015\n\n@author: htelg\n\"\"\"\n\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pylab as plt\nfrom scipy import stats\n\nfrom a...
```python # -*- coding: utf-8 -*- """ Created on Thu Mar 19 21:23:22 2015 @author: htelg """ import warnings import numpy as np import pandas as pd import pylab as plt from scipy import stats from atmPy.tools import array_tools, plt_tools from atmPy.tools import math_linear_algebra as mla # from scipy import integ...
[ { "content": "Return the code unaltered:\n```python\n#!/usr/bin/env python\n\"\"\"\nUpdate the README.md file with the authors from the git log\n\"\"\"\n\nimport re\nimport subprocess\n\nAUTHORS = \"README.md\"\nIGNORE = [ \"nick@raig-wood.com\" ]\n\ndef load():\n \"\"\"\n returns a set of emails already ...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n#!/usr/bin/env python\n\"\"\"\nUpdate the README.md file with the authors from the git log\n\"\"\"\n\nimport re\nimport subprocess\n\nAUTHORS = \"README.md\"\nIGNORE = [ \"nick@raig-wood.com\" ]\n\ndef load():\n \"\"\"\n returns a set of...
```python #!/usr/bin/env python """ Update the README.md file with the authors from the git log """ import re import subprocess AUTHORS = "README.md" IGNORE = [ "nick@raig-wood.com" ] def load(): """ returns a set of emails already in authors """ with open(AUTHORS) as fd: authors = fd.read() ...
[ { "content": "```python\n# Copyright 2016 Capital One Services, LLC\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...
[ { "content": "<|memory_start|>```python\n# Copyright 2016 Capital One Services, LLC\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-...
```python # Copyright 2016 Capital One Services, LLC # # 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 ag...
[ { "content": "Return the code unaltered:\n```python\n#!/usr/bin/env python\n\n\"\"\"Distribution Utilities setup program for NDG Security Package\n\nNERC Data Grid Project\n\"\"\"\n__author__ = \"P J Kershaw\"\n__date__ = \"24/04/06\"\n__copyright__ = \"(C) 2009 Science and Technology Facilities Council\"\n__li...
[ { "content": "Return the code unaltered:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n\"\"\"Distribution Utilities setup program for NDG Security Package\n\nNERC Data Grid Project\n\"\"\"\n__author__ = \"P J Kershaw\"\n__date__ = \"24/04/06\"\n__copyright__ = \"(C) 2009 Science and Technology Facilities...
```python #!/usr/bin/env python """Distribution Utilities setup program for NDG Security Package NERC Data Grid Project """ __author__ = "P J Kershaw" __date__ = "24/04/06" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = ...
[ { "content": "Here is some code:\n```python\n#\n# Copyright (C) 2009-2016 Nexedi SA\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your...
[ { "content": "Here is some code:\n<|memory_start|>```python\n#\n# Copyright (C) 2009-2016 Nexedi SA\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the Lice...
```python # # Copyright (C) 2009-2016 Nexedi SA # # 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 Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is d...
[ { "content": "```python\n#!/usr/bin/python\n# qbox_dos.py: extract electronic DOS from Qbox output\n# generate DOS plot in gnuplot format\n# use: qbox_dos.py [-last] emin emax width file.r\n# emin, emax: bounds of plot in [eV]\n# width: gaussian broadening in [eV]\n# the DOS is accumulated separately for each s...
[ { "content": "<|memory_start|>```python\n#!/usr/bin/python\n# qbox_dos.py: extract electronic DOS from Qbox output\n# generate DOS plot in gnuplot format\n# use: qbox_dos.py [-last] emin emax width file.r\n# emin, emax: bounds of plot in [eV]\n# width: gaussian broadening in [eV]\n# the DOS is accumulated separ...
```python #!/usr/bin/python # qbox_dos.py: extract electronic DOS from Qbox output # generate DOS plot in gnuplot format # use: qbox_dos.py [-last] emin emax width file.r # emin, emax: bounds of plot in [eV] # width: gaussian broadening in [eV] # the DOS is accumulated separately for each spin # With the -last option, ...
[ { "content": "Return the code exactly, with no changes:\n```python\n##############################################################################\n#\n# OSIS stands for Open Student Information System. It's an application\n# designed to manage the core business of higher education institutions,\n# such...
[ { "content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n##############################################################################\n#\n# OSIS stands for Open Student Information System. It's an application\n# designed to manage the core business of higher education institut...
```python ############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # ...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n#\n# Electrum - lightweight Bitcoin client\n# Copyright (C) 2018 The Electrum developers\n#\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation files\n# (the \"Software\"), to deal in t...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# Electrum - lightweight Bitcoin client\n# Copyright (C) 2018 The Electrum developers\n#\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation files\n# (the \"Software\...
```python # -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2018 The Electrum developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction,...
[ { "content": "Provide a verbatim copy of the code:\n```python\n# -*- coding: utf-8 -*-\n\n# preprocessor.py - simple preprocessor for plugin template files\n# This file is part of pluma\n#\n# Copyright (C) 2006 - Steve Frécinaux\n# Copyright (C) 2012-2021 MATE Developers\n#\n# pluma is free software; you can re...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# preprocessor.py - simple preprocessor for plugin template files\n# This file is part of pluma\n#\n# Copyright (C) 2006 - Steve Frécinaux\n# Copyright (C) 2012-2021 MATE Developers\n#\n# pluma is free soft...
```python # -*- coding: utf-8 -*- # preprocessor.py - simple preprocessor for plugin template files # This file is part of pluma # # Copyright (C) 2006 - Steve Frécinaux # Copyright (C) 2012-2021 MATE Developers # # pluma is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
[ { "content": "Here is a code snippet:\n```python\n#! /usr/bin/env python\n\n# MailTask Alpha: The Email Manager\n# Copyright (C) 2015 Patrick Simmons\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 as published by\n# the Free Sof...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n#! /usr/bin/env python\n\n# MailTask Alpha: The Email Manager\n# Copyright (C) 2015 Patrick Simmons\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 as published by...
```python #! /usr/bin/env python # MailTask Alpha: The Email Manager # Copyright (C) 2015 Patrick Simmons # 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 Foundation, either version 3 of the License, or #...
[ { "content": "Here is a code snippet:\n```python\n# -*- encoding: utf-8 -*-\nimport reportlab\n\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import mm\n\ndef n(integer):\n\treturn str('{:.2f}'.format(integer))\n\nclass Invoice2PDF:\n\tdef __init__(self, ...
[ { "content": "Here is a code snippet:\n<|memory_start|>```python\n# -*- encoding: utf-8 -*-\nimport reportlab\n\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import mm\n\ndef n(integer):\n\treturn str('{:.2f}'.format(integer))\n\nclass Invoice2PDF:\n\tdef...
```python # -*- encoding: utf-8 -*- import reportlab from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4 from reportlab.lib.units import mm def n(integer): return str('{:.2f}'.format(integer)) class Invoice2PDF: def __init__(self, type, file): self.file = file self.type = type self.p =...
[ { "content": "Produce an exact reconstruction of the code:\n```python\nfrom eve.auth import requires_auth\nfrom flask import Blueprint, request, render_template, Response, make_response\nfrom flask_weasyprint import HTML, render_pdf\nfrom pydash import identity\n\nfrom ereuse_devicehub.exceptions import WrongQu...
[ { "content": "Produce an exact reconstruction of the code:\n<|memory_start|>```python\nfrom eve.auth import requires_auth\nfrom flask import Blueprint, request, render_template, Response, make_response\nfrom flask_weasyprint import HTML, render_pdf\nfrom pydash import identity\n\nfrom ereuse_devicehub.exception...
```python from eve.auth import requires_auth from flask import Blueprint, request, render_template, Response, make_response from flask_weasyprint import HTML, render_pdf from pydash import identity from ereuse_devicehub.exceptions import WrongQueryParam from ereuse_devicehub.header_cache import header_cache from ereus...
[ { "content": "Provide a verbatim copy of the code:\n```python\n#! /usr/bin/env python\n\nimport os, sys\n\nfrom getopt import getopt,GetoptError\nfrom threading import Thread\nfrom commands import getstatusoutput\n\nfrom lfc import *\n\ndef usage():\n\n print 'Name:'\n print ' ganga-stagein.py'\n pr...
[ { "content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n#! /usr/bin/env python\n\nimport os, sys\n\nfrom getopt import getopt,GetoptError\nfrom threading import Thread\nfrom commands import getstatusoutput\n\nfrom lfc import *\n\ndef usage():\n\n print 'Name:'\n print ' ganga-sta...
```python #! /usr/bin/env python import os, sys from getopt import getopt,GetoptError from threading import Thread from commands import getstatusoutput from lfc import * def usage(): print 'Name:' print ' ganga-stagein.py' print print 'Arguments:' print ' logical names' print pri...
[ { "content": "Recreate the original code text:\n```python\n#\n# Project:\n# glideinWMS\n#\n# File Version: \n#\n# Description:\n# This module implements classes to query the condor daemons\n# and manipulate the results\n# Please notice that it also converts \\\" into \"\n#\n# Author:\n# Igor Sfiligoi ...
[ { "content": "Recreate the original code text:\n<|memory_start|>```python\n#\n# Project:\n# glideinWMS\n#\n# File Version: \n#\n# Description:\n# This module implements classes to query the condor daemons\n# and manipulate the results\n# Please notice that it also converts \\\" into \"\n#\n# Author:\n# ...
```python # # Project: # glideinWMS # # File Version: # # Description: # This module implements classes to query the condor daemons # and manipulate the results # Please notice that it also converts \" into " # # Author: # Igor Sfiligoi (Aug 30th 2006) # import condorExe import condorSecurity import os impo...
[ { "content": "Here is the snippet:\n```python\nfrom pandas.io.excel._base import ExcelWriter\nfrom pandas.io.excel._util import _validate_freeze_panes\n\n\nclass _OpenpyxlWriter(ExcelWriter):\n engine = 'openpyxl'\n supported_extensions = ('.xlsx', '.xlsm')\n\n def __init__(self, path, engine=None, mod...
[ { "content": "Here is the snippet:\n<|memory_start|>```python\nfrom pandas.io.excel._base import ExcelWriter\nfrom pandas.io.excel._util import _validate_freeze_panes\n\n\nclass _OpenpyxlWriter(ExcelWriter):\n engine = 'openpyxl'\n supported_extensions = ('.xlsx', '.xlsm')\n\n def __init__(self, path, ...
```python from pandas.io.excel._base import ExcelWriter from pandas.io.excel._util import _validate_freeze_panes class _OpenpyxlWriter(ExcelWriter): engine = 'openpyxl' supported_extensions = ('.xlsx', '.xlsm') def __init__(self, path, engine=None, mode='w', **engine_kwargs): # Use the openpyxl m...
[ { "content": "Reconstruct the code exactly:\n```python\n## database\nimport psycopg2\n\n## system libraries\nimport io, os\nimport datetime, time\nimport logging\n\n## web libraries\nimport tornado\nimport tornado.auth\nimport tornado.escape\nimport tornado.gen\nimport tornado.httpserver\nimport urlparse\nimpor...
[ { "content": "Reconstruct the code exactly:\n<|memory_start|>```python\n## database\nimport psycopg2\n\n## system libraries\nimport io, os\nimport datetime, time\nimport logging\n\n## web libraries\nimport tornado\nimport tornado.auth\nimport tornado.escape\nimport tornado.gen\nimport tornado.httpserver\nimport...
```python ## database import psycopg2 ## system libraries import io, os import datetime, time import logging ## web libraries import tornado import tornado.auth import tornado.escape import tornado.gen import tornado.httpserver import urlparse import threading import functools from tornado.ioloop import IOLoop from t...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n```python\n#!/usr/bin/python\n# \n# \n# Owen Bullock - UK Tides - UKHO Easytide webscrape. \n# - Parse config.html for list of ports and create a json file for each. \n# \n# 25Sep2014 - Cre...
[ { "content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n#!/usr/bin/python\n# \n# \n# Owen Bullock - UK Tides - UKHO Easytide webscrape. \n# - Parse config.html for list of ports and create a json file for each. \n# \n#...
```python #!/usr/bin/python # # # Owen Bullock - UK Tides - UKHO Easytide webscrape. # - Parse config.html for list of ports and create a json file for each. # # 25Sep2014 - Created # TODO - timezones - done # TODO - cope with only 3 tides a day - done # remove . f...
[ { "content": "Here is a code file:\n```python\n# Copyright 2021 Google LLC\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# https://www.apache.org/licenses/LICENSE-2.0\...
[ { "content": "Here is a code file:\n<|memory_start|>```python\n# Copyright 2021 Google LLC\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# https://www.apache.org/licen...
```python # Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ { "content": "Replicate the source code:\n```python\n\"\"\"Figuring out noise.\n\nThis code is lifted from:\n\n http://freespace.virgin.net/hugo.elias/models/m_perlin.htm\n\nSee also:\n\n http://mrl.nyu.edu/~perlin/doc/oscar.html\n http://www.noisemachine.com/talk1\n http://webstaff.itn.liu.se/~steg...
[ { "content": "Replicate the source code:\n<|memory_start|>```python\n\"\"\"Figuring out noise.\n\nThis code is lifted from:\n\n http://freespace.virgin.net/hugo.elias/models/m_perlin.htm\n\nSee also:\n\n http://mrl.nyu.edu/~perlin/doc/oscar.html\n http://www.noisemachine.com/talk1\n http://webstaff....
```python """Figuring out noise. This code is lifted from: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm See also: http://mrl.nyu.edu/~perlin/doc/oscar.html http://www.noisemachine.com/talk1 http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html """ i...
[ { "content": "```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>\n#\n\n\"\"\"\nModule implementing a dialog to show the output of the hg annotate command.\n\"\"\"\n\nfrom __future__ import unicode_literals\ntry:\n str = unicode\nexcept NameError:\n ...
[ { "content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>\n#\n\n\"\"\"\nModule implementing a dialog to show the output of the hg annotate command.\n\"\"\"\n\nfrom __future__ import unicode_literals\ntry:\n str = unicode\nexcep...
```python # -*- coding: utf-8 -*- # Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show the output of the hg annotate command. """ from __future__ import unicode_literals try: str = unicode except NameError: pass import os import re from PyQt5.Qt...
[ { "content": "Return the code unaltered:\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 # Adding f...
[ { "content": "Return the code unaltered:\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 ...
```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): # Adding field 'Channel.description' db.add_column(u'sign_chann...
[ { "content": "```python\nfrom django.db import models\nfrom django import forms\nfrom django.test import SimpleTestCase, TransactionTestCase\nfrom taggee.fields import TagField\nfrom .models import TagModel\n\n\nclass TagFieldTestCase(SimpleTestCase):\n def setUp(self):\n self.tags = TagField()\n ...
[ { "content": "<|memory_start|>```python\nfrom django.db import models\nfrom django import forms\nfrom django.test import SimpleTestCase, TransactionTestCase\nfrom taggee.fields import TagField\nfrom .models import TagModel\n\n\nclass TagFieldTestCase(SimpleTestCase):\n def setUp(self):\n self.tags = T...
```python from django.db import models from django import forms from django.test import SimpleTestCase, TransactionTestCase from taggee.fields import TagField from .models import TagModel class TagFieldTestCase(SimpleTestCase): def setUp(self): self.tags = TagField() self.model = TagModel() d...