prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | suite = cls()
tests = []
logger.trace("Processing target list {}", list(targets))
for target in targets:
logger.trace("Processing target '{}'", target)
try:
target_path = Path(target).resolve()
except FileNotFoundError:
... |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | return cls.from_targets(dir_path, **kwargs) |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | tests = []
dir_path = Path(dir_path)
logger.trace("+ Collecting dir {}", str(dir_path))
target_paths = dir_path.glob(
("**" if recursive else "*") +
"/test_*.yml"
)
for target_path in target_paths:
for test in cls.collect_file(
... |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | logger.trace(
" + Loading yml file {!r}",
str(target_path)
)
yield from ClimacticTestCase.from_path(
target_path,
base_path=base_path
) |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | target_tests = cls.collect_dir(
target_path,
**kwargs
)
tests.extend(target_tests) |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | for target_test in cls.collect_file(
target_path
):
tests.append(target_test) |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | from_targets |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | from_dir |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | collect_dir |
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
``climactic.suite``
-------------------
.. autoclass:: ClimacticTestSuite
"""
import logging
import unittest
from pathlib import Path
from climactic.case import ClimacticTestCase
logger = logging.getLogger(__name__)
class ClimacticTestS... | collect_file |
<|file_name|>test_send_ai_pics_stats.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
<|fim▁hole|>
class SendAiPicsStatsTestCase(TestCase):
def test_run_command(self):
call_command('send_ai_pics_stats')<|fim▁end|> | from django.core.management import call_command
|
<|file_name|>test_send_ai_pics_stats.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
from django.core.management import call_command
class SendAiPicsStatsTestCase(TestCase):
<|fim_middle|>
<|fim▁end|> | def test_run_command(self):
call_command('send_ai_pics_stats') |
<|file_name|>test_send_ai_pics_stats.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
from django.core.management import call_command
class SendAiPicsStatsTestCase(TestCase):
def test_run_command(self):
<|fim_middle|>
<|fim▁end|> | call_command('send_ai_pics_stats') |
<|file_name|>test_send_ai_pics_stats.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
from django.core.management import call_command
class SendAiPicsStatsTestCase(TestCase):
def <|fim_middle|>(self):
call_command('send_ai_pics_stats')
<|fim▁end|> | test_run_command |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | subfile = 'F/' |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | parser = argparse.ArgumentParser(description='Convert JP2 to PNG')
parser.add_argument('path', action="store", help='Directory with JP2 Files')
parser.add_argument('location', action="store", help='Directory to write to')
result = parser.parse_args()
# Reading all the jp2 files in that directory
filelist ... |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | subfile = 'F/' |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | subfile = 'IHC/' |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | subfile = 'N/' |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | main() |
<|file_name|>jp2kakadu.py<|end_file_name|><|fim▁begin|># Copyright 2014 NeuroData (http://neurodata.io)
#
# 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/license... | main |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | line = irc.recv(1024).rstrip()
if "\r\n" in line:
linesep = line.split() |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | irc.send(msg + "\r\n")
print "{SENT} " + msg
return |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | send("PRIVMSG " + user + " :" + msg)
return |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | parts = line.split(' :',1)
args = parts[0].split(' ')
if (len(parts) > 1):
args.append(parts[1])
if args[0] == "PING":
send("PONG :" + args[1])
return
try:
if args[3] == "!questions":
questions = str(Question.objects.all())
msg(args[2], questions)
r... |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | args.append(parts[1]) |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | send("PONG :" + args[1])
return |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | questions = str(Question.objects.all())
msg(args[2], questions)
return |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | linesep = line.split()
for l in linesep:
processline(l)
continue |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def <... | send |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | msg |
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
import socket
from trivia.models import *
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
irc.connect((settings.IRC_SERVER, settings.IRC_PORT))
def s... | processline |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>
import codecs
import os
from setuptools import setup, find_packages
def requirements():
"""Build the requirements list for this project"""
requirements_list = []
with open('requirements.txt') as requirements:
for... | """The setup and build script for the python-telegram-bot library.""" |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""The setup and build script for the python-telegram-bot library."""
import codecs
import os
from setuptools import setup, find_packages
def requirements():
<|fim_middle|>
packages = find_packages(exclude=['tests*'])
with codecs.open('... | """Build the requirements list for this project"""
requirements_list = []
with open('requirements.txt') as requirements:
for install in requirements:
requirements_list.append(install.strip())
return requirements_list |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""The setup and build script for the python-telegram-bot library."""
import codecs
import os
from setuptools import setup, find_packages
def <|fim_middle|>():
"""Build the requirements list for this project"""
requirements_list = []
... | requirements |
<|file_name|>inctest_runme.py<|end_file_name|><|fim▁begin|>import inctest
error = 0
try:
a = inctest.A()
except:
print "didn't find A"
print "therefore, I didn't include 'testdir/subdir1/hello.i'"
error = 1
pass
try:
b = inctest.B()
except:
print "didn't find B"
print "therefore, I didn't include 'test... |
# Check the import in subdirectory worked
if inctest.importtest1(5) != 15:
print "import test 1 failed" |
<|file_name|>inctest_runme.py<|end_file_name|><|fim▁begin|>import inctest
error = 0
try:
a = inctest.A()
except:
print "didn't find A"
print "therefore, I didn't include 'testdir/subdir1/hello.i'"
error = 1
pass
try:
b = inctest.B()
except:
print "didn't find B"
print "therefore, I didn't include 'test... | raise RuntimeError |
<|file_name|>inctest_runme.py<|end_file_name|><|fim▁begin|>import inctest
error = 0
try:
a = inctest.A()
except:
print "didn't find A"
print "therefore, I didn't include 'testdir/subdir1/hello.i'"
error = 1
pass
try:
b = inctest.B()
except:
print "didn't find B"
print "therefore, I didn't include 'test... | print "import test 1 failed"
raise RuntimeError |
<|file_name|>inctest_runme.py<|end_file_name|><|fim▁begin|>import inctest
error = 0
try:
a = inctest.A()
except:
print "didn't find A"
print "therefore, I didn't include 'testdir/subdir1/hello.i'"
error = 1
pass
try:
b = inctest.B()
except:
print "didn't find B"
print "therefore, I didn't include 'test... | print "import test 2 failed"
raise RuntimeError |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys<|fim▁hole|>sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unitte... | |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | ''' Tests with numbered degrees of bad or good data, on a scale of 0=baddest to 10=goodest '''
def setUp(self):
self.time = Time.check_time("")
# A string
def test_vbad0(self):
self.time = Time.check_time("iutoeht")
correct_time = time(00, 00, 00)
self.assertEqual( correct_time, self.time)
... |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("") |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("iutoeht")
correct_time = time(00, 00, 00)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("52304")
correct_time = time(00, 00, 00)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("70 80")
correct_time = time(23, 59, 00)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("03 - 32/74")
correct_time = time(3, 32, 59)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("03:32:50")
correct_time = time(3, 32, 50)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = Time.check_time("3:35pm")
correct_time = time(15, 35, 00)
self.assertEqual( correct_time, self.time) |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | self.time = ""
correct_time = "" |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | unittest.main() |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | setUp |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_vbad0 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_bad1 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_bad2 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_middle3 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_good4 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | test_vgood5 |
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.3
import unittest
import sys
sys.path.append("/home/hazel/Documents/new_linux_paradise/paradise_office_site/sandbox_v1.0/cygnet_maker/cy_data_validation")
from datetime import time
from time_conv import Time
class TimeTestCase(unittest.TestCase... | tearDown |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | def configure(conf): |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
<|... | opt.load('hwaf-base', tooldir=_heptooldir)
opt.add_option(
'--with-cmake',
default=None,
help="Look for CMake at the given path")
return |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | conf.load('hwaf-base', tooldir=_heptooldir)
return |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | if not ctx.env.HWAF_FOUND_C_COMPILER:
ctx.fatal('load a C compiler first')
pass
if not ctx.env.HWAF_FOUND_CXX_COMPILER:
ctx.fatal('load a C++ compiler first')
pass
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
if getattr(ctx.options, 'with_cmake', None)... |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | ctx.fatal('load a C compiler first')
pass |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | ctx.fatal('load a C++ compiler first')
pass |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | topdir = ctx.options.with_cmake
topdir = ctx.hwaf_subst_vars(topdir)
path_list.append(osp.join(topdir, "bin"))
pass |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | version=l[l.find("version")+len("version"):].strip()
break |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def <|fim_middle|>(opt):
... | options |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | configure |
<|file_name|>find_cmake.py<|end_file_name|><|fim▁begin|># -*- python -*-
# stdlib imports ---
import os
import os.path as osp
import textwrap
# waf imports ---
import waflib.Utils
import waflib.Logs as msg
from waflib.Configure import conf
#
_heptooldir = osp.dirname(osp.abspath(__file__))
def options(opt):
op... | find_cmake |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from keras import backend as K
class Config:
def __init__(self):
self.verbose = True
self.network = 'resnet50'
# setting for data augmentation
self.use_horizontal_flips = True
self.use_vertical_flips = True
self.rot_90 = True
# anchor box scales
... | |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from keras import backend as K
class Config:
<|fim_middle|>
<|fim▁end|> | def __init__(self):
self.verbose = True
self.network = 'resnet50'
# setting for data augmentation
self.use_horizontal_flips = True
self.use_vertical_flips = True
self.rot_90 = True
# anchor box scales
self.anchor_box_scales = [1, 2, 4, 8, 16, 32, 64, 124, 256, 512]
# anchor box ratios
self.anc... |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from keras import backend as K
class Config:
def __init__(self):
<|fim_middle|>
<|fim▁end|> | self.verbose = True
self.network = 'resnet50'
# setting for data augmentation
self.use_horizontal_flips = True
self.use_vertical_flips = True
self.rot_90 = True
# anchor box scales
self.anchor_box_scales = [1, 2, 4, 8, 16, 32, 64, 124, 256, 512]
# anchor box ratios
self.anchor_box_ratios = [[1, ... |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from keras import backend as K
class Config:
def <|fim_middle|>(self):
self.verbose = True
self.network = 'resnet50'
# setting for data augmentation
self.use_horizontal_flips = True
self.use_vertical_flips = True
self.rot_90 = True
# anchor box s... | __init__ |
<|file_name|>get_account_urls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from keyring import get_password
from boto.iam.connection import IAMConnection
import lib.LoadBotoConfig as BotoConfig<|fim▁hole|>
from sys import exit
envs = ['dev', 'qa', 'staging', 'demo', 'prod']
for env in envs:
id = BotoConfi... | |
<|file_name|>test_skip_checkpoint_abort_transaction.py<|end_file_name|><|fim▁begin|>"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this f... | > psql template1 -c 'create table test(a int);'
5. connect in utility mode to master and create table, insert rows into table and truncate table |
<|file_name|>test_skip_checkpoint_abort_transaction.py<|end_file_name|><|fim▁begin|>"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this f... | def test_skip_checkpoint_abort_transaction(self):
"""
@description FATAL failure execution handles already committed transactions properly
@created 2013-04-19 00:00:00
@modified 2013-04-19 00:00:00
@tags transaction checkpoint MPP-17817 MPP-17925 MPP-17926 MPP-17927 ... |
<|file_name|>test_skip_checkpoint_abort_transaction.py<|end_file_name|><|fim▁begin|>"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this f... | """
@description FATAL failure execution handles already committed transactions properly
@created 2013-04-19 00:00:00
@modified 2013-04-19 00:00:00
@tags transaction checkpoint MPP-17817 MPP-17925 MPP-17926 MPP-17927 MPP-17928 schedule_transaction
@product_versio... |
<|file_name|>test_skip_checkpoint_abort_transaction.py<|end_file_name|><|fim▁begin|>"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this f... | test_skip_checkpoint_abort_transaction |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | meta={'grants':grants})
|
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
<|fim_middle|>
<|fim▁end|> | name = "grants"
allowed_domains = ["www.knightfoundation.org"]
pages = 1
base_url = 'http://www.knightfoundation.org'
start_url_str = 'http://www.knightfoundation.org/grants/?sort=title&page=%s'
def __init__(self, pages=None, *args, **kwargs):
super(GrantsSpider, self).__init__(*args,... |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | super(GrantsSpider, self).__init__(*args, **kwargs)
if pages is not None:
self.pages = pages
self.start_urls = [ self.start_url_str % str(page) for page in xrange(1,int(self.pages)+1)] |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | hxs = Selector(response)
projects = hxs.xpath('//article')
for project in projects:
time.sleep(2)
project_url = self.base_url + ''.join(project.xpath('a/@href').extract())
grants = KgrantsItem()
grants['page'] = project_url
grants['pro... |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | hxs = Selector(response)
grants = response.meta['grants']
details = hxs.xpath('//section[@id="grant_info"]')
fields = hxs.xpath('//dt')
values = hxs.xpath('//dd')
self.log('field: <%s>' % fields.extract())
for item in details:
grants['fiscal_agent'] =... |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | self.pages = pages
self.start_urls = [ self.start_url_str % str(page) for page in xrange(1,int(self.pages)+1)] |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | grants[normalized_field] = values.xpath('a/text()').extract()[1] |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | grants[normalized_field] = values.xpath('a/text()').extract()[0] |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | grant_period = grants['grant_period'].split(' to ')
grants['grant_period_start'] = grant_period[0]
grants['grant_period_end'] = grant_period[1] |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | __init__ |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | parse |
<|file_name|>grants.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from kgrants.items import KgrantsItem
from scrapy.http import Request
import time
class GrantsSpider(Spider):
name = "grants"
allowed_domains = ["www.knightfoundat... | parse_project |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from paste.models import Paste, Language
@csrf_exempt
def add(request):
print "jojo"
<|fim▁hole|> if request.method == 'POST':
... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from paste.models import Paste, Language
@csrf_exempt
def add(request):
<|fim_middle|>
<|fim▁end|> | print "jojo"
if request.method == 'POST':
language = request.POST['language']
content = request.POST['content']
try:
lang = Language.objects.get(pk=language)
except:
print "lang not avalible", language
lang = Language.objects.get(pk='txt'... |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from paste.models import Paste, Language
@csrf_exempt
def add(request):
print "jojo"
if request.method == 'POST':
... | language = request.POST['language']
content = request.POST['content']
try:
lang = Language.objects.get(pk=language)
except:
print "lang not avalible", language
lang = Language.objects.get(pk='txt')
paste = Paste(content=content, language=l... |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from paste.models import Paste, Language
@csrf_exempt
def add(request):
print "jojo"
if request.method == 'POST':
lang... | return redirect('/api') |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from paste.models import Paste, Language
@csrf_exempt
def <|fim_middle|>(request):
print "jojo"
if request.method == 'POST':
... | add |
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk
import gourmet.gtk_extras.dialog_extras as de
from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin
from .recipe_emailer import RecipeEmailer
from gettext import gettext as _
class EmailRecipePlugin (MainP... | self.rg = self.pluggable = pluggable |
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk
import gourmet.gtk_extras.dialog_extras as de
from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin
from .recipe_emailer import RecipeEmailer
from gettext import gettext as _
class EmailRecipePlugin (MainP... | ui_string = '''
<menubar name="RecipeIndexMenuBar">
<menu name="Tools" action="Tools">
<placeholder name="StandaloneTool">
<menuitem action="EmailRecipes"/>
</placeholder>
</menu>
</menubar>
'''
def setup_action_groups (self):
self.actionGroup = Gtk.Action... |
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk
import gourmet.gtk_extras.dialog_extras as de
from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin
from .recipe_emailer import RecipeEmailer
from gettext import gettext as _
class EmailRecipePlugin (MainP... | self.actionGroup = Gtk.ActionGroup(name='RecipeEmailerActionGroup')
self.actionGroup.add_actions([
('EmailRecipes',None,_('Email recipes'),
None,_('Email all selected recipes (or all recipes if no recipes are selected'),self.email_selected),
])
se... |
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk
import gourmet.gtk_extras.dialog_extras as de
from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin
from .recipe_emailer import RecipeEmailer
from gettext import gettext as _
class EmailRecipePlugin (MainP... | self.rg = self.pluggable = pluggable
self.add_to_uimanager(pluggable.ui_manager) |
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk
import gourmet.gtk_extras.dialog_extras as de
from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin
from .recipe_emailer import RecipeEmailer
from gettext import gettext as _
class EmailRecipePlugin (MainP... | recs = self.rg.get_selected_recs_from_rec_tree()
if not recs:
recs = self.rd.fetch_all(self.rd.recipe_table, deleted=False, sort_by=[('title',1)])
return recs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.