prompt listlengths 1 1 | compression_prompt listlengths 1 1 | target stringlengths 1.03k 828k |
|---|---|---|
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\nimport sys\nsys.path.append(\"..\")\nimport pygame\nimport core\nimport widgets\n\n# Text label example.\n\nWINDOW_WIDTH = 1024\nWINDOW_HEIGHT = 728\n\npygame.init()\npygame.font.init\nscreen = pygame.display.set_mode((WINDOW_WIDTH... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\nimport sys\nsys.path.append(\"..\")\nimport pygame\nimport core\nimport widgets\n\n# Text label example.\n\nWINDOW_WIDTH = 1024\nWINDOW_HEIGHT = 728\n\npygame.init()\npygame.font.init\nscreen = pygame.display.set_mo... | ```python
import sys
sys.path.append("..")
import pygame
import core
import widgets
# Text label example.
WINDOW_WIDTH = 1024
WINDOW_HEIGHT = 728
pygame.init()
pygame.font.init
screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
clock = pygame.time.Clock()
FPS = 60
running = True
if __name__ == "__main_... |
[
{
"content": "```python\nimport time\nimport signal\nimport sys\nimport smbus\nimport robot_data_pb2\nfrom oled_display import OledDisplay\n\nclass RobotDriver:\n SERVO_STOP = 90\n\n def __init__(self, i2c_address=0x04, i2c_bus=1, oled_display=None):\n self.i2c_address = i2c_address\n self.i... | [
{
"content": "<|memory_start|>```python\nimport time\nimport signal\nimport sys\nimport smbus\nimport robot_data_pb2\nfrom oled_display import OledDisplay\n\nclass RobotDriver:\n SERVO_STOP = 90\n\n def __init__(self, i2c_address=0x04, i2c_bus=1, oled_display=None):\n self.i2c_address = i2c_address... | ```python
import time
import signal
import sys
import smbus
import robot_data_pb2
from oled_display import OledDisplay
class RobotDriver:
SERVO_STOP = 90
def __init__(self, i2c_address=0x04, i2c_bus=1, oled_display=None):
self.i2c_address = i2c_address
self.i2c_bus = smbus.SMBus(i2c_bus)
... |
[
{
"content": "```python\n#!/usr/bin/env python\n# vim:fileencoding=utf-8\nfrom __future__ import (unicode_literals, division, absolute_import,\n print_function)\n\n__license__ = 'GPL v3'\n__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'\n\nimport os\nfrom functools import par... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/env python\n# vim:fileencoding=utf-8\nfrom __future__ import (unicode_literals, division, absolute_import,\n print_function)\n\n__license__ = 'GPL v3'\n__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'\n\nimport os\nfrom func... | ```python
#!/usr/bin/env python
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
import os
from functools import partial
from calibre import prepar... |
[
{
"content": "Here is the code content:\n```python\n# $Id$\nimport sys\nimport os.path\nimport math\nfrom itcc.molecule import read, write\nfrom itcc.molecule.tools import neighbours, is_pyramid\nfrom itcc.molecule import relalist\n\ntry:\n sorted\nexcept:\n from itcc.core.tools import sorted_ as sorted\n... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n# $Id$\nimport sys\nimport os.path\nimport math\nfrom itcc.molecule import read, write\nfrom itcc.molecule.tools import neighbours, is_pyramid\nfrom itcc.molecule import relalist\n\ntry:\n sorted\nexcept:\n from itcc.core.tools import sor... | ```python
# $Id$
import sys
import os.path
import math
from itcc.molecule import read, write
from itcc.molecule.tools import neighbours, is_pyramid
from itcc.molecule import relalist
try:
sorted
except:
from itcc.core.tools import sorted_ as sorted
def mirrormol():
if len(sys.argv) != 2:
sys.stder... |
[
{
"content": "Repeat the code precisely:\n```python\n# -*- coding: utf-8 -*-\n#\n# Polycircles documentation build configuration file, created by\n# sphinx-quickstart on Mon Apr 21 13:22:59 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all poss... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# Polycircles documentation build configuration file, created by\n# sphinx-quickstart on Mon Apr 21 13:22:59 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note t... | ```python
# -*- coding: utf-8 -*-
#
# Polycircles documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 21 13:22:59 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerat... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n#!/usr/bin/env python\n\n\"\"\"\n================================================\nABElectronics IO Pi Tests | __init__\n\nRequires python smbus to be installed\nFor Python 2 install with: sudo apt-get install python-smbus\nFor Python 3 install... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n#!/usr/bin/env python\n\n\"\"\"\n================================================\nABElectronics IO Pi Tests | __init__\n\nRequires python smbus to be installed\nFor Python 2 install with: sudo apt-get install python-smbus\nFor ... | ```python
#!/usr/bin/env python
"""
================================================
ABElectronics IO Pi Tests | __init__
Requires python smbus to be installed
For Python 2 install with: sudo apt-get install python-smbus
For Python 3 install with: sudo apt-get install python3-smbus
run with: python3 IOPi_init.py
===... |
[
{
"content": "Recreate the entire code block with identical formatting:\n```python\n#encoding: utf-8\nimport json\n\nimport gconf\nimport MySQLdb\nfrom dbutils import execute_fetch_sql\nfrom dbutils import execute_commit_sql\n\n'''\n获取用户信息\n'''\ndef get_users():\n _columns = ('id','username','password','age'... | [
{
"content": "Recreate the entire code block with identical formatting:\n<|memory_start|>```python\n#encoding: utf-8\nimport json\n\nimport gconf\nimport MySQLdb\nfrom dbutils import execute_fetch_sql\nfrom dbutils import execute_commit_sql\n\n'''\n获取用户信息\n'''\ndef get_users():\n _columns = ('id','username',... | ```python
#encoding: utf-8
import json
import gconf
import MySQLdb
from dbutils import execute_fetch_sql
from dbutils import execute_commit_sql
'''
获取用户信息
'''
def get_users():
_columns = ('id','username','password','age')
_sql = 'select * from user'
_count,_rt_list = execute_fetch_sql(_sql)
_rt = []
... |
[
{
"content": "Reconstruct the code file line-for-line, unmodified:\n```python\nfrom rest_framework import serializers\n\nfrom .core import MoneyField\n\n\nclass StateListField(serializers.ListField):\n id = serializers.PrimaryKeyRelatedField(source='pk', read_only=True)\n state = serializers.CharField(sou... | [
{
"content": "Reconstruct the code file line-for-line, unmodified:\n<|memory_start|>```python\nfrom rest_framework import serializers\n\nfrom .core import MoneyField\n\n\nclass StateListField(serializers.ListField):\n id = serializers.PrimaryKeyRelatedField(source='pk', read_only=True)\n state = serialize... | ```python
from rest_framework import serializers
from .core import MoneyField
class StateListField(serializers.ListField):
id = serializers.PrimaryKeyRelatedField(source='pk', read_only=True)
state = serializers.CharField(source='name', read_only=True)
description = serializers.CharField(read_only=True)
... |
[
{
"content": "Here is the code block:\n```python\n#-------------------------------- Variables ---------------------------#\n\n# input to build the training set\npath_data = '/Users/viherm/Desktop/CARS'\npath_training = '/Users/viherm/Desktop/trainingset'\n\n# input to train the U-Net\npath_model = '/Users/viher... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n#-------------------------------- Variables ---------------------------#\n\n# input to build the training set\npath_data = '/Users/viherm/Desktop/CARS'\npath_training = '/Users/viherm/Desktop/trainingset'\n\n# input to train the U-Net\npath_model... | ```python
#-------------------------------- Variables ---------------------------#
# input to build the training set
path_data = '/Users/viherm/Desktop/CARS'
path_training = '/Users/viherm/Desktop/trainingset'
# input to train the U-Net
path_model = '/Users/viherm/Desktop/data/models/model_init'
path_model_new = '/Us... |
[
{
"content": "```python\nfrom flask import request, g, jsonify\nfrom flask_cors import cross_origin\n\nfrom alerta.app.auth.utils import permission\nfrom alerta.app.models.alert import Alert\nfrom alerta.app.utils.api import process_alert, add_remote_ip\nfrom alerta.app.exceptions import ApiError, RejectExcepti... | [
{
"content": "<|memory_start|>```python\nfrom flask import request, g, jsonify\nfrom flask_cors import cross_origin\n\nfrom alerta.app.auth.utils import permission\nfrom alerta.app.models.alert import Alert\nfrom alerta.app.utils.api import process_alert, add_remote_ip\nfrom alerta.app.exceptions import ApiErro... | ```python
from flask import request, g, jsonify
from flask_cors import cross_origin
from alerta.app.auth.utils import permission
from alerta.app.models.alert import Alert
from alerta.app.utils.api import process_alert, add_remote_ip
from alerta.app.exceptions import ApiError, RejectException
from . import webhooks
#... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n###############################################################################\n#\n# Tests for XlsxWriter.\n#\n# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org\n#\n\nfrom ..excel_comparsion_test import ExcelComparisonTest\nfrom ..... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n###############################################################################\n#\n# Tests for XlsxWriter.\n#\n# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org\n#\n\nfrom ..excel_comparsion_test import ExcelCompari... | ```python
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\nimport scrapy\n\nfrom ansicolor import red\nfrom ansicolor import cyan\nfrom ansicolor import green\nfrom ansicolor import blue\n\nfrom django.db.models import Q\n\nfrom urllib import urlencode\n\nfrom parlament.settings import BASE_HOST\nfrom parlament.spiders.... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport scrapy\n\nfrom ansicolor import red\nfrom ansicolor import cyan\nfrom ansicolor import green\nfrom ansicolor import blue\n\nfrom django.db.models import Q\n\nfrom urllib import urlencode\n\nfrom parlament.settings import BASE_HOST\nfrom pa... | ```python
# -*- coding: utf-8 -*-
import scrapy
from ansicolor import red
from ansicolor import cyan
from ansicolor import green
from ansicolor import blue
from django.db.models import Q
from urllib import urlencode
from parlament.settings import BASE_HOST
from parlament.spiders.persons import PersonsSpider
from pa... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n#!/usr/bin/env python\n\nclass Graph:\n \"Plot various graphs into burndown chart\"\n\n def __init__ (self, graph_data):\n self.getGraphData(graph_data)\n\n def getGraphData(self, graph_data):\n self.x =... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n#!/usr/bin/env python\n\nclass Graph:\n \"Plot various graphs into burndown chart\"\n\n def __init__ (self, graph_data):\n self.getGraphData(graph_data)\n\n def getGraphData(self, graph_data... | ```python
#!/usr/bin/env python
class Graph:
"Plot various graphs into burndown chart"
def __init__ (self, graph_data):
self.getGraphData(graph_data)
def getGraphData(self, graph_data):
self.x = graph_data['x']
self.y = graph_data['y']
self.xy_extra = 0
self.ymin = graph_data['ymin']
se... |
[
{
"content": "```python\n\"\"\"\nRecurrent layers.\n\n\nTODO: write more documentation\n\"\"\"\n__docformat__ = 'restructedtext en'\n__authors__ = (\"Razvan Pascanu \"\n \"KyungHyun Cho \"\n \"Caglar Gulcehre \")\n__contact__ = \"Razvan Pascanu <r.pascanu@gmail>\"\n\nimport numpy\nim... | [
{
"content": "<|memory_start|>```python\n\"\"\"\nRecurrent layers.\n\n\nTODO: write more documentation\n\"\"\"\n__docformat__ = 'restructedtext en'\n__authors__ = (\"Razvan Pascanu \"\n \"KyungHyun Cho \"\n \"Caglar Gulcehre \")\n__contact__ = \"Razvan Pascanu <r.pascanu@gmail>\"\n\n... | ```python
"""
Recurrent layers.
TODO: write more documentation
"""
__docformat__ = 'restructedtext en'
__authors__ = ("Razvan Pascanu "
"KyungHyun Cho "
"Caglar Gulcehre ")
__contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import numpy
import copy
import theano
import theano.tensor as TT... |
[
{
"content": "Here is the code content:\n```python\n#!/usr/bin/python3\n\n#--------------------------------------------------------------------\n# Function: enumer_d_and_c\n# Description: Computes the maximum sub-array and the associated sum using a div# ide and conquer algorithm\n# Receives: values - list o... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n#!/usr/bin/python3\n\n#--------------------------------------------------------------------\n# Function: enumer_d_and_c\n# Description: Computes the maximum sub-array and the associated sum using a div# ide and conquer algorithm\n# Receives:... | ```python
#!/usr/bin/python3
#--------------------------------------------------------------------
# Function: enumer_d_and_c
# Description: Computes the maximum sub-array and the associated sum using a div# ide and conquer algorithm
# Receives: values - list of integers
# Returns: maximum sub-array sum, and maximu... |
[
{
"content": "Provide an exact copy of the source code:\n```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 fil... | [
{
"content": "Provide an exact copy of the source code:\n<|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 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": "Here is the code content:\n```python\n# coding:utf-8\nimport json\nfrom cryptacular.bcrypt import BCRYPTPasswordManager\nfrom webob import exc\nfrom webob.response import Response\n\n\ndef convert_datetime(model_object):\n model_object['pubDate'] = model_object['pubDate'].strftime(\"%Y-%m-%d %H... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n# coding:utf-8\nimport json\nfrom cryptacular.bcrypt import BCRYPTPasswordManager\nfrom webob import exc\nfrom webob.response import Response\n\n\ndef convert_datetime(model_object):\n model_object['pubDate'] = model_object['pubDate'].strfti... | ```python
# coding:utf-8
import json
from cryptacular.bcrypt import BCRYPTPasswordManager
from webob import exc
from webob.response import Response
def convert_datetime(model_object):
model_object['pubDate'] = model_object['pubDate'].strftime("%Y-%m-%d %H:%M:%S")
model_object['modifiedDate'] = model_object['m... |
[
{
"content": "Here is the snippet:\n```python\n#pylint: disable=invalid-name, too-few-public-methods, too-many-public-methods\n#pylint: disable=protected-access, missing-docstring, too-many-locals\n#pylint: disable=too-many-arguments\n#pylint: disable=deprecated-method\n\nfrom __future__ import print_function, ... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n#pylint: disable=invalid-name, too-few-public-methods, too-many-public-methods\n#pylint: disable=protected-access, missing-docstring, too-many-locals\n#pylint: disable=too-many-arguments\n#pylint: disable=deprecated-method\n\nfrom __future__ import ... | ```python
#pylint: disable=invalid-name, too-few-public-methods, too-many-public-methods
#pylint: disable=protected-access, missing-docstring, too-many-locals
#pylint: disable=too-many-arguments
#pylint: disable=deprecated-method
from __future__ import print_function, absolute_import, division
from argparse import Nam... |
[
{
"content": "```python\n# type: ignore\nimport asyncio\nimport io\nimport json\nimport pathlib\nimport sys\nimport zlib\nfrom typing import Any, Optional\nfrom unittest import mock\n\nimport pytest\n\nimport aiohttp\nfrom aiohttp import payload\nfrom aiohttp.hdrs import (\n CONTENT_DISPOSITION,\n CONTENT... | [
{
"content": "<|memory_start|>```python\n# type: ignore\nimport asyncio\nimport io\nimport json\nimport pathlib\nimport sys\nimport zlib\nfrom typing import Any, Optional\nfrom unittest import mock\n\nimport pytest\n\nimport aiohttp\nfrom aiohttp import payload\nfrom aiohttp.hdrs import (\n CONTENT_DISPOSITI... | ```python
# type: ignore
import asyncio
import io
import json
import pathlib
import sys
import zlib
from typing import Any, Optional
from unittest import mock
import pytest
import aiohttp
from aiohttp import payload
from aiohttp.hdrs import (
CONTENT_DISPOSITION,
CONTENT_ENCODING,
CONTENT_TRANSFER_ENCODIN... |
[
{
"content": "Here is the script:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom optparse import make_option\n\nfrom fabric.colors import green\n\nfrom django.core.management.base import BaseCommand\n\nfrom magicbackup.helpers import MagicBackup\n\n\nclass Command(BaseComma... | [
{
"content": "Here is the script:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom optparse import make_option\n\nfrom fabric.colors import green\n\nfrom django.core.management.base import BaseCommand\n\nfrom magicbackup.helpers import MagicBackup\n\n\nclass C... | ```python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option
from fabric.colors import green
from django.core.management.base import BaseCommand
from magicbackup.helpers import MagicBackup
class Command(BaseCommand):
help = 'Backup a Site'
option_list = BaseCo... |
[
{
"content": "Provide an exact copy of the source code:\n```python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\n# env\nsys.path.append('/usr/lib/python2.7/dist-packages/')\nsys.path.append('/usr/lib/python2.7/')\nsys.path.append('/usr/local/lib/python2.7/dist-packages/')\nsys.path.append('/data2/django_1.... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\n# env\nsys.path.append('/usr/lib/python2.7/dist-packages/')\nsys.path.append('/usr/lib/python2.7/')\nsys.path.append('/usr/local/lib/python2.7/dist-packages/')\nsys.path.append('... | ```python
# -*- coding: utf-8 -*-
import os
import sys
# env
sys.path.append('/usr/lib/python2.7/dist-packages/')
sys.path.append('/usr/lib/python2.7/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/')
sys.path.append('/data2/django_1.11/')
sys.path.append('/data2/django_projects/')
sys.path.append('/data2/d... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n#!/usr/bin/env python3\n\n# RAAED Server software: v1.0\n# A GUI RAAED Server\n# Detects a reverse SSH connection bound to port 22 from an RAAED Client.\n#\n# DESCRIPTION\n# The server is designed to continually ... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n#!/usr/bin/env python3\n\n# RAAED Server software: v1.0\n# A GUI RAAED Server\n# Detects a reverse SSH connection bound to port 22 from an RAAED Client.\n#\n# DESCRIPTION\n# The server is designed... | ```python
#!/usr/bin/env python3
# RAAED Server software: v1.0
# A GUI RAAED Server
# Detects a reverse SSH connection bound to port 22 from an RAAED Client.
#
# DESCRIPTION
# The server is designed to continually check for the prescence of a reverse SSH session on port 22.
# The GUI will then reflect the presence of ... |
[
{
"content": "Here is the code content:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2013-2017 Camptocamp SA\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)\n\n\"\"\"\nBinders\n=======\n\nBinders are components that know how to find the external ID for an\nOdoo ID, how to find the Odoo ... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Copyright 2013-2017 Camptocamp SA\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)\n\n\"\"\"\nBinders\n=======\n\nBinders are components that know how to find the external ID for an\nOdoo ID, how t... | ```python
# -*- coding: utf-8 -*-
# Copyright 2013-2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
"""
Binders
=======
Binders are components that know how to find the external ID for an
Odoo ID, how to find the Odoo ID for an external ID and how to
create the binding between th... |
[
{
"content": "Here is the script:\n```python\nr\"\"\"\n\n**openpnm.network**\n\n----\n\nThis module contains the ``GenericNetwork`` class, whose main purpose is to\nmanage the topological representation of the Network. It also houses a\ncollection of Network generators.\n\n----\n\n**Available Network Generator... | [
{
"content": "Here is the script:\n<|memory_start|>```python\nr\"\"\"\n\n**openpnm.network**\n\n----\n\nThis module contains the ``GenericNetwork`` class, whose main purpose is to\nmanage the topological representation of the Network. It also houses a\ncollection of Network generators.\n\n----\n\n**Available N... | ```python
r"""
**openpnm.network**
----
This module contains the ``GenericNetwork`` class, whose main purpose is to
manage the topological representation of the Network. It also houses a
collection of Network generators.
----
**Available Network Generators**
OpenPNM includes a variety of Network generators. The... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\n# Copyright 2008-2012 Nokia Siemens Networks Oyj\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 t... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# Copyright 2008-2012 Nokia Siemens Networks Oyj\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 ob... | ```python
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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 appl... |
[
{
"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": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n# awl.tests.test_utils.py\nimport sys\nfrom io import StringIO\n\nfrom django.test import TestCase\n\nfrom awl.tests.models import Link\nfrom awl.utils import (URLTree, refetch, refetch_for_update, render_page,\n re... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n# awl.tests.test_utils.py\nimport sys\nfrom io import StringIO\n\nfrom django.test import TestCase\n\nfrom awl.tests.models import Link\nfrom awl.utils import (URLTree, refetch, refetch_for_update, rend... | ```python
# awl.tests.test_utils.py
import sys
from io import StringIO
from django.test import TestCase
from awl.tests.models import Link
from awl.utils import (URLTree, refetch, refetch_for_update, render_page,
render_page_to_string, get_field_names, get_obj_attr)
from awl.waelsteng import FakeRequest
# =======... |
[
{
"content": "Repeat the code precisely:\n```python\n\"\"\"\nAuto-auth page (used to automatically log in during testing).\n\"\"\"\n\nimport urllib\nfrom bok_choy.page_object import PageObject\nfrom . import BASE_URL\n\n\nclass AutoAuthPage(PageObject):\n \"\"\"\n The automatic authorization page.\n Wh... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n\"\"\"\nAuto-auth page (used to automatically log in during testing).\n\"\"\"\n\nimport urllib\nfrom bok_choy.page_object import PageObject\nfrom . import BASE_URL\n\n\nclass AutoAuthPage(PageObject):\n \"\"\"\n The automatic authorizati... | ```python
"""
Auto-auth page (used to automatically log in during testing).
"""
import urllib
from bok_choy.page_object import PageObject
from . import BASE_URL
class AutoAuthPage(PageObject):
"""
The automatic authorization page.
When allowed via the django settings file, visiting
this url will crea... |
[
{
"content": "Here is the code block:\n```python\n# export_2d.py\n# functions to help to generate 2D dxf and svg plan.\n# created by charlyoleg on 2013/05/31\n#\n# (C) Copyright 2013 charlyoleg\n#\n# This file is part of the Cnc25D Python package.\n# \n# Cnc25D is free software: you can redistribute it and/or m... | [
{
"content": "Here is the code block:\n<|memory_start|>```python\n# export_2d.py\n# functions to help to generate 2D dxf and svg plan.\n# created by charlyoleg on 2013/05/31\n#\n# (C) Copyright 2013 charlyoleg\n#\n# This file is part of the Cnc25D Python package.\n# \n# Cnc25D is free software: you can redistri... | ```python
# export_2d.py
# functions to help to generate 2D dxf and svg plan.
# created by charlyoleg on 2013/05/31
#
# (C) Copyright 2013 charlyoleg
#
# This file is part of the Cnc25D Python package.
#
# Cnc25D is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... |
[
{
"content": "```python\n#\n# Copyright (c) 2015 nexB Inc. and others. All rights reserved.\n# http://nexb.com and https://github.com/nexB/scancode-toolkit/\n# The ScanCode software is licensed under the Apache License version 2.0.\n# Data generated with ScanCode require an acknowledgment.\n# ScanCode is a trad... | [
{
"content": "<|memory_start|>```python\n#\n# Copyright (c) 2015 nexB Inc. and others. All rights reserved.\n# http://nexb.com and https://github.com/nexB/scancode-toolkit/\n# The ScanCode software is licensed under the Apache License version 2.0.\n# Data generated with ScanCode require an acknowledgment.\n# Sc... | ```python
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You m... |
[
{
"content": "Here is a code file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom runner.koan import *\n\nclass AboutTuples(Koan):\n def test_creating_a_tuple(self):\n count_of_three = (1, 2, 5)\n self.assertEqual(5, count_of_three[2])\n\n def test_tuples_are_immutable_s... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom runner.koan import *\n\nclass AboutTuples(Koan):\n def test_creating_a_tuple(self):\n count_of_three = (1, 2, 5)\n self.assertEqual(5, count_of_three[2])\n\n def test_tuples... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutTuples(Koan):
def test_creating_a_tuple(self):
count_of_three = (1, 2, 5)
self.assertEqual(5, count_of_three[2])
def test_tuples_are_immutable_so_item_assignment_is_not_possible(self):
count_... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\n# Copyright 2020 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# http://www.apache.org/licenses/LICENSE-2.... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Copyright 2020 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# http://www.apache.org/lic... | ```python
# -*- coding: utf-8 -*-
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\n\"\"\"\nproblem68.py\n\nhttps://projecteuler.net/problem=68\n\nWhat is the maximum 16-digit string for a 'magic' 5-gon ring?\n\"\"\"\nfrom itertools import chain\n\nflatten = chain.from_iterable\n\ndef five_gon_rings(n):\n \"\"\"Ret... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n\"\"\"\nproblem68.py\n\nhttps://projecteuler.net/problem=68\n\nWhat is the maximum 16-digit string for a 'magic' 5-gon ring?\n\"\"\"\nfrom itertools import chain\n\nflatten = chain.from_iterable\n\ndef five_gon_rings(n)... | ```python
"""
problem68.py
https://projecteuler.net/problem=68
What is the maximum 16-digit string for a 'magic' 5-gon ring?
"""
from itertools import chain
flatten = chain.from_iterable
def five_gon_rings(n):
"""Return list of solutions to the 'magic' 5-gon ring problem, each line
summing to n. The empty l... |
[
{
"content": "Repeat the code exactly as the original, including blank lines:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2014-2016 The HyperSpyUI developers\n#\n# This file is part of HyperSpyUI.\n#\n# HyperSpyUI is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Gene... | [
{
"content": "Repeat the code exactly as the original, including blank lines:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n# Copyright 2014-2016 The HyperSpyUI developers\n#\n# This file is part of HyperSpyUI.\n#\n# HyperSpyUI is free software: you can redistribute it and/or modify\n# it under the terms... | ```python
# -*- coding: utf-8 -*-
# Copyright 2014-2016 The HyperSpyUI developers
#
# This file is part of HyperSpyUI.
#
# HyperSpyUI 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 Lic... |
[
{
"content": "```python\n\"\"\"\nraven.transport.builtins\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport logging\nimport sys\nimport urllib2\n\nfrom raven.utils import all\n\ntry:\n # Goo... | [
{
"content": "<|memory_start|>```python\n\"\"\"\nraven.transport.builtins\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport logging\nimport sys\nimport urllib2\n\nfrom raven.utils import all\n\... | ```python
"""
raven.transport.builtins
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import logging
import sys
import urllib2
from raven.utils import all
try:
# Google App Engine blacklists parts of the socke... |
[
{
"content": "Repeat the following code:\n```python\n\"\"\"\nDjango settings for mobileinterest project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/\n... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n\"\"\"\nDjango settings for mobileinterest project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6... | ```python
"""
Django settings for mobileinterest project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(... |
[
{
"content": "```python\n# -*- coding: UTF-8 -*-\n#\n# (c) 2010 Mandriva, http://www.mandriva.com/\n#\n# This file is part of Mandriva Server Setup\n#\n# MSS 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 Found... | [
{
"content": "<|memory_start|>```python\n# -*- coding: UTF-8 -*-\n#\n# (c) 2010 Mandriva, http://www.mandriva.com/\n#\n# This file is part of Mandriva Server Setup\n#\n# MSS 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 Fre... | ```python
# -*- coding: UTF-8 -*-
#
# (c) 2010 Mandriva, http://www.mandriva.com/
#
# This file is part of Mandriva Server Setup
#
# MSS 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 ... |
[
{
"content": "```python\n#!/usr/bin/env python\n'''CREMA structured chord model'''\n\nimport argparse\nimport sys\nimport os\nimport pickle\n\nfrom tqdm import tqdm\nfrom joblib import Parallel, delayed\n\nfrom jams.util import smkdirs\n\nimport pumpp\n\nimport crema.utils\n\nOUTPUT_PATH = 'resources'\n\n\ndef ... | [
{
"content": "<|memory_start|>```python\n#!/usr/bin/env python\n'''CREMA structured chord model'''\n\nimport argparse\nimport sys\nimport os\nimport pickle\n\nfrom tqdm import tqdm\nfrom joblib import Parallel, delayed\n\nfrom jams.util import smkdirs\n\nimport pumpp\n\nimport crema.utils\n\nOUTPUT_PATH = 'reso... | ```python
#!/usr/bin/env python
'''CREMA structured chord model'''
import argparse
import sys
import os
import pickle
from tqdm import tqdm
from joblib import Parallel, delayed
from jams.util import smkdirs
import pumpp
import crema.utils
OUTPUT_PATH = 'resources'
def process_arguments(args):
parser = argpa... |
[
{
"content": "Repeat the following code:\n```python\n#!/usr/bin/python\n\"\"\"\nUnittests for utils_libvirtd module.\n\"\"\"\nimport unittest\nimport common\nfrom virttest import utils_selinux\nfrom autotest.client import os_dep\n\nclass TestSelinux(unittest.TestCase):\n \"\"\"\n Class for unittests of ut... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n#!/usr/bin/python\n\"\"\"\nUnittests for utils_libvirtd module.\n\"\"\"\nimport unittest\nimport common\nfrom virttest import utils_selinux\nfrom autotest.client import os_dep\n\nclass TestSelinux(unittest.TestCase):\n \"\"\"\n Class for... | ```python
#!/usr/bin/python
"""
Unittests for utils_libvirtd module.
"""
import unittest
import common
from virttest import utils_selinux
from autotest.client import os_dep
class TestSelinux(unittest.TestCase):
"""
Class for unittests of utils_selinux.
"""
def test_sestatus(self):
"""
T... |
[
{
"content": "Repeat the code precisely:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\n######################\n# MEZZANINE SETTINGS #\n######################\n\n# The following settings are already defined with default values in\n# the ``defaults.py`` module within each of Mezzanine's ... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\nfrom __future__ import absolute_import, unicode_literals\n\n######################\n# MEZZANINE SETTINGS #\n######################\n\n# The following settings are already defined with default values in\n# the ``defaults.py`` module within each... | ```python
from __future__ import absolute_import, unicode_literals
######################
# MEZZANINE SETTINGS #
######################
# The following settings are already defined with default values in
# the ``defaults.py`` module within each of Mezzanine's apps, but are
# common enough to be put here, commented ou... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\n# -*- coding: utf-8 -*-\nfrom rest_framework.views import APIView\nfrom rest_framework.permissions import IsAuthenticatedOrReadOnly\nfrom wms.models import Dataset, Layer, VirtualLayer, Variable\nfrom wmsrest.serializers import ... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom rest_framework.views import APIView\nfrom rest_framework.permissions import IsAuthenticatedOrReadOnly\nfrom wms.models import Dataset, Layer, VirtualLayer, Variable\nfrom wmsrest.ser... | ```python
# -*- coding: utf-8 -*-
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from wms.models import Dataset, Layer, VirtualLayer, Variable
from wmsrest.serializers import DatasetSerializer, SGridDatasetSerializer, UGridDatasetSerializer, RGridDatasetSeriali... |
[
{
"content": "Here is the source code:\n```python\n###############################################################################\n# Language Modeling on Wikitext-2\n#\n# This file generates new sentences sampled from the language model\n#\n######################################################################... | [
{
"content": "Here is the source code:\n<|memory_start|>```python\n###############################################################################\n# Language Modeling on Wikitext-2\n#\n# This file generates new sentences sampled from the language model\n#\n######################################################... | ```python
###############################################################################
# Language Modeling on Wikitext-2
#
# This file generates new sentences sampled from the language model
#
###############################################################################
# stdlib
import argparse
# third party
imp... |
[
{
"content": "Repeat the following code:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Setup the Brie application\"\"\"\n\nimport logging\n\nimport transaction\nfrom tg import config\n\nfrom brie.config.environment import load_environment\n\n__all__ = ['setup_app']\n\nlog = logging.getLogger(__name__)\n\n\ndef set... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\"\"\"Setup the Brie application\"\"\"\n\nimport logging\n\nimport transaction\nfrom tg import config\n\nfrom brie.config.environment import load_environment\n\n__all__ = ['setup_app']\n\nlog = logging.getLogger(__name... | ```python
# -*- coding: utf-8 -*-
"""Setup the Brie application"""
import logging
import transaction
from tg import config
from brie.config.environment import load_environment
__all__ = ['setup_app']
log = logging.getLogger(__name__)
def setup_app(command, conf, vars):
"""Place any commands to setup brie her... |
[
{
"content": "Here is the snippet:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('exchange', '0011_conferenceroom'),\n ]\n\n operations = [\n migr... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('exchange', '0011_conferenceroom'),\n ]\n\n operations =... | ```python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('exchange', '0011_conferenceroom'),
]
operations = [
migrations.AddField(
model_name='group',
... |
[
{
"content": "Repeat the full code snippet:\n```python\nfrom zope.interface import implementer\nfrom sqlalchemy import (\n Column,\n Unicode,\n Integer,\n ForeignKey,\n)\nfrom sqlalchemy.orm import relationship, backref\nfrom sqlalchemy.ext.declarative import declared_attr\n\nfrom clld import interf... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\nfrom zope.interface import implementer\nfrom sqlalchemy import (\n Column,\n Unicode,\n Integer,\n ForeignKey,\n)\nfrom sqlalchemy.orm import relationship, backref\nfrom sqlalchemy.ext.declarative import declared_attr\n\nfrom cl... | ```python
from zope.interface import implementer
from sqlalchemy import (
Column,
Unicode,
Integer,
ForeignKey,
)
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declared_attr
from clld import interfaces
from clld.db.meta import Base, CustomModelMixin
from clld.d... |
[
{
"content": "```python\n# Generated by YCM Generator at 2015-07-01 14:51:38.867126\n\n# This file is NOT licensed under the GPLv3, which is the license for the rest\n# of YouCompleteMe.\n#\n# Here's the license text for this file:\n#\n# This is free and unencumbered software released into the public domain.\n#... | [
{
"content": "<|memory_start|>```python\n# Generated by YCM Generator at 2015-07-01 14:51:38.867126\n\n# This file is NOT licensed under the GPLv3, which is the license for the rest\n# of YouCompleteMe.\n#\n# Here's the license text for this file:\n#\n# This is free and unencumbered software released into the p... | ```python
# Generated by YCM Generator at 2015-07-01 14:51:38.867126
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modi... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n'''\nVisualOps agent requests objects\n(c) 2014 - MadeiraCloud LTD.\n\n@author: Thibault BRONCHAIN\n'''\n\n\n# Protocol defines import\nfrom opsagent.objects import codes\n\n\n# Handshake request\ndef handshake(config, errors):\n init = conf... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n'''\nVisualOps agent requests objects\n(c) 2014 - MadeiraCloud LTD.\n\n@author: Thibault BRONCHAIN\n'''\n\n\n# Protocol defines import\nfrom opsagent.objects import codes\n\n\n# Handshake request\ndef handshake(config, errors):\... | ```python
'''
VisualOps agent requests objects
(c) 2014 - MadeiraCloud LTD.
@author: Thibault BRONCHAIN
'''
# Protocol defines import
from opsagent.objects import codes
# Handshake request
def handshake(config, errors):
init = config.get('init')
version = (config['userdata'].get('version') if config.get('u... |
[
{
"content": "Repeat the code precisely:\n```python\n\"\"\"A setuptools based setup module.\n\nSee (and based on):\nhttps://packaging.python.org/en/latest/distributing.html\nhttps://github.com/pypa/sampleproject\n\"\"\"\n\n# Always prefer setuptools over distutils\nfrom setuptools import setup, find_packages\n#... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n\"\"\"A setuptools based setup module.\n\nSee (and based on):\nhttps://packaging.python.org/en/latest/distributing.html\nhttps://github.com/pypa/sampleproject\n\"\"\"\n\n# Always prefer setuptools over distutils\nfrom setuptools import setup, ... | ```python
"""A setuptools based setup module.
See (and based on):
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os impo... |
[
{
"content": "Replicate the source code:\n```python\nfrom office365.sharepoint.publishing.primary_city_time import PrimaryCityTime\nfrom office365.sharepoint.publishing.site_page_metadata_collection import SitePageMetadataCollection\nfrom office365.sharepoint.publishing.site_page_service import SitePageService\... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\nfrom office365.sharepoint.publishing.primary_city_time import PrimaryCityTime\nfrom office365.sharepoint.publishing.site_page_metadata_collection import SitePageMetadataCollection\nfrom office365.sharepoint.publishing.site_page_service import ... | ```python
from office365.sharepoint.publishing.primary_city_time import PrimaryCityTime
from office365.sharepoint.publishing.site_page_metadata_collection import SitePageMetadataCollection
from office365.sharepoint.publishing.site_page_service import SitePageService
from office365.sharepoint.publishing.video_service_di... |
[
{
"content": "```python\nfrom django import template\nfrom django.conf import settings\nimport json\nfrom geotrek.outdoor.models import Practice, Site\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef is_outdoor_enabled():\n return 'geotrek.outdoor' in settings.INSTALLED_APPS\n\n\n@register.s... | [
{
"content": "<|memory_start|>```python\nfrom django import template\nfrom django.conf import settings\nimport json\nfrom geotrek.outdoor.models import Practice, Site\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef is_outdoor_enabled():\n return 'geotrek.outdoor' in settings.INSTALLED_APPS\... | ```python
from django import template
from django.conf import settings
import json
from geotrek.outdoor.models import Practice, Site
register = template.Library()
@register.simple_tag
def is_outdoor_enabled():
return 'geotrek.outdoor' in settings.INSTALLED_APPS
@register.simple_tag
def site_practices():
p... |
[
{
"content": "Here is a code snippet:\n```python\n#!/usr/bin/python\n#\n# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.\n#\n\nimport os\nimport sys\nimport argparse\nimport netaddr\nimport netifaces\nimport ConfigParser\nimport platform\n\nfrom fabric.api import local\n\nfrom contrail_provision... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\n#!/usr/bin/python\n#\n# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.\n#\n\nimport os\nimport sys\nimport argparse\nimport netaddr\nimport netifaces\nimport ConfigParser\nimport platform\n\nfrom fabric.api import local\n\nfrom co... | ```python
#!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import os
import sys
import argparse
import netaddr
import netifaces
import ConfigParser
import platform
from fabric.api import local
from contrail_provisioning.common.base import ContrailSetup
from contrail_provisioning... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n# This file is part of the pyMOR project (http://www.pymor.org).\n# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler\n# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)\n\nfrom __future__ impor... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n# This file is part of the pyMOR project (http://www.pymor.org).\n# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler\n# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)\n\nfrom ... | ```python
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
from itertools import product
import... |
[
{
"content": "Repeat the following code:\n```python\nfrom . import lib\nfrom .timeout import Timeout\n\nimport greenlet\n\nimport errno\nimport socket as stdsocket\n\nfrom socket import * # for convenience\nfrom socket import timeout as timeout_error\n\n\nclass socket(stdsocket.socket):\n __slots__ = ()\n\n ... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\nfrom . import lib\nfrom .timeout import Timeout\n\nimport greenlet\n\nimport errno\nimport socket as stdsocket\n\nfrom socket import * # for convenience\nfrom socket import timeout as timeout_error\n\n\nclass socket(stdsocket.socket):\n __s... | ```python
from . import lib
from .timeout import Timeout
import greenlet
import errno
import socket as stdsocket
from socket import * # for convenience
from socket import timeout as timeout_error
class socket(stdsocket.socket):
__slots__ = ()
def __init__(self, *args, **kwargs):
super().__init__(*... |
[
{
"content": "Repeat the following code:\n```python\n# -*- coding:utf-8 -*-\n\nfrom report import report_sxw\nfrom tools.translate import _\nimport rml_parse\nimport time\n\nclass rainsoft_saleout_report(rml_parse.rml_parse):\n def __init__(self,cr,uid,name,context):\n\tsuper(rainsoft_saleout_report, self)._... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n# -*- coding:utf-8 -*-\n\nfrom report import report_sxw\nfrom tools.translate import _\nimport rml_parse\nimport time\n\nclass rainsoft_saleout_report(rml_parse.rml_parse):\n def __init__(self,cr,uid,name,context):\n\tsuper(rainsoft_saleout... | ```python
# -*- coding:utf-8 -*-
from report import report_sxw
from tools.translate import _
import rml_parse
import time
class rainsoft_saleout_report(rml_parse.rml_parse):
def __init__(self,cr,uid,name,context):
super(rainsoft_saleout_report, self).__init__(cr, uid, name, context)
self.localcontext.upd... |
[
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n```python\n# Generated by Django 2.0.8 on 2018-09-25 15:48\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [(\"product\", \"0071_attributechoicevalue_value\")]\n\n op... | [
{
"content": "Replicate the code snippet exactly, without paraphrasing or reformatting:\n<|memory_start|>```python\n# Generated by Django 2.0.8 on 2018-09-25 15:48\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [(\"product\", \"0071_attributechoicevalue_val... | ```python
# Generated by Django 2.0.8 on 2018-09-25 15:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("product", "0071_attributechoicevalue_value")]
operations = [
migrations.RenameModel(old_name="ProductAttribute", new_name="Attribute"),
migrati... |
[
{
"content": "Here is the snippet:\n```python\n# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n\n # Changing field 'MessageCost.tag_pool'\n ... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n\n # Changing field 'MessageCost.tag... | ```python
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'MessageCost.tag_pool'
db.alter_column(u'billing_messagecost', 'tag_pool_id', se... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n```python\n\"\"\"\nAllow the ability to connect and publish to a queue.\n\"\"\"\nimport logging\nimport time\n\nimport kombu\nimport six\n\n\nclass Producer(object):\n\n def __init__(self, dest_queue_name, rabbitmq_host, rabbi... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\n<|memory_start|>```python\n\"\"\"\nAllow the ability to connect and publish to a queue.\n\"\"\"\nimport logging\nimport time\n\nimport kombu\nimport six\n\n\nclass Producer(object):\n\n def __init__(self, dest_queue_name, rabb... | ```python
"""
Allow the ability to connect and publish to a queue.
"""
import logging
import time
import kombu
import six
class Producer(object):
def __init__(self, dest_queue_name, rabbitmq_host, rabbitmq_port=None,
serializer=None, compression=None,
userid=None, password=None... |
[
{
"content": "Here is the snippet:\n```python\n#-*- coding: utf-8 -*-\n\nimport sys\nimport pygame\nfrom pygame.locals import *\nfrom utils import *\nfrom initial import LoadMenuTextures\n\nclass MainMenu(LoadMenuTextures):\n \n def __init__(self, modes, win_w, win_h):\n self.showmain = True\n ... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n#-*- coding: utf-8 -*-\n\nimport sys\nimport pygame\nfrom pygame.locals import *\nfrom utils import *\nfrom initial import LoadMenuTextures\n\nclass MainMenu(LoadMenuTextures):\n \n def __init__(self, modes, win_w, win_h):\n self.showma... | ```python
#-*- coding: utf-8 -*-
import sys
import pygame
from pygame.locals import *
from utils import *
from initial import LoadMenuTextures
class MainMenu(LoadMenuTextures):
def __init__(self, modes, win_w, win_h):
self.showmain = True
self.submenu = False
self.click = False
... |
[
{
"content": "Here is a code file:\n```python\nfrom ZODB.utils import u64\nimport unittest\n\nfrom .. import Object\nfrom .base import DBSetup\n\nclass SearchTests(DBSetup, unittest.TestCase):\n\n def setUp(self):\n super(SearchTests, self).setUp()\n import newt.db\n self.db = newt.db.DB... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nfrom ZODB.utils import u64\nimport unittest\n\nfrom .. import Object\nfrom .base import DBSetup\n\nclass SearchTests(DBSetup, unittest.TestCase):\n\n def setUp(self):\n super(SearchTests, self).setUp()\n import newt.db\n self... | ```python
from ZODB.utils import u64
import unittest
from .. import Object
from .base import DBSetup
class SearchTests(DBSetup, unittest.TestCase):
def setUp(self):
super(SearchTests, self).setUp()
import newt.db
self.db = newt.db.DB(self.dsn)
self.conn = self.db.open()
def t... |
[
{
"content": "Repeat the code precisely:\n```python\n# Import a whole load of stuff\r\nfrom System.IO import *\r\nfrom System.Drawing import *\r\nfrom System.Runtime.Remoting import *\r\nfrom System.Threading import *\r\nfrom System.Windows.Forms import *\r\nfrom System.Xml.Serialization import *\r\nfrom System... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\n# Import a whole load of stuff\r\nfrom System.IO import *\r\nfrom System.Drawing import *\r\nfrom System.Runtime.Remoting import *\r\nfrom System.Threading import *\r\nfrom System.Windows.Forms import *\r\nfrom System.Xml.Serialization import ... | ```python
# Import a whole load of stuff
from System.IO import *
from System.Drawing import *
from System.Runtime.Remoting import *
from System.Threading import *
from System.Windows.Forms import *
from System.Xml.Serialization import *
from System import *
from Analysis.EDM import *
from DAQ.Environment imp... |
[
{
"content": "Write the code verbatim:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright(C) 2012 Romain Bignon\n#\n# This file is part of weboob.\n#\n# weboob 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 Soft... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n# Copyright(C) 2012 Romain Bignon\n#\n# This file is part of weboob.\n#\n# weboob 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\... | ```python
# -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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
# (a... |
[
{
"content": "Return the code unaltered:\n```python\n# Prints a tree of all items in the configuration\n# vim: tabstop=4 shiftwidth=4 expandtab\n\nimport kconfiglib\nimport sys\n\n# Integers representing symbol types\nUNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(6)\n\n# Strings to use for types\nTYPENAME =... | [
{
"content": "Return the code unaltered:\n<|memory_start|>```python\n# Prints a tree of all items in the configuration\n# vim: tabstop=4 shiftwidth=4 expandtab\n\nimport kconfiglib\nimport sys\n\n# Integers representing symbol types\nUNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(6)\n\n# Strings to use for t... | ```python
# Prints a tree of all items in the configuration
# vim: tabstop=4 shiftwidth=4 expandtab
import kconfiglib
import sys
# Integers representing symbol types
UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(6)
# Strings to use for types
TYPENAME = {UNKNOWN: "unknown", BOOL: "bool", TRISTATE: "tristate",
... |
[
{
"content": "Here is a code file:\n```python\nfrom fabric.contrib.files import append, exists, sed\nfrom fabric.api import env, local, run\nimport random\n\n\nREPO_URL = 'https://github.com/rmelchorv/TDD-Cuervos.git'\n\ndef deploy():\n\tsite_folder = '/home/%s/sites/%s' % (env.user, env.host)\n\tsource_folder ... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nfrom fabric.contrib.files import append, exists, sed\nfrom fabric.api import env, local, run\nimport random\n\n\nREPO_URL = 'https://github.com/rmelchorv/TDD-Cuervos.git'\n\ndef deploy():\n\tsite_folder = '/home/%s/sites/%s' % (env.user, env.host)\n... | ```python
from fabric.contrib.files import append, exists, sed
from fabric.api import env, local, run
import random
REPO_URL = 'https://github.com/rmelchorv/TDD-Cuervos.git'
def deploy():
site_folder = '/home/%s/sites/%s' % (env.user, env.host)
source_folder = site_folder + '/source'
_create_directory_structure_i... |
[
{
"content": "Here is the script:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC.\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#... | [
{
"content": "Here is the script:\n<|memory_start|>```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC.\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. Y... | ```python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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.a... |
[
{
"content": "Replicate the source code:\n```python\n\"\"\"Unit tests for FrameGetProtocolVersionRequest.\"\"\"\nimport unittest\n\nfrom pyvlx.api.frame_creation import frame_from_raw\nfrom pyvlx.api.frames import FrameGetProtocolVersionRequest\n\n\nclass TestFrameGetProtocolVersionRequest(unittest.TestCase):\n... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n\"\"\"Unit tests for FrameGetProtocolVersionRequest.\"\"\"\nimport unittest\n\nfrom pyvlx.api.frame_creation import frame_from_raw\nfrom pyvlx.api.frames import FrameGetProtocolVersionRequest\n\n\nclass TestFrameGetProtocolVersionRequest(unitt... | ```python
"""Unit tests for FrameGetProtocolVersionRequest."""
import unittest
from pyvlx.api.frame_creation import frame_from_raw
from pyvlx.api.frames import FrameGetProtocolVersionRequest
class TestFrameGetProtocolVersionRequest(unittest.TestCase):
"""Test class FrameGetProtocolVersionRequest."""
# pylin... |
[
{
"content": "Here is a code snippet:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"psutil is a cross-platform library fo... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"psutil is a cross-pla... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""psutil is a cross-platform library for retrieving information on
running processes and system u... |
[
{
"content": "Write the code verbatim:\n```python\n\"\"\"This file contains code used in \"Think Stats\",\nby Allen B. Downey, available from greenteapress.com\n\nCopyright 2014 Allen B. Downey\nLicense: GNU GPLv3 http://www.gnu.org/licenses/gpl.html\n\"\"\"\n\nfrom __future__ import print_function\n\nimport ma... | [
{
"content": "Write the code verbatim:\n<|memory_start|>```python\n\"\"\"This file contains code used in \"Think Stats\",\nby Allen B. Downey, available from greenteapress.com\n\nCopyright 2014 Allen B. Downey\nLicense: GNU GPLv3 http://www.gnu.org/licenses/gpl.html\n\"\"\"\n\nfrom __future__ import print_funct... | ```python
"""This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function
import math
import random
import scipy.stats
import brfss
import first
imp... |
[
{
"content": "Replicate the source code:\n```python\nimport numpy as np\n\nimport torch\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport torch.optim as optim\n\nfrom torch.autograd import Variable, Function\n\nfrom binge.layers import ScaledEmbedding, ZeroEmbedding\nfrom binge.native import a... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\nimport numpy as np\n\nimport torch\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport torch.optim as optim\n\nfrom torch.autograd import Variable, Function\n\nfrom binge.layers import ScaledEmbedding, ZeroEmbedding\nfrom binge... | ```python
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable, Function
from binge.layers import ScaledEmbedding, ZeroEmbedding
from binge.native import align, get_lib
def _gpu(tensor, gpu=False):
if gpu:
... |
[
{
"content": "Repeat the code precisely:\n```python\nfrom pixelpuncher.game.utils.message import add_game_message\nfrom pixelpuncher.game.utils.messages import learned_skill_message\nfrom pixelpuncher.player.models import PlayerSkill, Skill\n\n\ndef add_starting_skills(player):\n skills = Skill.objects.filte... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\nfrom pixelpuncher.game.utils.message import add_game_message\nfrom pixelpuncher.game.utils.messages import learned_skill_message\nfrom pixelpuncher.player.models import PlayerSkill, Skill\n\n\ndef add_starting_skills(player):\n skills = Ski... | ```python
from pixelpuncher.game.utils.message import add_game_message
from pixelpuncher.game.utils.messages import learned_skill_message
from pixelpuncher.player.models import PlayerSkill, Skill
def add_starting_skills(player):
skills = Skill.objects.filter(level=1)
for skill in skills:
create_playe... |
[
{
"content": "Here is the code content:\n```python\nfrom .base import Base\n\n\nclass Capture(Base):\n @classmethod\n def get_resource_class(cls, client):\n from ..resources.captures import Captures\n\n return Captures(client)\n\n @property\n def id(self):\n return self._get_pro... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\nfrom .base import Base\n\n\nclass Capture(Base):\n @classmethod\n def get_resource_class(cls, client):\n from ..resources.captures import Captures\n\n return Captures(client)\n\n @property\n def id(self):\n retu... | ```python
from .base import Base
class Capture(Base):
@classmethod
def get_resource_class(cls, client):
from ..resources.captures import Captures
return Captures(client)
@property
def id(self):
return self._get_property("id")
@property
def mode(self):
return ... |
[
{
"content": "Here is the snippet:\n```python\n# -*- coding: utf-8 -*-\n#\n# installation_process.py\n# \n# Copyright 2013 Antergos\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 Software Foun... | [
{
"content": "Here is the snippet:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n#\n# installation_process.py\n# \n# Copyright 2013 Antergos\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 Fr... | ```python
# -*- coding: utf-8 -*-
#
# installation_process.py
#
# Copyright 2013 Antergos
#
# 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 yo... |
[
{
"content": "Here is a code file:\n```python\n# Copyright (c) 2011 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport re\nimport os\n\n\ndef XmlToString(content, encoding='utf-8', pretty=False):\n \"\"\" Writes the... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n# Copyright (c) 2011 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport re\nimport os\n\n\ndef XmlToString(content, encoding='utf-8', pretty=False):\n \... | ```python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import os
def XmlToString(content, encoding='utf-8', pretty=False):
""" Writes the XML content to disk, touching the file only if it has ch... |
[
{
"content": "Here is a code file:\n```python\nimport operator\n\nfrom django.db.models.base import ModelBase\n\nfrom enumfields import EnumField\n\nfrom cvsslib.mixin import cvss_mixin_data, utils_mixin\nfrom cvsslib.base_enum import NotDefined\n\n\nclass KeyedEnumField(EnumField):\n \"\"\"\n An enum fie... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nimport operator\n\nfrom django.db.models.base import ModelBase\n\nfrom enumfields import EnumField\n\nfrom cvsslib.mixin import cvss_mixin_data, utils_mixin\nfrom cvsslib.base_enum import NotDefined\n\n\nclass KeyedEnumField(EnumField):\n \"\"\"\... | ```python
import operator
from django.db.models.base import ModelBase
from enumfields import EnumField
from cvsslib.mixin import cvss_mixin_data, utils_mixin
from cvsslib.base_enum import NotDefined
class KeyedEnumField(EnumField):
"""
An enum field that stores the names of the values as strings, rather th... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nimport numpy as np\n\nfrom .. import util\nfrom ..constants import log\n\n\ndef fill_orthographic(dense):\n shape = dense.shape\n indices = np.stack(\n np.meshgrid(*(np.arange(s) for s in shape), indexing='ij'),\n axis=-1)\n... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nimport numpy as np\n\nfrom .. import util\nfrom ..constants import log\n\n\ndef fill_orthographic(dense):\n shape = dense.shape\n indices = np.stack(\n np.meshgrid(*(np.arange(s) for s in shape), indexing='ij'),\n ... | ```python
import numpy as np
from .. import util
from ..constants import log
def fill_orthographic(dense):
shape = dense.shape
indices = np.stack(
np.meshgrid(*(np.arange(s) for s in shape), indexing='ij'),
axis=-1)
empty = np.logical_not(dense)
def fill_axis(axis):
base_loca... |
[
{
"content": "Here is a code file:\n```python\n\"\"\" Utility module for command line script select_images\n\"\"\"\n# Author: Ilya Patrushev ilya.patrushev@gmail.com\n\n# License: GPL v2.0\n\nimport os\nimport numpy as np\nimport scipy.linalg as la\n\nfrom cPickle import load\n\nimport cv2\n\ndef image_colour_d... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\n\"\"\" Utility module for command line script select_images\n\"\"\"\n# Author: Ilya Patrushev ilya.patrushev@gmail.com\n\n# License: GPL v2.0\n\nimport os\nimport numpy as np\nimport scipy.linalg as la\n\nfrom cPickle import load\n\nimport cv2\n\nde... | ```python
""" Utility module for command line script select_images
"""
# Author: Ilya Patrushev ilya.patrushev@gmail.com
# License: GPL v2.0
import os
import numpy as np
import scipy.linalg as la
from cPickle import load
import cv2
def image_colour_distribution(img):
"""
Extract colour distribution pa... |
[
{
"content": "Provide a verbatim copy of the code:\n```python\n#coding=UTF-8\n'''\nCreated on 2012-9-29\n\n@author: s00228753\n'''\n\nimport xml.etree.ElementTree as ET\n\nfrom com.hws.s3.models.bucket import Bucket\nfrom com.hws.s3.models.owner import Owner\nfrom com.hws.s3.utils.utils import Utils\n\n\n#罗列存储空... | [
{
"content": "Provide a verbatim copy of the code:\n<|memory_start|>```python\n#coding=UTF-8\n'''\nCreated on 2012-9-29\n\n@author: s00228753\n'''\n\nimport xml.etree.ElementTree as ET\n\nfrom com.hws.s3.models.bucket import Bucket\nfrom com.hws.s3.models.owner import Owner\nfrom com.hws.s3.utils.utils import U... | ```python
#coding=UTF-8
'''
Created on 2012-9-29
@author: s00228753
'''
import xml.etree.ElementTree as ET
from com.hws.s3.models.bucket import Bucket
from com.hws.s3.models.owner import Owner
from com.hws.s3.utils.utils import Utils
#罗列存储空间方法返回对象,可解析返回的XML为S3存储空间
class ListBucketsResponse(object):
def __... |
[
{
"content": "```python\n'''Ensure non-immutable constants are copied to prevent\n mutation affecting constant in future uses\n'''\n\nfrom ..runtime.builtins import get_builtin_symbol\nfrom ..runtime.immutable import immutablep\nfrom .walk import IRWalker, propigate_location\nfrom . import ir as I\nfrom .bind... | [
{
"content": "<|memory_start|>```python\n'''Ensure non-immutable constants are copied to prevent\n mutation affecting constant in future uses\n'''\n\nfrom ..runtime.builtins import get_builtin_symbol\nfrom ..runtime.immutable import immutablep\nfrom .walk import IRWalker, propigate_location\nfrom . import ir ... | ```python
'''Ensure non-immutable constants are copied to prevent
mutation affecting constant in future uses
'''
from ..runtime.builtins import get_builtin_symbol
from ..runtime.immutable import immutablep
from .walk import IRWalker, propigate_location
from . import ir as I
from .bind import Binding, BindingUse
co... |
[
{
"content": "Here is a code file:\n```python\nfrom math_g4z3 import mod_exp\nfrom converts import big_int_to_bin_str\nimport random\n\n\nDH_p = 0xffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c4... | [
{
"content": "Here is a code file:\n<|memory_start|>```python\nfrom math_g4z3 import mod_exp\nfrom converts import big_int_to_bin_str\nimport random\n\n\nDH_p = 0xffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b... | ```python
from math_g4z3 import mod_exp
from converts import big_int_to_bin_str
import random
DH_p = 0xffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f241... |
[
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\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... | [
{
"content": "Write out the code verbatim, preserving indentation and whitespace:\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(SchemaMigrat... | ```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 'Comments.datetime'
db.add_column(u'chat_comment... |
[
{
"content": "```python\nimport pandas as pd\nfrom sklearn import model_selection\nfrom sklearn.linear_model import LogisticRegression\n\ndef loadData():\n col_names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']\n dataframe = pd.read_csv(\"./pima-indians-diabetes.data.txt\", n... | [
{
"content": "<|memory_start|>```python\nimport pandas as pd\nfrom sklearn import model_selection\nfrom sklearn.linear_model import LogisticRegression\n\ndef loadData():\n col_names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']\n dataframe = pd.read_csv(\"./pima-indians-diabet... | ```python
import pandas as pd
from sklearn import model_selection
from sklearn.linear_model import LogisticRegression
def loadData():
col_names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']
dataframe = pd.read_csv("./pima-indians-diabetes.data.txt", names = col_names)
array = d... |
[
{
"content": "Repeat the following code:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis file is part of Radar.\n\nRadar is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the... | [
{
"content": "Repeat the following code:\n<|memory_start|>```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis file is part of Radar.\n\nRadar is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either ... | ```python
# -*- coding: utf-8 -*-
"""
This file is part of Radar.
Radar 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, either version 3 of the License, or
(at your option) any later version.
Radar is di... |
[
{
"content": "```python\nclass Operation:\n def __init__(self, *stations):\n self.stations = stations\n \n \n def __call__(self, params=None, **dependencies):\n options = dict(params=(params or {}), **dependencies)\n success = True\n for station in self.stations:\... | [
{
"content": "<|memory_start|>```python\nclass Operation:\n def __init__(self, *stations):\n self.stations = stations\n \n \n def __call__(self, params=None, **dependencies):\n options = dict(params=(params or {}), **dependencies)\n success = True\n for station in... | ```python
class Operation:
def __init__(self, *stations):
self.stations = stations
def __call__(self, params=None, **dependencies):
options = dict(params=(params or {}), **dependencies)
success = True
for station in self.stations:
if (success and sta... |
[
{
"content": "```python\n# -*- coding: utf-8 -*-\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n ('Javi Manzano', 'javi.manzano.oller@gmail.com'),\n)\n\nMANAGERS = ADMINS\n\nALLOWED_HOSTS = ['176.58.120.22', 'fuzzingtheweb.com']\n\nTIME_ZONE = 'Europe/London'\nUSE_TZ = True\nLANGUAGE_CODE = 'en-gb'\nS... | [
{
"content": "<|memory_start|>```python\n# -*- coding: utf-8 -*-\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n ('Javi Manzano', 'javi.manzano.oller@gmail.com'),\n)\n\nMANAGERS = ADMINS\n\nALLOWED_HOSTS = ['176.58.120.22', 'fuzzingtheweb.com']\n\nTIME_ZONE = 'Europe/London'\nUSE_TZ = True\nLANGUAGE_C... | ```python
# -*- coding: utf-8 -*-
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Javi Manzano', 'javi.manzano.oller@gmail.com'),
)
MANAGERS = ADMINS
ALLOWED_HOSTS = ['176.58.120.22', 'fuzzingtheweb.com']
TIME_ZONE = 'Europe/London'
USE_TZ = True
LANGUAGE_CODE = 'en-gb'
SITE_ID = 1
USE_I18N = True
USE_L10N = ... |
[
{
"content": "Reproduce the code exactly as provided (keep formatting):\n```python\n# gpio.py: Implements the GPIO calls to operate OpenSprinkler zones\n#\n# Copyright 2013 Sudaraka Wijesinghe <sudaraka.wijesinghe@gmail.com>\n#\n# This file is part of OpenSprinkler Pi Monitor (OSPi Monitor)\n#\n# OSPi Monitor i... | [
{
"content": "Reproduce the code exactly as provided (keep formatting):\n<|memory_start|>```python\n# gpio.py: Implements the GPIO calls to operate OpenSprinkler zones\n#\n# Copyright 2013 Sudaraka Wijesinghe <sudaraka.wijesinghe@gmail.com>\n#\n# This file is part of OpenSprinkler Pi Monitor (OSPi Monitor)\n#\n... | ```python
# gpio.py: Implements the GPIO calls to operate OpenSprinkler zones
#
# Copyright 2013 Sudaraka Wijesinghe <sudaraka.wijesinghe@gmail.com>
#
# This file is part of OpenSprinkler Pi Monitor (OSPi Monitor)
#
# OSPi Monitor is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... |
[
{
"content": "```python\n#coding:utf-8\nimport re\nimport commands\n\n###################################\n#\n#\t测试系统日志是否做了权限限制\n#\n####################################\n\nclass TvarfileMod:\n\tglobal results,sorce\n\tresults=[]\n\tsorce=60\n\tdef setBaseline_main(self,baseline_main):\n\t\tself.baseline_main=ba... | [
{
"content": "<|memory_start|>```python\n#coding:utf-8\nimport re\nimport commands\n\n###################################\n#\n#\t测试系统日志是否做了权限限制\n#\n####################################\n\nclass TvarfileMod:\n\tglobal results,sorce\n\tresults=[]\n\tsorce=60\n\tdef setBaseline_main(self,baseline_main):\n\t\tself.... | ```python
#coding:utf-8
import re
import commands
###################################
#
# 测试系统日志是否做了权限限制
#
####################################
class TvarfileMod:
global results,sorce
results=[]
sorce=60
def setBaseline_main(self,baseline_main):
self.baseline_main=baseline_main
def start(self):
print "[*] C... |
[
{
"content": "```python\nimport logging\nfrom flask_restplus import Namespace, Resource, fields\nfrom flask import jsonify, request\nfrom Service.userInfoService import *\napi = Namespace('user', description='User Info API related operations')\nLOG = logging.getLogger(\"userInfoApi\")\nuser_fields = api.model('... | [
{
"content": "<|memory_start|>```python\nimport logging\nfrom flask_restplus import Namespace, Resource, fields\nfrom flask import jsonify, request\nfrom Service.userInfoService import *\napi = Namespace('user', description='User Info API related operations')\nLOG = logging.getLogger(\"userInfoApi\")\nuser_fiel... | ```python
import logging
from flask_restplus import Namespace, Resource, fields
from flask import jsonify, request
from Service.userInfoService import *
api = Namespace('user', description='User Info API related operations')
LOG = logging.getLogger("userInfoApi")
user_fields = api.model('UserModel', {
'lastLogin': ... |
[
{
"content": "Recreate the original code text:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n\nimport feedparser\nfrom .Hunter import Hunter\nfrom .Tweet import Tweet\nimport logging\nfrom textblob import TextBlob\n\n\n# Find new tweets from RSS streams\nclass RSSHunter(Hunter):\n \"\"\"\n ... | [
{
"content": "Recreate the original code text:\n<|memory_start|>```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n\nimport feedparser\nfrom .Hunter import Hunter\nfrom .Tweet import Tweet\nimport logging\nfrom textblob import TextBlob\n\n\n# Find new tweets from RSS streams\nclass RSSHunter(Hunter):... | ```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import feedparser
from .Hunter import Hunter
from .Tweet import Tweet
import logging
from textblob import TextBlob
# Find new tweets from RSS streams
class RSSHunter(Hunter):
"""
Find new tweets from RSS streams
"""
# Constructor
def __in... |
[
{
"content": "Repeat the code precisely as written (spacing intact):\n```python\n#\n# Copyright John Reid 2013\n#\n\n\n\"\"\"\nExample to illustrate application of pybool. Based on regulatory network in paper\non robustness under functional constraint by Nakajima et al.\n\"\"\"\n\nimport numpy as N, logging\nfr... | [
{
"content": "Repeat the code precisely as written (spacing intact):\n<|memory_start|>```python\n#\n# Copyright John Reid 2013\n#\n\n\n\"\"\"\nExample to illustrate application of pybool. Based on regulatory network in paper\non robustness under functional constraint by Nakajima et al.\n\"\"\"\n\nimport numpy a... | ```python
#
# Copyright John Reid 2013
#
"""
Example to illustrate application of pybool. Based on regulatory network in paper
on robustness under functional constraint by Nakajima et al.
"""
import numpy as N, logging
from pybool.constraints import gene_off, gene_on
from pybool import network, constraints
class ... |
[
{
"content": "```python\n# Copyright 2015-2016 Open Source Robotics Foundation, 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.apache.org/licenses/LIC... | [
{
"content": "<|memory_start|>```python\n# Copyright 2015-2016 Open Source Robotics Foundation, 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.apache.... | ```python
# Copyright 2015-2016 Open Source Robotics Foundation, 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... |
[
{
"content": "Return the code exactly, with no changes:\n```python\n\"\"\"Given the names and grades for each student in a Physics class of N\n students, store them in a nested list and print the name(s) of any\n student(s) having the second lowest grade.\n\nNote: If there are multiple students with the same gr... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\n\"\"\"Given the names and grades for each student in a Physics class of N\n students, store them in a nested list and print the name(s) of any\n student(s) having the second lowest grade.\n\nNote: If there are multiple students ... | ```python
"""Given the names and grades for each student in a Physics class of N
students, store them in a nested list and print the name(s) of any
student(s) having the second lowest grade.
Note: If there are multiple students with the same grade, order their
names alphabetically and print each name on a new line.
... |
[
{
"content": "Here is some code:\n```python\nfrom pypot.primitive import LoopPrimitive\n\n\nclass FaceTracking(LoopPrimitive):\n def __init__(self, robot, freq, face_detector):\n LoopPrimitive.__init__(self, robot, freq)\n\n self.face_detector = face_detector\n\n self.dx, self.dy = 60, 5... | [
{
"content": "Here is some code:\n<|memory_start|>```python\nfrom pypot.primitive import LoopPrimitive\n\n\nclass FaceTracking(LoopPrimitive):\n def __init__(self, robot, freq, face_detector):\n LoopPrimitive.__init__(self, robot, freq)\n\n self.face_detector = face_detector\n\n self.dx,... | ```python
from pypot.primitive import LoopPrimitive
class FaceTracking(LoopPrimitive):
def __init__(self, robot, freq, face_detector):
LoopPrimitive.__init__(self, robot, freq)
self.face_detector = face_detector
self.dx, self.dy = 60, 50
self._tracked_face = None
def setup(s... |
[
{
"content": "Provide an exact copy of the source code:\n```python\nimport os\nimport shutil\nimport glob\nimport logging\nfrom autotest.client import test, utils\nfrom autotest.client.shared import error\n\n\nclass ctcs(test.test):\n\n \"\"\"\n This autotest module runs CTCS (Cerberus Test Control System... | [
{
"content": "Provide an exact copy of the source code:\n<|memory_start|>```python\nimport os\nimport shutil\nimport glob\nimport logging\nfrom autotest.client import test, utils\nfrom autotest.client.shared import error\n\n\nclass ctcs(test.test):\n\n \"\"\"\n This autotest module runs CTCS (Cerberus Tes... | ```python
import os
import shutil
import glob
import logging
from autotest.client import test, utils
from autotest.client.shared import error
class ctcs(test.test):
"""
This autotest module runs CTCS (Cerberus Test Control System), that is being
maintained on a new location, since both CTCS and CTCS2 on ... |
[
{
"content": "Repeat the full code snippet:\n```python\n############################################################################\n#\n# Copyright (C) 2016 The Qt Company Ltd.\n# Contact: https://www.qt.io/licensing/\n#\n# This file is part of Qt Creator.\n#\n# Commercial License Usage\n# Licensees holding va... | [
{
"content": "Repeat the full code snippet:\n<|memory_start|>```python\n############################################################################\n#\n# Copyright (C) 2016 The Qt Company Ltd.\n# Contact: https://www.qt.io/licensing/\n#\n# This file is part of Qt Creator.\n#\n# Commercial License Usage\n# Lice... | ```python
############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance w... |
[
{
"content": "Here is the code content:\n```python\n## This file is part of Invenio.\n## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.\n##\n## Invenio is free software; you can redistribute it and/or\n## modify it under the terms of the GNU General Public License as\n## published by the Fre... | [
{
"content": "Here is the code content:\n<|memory_start|>```python\n## This file is part of Invenio.\n## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.\n##\n## Invenio is free software; you can redistribute it and/or\n## modify it under the terms of the GNU General Public License as\n## publ... | ```python
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio 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
## Licen... |
[
{
"content": "Here is a code snippet:\n```python\nfrom multiprocessing import Process, Queue\nfrom Queue import Empty, Full\nfrom datetime import datetime\nfrom copy import deepcopy\nimport json\nimport time\nimport re\n\nfrom Snmp import SnmpWalkTask, GraphiteSnmpData\nfrom polymer.Polymer import ControllerQue... | [
{
"content": "Here is a code snippet:\n<|memory_start|>```python\nfrom multiprocessing import Process, Queue\nfrom Queue import Empty, Full\nfrom datetime import datetime\nfrom copy import deepcopy\nimport json\nimport time\nimport re\n\nfrom Snmp import SnmpWalkTask, GraphiteSnmpData\nfrom polymer.Polymer impo... | ```python
from multiprocessing import Process, Queue
from Queue import Empty, Full
from datetime import datetime
from copy import deepcopy
import json
import time
import re
from Snmp import SnmpWalkTask, GraphiteSnmpData
from polymer.Polymer import ControllerQueue, TaskMgr
""" Gardener.py - Prune unwanted interfaces ... |
[
{
"content": "Return the code exactly, with no changes:\n```python\nimport collections\nimport json\nfrom logging import getLogger\n\nfrom ckan.lib.helpers import url_for\nfrom ckan.common import config\nfrom ckanext.package_converter.model.metadata_format import MetadataFormats\nfrom ckanext.package_converter.... | [
{
"content": "Return the code exactly, with no changes:\n<|memory_start|>```python\nimport collections\nimport json\nfrom logging import getLogger\n\nfrom ckan.lib.helpers import url_for\nfrom ckan.common import config\nfrom ckanext.package_converter.model.metadata_format import MetadataFormats\nfrom ckanext.pa... | ```python
import collections
import json
from logging import getLogger
from ckan.lib.helpers import url_for
from ckan.common import config
from ckanext.package_converter.model.metadata_format import MetadataFormats
from ckanext.package_converter.model.scheming_converter import Datacite43SchemingConverter
from xmltodic... |
[
{
"content": "Replicate the source code:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
{
"content": "Replicate the source code:\n<|memory_start|>```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | ```python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed... |
[
{
"content": "Output the full code verbatim (no extra comments):\n```python\n# Copyright 2010 OpenStack Foundation\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... | [
{
"content": "Output the full code verbatim (no extra comments):\n<|memory_start|>```python\n# Copyright 2010 OpenStack Foundation\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 obt... | ```python
# Copyright 2010 OpenStack Foundation
# 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
#
# U... |
[
{
"content": "```python\n# Unit tests for cache framework\n# Uses whatever cache backend is set in the test settings file.\nimport copy\nimport io\nimport os\nimport pickle\nimport re\nimport shutil\nimport tempfile\nimport threading\nimport time\nimport unittest\nimport warnings\nfrom unittest import mock\n\nf... | [
{
"content": "<|memory_start|>```python\n# Unit tests for cache framework\n# Uses whatever cache backend is set in the test settings file.\nimport copy\nimport io\nimport os\nimport pickle\nimport re\nimport shutil\nimport tempfile\nimport threading\nimport time\nimport unittest\nimport warnings\nfrom unittest ... | ```python
# Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
import copy
import io
import os
import pickle
import re
import shutil
import tempfile
import threading
import time
import unittest
import warnings
from unittest import mock
from django.conf import settings
from d... |
[
{
"content": "Repeat the code precisely:\n```python\nfrom rllab.envs.mujoco.mujoco_env import MujocoEnv\nfrom rllab.core.serializable import Serializable\nfrom rllab.envs.base import Step\nfrom rllab.misc.overrides import overrides\nfrom rllab.misc import logger\n\nfrom rllab.envs.mujoco.mujoco_env import q_mul... | [
{
"content": "Repeat the code precisely:\n<|memory_start|>```python\nfrom rllab.envs.mujoco.mujoco_env import MujocoEnv\nfrom rllab.core.serializable import Serializable\nfrom rllab.envs.base import Step\nfrom rllab.misc.overrides import overrides\nfrom rllab.misc import logger\n\nfrom rllab.envs.mujoco.mujoco_... | ```python
from rllab.envs.mujoco.mujoco_env import MujocoEnv
from rllab.core.serializable import Serializable
from rllab.envs.base import Step
from rllab.misc.overrides import overrides
from rllab.misc import logger
from rllab.envs.mujoco.mujoco_env import q_mult, q_inv
import numpy as np
import math
class AntEnv(Mu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.