commit stringlengths 40 40 | old_file stringlengths 4 118 | new_file stringlengths 4 118 | old_contents stringlengths 0 2.94k | new_contents stringlengths 1 4.43k | subject stringlengths 15 444 | message stringlengths 16 3.45k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 5 43.2k | prompt stringlengths 17 4.58k | response stringlengths 1 4.43k | prompt_tagged stringlengths 58 4.62k | response_tagged stringlengths 1 4.43k | text stringlengths 132 7.29k | text_tagged stringlengths 173 7.33k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
850e04a7cf045c11fcc0aef04e37268a0d8e20c6 | src/container.py | src/container.py | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | Replace / with - in image domain names | Replace / with - in image domain names
| Python | mit | regiontog/macvlan-ipvs-dr,regiontog/macvlan-ipvs-dr | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | <commit_before>from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name ... | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name = image.tags[0]... | <commit_before>from dock import client
def fmt(container):
image, name = ns(container)
return '[{image}/{name}]'.format(image=image, name=name)
def ns(container):
image_name = container.attrs['Image']
image = client.images.get(image_name)
if len(image.tags) > 0:
image_name ... |
a6e87690e6bc9a22ec21874ef2c821f3a2855212 | gtrutils.py | gtrutils.py | """ Utility functions for GTR.
"""
def _get_card_from_zone(self, card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card... | """ Utility functions for GTR.
"""
def _get_card_from_zone(card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card {0!s}... | Remove self argument from _get_card_from_zone | Remove self argument from _get_card_from_zone
| Python | mit | mhmurray/cloaca,mhmurray/cloaca,mhmurray/cloaca,mhmurray/cloaca | """ Utility functions for GTR.
"""
def _get_card_from_zone(self, card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card... | """ Utility functions for GTR.
"""
def _get_card_from_zone(card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card {0!s}... | <commit_before>""" Utility functions for GTR.
"""
def _get_card_from_zone(self, card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
pri... | """ Utility functions for GTR.
"""
def _get_card_from_zone(card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card {0!s}... | """ Utility functions for GTR.
"""
def _get_card_from_zone(self, card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
print 'Error! card... | <commit_before>""" Utility functions for GTR.
"""
def _get_card_from_zone(self, card, l):
""" Wrapper around the possible exception caused by trying to
find a non-existent card in a list. Prints an error and
re-raises the exception.
"""
try:
return l.pop(l.index(card))
except ValueError as e:
pri... |
95d86b30d8c5d922bc7ba17d50e5f83eae086e88 | __init__.py | __init__.py | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | Check that each module is valid before trying to import. | Check that each module is valid before trying to import.
| Python | mit | embaldridge/retriever,bendmorris/retriever,embaldridge/retriever,goelakash/retriever,henrykironde/deletedret,goelakash/retriever,davharris/retriever,davharris/retriever,embaldridge/retriever,henrykironde/deletedret,davharris/retriever,bendmorris/retriever,bendmorris/retriever | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | <commit_before>"""Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scr... | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | """Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scripts from scrip... | <commit_before>"""Database Toolkit
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
import imp
VERSION = '0.4.1'
REPOSITORY = 'http://www.ecologicaldata.org/dbtk/'
def MODULE_LIST():
"""Load scr... |
6606467733d9bb6a5c59e9fb72946303cb0b8693 | src/foremast/dns/__main__.py | src/foremast/dns/__main__.py | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | Use better help for --elb-subnet | fix: Use better help for --elb-subnet
See also: PSOBAT-1359
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | <commit_before>"""Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argpa... | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | """Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argparse.ArgumentPar... | <commit_before>"""Create DNS record."""
import argparse
import logging
from ..args import add_debug
from ..consts import LOGGING_FORMAT
from .create_dns import SpinnakerDns
def main():
"""Run newer stuffs."""
logging.basicConfig(format=LOGGING_FORMAT)
log = logging.getLogger(__name__)
parser = argpa... |
c4bc4b37b991f428ecfc730d7f8030d8ea52050c | src/protocol/caldav/definitions/csxml.py | src/protocol/caldav/definitions/csxml.py | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Define the pushkey attribute for XMPP push | Define the pushkey attribute for XMPP push
git-svn-id: b8a2ed21f1aafe1ee9fc65e616c668cc51cd004a@7731 e27351fd-9f3e-4f54-a53b-843176b1656c
| Python | apache-2.0 | skarra/CalDAVClientLibrary,skarra/CalDAVClientLibrary | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | <commit_before>##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | <commit_before>##
# Copyright (c) 2007-2009 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
a4656e18539950c0de0aea08eadf88f841ef24ea | scripts/get_bump_version.py | scripts/get_bump_version.py | from __future__ import print_function
import subprocess
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
versio... | from __future__ import print_function
import subprocess
import sys
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
... | Make sure sys is available for sys.exit() call on failure | Make sure sys is available for sys.exit() call on failure
| Python | bsd-3-clause | dennisobrien/bokeh,stuart-knock/bokeh,mutirri/bokeh,canavandl/bokeh,daodaoliang/bokeh,abele/bokeh,jakirkham/bokeh,stonebig/bokeh,abele/bokeh,philippjfr/bokeh,rs2/bokeh,rs2/bokeh,aavanian/bokeh,birdsarah/bokeh,srinathv/bokeh,bokeh/bokeh,PythonCharmers/bokeh,paultcochrane/bokeh,gpfreitas/bokeh,draperjames/bokeh,Karel-van... | from __future__ import print_function
import subprocess
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
versio... | from __future__ import print_function
import subprocess
import sys
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
... | <commit_before>from __future__ import print_function
import subprocess
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit... | from __future__ import print_function
import subprocess
import sys
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
... | from __future__ import print_function
import subprocess
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit(1)
versio... | <commit_before>from __future__ import print_function
import subprocess
def get_version_from_git():
cmd = ["git", "describe", "--tags", "--always"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
code = proc.wait()
if code != 0:
print("Failed to run: %s" % " ".join(cmd))
sys.exit... |
5000ed8fa0426a7968a0db4a89d221ef800a2da7 | wordsegmenterTC/__init__.py | wordsegmenterTC/__init__.py | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | Fix str index of range in some case | Fix str index of range in some case
| Python | mit | tchayintr/wordsegmenterTC | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | <commit_before>import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setT... | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setText(text)
... | <commit_before>import PyICU
SEPARATER = " "
class Segmenter:
def isThai(self, chr):
cVal = ord(chr)
if (cVal >= 3584 and cVal <= 3711):
return True
return False
def segment(self, text):
bd = PyICU.BreakIterator.createWordInstance(PyICU.Locale("th"))
bd.setT... |
81ddb6a5242db63bc7e5cf10f0419d339404cec3 | DebianChangesBot/formatters/upload_accepted.py | DebianChangesBot/formatters/upload_accepted.py |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... | Fix additional fullstop on accepted upload formatter | Fix additional fullstop on accepted upload formatter
Signed-off-by: Chris Lamb <[email protected]>
| Python | agpl-3.0 | lamby/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,xtaran/debian-devel-changes-bot |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... | <commit_before>
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueu... |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... |
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueue().is_new(self... | <commit_before>
from DebianChangesBot import Formatter
from DebianChangesBot.datasources import NewQueue
class UploadAcceptedFormatter(Formatter):
FIELDS = ('package', 'version', 'distribution', 'urgency', 'by')
OPTIONAL = ('closes',)
def format(self):
msg = "[green]%s[reset] "
if NewQueu... |
12327b28697e3d27a6f92863091a84d9b56c0eec | openrcv/test/test_datagen.py | openrcv/test/test_datagen.py |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... | Add more datagen test cases. | Add more datagen test cases.
| Python | mit | cjerdonek/open-rcv,cjerdonek/open-rcv |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... | <commit_before>
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except ... |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... |
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except StopIteration: ... | <commit_before>
from unittest import TestCase
from unittest.mock import patch
from openrcv.datagen import gen_random_list
class ModuleTest(TestCase):
def make_randint(self, values):
values = iter(values)
def randint(*args):
try:
return next(values)
except ... |
cb78ebc617c5ac8370321a10bd7f6ee418a77b7e | grade-school/grade_school.py | grade-school/grade_school.py | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
def __init__(s... | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
students = {}
... | Add student name and grade | Add student name and grade
| Python | mit | amalshehu/exercism-python | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
def __init__(s... | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
students = {}
... | <commit_before># File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
... | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
students = {}
... | # File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
def __init__(s... | <commit_before># File: grade_school.py
# Purpose: Write a small archiving program that stores students' names along with the grade that they are in.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 12th September 2016, 11:00 PM
class School(object):
"""docstring for School."""
... |
3389c6208a86d4ec7ba9594e6f0f57f082d81882 | gitfs/views/history_index.py | gitfs/views/history_index.py | from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structure of
s... |
from datetime import datetime
from errno import ENOENT
from stat import S_IFDIR
from pygit2 import GIT_SORT_TIME
from .view import View
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dict... | Update HistoryIndeView - listdir is working. | Update HistoryIndeView - listdir is working.
| Python | apache-2.0 | PressLabs/gitfs,rowhit/gitfs,bussiere/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs | from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structure of
s... |
from datetime import datetime
from errno import ENOENT
from stat import S_IFDIR
from pygit2 import GIT_SORT_TIME
from .view import View
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dict... | <commit_before>from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structu... |
from datetime import datetime
from errno import ENOENT
from stat import S_IFDIR
from pygit2 import GIT_SORT_TIME
from .view import View
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dict... | from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structure of
s... | <commit_before>from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structu... |
5150c61929271167556e1e337de1db573a5719ea | tests/unittests/framework_file_server_tests.py | tests/unittests/framework_file_server_tests.py | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | Add test that db.insert is called when add is called | Add test that db.insert is called when add is called
| Python | agpl-3.0 | localprojects/Change-By-Us,watchcat/cbu-rotterdam,localprojects/Change-By-Us,codeforamerica/Change-By-Us,localprojects/Change-By-Us,codeforamerica/Change-By-Us,watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,codeforeu... | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | <commit_before>from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_va... | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_value=None)
... | <commit_before>from unittest import TestCase
from lib import web
from mock import Mock
import main
import framework.file_server as file_server
class BaseFileServerTests (TestCase):
def test_AddShouldReturnNoneIfDbInsertionFails(self):
fs = file_server.FileServer()
fs._addDbRecord = Mock(return_va... |
f849961e75dc956d669813fddb5b13627b224e1e | pyang/plugins/name.py | pyang/plugins/name.py | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | Use i_latest_revision to ensure we get the latest revision. | Use i_latest_revision to ensure we get the latest revision.
| Python | isc | mbj4668/pyang,mbj4668/pyang | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | <commit_before>"""Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, o... | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | """Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, optparser):
... | <commit_before>"""Name output plugin
"""
import optparse
from pyang import plugin
def pyang_plugin_init():
plugin.register_plugin(NamePlugin())
class NamePlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
self.multiple_modules = True
fmts['name'] = self
def add_opts(self, o... |
2a0dafb41a0e033f58848fd8e325b96466b924b5 | gamecraft/wsgi.py | gamecraft/wsgi.py | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings")
from django.co... | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings_docker")
from dj... | Tweak WSGI module to use docker settings | Tweak WSGI module to use docker settings
| Python | mit | micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings")
from django.co... | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings_docker")
from dj... | <commit_before>"""
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings")
... | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings_docker")
from dj... | """
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings")
from django.co... | <commit_before>"""
WSGI config for gamecraft project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gamecraft.settings")
... |
8707b835d34380f737e7954c7bac527c916b2a7c | tests/test_special_features.py | tests/test_special_features.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
def test_sphinx_keywords(self):
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
self.addTypeEqualityFunc(str,self.... | Test ignoring duplicates and order | Test ignoring duplicates and order
| Python | bsd-3-clause | arvindch/speech_recognition,arvindch/speech_recognition,Uberi/speech_recognition,Uberi/speech_recognition | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
def test_sphinx_keywords(self):
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
self.addTypeEqualityFunc(str,self.... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
def test_sphinx_keywor... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
self.addTypeEqualityFunc(str,self.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
def test_sphinx_keywords(self):
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import speech_recognition as sr
class TestSpecialFeatures(unittest.TestCase):
def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
def test_sphinx_keywor... |
6f128279e8f4126c2d0f1a4076b93768678cdc0a | zerver/migrations/0130_text_choice_in_emojiset.py | zerver/migrations/0130_text_choice_in_emojiset.py | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | Add reverser for emoji_alt_code migration. | migrations: Add reverser for emoji_alt_code migration.
This is easy to do, and prevents this feature from getting a server
admin stuck in potentially a pretty uncomfortable way -- unable to
roll back a deploy.
| Python | apache-2.0 | tommyip/zulip,eeshangarg/zulip,rht/zulip,jackrzhang/zulip,brainwane/zulip,andersk/zulip,shubhamdhama/zulip,shubhamdhama/zulip,punchagan/zulip,kou/zulip,hackerkid/zulip,timabbott/zulip,showell/zulip,hackerkid/zulip,eeshangarg/zulip,dhcrzf/zulip,andersk/zulip,shubhamdhama/zulip,punchagan/zulip,kou/zulip,synicalsyntax/zul... | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | <commit_before>from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:... | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfil... | <commit_before>from django.db import migrations, models
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
# change emojiset to text if emoji_alt_code is true.
def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:... |
c2b950c043f452a473ed5c726faa540c0118b0f5 | cs251tk/toolkit/process_student.py | cs251tk/toolkit/process_student.py | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | Remove extra whitespace in newline | Remove extra whitespace in newline
| Python | mit | StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | <commit_before>from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_... | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_student(
st... | <commit_before>from cs251tk.student import remove
from cs251tk.student import clone_student
from cs251tk.student import stash
from cs251tk.student import pull
from cs251tk.student import checkout_date
from cs251tk.student import record
from cs251tk.student import reset
from cs251tk.student import analyze
def process_... |
d86701d87e40532197d73b826f076ffa7003003e | linspace.py | linspace.py | def linspace(start, stop, num):
return [(stop*i + start*(num-i)) / num
for i in range(num+1)]
| #!/usr/bin/env python3
import collections
import collections.abc
class linspace(collections.abc.Sequence):
def __init__(self, start, stop, num):
self.start, self.stop, self.num = start, stop, num
def __len__(self):
return self.num
def __getitem__(self, i):
if i >= self.num:
... | Fix off-by-one error, make it lazy | Fix off-by-one error, make it lazy
| Python | mit | abarnert/linspace | def linspace(start, stop, num):
return [(stop*i + start*(num-i)) / num
for i in range(num+1)]
Fix off-by-one error, make it lazy | #!/usr/bin/env python3
import collections
import collections.abc
class linspace(collections.abc.Sequence):
def __init__(self, start, stop, num):
self.start, self.stop, self.num = start, stop, num
def __len__(self):
return self.num
def __getitem__(self, i):
if i >= self.num:
... | <commit_before>def linspace(start, stop, num):
return [(stop*i + start*(num-i)) / num
for i in range(num+1)]
<commit_msg>Fix off-by-one error, make it lazy<commit_after> | #!/usr/bin/env python3
import collections
import collections.abc
class linspace(collections.abc.Sequence):
def __init__(self, start, stop, num):
self.start, self.stop, self.num = start, stop, num
def __len__(self):
return self.num
def __getitem__(self, i):
if i >= self.num:
... | def linspace(start, stop, num):
return [(stop*i + start*(num-i)) / num
for i in range(num+1)]
Fix off-by-one error, make it lazy#!/usr/bin/env python3
import collections
import collections.abc
class linspace(collections.abc.Sequence):
def __init__(self, start, stop, num):
self.start, self.... | <commit_before>def linspace(start, stop, num):
return [(stop*i + start*(num-i)) / num
for i in range(num+1)]
<commit_msg>Fix off-by-one error, make it lazy<commit_after>#!/usr/bin/env python3
import collections
import collections.abc
class linspace(collections.abc.Sequence):
def __init__(self, sta... |
df34d72695b14ca7ee0cb6c8b6855e2263b13b38 | test_settings.py | test_settings.py | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | Remove cms dependency in test-runner | Remove cms dependency in test-runner
| Python | bsd-3-clause | aldryn/aldryn-categories,aldryn/aldryn-categories | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | <commit_before>HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
... | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
1: (
... | <commit_before>HELPER_SETTINGS = {
'SITE_ID': 1,
'TIME_ZONE': 'Europe/Zurich',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'INSTALLED_APPS': [
'parler',
'treebeard',
'aldryn_categories',
],
'PARLER_LANGUAGES': {
... |
6f6c743a03d8162abca9e5406e5e6c2e51f77052 | users/views.py | users/views.py | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
class UserDetail(DetailView):
model = User
... | # -*- coding: utf-8 -*-
from django.shortcuts import redirect, render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
from users.models import Users
class Use... | Fix redirect after success registration | Fix redirect after success registration
| Python | mit | sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/Rynda | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
class UserDetail(DetailView):
model = User
... | # -*- coding: utf-8 -*-
from django.shortcuts import redirect, render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
from users.models import Users
class Use... | <commit_before># -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
class UserDetail(DetailView):
... | # -*- coding: utf-8 -*-
from django.shortcuts import redirect, render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
from users.models import Users
class Use... | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
class UserDetail(DetailView):
model = User
... | <commit_before># -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from core.views import RyndaFormView, RyndaListView
from users.forms import SimpleRegistrationForm
class UserDetail(DetailView):
... |
0e4bcae9b409d18a2b2f818833b0e03762332a80 | example/example/spiders/custom_kafka_spider.py | example/example/spiders/custom_kafka_spider.py | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import KafkaSpider
from example.items import DmozItem
class CustomKafkaSpider(KafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem()
... | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import ListeningKafkaSpider
from ..items import DmozItem
class CustomKafkaSpider(ListeningKafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem... | Use the correct Spider superclass in the example | Use the correct Spider superclass in the example
| Python | apache-2.0 | dfdeshom/scrapy-kafka | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import KafkaSpider
from example.items import DmozItem
class CustomKafkaSpider(KafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem()
... | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import ListeningKafkaSpider
from ..items import DmozItem
class CustomKafkaSpider(ListeningKafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem... | <commit_before># -*- coding: utf-8 -*-
from scrapy_kafka.spiders import KafkaSpider
from example.items import DmozItem
class CustomKafkaSpider(KafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozI... | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import ListeningKafkaSpider
from ..items import DmozItem
class CustomKafkaSpider(ListeningKafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem... | # -*- coding: utf-8 -*-
from scrapy_kafka.spiders import KafkaSpider
from example.items import DmozItem
class CustomKafkaSpider(KafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozItem()
... | <commit_before># -*- coding: utf-8 -*-
from scrapy_kafka.spiders import KafkaSpider
from example.items import DmozItem
class CustomKafkaSpider(KafkaSpider):
name = "dmoz_kafka"
allowed_domains = ["dmoz.org"]
def parse(self, response):
for sel in response.xpath('//ul/li'):
item = DmozI... |
1cf82c6efa0550c5a0ba7160f82f77db6e3358ec | panoptes/test/test_mount.py | panoptes/test/test_mount.py | from panoptes.mount.ioptron import iOptronMount
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
print ... | import os
import importlib
import warnings
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
mount_dir =... | Test file loops over all the mounts | Test file loops over all the mounts
| Python | mit | AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,fmin2958/POCS,joshwalawender/POCS,AstroHuntsman/POCS,panoptes/POCS,fmin2958/POCS,Guokr1991/POCS,panoptes/POCS,Guokr1991/POCS,joshwalawender/POCS,Guokr1991/POCS,Guokr1991/POCS,panoptes/POCS,AstroHuntsman/POCS,joshwalawender/POCS,fmin2958/POCS | from panoptes.mount.ioptron import iOptronMount
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
print ... | import os
import importlib
import warnings
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
mount_dir =... | <commit_before>from panoptes.mount.ioptron import iOptronMount
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):... | import os
import importlib
import warnings
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
mount_dir =... | from panoptes.mount.ioptron import iOptronMount
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):
print ... | <commit_before>from panoptes.mount.ioptron import iOptronMount
class TestOptronMount:
mount = None
def setup(self):
print ("TestMount:setup() before each test method")
def teardown(self):
print ("TestMount:teardown() after each test method")
@classmethod
def setup_class(cls):... |
9ed49cee1ce669547f6d0278af00c3ad246fec78 | migrations/versions/201608181200_11890f58b1df_add_tracks.py | migrations/versions/201608181200_11890f58b1df_add_tracks.py | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | Fix incorrect indexes in alembic revision | Fix incorrect indexes in alembic revision
| Python | mit | ThiefMaster/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,ThiefMaster/indico,mvidalgarcia/indico,indico/indico,OmeGak/indico,mic4ael/indico,OmeGak/indico,mvidalgarcia/indico,DirkHoffmann/indico,mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,OmeGak/ind... | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | <commit_before>"""Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tra... | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | """Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tracks',
s... | <commit_before>"""Add tracks
Revision ID: 11890f58b1df
Revises: 4d4b95748173
Create Date: 2016-08-16 16:48:27.441514
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '11890f58b1df'
down_revision = '4d4b95748173'
def upgrade():
op.create_table(
'tra... |
9ab879af48e46fae2279402ac9cb242f173f037c | javascript_settings/views.py | javascript_settings/views.py | from django.http import HttpResponse
from django.utils import simplejson
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % simplejson.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
... | import json
from django.http import HttpResponse
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % json.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
)
)
| Use json instead of django.utils.simplejson. | Use json instead of django.utils.simplejson. | Python | mit | pozytywnie/django-javascript-settings | from django.http import HttpResponse
from django.utils import simplejson
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % simplejson.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
... | import json
from django.http import HttpResponse
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % json.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
)
)
| <commit_before>from django.http import HttpResponse
from django.utils import simplejson
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % simplejson.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configu... | import json
from django.http import HttpResponse
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % json.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
)
)
| from django.http import HttpResponse
from django.utils import simplejson
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % simplejson.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configuration()
... | <commit_before>from django.http import HttpResponse
from django.utils import simplejson
from configuration_builder import DEFAULT_CONFIGURATION_BUILDER
def load_configuration(request):
return HttpResponse(
"var configuration = %s;" % simplejson.dumps(
DEFAULT_CONFIGURATION_BUILDER.get_configu... |
d6bfe797254823f0be8b00b657061cbfe7d3da15 | wafer/utils.py | wafer/utils.py | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | Clear queries list instead of overwriting it. | Clear queries list instead of overwriting it.
| Python | isc | CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | <commit_before>import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | <commit_before>import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore... |
ad8b8d6db5e81884ff5e3270455c714024cccbc1 | Tools/scripts/findlinksto.py | Tools/scripts/findlinksto.py | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import regex
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.error, 'not enough arguments'
except ge... | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import re
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.GetoptError('not enough arguments', None)
... | Use new name for GetoptError, and pass it two arguments Use re module instead of regex | Use new name for GetoptError, and pass it two arguments
Use re module instead of regex
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import regex
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.error, 'not enough arguments'
except ge... | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import re
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.GetoptError('not enough arguments', None)
... | <commit_before>#! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import regex
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.error, 'not enough arguments... | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import re
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.GetoptError('not enough arguments', None)
... | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import regex
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.error, 'not enough arguments'
except ge... | <commit_before>#! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import regex
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.error, 'not enough arguments... |
678594fb68845d3aec80c935fc0cd0fe89ce26b5 | shakedown/dcos/service.py | shakedown/dcos/service.py | from dcos import (marathon, mesos, package, util)
from dcos.errors import DCOSException
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
... | from dcos import mesos
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
return service
return None
def get_service_framework_... | Return None or Empty List | Return None or Empty List
Return None when an object cannot be found or an empty list when a list
type is expected.
| Python | apache-2.0 | dcos/shakedown | from dcos import (marathon, mesos, package, util)
from dcos.errors import DCOSException
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
... | from dcos import mesos
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
return service
return None
def get_service_framework_... | <commit_before>from dcos import (marathon, mesos, package, util)
from dcos.errors import DCOSException
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == servic... | from dcos import mesos
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
return service
return None
def get_service_framework_... | from dcos import (marathon, mesos, package, util)
from dcos.errors import DCOSException
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == service_name:
... | <commit_before>from dcos import (marathon, mesos, package, util)
from dcos.errors import DCOSException
def get_service(service_name, inactive=False, completed=False):
services = mesos.get_master().frameworks(inactive=inactive, completed=completed)
for service in services:
if service['name'] == servic... |
652853221ce9eca84ebbe568fa0c1985915dad59 | scratch/asb/print_refquad_input.py | scratch/asb/print_refquad_input.py | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "integrated" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_integrated.pickle") + "_refined_experiments.json")
print " reflec... | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "indexed" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_indexed.pickle") + "_refined_experiments.json")
print " reflections ... | Use indexed instead of integrated pickle files for detector refinement. | Use indexed instead of integrated pickle files for detector refinement.
| Python | bsd-3-clause | dials/dials,dials/dials,dials/dials,dials/dials,dials/dials | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "integrated" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_integrated.pickle") + "_refined_experiments.json")
print " reflec... | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "indexed" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_indexed.pickle") + "_refined_experiments.json")
print " reflections ... | <commit_before>from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "integrated" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_integrated.pickle") + "_refined_experiments.json")
... | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "indexed" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_indexed.pickle") + "_refined_experiments.json")
print " reflections ... | from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "integrated" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_integrated.pickle") + "_refined_experiments.json")
print " reflec... | <commit_before>from __future__ import division
import os, sys
paths = sys.argv[1:]
for path in paths:
for filename in os.listdir(path):
if "integrated" in filename:
print "input {"
print " experiments =", os.path.join(path, filename.rstrip("_integrated.pickle") + "_refined_experiments.json")
... |
34aa4a19ac1fc7ff52ea0d9ac13df944f1e9754d | src/tn/plonebehavior/template/html_page_html.py | src/tn/plonebehavior/template/html_page_html.py | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(grok.Adapter):
... | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import _
from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import inter... | Add a validation to ensure that CSS selector actually works | Add a validation to ensure that CSS selector actually works
| Python | bsd-3-clause | tecnologiaenegocios/tn.plonebehavior.template,tecnologiaenegocios/tn.plonebehavior.template | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(grok.Adapter):
... | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import _
from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import inter... | <commit_before>try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(g... | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import _
from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import inter... | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(grok.Adapter):
... | <commit_before>try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(g... |
fa977ddff460dc763448835701b4858934498ffb | img_pipe/archival_data/single_channel_clean.py | img_pipe/archival_data/single_channel_clean.py |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | Add in largest scale with high pb cutoff | Add in largest scale with high pb cutoff
| Python | mit | e-koch/canfar_scripts,e-koch/canfar_scripts |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | <commit_before>
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | <commit_before>
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
... |
c3c4b52991706036a27eb4cebf33ea8eaad115d2 | enchanting2.py | enchanting2.py | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import pygame
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(fi... | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(filename)
proje... | Fix - was flipping display twice | Fix - was flipping display twice
Gah. Here is a speedup for pygame -- don't flip the display twice.
| Python | agpl-3.0 | clintonblackmore/enchanting2,clintonblackmore/enchanting2 | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import pygame
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(fi... | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(filename)
proje... | <commit_before>"""enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import pygame
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = Eleme... | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(filename)
proje... | """enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import pygame
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = ElementTree.parse(fi... | <commit_before>"""enchanting2.py
This is the main entry point of the system"""
import sys
import xml.etree.cElementTree as ElementTree
import pygame
import actor
import media
def main(argv):
"""This is a naive, blocking, co-operatively multitasking approach"""
filename = argv[1] # xml file to open
tree = Eleme... |
d1d40da564ca82dc58a37893f86acc934bc69cd5 | api/base/content_negotiation.py | api/base/content_negotiation.py | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | Use super because only one superclass | Use super because only one superclass
| Python | apache-2.0 | SSJohns/osf.io,HalcyonChimera/osf.io,haoyuchen1992/osf.io,chennan47/osf.io,chennan47/osf.io,KAsante95/osf.io,laurenrevere/osf.io,njantrania/osf.io,caneruguz/osf.io,adlius/osf.io,GageGaskins/osf.io,brandonPurvis/osf.io,chrisseto/osf.io,zamattiac/osf.io,erinspace/osf.io,haoyuchen1992/osf.io,Johnetordoff/osf.io,baylee-d/o... | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | <commit_before>from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEF... | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEFAULT_RENDERER_C... | <commit_before>from rest_framework.negotiation import DefaultContentNegotiation
class JSONAPIContentNegotiation(DefaultContentNegotiation):
def select_renderer(self, request, renderers, format_suffix=None):
"""
If 'application/json' in acceptable media types, use the first renderer in
DEF... |
10313adc8b5aab9bcc7e21242ef54effc2262a24 | accio/__init__.py | accio/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | Revert msgpack to json content message | Revert msgpack to json content message
| Python | bsd-3-clause | silverfix/django-accio | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTas... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTask)
celery_app.... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from celery import Celery
from accio.basetask import ManagedTask
import django.conf
default_app_config = 'accio.apps.Config'
REDIS_DB_URL = 'redis://127.0.0.1:6379/0'
celery_app = Celery(task_cls=ManagedTas... |
d423668902a87c17e73f3521e58571709c9b9283 | td_biblio/urls.py | td_biblio/urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from .views import EntryListView
urlpatterns = patterns(
'',
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
)
| # -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import EntryListView
urlpatterns = [
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
]
| Switch to django new url schema | Switch to django new url schema
| Python | mit | TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio | # -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from .views import EntryListView
urlpatterns = patterns(
'',
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
)
Switch to django new url schema | # -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import EntryListView
urlpatterns = [
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
]
| <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from .views import EntryListView
urlpatterns = patterns(
'',
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
)
<commit_msg>Switch to django new url schema<commit_after> | # -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import EntryListView
urlpatterns = [
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
]
| # -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from .views import EntryListView
urlpatterns = patterns(
'',
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
)
Switch to django new url schema# -*- coding: utf-8 -*-
from django.conf.urls import url
from .views impor... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from .views import EntryListView
urlpatterns = patterns(
'',
# Entry List
url('^$', EntryListView.as_view(), name='entry_list'),
)
<commit_msg>Switch to django new url schema<commit_after># -*- coding: utf-8 -*-
from djang... |
5f945f5335cd5d989401fe99b0752e98595748c0 | chainer/functions/evaluation/binary_accuracy.py | chainer/functions/evaluation/binary_accuracy.py | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | Use maximum instead of if-statement | Use maximum instead of if-statement
| Python | mit | cupy/cupy,keisuke-umezawa/chainer,benob/chainer,ktnyt/chainer,anaruse/chainer,AlpacaDB/chainer,ktnyt/chainer,rezoo/chainer,niboshi/chainer,ysekky/chainer,jnishi/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,hvy/chainer,chainer/chainer,okuta/chainer,okuta/chainer,wkentaro/chainer,keisuke-umezawa/chainer... | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | <commit_before>import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
... | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.ex... | <commit_before>import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class BinaryAccuracy(function.Function):
ignore_label = -1
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
... |
d6e9b587644d6b6a8c0d1e11407811c9a0576461 | emailfwd/management/commands/export_emailfwd.py | emailfwd/management/commands/export_emailfwd.py | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | Use output_dir, not hard-coded dir name | Use output_dir, not hard-coded dir name
| Python | apache-2.0 | snswa/swsites,snswa/swsites,snswa/swsites | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | <commit_before>from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, ... | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, **options):
... | <commit_before>from __future__ import print_function
import os
import sys
from django.core.management.base import BaseCommand
from emailfwd.models import ForwardedEmailAddress
class Command(BaseCommand):
args = '<output_dir>'
help = 'Export the email forwarding data directory'
def handle(self, *args, ... |
84b48b9be466ac72bddf5ee6288ff48be26eed62 | tests/classifier/RandomForestClassifier/RandomForestClassifierPHPTest.py | tests/classifier/RandomForestClassifier/RandomForestClassifierPHPTest.py | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | Reduce the number of trees | Reduce the number of trees
| Python | bsd-3-clause | nok/sklearn-porter | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | <commit_before># -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomFore... | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | # -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHP... | <commit_before># -*- coding: utf-8 -*-
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomFore... |
94c48d9f61b8f7e462ce5f7013b29ce2399e4190 | log4django/views/__init__.py | log4django/views/__init__.py | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | Add search by request_id field. | Add search by request_id field.
| Python | bsd-3-clause | CodeScaleInc/log4django,CodeScaleInc/log4django,CodeScaleInc/log4django | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | <commit_before>from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_q... | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_qs.filter(
... | <commit_before>from django.db.models import Q
from ..models import LogRecord
def _filter_records(request):
getvars = request.GET
logrecord_qs = LogRecord.objects.all().select_related('app')
# Filtering by get params.
if getvars.get('q'):
q = getvars.get('q')
logrecord_qs = logrecord_q... |
44233af1e6cdc368a866c4a96ee4b1dfa53cc870 | logya/generate.py | logya/generate.py | # -*- coding: utf-8 -*-
import shutil
from pathlib import Path
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
#L.build_index()
if not options.keep:
print('Remove existing public directory.... | # -*- coding: utf-8 -*-
import shutil
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
L.build_index()
if not options.keep:
print('Remove existing public directory.')
shutil.rmtree(L... | Call build_index and use joinpath. | Call build_index and use joinpath.
| Python | mit | elaOnMars/logya,elaOnMars/logya,yaph/logya,elaOnMars/logya,yaph/logya | # -*- coding: utf-8 -*-
import shutil
from pathlib import Path
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
#L.build_index()
if not options.keep:
print('Remove existing public directory.... | # -*- coding: utf-8 -*-
import shutil
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
L.build_index()
if not options.keep:
print('Remove existing public directory.')
shutil.rmtree(L... | <commit_before># -*- coding: utf-8 -*-
import shutil
from pathlib import Path
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
#L.build_index()
if not options.keep:
print('Remove existing pu... | # -*- coding: utf-8 -*-
import shutil
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
L.build_index()
if not options.keep:
print('Remove existing public directory.')
shutil.rmtree(L... | # -*- coding: utf-8 -*-
import shutil
from pathlib import Path
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
#L.build_index()
if not options.keep:
print('Remove existing public directory.... | <commit_before># -*- coding: utf-8 -*-
import shutil
from pathlib import Path
from shutil import copytree
from logya.core import Logya
from logya.content import write_collection, write_page
def generate(options):
L = Logya(options)
#L.build_index()
if not options.keep:
print('Remove existing pu... |
b5bf31eab3fef21872ce44ada1a14aee9c3216d7 | mlab-ns-simulator/mlabsim/tests/test_update.py | mlab-ns-simulator/mlabsim/tests/test_update.py | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
tool_extra = {
'collector_onion': 'testfakenotreal.onion',
}
... | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
fqdn = 'mlab01.ooni-tests.not-real.except-it-actually-could-be.example.com'
tool_... | Update test_render_PUT_valid_parameters to be an approximate first draft. | Update test_render_PUT_valid_parameters to be an approximate first draft.
| Python | apache-2.0 | hellais/ooni-support,m-lab/ooni-support,m-lab/ooni-support,hellais/ooni-support | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
tool_extra = {
'collector_onion': 'testfakenotreal.onion',
}
... | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
fqdn = 'mlab01.ooni-tests.not-real.except-it-actually-could-be.example.com'
tool_... | <commit_before>import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
tool_extra = {
'collector_onion': 'testfakenotreal.onion',
... | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
fqdn = 'mlab01.ooni-tests.not-real.except-it-actually-could-be.example.com'
tool_... | import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
tool_extra = {
'collector_onion': 'testfakenotreal.onion',
}
... | <commit_before>import json
import urllib
from twisted.trial import unittest
import mock
from mlabsim import update
class UpdateResourceTests (unittest.TestCase):
def test_render_PUT_valid_parameters(self):
# Test data:
tool_extra = {
'collector_onion': 'testfakenotreal.onion',
... |
021225cbce30b70c350133f5ae3cae9409bdd6ae | dbaas/dbaas_services/analyzing/admin/analyze.py | dbaas/dbaas_services/analyzing/admin/analyze.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | Add filters to analyzing admin | Add filters to analyzing admin
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmi... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmin):
form = ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django_services import admin
from dbaas_services.analyzing.service import AnalyzeRepositoryService
from dbaas_services.analyzing.forms import AnalyzeRepositoryForm
class AnalyzeRepositoryAdmin(admin.DjangoServicesAdmi... |
0af64c176d162f01e78814cae7b98935c01eee82 | neuroimaging/algorithms/statistics/__init__.py | neuroimaging/algorithms/statistics/__init__.py | """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
def test(level=1, verbosity=1, flags=[]):
from neuroimaging.utils.testutils import set_flags
set_flags(flags)
from neuroimaging.testing import *
return NumpyTest().test(level, verbosity)
| """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
from neuroimaging.testing import Tester
test = Tester().test
bench = Tester().bench
| Fix test funcs in algorithms packaging. | Fix test funcs in algorithms packaging.
| Python | bsd-3-clause | matthew-brett/draft-statsmodels,matthew-brett/draft-statsmodels | """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
def test(level=1, verbosity=1, flags=[]):
from neuroimaging.utils.testutils import set_flags
set_flags(flags)
from neuroimaging.testing import *
return NumpyTest().test(level, verbosity)
Fix test funcs in algorithms packagin... | """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
from neuroimaging.testing import Tester
test = Tester().test
bench = Tester().bench
| <commit_before>"""
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
def test(level=1, verbosity=1, flags=[]):
from neuroimaging.utils.testutils import set_flags
set_flags(flags)
from neuroimaging.testing import *
return NumpyTest().test(level, verbosity)
<commit_msg>Fix test f... | """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
from neuroimaging.testing import Tester
test = Tester().test
bench = Tester().bench
| """
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
def test(level=1, verbosity=1, flags=[]):
from neuroimaging.utils.testutils import set_flags
set_flags(flags)
from neuroimaging.testing import *
return NumpyTest().test(level, verbosity)
Fix test funcs in algorithms packagin... | <commit_before>"""
TODO
"""
__docformat__ = 'restructuredtext'
import intrinsic_volumes, rft
def test(level=1, verbosity=1, flags=[]):
from neuroimaging.utils.testutils import set_flags
set_flags(flags)
from neuroimaging.testing import *
return NumpyTest().test(level, verbosity)
<commit_msg>Fix test f... |
3773132aa24f1b7f9e3eb104274b0960eee12d14 | froide/foirequest/templatetags/foirequest_tags.py | froide/foirequest/templatetags/foirequest_tags.py | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
try:
index = content.index(description)
except... | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
description = description.replace("\r\n", "\n")
try:
... | Replace uni linebreaks with simple linefeeds in order to make highlighting work | Replace uni linebreaks with simple linefeeds in order to make highlighting work | Python | mit | catcosmo/froide,LilithWittmann/froide,stefanw/froide,stefanw/froide,CodeforHawaii/froide,catcosmo/froide,LilithWittmann/froide,okfse/froide,fin/froide,CodeforHawaii/froide,catcosmo/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,okfse/froide,catcosmo/froide,fin/froide,CodeforHawaii/froide,ryankanno/froid... | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
try:
index = content.index(description)
except... | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
description = description.replace("\r\n", "\n")
try:
... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
try:
index = content.index(descript... | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
description = description.replace("\r\n", "\n")
try:
... | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
try:
index = content.index(description)
except... | <commit_before>from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
register = template.Library()
def highlight_request(message):
content = message.get_content()
description = message.request.description
try:
index = content.index(descript... |
4fec805a0a6c04ac16fd4439298a4fa05709c7ea | armstrong/hatband/tests/hatband_support/admin.py | armstrong/hatband/tests/hatband_support/admin.py | from armstrong import hatband
from hatband_support import models
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': Te... | from armstrong import hatband
from . import models
from django.db.models import TextField
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
TextFi... | Fix these class names and imports so it works | Fix these class names and imports so it works
| Python | apache-2.0 | armstrong/armstrong.hatband,texastribune/armstrong.hatband,texastribune/armstrong.hatband,armstrong/armstrong.hatband,armstrong/armstrong.hatband,texastribune/armstrong.hatband | from armstrong import hatband
from hatband_support import models
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': Te... | from armstrong import hatband
from . import models
from django.db.models import TextField
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
TextFi... | <commit_before>from armstrong import hatband
from hatband_support import models
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
models.TextField... | from armstrong import hatband
from . import models
from django.db.models import TextField
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
TextFi... | from armstrong import hatband
from hatband_support import models
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': Te... | <commit_before>from armstrong import hatband
from hatband_support import models
from django.forms.widgets import TextInput
class ArticleAdmin(hatband.ModelAdmin):
class Meta:
model = models.TestArticle
class ArticleOverrideAdmin(hatband.ModelAdmin):
formfield_overrides = {
models.TextField... |
3595bffb71f415999847f323af36737a41ce4b56 | main.py | main.py | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/update", methods=["POST"])
def update():
print json.dumps(request.form['payload'])
r... | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/latest")
def latest():
return lastCommit
@app.route("/update", methods=["POST"])
def ... | Add code to show last commit message | Add code to show last commit message
| Python | mit | LinuxMercedes/IntegralGit,LinuxMercedes/IntegralGit | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/update", methods=["POST"])
def update():
print json.dumps(request.form['payload'])
r... | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/latest")
def latest():
return lastCommit
@app.route("/update", methods=["POST"])
def ... | <commit_before>from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/update", methods=["POST"])
def update():
print json.dumps(request.form[... | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/latest")
def latest():
return lastCommit
@app.route("/update", methods=["POST"])
def ... | from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/update", methods=["POST"])
def update():
print json.dumps(request.form['payload'])
r... | <commit_before>from flask import Flask, request
from pprint import pprint
import json
app = Flask(__name__)
lastCommit = "No recorded commits!"
@app.route("/")
def hello():
return "IntegralGit: continuous integration via GitHub"
@app.route("/update", methods=["POST"])
def update():
print json.dumps(request.form[... |
774a392695ebdca04ddc83f351a656e2abe19471 | messagehandler.py | messagehandler.py | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | Make function return false or true. | Make function return false or true. | Python | bsd-3-clause | rockwolf/python_generic | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | <commit_before>"""
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it ... | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | """
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it will be useful,... | <commit_before>"""
This file is part of Lisa.
Lisa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Lisa is distributed in the hope that it ... |
d95f2059a753855d373332df0b748d52bba0210d | main.py | main.py | import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
else:
click.echo("Bye!")
if __name__ == '__main__':
main()
| import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
click.echo("Bye!")
if __name__ == '__main__':
main()
| Fix to ensure program echos "bye" whenever program is quit | Fix to ensure program echos "bye" whenever program is quit
| Python | mit | amrishparmar/mal_cl_interface | import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
else:
click.echo("Bye!")
if __name__ == '__main__':
main()
Fix to ensure program echos "bye" whenever program is quit | import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
click.echo("Bye!")
if __name__ == '__main__':
main()
| <commit_before>import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
else:
click.echo("Bye!")
if __name__ == '__main__':
main()
<commit_msg>Fix to ensure program echos "bye" whenev... | import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
click.echo("Bye!")
if __name__ == '__main__':
main()
| import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
else:
click.echo("Bye!")
if __name__ == '__main__':
main()
Fix to ensure program echos "bye" whenever program is quitimport me... | <commit_before>import menus
import auth
import click
def main():
"""Main function"""
credentials = auth.authenticate_user()
if credentials:
menus.main_menu(credentials)
else:
click.echo("Bye!")
if __name__ == '__main__':
main()
<commit_msg>Fix to ensure program echos "bye" whenev... |
5863f46280697be7e14ae9a8e6bb08a42ff940ac | resource_scheduler/views.py | resource_scheduler/views.py | from django.http import HttpResponse
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def... | from django.http import Http404
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def spec... | Add check to make sure resource exists | Add check to make sure resource exists
| Python | mit | simon-andrews/django-resource-scheduler,simon-andrews/django-resource-scheduler | from django.http import HttpResponse
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def... | from django.http import Http404
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def spec... | <commit_before>from django.http import HttpResponse
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.htm... | from django.http import Http404
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def spec... | from django.http import HttpResponse
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.html", mdict)
def... | <commit_before>from django.http import HttpResponse
from django.shortcuts import render_to_response
from .models import Resource
def index(request):
return render_to_response("index.html")
def allresources(request):
mdict = {
"resources": Resource.objects.all()
}
return render_to_response("resources_main.htm... |
47150a81ed780f057a643ce33bd88b9ab5546867 | pronto_praise/pronto_praise/settings/heroku.py | pronto_praise/pronto_praise/settings/heroku.py | import dj_database_url
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['default'] = dj_database_url.config()
| import dj_database_url
from .base import *
# WhiteNoise won't work on Heroku when we set DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['defa... | Set DEBUG = True to make WhiteNoise works | Set DEBUG = True to make WhiteNoise works
| Python | mit | prontotools/pronto-praise,prontotools/pronto-praise,prontotools/pronto-praise,prontotools/pronto-praise | import dj_database_url
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['default'] = dj_database_url.config()
Set DEBUG = True to make ... | import dj_database_url
from .base import *
# WhiteNoise won't work on Heroku when we set DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['defa... | <commit_before>import dj_database_url
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['default'] = dj_database_url.config()
<commit_ms... | import dj_database_url
from .base import *
# WhiteNoise won't work on Heroku when we set DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['defa... | import dj_database_url
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['default'] = dj_database_url.config()
Set DEBUG = True to make ... | <commit_before>import dj_database_url
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
MIDDLEWARE = MIDDLEWARE + [
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DATABASES['default'] = dj_database_url.config()
<commit_ms... |
4fecbff12c4ebcd63ca2d43e608da95758909b46 | app/__init__.py | app/__init__.py | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
| from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
from app import models
| Add import models to app | Add import models to app
| Python | mit | mdsrosa/routes_api_python | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
Add import models to app | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
from app import models
| <commit_before>from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
<commit_msg>Add import models to app<commit_after> | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
from app import models
| from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
Add import models to appfrom flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# l... | <commit_before>from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# load configuration file
app.config.from_object('config')
# database initialization
db = SQLAlchemy(app)
<commit_msg>Add import models to app<commit_after>from flask import Flask
from flask.ext.sqlalchemy impor... |
b3adf26f8b7353d3b0581cdca533eb03ee24b207 | bin/verify_cached_graphs.py | bin/verify_cached_graphs.py | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | Fix cached graph out-of-sync when checking. | Fix cached graph out-of-sync when checking.
| Python | agpl-3.0 | rfugger/villagescc,rfugger/villagescc,rfugger/villagescc,rfugger/villagescc | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | <commit_before>#!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cac... | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | #!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cached_graph(graph... | <commit_before>#!/usr/bin/env python
import sys
from pprint import pprint as pp
from cc.payment import flow
def verify():
for ignore_balances in (True, False):
graph = flow.build_graph(ignore_balances)
cached = flow.get_cached_graph(ignore_balances)
if not cached:
flow.set_cac... |
ea6a8de791bf200da2fe5e54a9f9ca68314f3489 | forum/admin.py | forum/admin.py | from django.contrib import admin
from forum.models import Category, Forum, Thread
admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Thread)
| from django.contrib import admin
from forum.models import Category, Forum, Thread
class ForumInline(admin.StackedInline):
model = Forum
class CategoryAdmin(admin.ModelAdmin):
inlines = [ForumInline]
admin.site.register(Category, CategoryAdmin)
admin.site.register(Thread)
| Modify forums directly in categories. | Modify forums directly in categories.
| Python | mit | xfix/NextBoard | from django.contrib import admin
from forum.models import Category, Forum, Thread
admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Thread)
Modify forums directly in categories. | from django.contrib import admin
from forum.models import Category, Forum, Thread
class ForumInline(admin.StackedInline):
model = Forum
class CategoryAdmin(admin.ModelAdmin):
inlines = [ForumInline]
admin.site.register(Category, CategoryAdmin)
admin.site.register(Thread)
| <commit_before>from django.contrib import admin
from forum.models import Category, Forum, Thread
admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Thread)
<commit_msg>Modify forums directly in categories.<commit_after> | from django.contrib import admin
from forum.models import Category, Forum, Thread
class ForumInline(admin.StackedInline):
model = Forum
class CategoryAdmin(admin.ModelAdmin):
inlines = [ForumInline]
admin.site.register(Category, CategoryAdmin)
admin.site.register(Thread)
| from django.contrib import admin
from forum.models import Category, Forum, Thread
admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Thread)
Modify forums directly in categories.from django.contrib import admin
from forum.models import Category, Forum, Thread
class ForumInline(admin.StackedI... | <commit_before>from django.contrib import admin
from forum.models import Category, Forum, Thread
admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Thread)
<commit_msg>Modify forums directly in categories.<commit_after>from django.contrib import admin
from forum.models import Category, Forum,... |
371df3363677118d59315e66523aefb081c67282 | astroML/plotting/settings.py | astroML/plotting/settings.py | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
matplotlib.rc('axes', titlesize=fontsize)
matp... | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
from distutils.version import LooseVersion
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
mat... | Update the mpl rcparams for mpl 2.0+ | Update the mpl rcparams for mpl 2.0+
| Python | bsd-2-clause | astroML/astroML | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
matplotlib.rc('axes', titlesize=fontsize)
matp... | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
from distutils.version import LooseVersion
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
mat... | <commit_before>def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
matplotlib.rc('axes', titlesize=fon... | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
from distutils.version import LooseVersion
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
mat... | def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
matplotlib.rc('axes', titlesize=fontsize)
matp... | <commit_before>def setup_text_plots(fontsize=8, usetex=True):
"""
This function adjusts matplotlib settings so that all figures in the
textbook have a uniform format and look.
"""
import matplotlib
matplotlib.rc('legend', fontsize=fontsize, handlelength=3)
matplotlib.rc('axes', titlesize=fon... |
261393eb46cdc082b60d9ea11ec862f508632ad2 | audit_log/models/__init__.py | audit_log/models/__init__.py | from django.db.models import Model
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session information
fie... | from django.db.models import Model, SET_NULL
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session inform... | Add mandatory `on_delete` and allow nulls | Add mandatory `on_delete` and allow nulls
I assume it's better to allow nulls than to have auth stamped models
disappear with deleted users.
| Python | bsd-3-clause | Atomidata/django-audit-log,Atomidata/django-audit-log | from django.db.models import Model
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session information
fie... | from django.db.models import Model, SET_NULL
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session inform... | <commit_before>from django.db.models import Model
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session i... | from django.db.models import Model, SET_NULL
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session inform... | from django.db.models import Model
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session information
fie... | <commit_before>from django.db.models import Model
from django.utils.translation import ugettext_lazy as _
from audit_log.models.fields import CreatingUserField, CreatingSessionKeyField, LastUserField, LastSessionKeyField
class AuthStampedModel(Model):
"""
An abstract base class model that provides auth and session i... |
bf70f8e3235c140589e9b0110b34da8427ab409b | child_sync_typo3/wizard/delegate_child_wizard.py | child_sync_typo3/wizard/delegate_child_wizard.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | Fix res returned on delegate | Fix res returned on delegate
| Python | agpl-3.0 | MickSandoz/compassion-switzerland,ndtran/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland,Secheron/compassion-switzerland,ecino/compassion-switzerland,Secheron/compassion-switzerland,CompassionCH/compassion-switzerland,MickSandoz/compassion-switzerland,ndtran/compassion-switzerland,ec... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in the file __ope... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <[email protected]>
#
# The licence is in... |
c845570d8ce6217f5943d538700e207f0221841e | setup.py | setup.py | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | Add github as project URL | Add github as project URL
| Python | bsd-2-clause | karissa/pyeda,karissa/pyeda,cjdrake/pyeda,cjdrake/pyeda,pombredanne/pyeda,GtTmy/pyeda,GtTmy/pyeda,pombredanne/pyeda,cjdrake/pyeda,sschnug/pyeda,sschnug/pyeda,karissa/pyeda,sschnug/pyeda,pombredanne/pyeda,GtTmy/pyeda | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | <commit_before># -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = ... | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | # -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = fin.read()
PAC... | <commit_before># -*- coding: utf-8 -*-
__copyright__ = "Copyright (c) 2012, Chris Drake"
__license__ = "All rights reserved."
# standard library
from distutils.core import setup
# pyeda
from pyeda import __version__
with open("README.rst") as fin:
README = fin.read()
with open("LICENSE") as fin:
LICENSE = ... |
f39a3934e4be271f2cc061e44bee34c6d6cb4126 | setup.py | setup.py | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | Add a download url for the tarball from github | Add a download url for the tarball from github
| Python | mit | felipeochoa/minecart | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | <commit_before>from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(R... | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(README).read(),
... | <commit_before>from os import path
from setuptools import setup
README = path.join(path.dirname(path.abspath(__file__)), "README.rst")
setup(
name="minecart",
version="0.3.0",
description=("Simple, Pythonic extraction of images, text, and shapes "
"from PDFs"),
long_description=open(R... |
06d46159c2742c760b8cd589bf715a96805b870b | setup.py | setup.py | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if IS_P... | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if not ... | Add mock as a test dependency if running as python2 | Add mock as a test dependency if running as python2
Test dependencies only get used if running as python setup.py test, so
need to add test_suite
| Python | agpl-3.0 | Connexions/cnx-epub,Connexions/cnx-epub,Connexions/cnx-epub | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if IS_P... | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if not ... | <commit_before># -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' E... | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if not ... | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' EPUBs."
if IS_P... | <commit_before># -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = [
'jinja2',
'lxml',
]
tests_require = [
]
extras_require = {
'test': tests_require,
}
description = "Library for building and paring Connexions' E... |
b2a064000a79151c3e9bda06e970bc8208cce330 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | Fix url in distutils description. | Fix url in distutils description.
| Python | bsd-2-clause | theatlantic/django-auth-ldap,DheerendraRathor/django-auth-ldap-ng | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simpl... | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | #!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single d... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(
name="django-auth-ldap",
version="1.0b7",
description="Django LDAP authentication backend",
long_description="""This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simpl... |
53931faf00ee64bec253e1ae9a5c6be66298d379 | setup.py | setup.py | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | Add sentry_sdk to cxfreeze packages | Add sentry_sdk to cxfreeze packages
| Python | mit | virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | <commit_before>from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
... | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
"readme.md"
... | <commit_before>from cx_Freeze import setup, Executable
build_exe_options = {
"bin_includes": [
"libssl.so",
"libz.so"
],
"bin_path_includes": [
"/usr/lib/x86_64-linux-gnu"
],
"include_files": [
("client/dist", "client"),
"LICENSE",
"templates",
... |
b589feb587a7fa693d77f35395485f5b673e9d95 | celery/backends/__init__.py | celery/backends/__init__.py | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | Add strings in weak quotes | Add strings in weak quotes
| Python | bsd-3-clause | frac/celery,cbrepo/celery,WoLpH/celery,WoLpH/celery,cbrepo/celery,ask/celery,ask/celery,mitsuhiko/celery,frac/celery,mitsuhiko/celery | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | <commit_before>"""celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (... | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | """celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (is not fully qu... | <commit_before>"""celery.backends"""
from functools import partial
from django.conf import settings
import sys
DEFAULT_BACKEND = "database"
CELERY_BACKEND = getattr(settings, "CELERY_BACKEND", DEFAULT_BACKEND)
def get_backend_cls(backend):
"""Get backend class by name.
If the name does not include "``.``" (... |
a51d2ec96469686e3a2767e29951b8442b17da69 | test/test_util.py | test/test_util.py | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | Add tests for APM overrides | Add tests for APM overrides
| Python | mit | thiderman/network-kitten | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | <commit_before>from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def ... | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def test_second_loa... | <commit_before>from kitten.util import AutoParadigmMixin
class TestAutoParadigmMixin(object):
def setup_method(self, method):
self.apm = AutoParadigmMixin()
def test_first_load(self):
ret = self.apm.paradigms
assert 'node' in ret
assert 'node' in self.apm._paradigms
def ... |
6cd9c7285d462311580754229d0b85af844dd387 | test/integration/test_cli.py | test/integration/test_cli.py | import unittest
class TestCLI(unittest.TestCase):
def test_kubos_installed(self):
self.assertEqual('foo'.upper(), 'FOO')
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that... | import unittest
import re
import subprocess
class TestCLI(unittest.TestCase):
def test_latest_kubos_installed(self):
bashCommand = "vagrant ssh -c 'kubos update'"
process = subprocess.Popen(bashCommand.split())
output, error = process.communicate()
regex = re.compile(r"All up to dat... | Update integration test with actual...integration test | Update integration test with actual...integration test
| Python | apache-2.0 | Psykar/kubos,kubostech/KubOS,Psykar/kubos,Psykar/kubos,Psykar/kubos,kubostech/KubOS,Psykar/kubos,Psykar/kubos,Psykar/kubos | import unittest
class TestCLI(unittest.TestCase):
def test_kubos_installed(self):
self.assertEqual('foo'.upper(), 'FOO')
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that... | import unittest
import re
import subprocess
class TestCLI(unittest.TestCase):
def test_latest_kubos_installed(self):
bashCommand = "vagrant ssh -c 'kubos update'"
process = subprocess.Popen(bashCommand.split())
output, error = process.communicate()
regex = re.compile(r"All up to dat... | <commit_before>import unittest
class TestCLI(unittest.TestCase):
def test_kubos_installed(self):
self.assertEqual('foo'.upper(), 'FOO')
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
... | import unittest
import re
import subprocess
class TestCLI(unittest.TestCase):
def test_latest_kubos_installed(self):
bashCommand = "vagrant ssh -c 'kubos update'"
process = subprocess.Popen(bashCommand.split())
output, error = process.communicate()
regex = re.compile(r"All up to dat... | import unittest
class TestCLI(unittest.TestCase):
def test_kubos_installed(self):
self.assertEqual('foo'.upper(), 'FOO')
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that... | <commit_before>import unittest
class TestCLI(unittest.TestCase):
def test_kubos_installed(self):
self.assertEqual('foo'.upper(), 'FOO')
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
... |
ec7da0420a83223c0f636ddb9a7ebfcfa943f2da | test/mock_settings_device.py | test/mock_settings_device.py | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | Add addSettings call also to the testing code. | Add addSettings call also to the testing code.
| Python | mit | victronenergy/velib_python | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | <commit_before>PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, s... | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, supported_settin... | <commit_before>PATH = 0
VALUE = 1
MINIMUM = 2
MAXIMUM = 3
# Simulates the SettingsSevice object without using the D-Bus (intended for unit tests). Values passed to
# __setitem__ (or the [] operator) will be stored in memory for later retrieval by __getitem__.
class MockSettingsDevice(object):
def __init__(self, s... |
6dfc6cffb2594b420843ce7021988f78de2b4faf | estmator_project/estmator_project/test.py | estmator_project/estmator_project/test.py | from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
pass
| from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
"""Sublcassed TestCase for project."""
pass
| Test commit for travis setup | Test commit for travis setup
| Python | mit | Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp | from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
pass
Test commit for travis setup | from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
"""Sublcassed TestCase for project."""
pass
| <commit_before>from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
pass
<commit_msg>Test commit for travis setup<commit_after> | from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
"""Sublcassed TestCase for project."""
pass
| from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
pass
Test commit for travis setupfrom test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
"""Sublcassed TestCase for project."""
pass
| <commit_before>from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
pass
<commit_msg>Test commit for travis setup<commit_after>from test_plus.test import TestCase as PlusTestCase
class TestCase(PlusTestCase):
"""Sublcassed TestCase for project."""
pass
|
8c55bdc78b3ae2c52826740ab049a2bab5ca1fdd | src/nodeconductor_saltstack/exchange/extension.py | src/nodeconductor_saltstack/exchange/extension.py | from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
| from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
@staticmethod
... | Add sync quota task to celerybeat | Add sync quota task to celerybeat
- nc-1009
| Python | mit | opennode/nodeconductor-saltstack | from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
Add sync quota task... | from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
@staticmethod
... | <commit_before>from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
<com... | from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
@staticmethod
... | from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
Add sync quota task... | <commit_before>from nodeconductor.core import NodeConductorExtension
class ExchangeExtension(NodeConductorExtension):
@staticmethod
def django_app():
return 'nodeconductor_saltstack.exchange'
@staticmethod
def rest_urls():
from .urls import register_in
return register_in
<com... |
3c01c07e13dfd79a76408926b13848417a3cfb3e | tests/test_requesthandler.py | tests/test_requesthandler.py | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | Fix requesthandler tests (new version of datamodel). | Fix requesthandler tests (new version of datamodel).
| Python | mit | iScienceLuvr/PPP-NaturalMath,ProjetPP/PPP-NaturalMath,iScienceLuvr/ckse,iScienceLuvr/PPP-NaturalMath,ProjetPP/PPP-NaturalMath,iScienceLuvr/ckse | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | <commit_before>from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self... | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self):
q = ... | <commit_before>from ppp_datamodel import Sentence, Resource
from ppp_datamodel.communication import Request, TraceItem, Response
from ppp_libmodule.tests import PPPTestCase
from ppp_natural_math import app
class TestFollowing(PPPTestCase(app)):
config_var = 'PPP_NATURALMATH'
config = ''
def testBasics(self... |
e4b1fcf017494c22744f44bd93381b8063b30e34 | eadred/tests/test_generate.py | eadred/tests/test_generate.py | import unittest
from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.execute()
assert sampledata.called ==... | from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.run_from_argv(['manage.py', ''])
assert sampledata.cal... | Fix test to catch options issues | Fix test to catch options issues
The test should now catch the issue that was fixed in 79a453f.
| Python | bsd-3-clause | willkg/django-eadred | import unittest
from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.execute()
assert sampledata.called ==... | from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.run_from_argv(['manage.py', ''])
assert sampledata.cal... | <commit_before>import unittest
from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.execute()
assert sampl... | from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.run_from_argv(['manage.py', ''])
assert sampledata.cal... | import unittest
from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.execute()
assert sampledata.called ==... | <commit_before>import unittest
from eadred.management.commands import generatedata
def test_generatedata():
"""Basic test to make sure function gets called."""
from testproject.testapp import sampledata
assert sampledata.called == False
cmd = generatedata.Command()
cmd.execute()
assert sampl... |
62494cd7125d498d8de058ab3ebe556cd9686f6e | calvin/runtime/north/plugins/coders/messages/msgpack_coder.py | calvin/runtime/north/plugins/coders/messages/msgpack_coder.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | Use umsgpack package for msgpack coder | coder/msgpack: Use umsgpack package for msgpack coder
| Python | apache-2.0 | EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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... |
8cd859609a8a58474ff152d9adbb968ab3cdffa0 | gaphor/diagram/diagramtools/tests/test_txtool.py | gaphor/diagram/diagramtools/tests/test_txtool.py | from unittest.mock import Mock
from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import TxData, on_begin, transactional_tool
from gaphor.transaction import TransactionBegin
def xtest_start_tx_on_begin(view, event_manager):
event_manager.handle = Mock()
tx_data = TxData(event_manager)
... | from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import (
TxData,
on_begin,
on_end,
transactional_tool,
)
from gaphor.transaction import TransactionBegin
class MockEventManager:
def __init__(self):
self.events = []
def handle(self, event):
self.events.app... | Fix tests for tx tool | Fix tests for tx tool
| Python | lgpl-2.1 | amolenaar/gaphor,amolenaar/gaphor | from unittest.mock import Mock
from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import TxData, on_begin, transactional_tool
from gaphor.transaction import TransactionBegin
def xtest_start_tx_on_begin(view, event_manager):
event_manager.handle = Mock()
tx_data = TxData(event_manager)
... | from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import (
TxData,
on_begin,
on_end,
transactional_tool,
)
from gaphor.transaction import TransactionBegin
class MockEventManager:
def __init__(self):
self.events = []
def handle(self, event):
self.events.app... | <commit_before>from unittest.mock import Mock
from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import TxData, on_begin, transactional_tool
from gaphor.transaction import TransactionBegin
def xtest_start_tx_on_begin(view, event_manager):
event_manager.handle = Mock()
tx_data = TxData(eve... | from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import (
TxData,
on_begin,
on_end,
transactional_tool,
)
from gaphor.transaction import TransactionBegin
class MockEventManager:
def __init__(self):
self.events = []
def handle(self, event):
self.events.app... | from unittest.mock import Mock
from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import TxData, on_begin, transactional_tool
from gaphor.transaction import TransactionBegin
def xtest_start_tx_on_begin(view, event_manager):
event_manager.handle = Mock()
tx_data = TxData(event_manager)
... | <commit_before>from unittest.mock import Mock
from gi.repository import Gtk
from gaphor.diagram.diagramtools.txtool import TxData, on_begin, transactional_tool
from gaphor.transaction import TransactionBegin
def xtest_start_tx_on_begin(view, event_manager):
event_manager.handle = Mock()
tx_data = TxData(eve... |
9ef44fb81e8c9fef40f5b21e648c2500e01169f4 | medical_patient_ethnicity/models/medical_patient_ethnicity.py | medical_patient_ethnicity/models/medical_patient_ethnicity.py | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | Add required to ethnicity code | Add required to ethnicity code
| Python | agpl-3.0 | laslabs/vertical-medical,ShaheenHossain/eagle-medical,ShaheenHossain/eagle-medical,laslabs/vertical-medical | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | <commit_before># -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | # -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free softwa... | <commit_before># -*- coding: utf-8 -*-
# #############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program... |
63c300670a8406ac403841630aded1a810d929fd | lib/subprocess_tee/test/test_rich.py | lib/subprocess_tee/test/test_rich.py | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | Add testing of rich html_export | Add testing of rich html_export
| Python | mit | pycontribs/subprocess-tee | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | <commit_before>"""Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
... | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | """Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
print("beta"... | <commit_before>"""Tests for rich module."""
import sys
from subprocess_tee import run
from subprocess_tee.rich import ConsoleEx
def test_rich_console_ex() -> None:
"""Validate that ConsoleEx can capture output from print() calls."""
console = ConsoleEx(record=True, redirect=True)
console.print("alpha")
... |
8734b8448edafe10db7380c93039832f8e43624c | examples/connect4/connect4.py | examples/connect4/connect4.py | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 1
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 3 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 0
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 1 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | Use players 0 and 1 instead of 1 and 2 | Use players 0 and 1 instead of 1 and 2
Makes it easier to communicate with ANN, as 1 is truthy and 0 is falsy.
Players are also slightly more clear when Connect4 is printed.
| Python | mit | tysonzero/py-ann | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 1
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 3 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 0
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 1 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | <commit_before>class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 1
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 3 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
... | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 0
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 1 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 1
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 3 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
output ... | <commit_before>class Connect4(object):
def __init__(self):
self.pieces = [[] for i in xrange(7)]
self.turn = 1
def move(self, column):
self.pieces[column % 7].append(self.turn)
self.turn = 3 - self.turn
def __str__(self):
output = ''
for i in xrange(6):
... |
c7d09823bb75146602146606823f0f7906edbec3 | babybuddy/urls.py | babybuddy/urls.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | Fix linting issue with url line length | Fix linting issue with url line length
| Python | bsd-2-clause | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^adm... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [... |
cda5fcb56ecdfe5a2f49d0efbf76e853c8c50e6c | migration_scripts/0.3/crypto_util.py | migration_scripts/0.3/crypto_util.py | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import random as badrandom
nouns = file("nouns.txt").read().split('\n')
adjectives = file("adjectives.txt").read().split('\n')
def displayid(n):
... | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import os
import random as badrandom
# Find the absolute path relative to this file so this script can be run anywhere
SRC_DIR = os.path.dirname(os.p... | Load files from absolute paths so this can be run from anywhere | Load files from absolute paths so this can be run from anywhere
| Python | agpl-3.0 | mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream,mark-in/securedrop-prov-upstream | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import random as badrandom
nouns = file("nouns.txt").read().split('\n')
adjectives = file("adjectives.txt").read().split('\n')
def displayid(n):
... | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import os
import random as badrandom
# Find the absolute path relative to this file so this script can be run anywhere
SRC_DIR = os.path.dirname(os.p... | <commit_before># -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import random as badrandom
nouns = file("nouns.txt").read().split('\n')
adjectives = file("adjectives.txt").read().split('\n')
def di... | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import os
import random as badrandom
# Find the absolute path relative to this file so this script can be run anywhere
SRC_DIR = os.path.dirname(os.p... | # -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import random as badrandom
nouns = file("nouns.txt").read().split('\n')
adjectives = file("adjectives.txt").read().split('\n')
def displayid(n):
... | <commit_before># -*- coding: utf-8 -*-
# Minimal set of functions and variables from 0.2.1's crypto_util.py needed to
# regenerate journalist designations from soure's filesystem id's.
import random as badrandom
nouns = file("nouns.txt").read().split('\n')
adjectives = file("adjectives.txt").read().split('\n')
def di... |
66d70394d22870ee4ff8035342d88a5c65a9f338 | samsa/utils/delayedconfig.py | samsa/utils/delayedconfig.py | __license__ = """
Copyright 2012 DISQUS
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, so... | __license__ = """
Copyright 2012 DISQUS
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, so... | Make log message a little clearer | Make log message a little clearer
| Python | apache-2.0 | sammerry/pykafka,jofusa/pykafka,aeroevan/pykafka,benauthor/pykafka,sammerry/pykafka,vortec/pykafka,aeroevan/pykafka,vortec/pykafka,sontek/pykafka,sontek/pykafka,thedrow/samsa,wikimedia/operations-debs-python-pykafka,tempbottle/pykafka,benauthor/pykafka,thedrow/samsa,jofusa/pykafka,benauthor/pykafka,wikimedia/operations... | __license__ = """
Copyright 2012 DISQUS
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, so... | __license__ = """
Copyright 2012 DISQUS
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, so... | <commit_before>__license__ = """
Copyright 2012 DISQUS
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... | __license__ = """
Copyright 2012 DISQUS
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, so... | __license__ = """
Copyright 2012 DISQUS
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, so... | <commit_before>__license__ = """
Copyright 2012 DISQUS
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... |
da52ad14f23bcecd8d0107742eb8a1d9a447265a | opps/views/generic/detail.py | opps/views/generic/detail.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | Fix pep8, remove blank line on DetailView | Fix pep8, remove blank line on DetailView
| Python | mit | opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,williamroot/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,opps/opps,YACOWS/opps,opps/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def ge... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def get_template_name... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.detail import DetailView as DjangoDetailView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from opps.views.generic.base import View
class DetailView(View, DjangoDetailView):
def ge... |
fe6b7b9abb8e9730a3d028850337c047fe6607ea | tests/unit/services/user/test_models_full_name.py | tests/unit/services/user/test_models_full_name.py | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from testfixtures.user import create_user_with_detail
@pytest.mark.parametrize(
'first_names, last_name, expected',
[
(None, None , None ),
('Gie... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import datetime
import pytest
from byceps.services.user.models.user import User as DbUser
from byceps.services.user.models.detail import UserDetail as DbUserDetail
@pytest.mark.parametrize(
'... | Create fullname user object locally in test | Create fullname user object locally in test
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from testfixtures.user import create_user_with_detail
@pytest.mark.parametrize(
'first_names, last_name, expected',
[
(None, None , None ),
('Gie... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import datetime
import pytest
from byceps.services.user.models.user import User as DbUser
from byceps.services.user.models.detail import UserDetail as DbUserDetail
@pytest.mark.parametrize(
'... | <commit_before>"""
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from testfixtures.user import create_user_with_detail
@pytest.mark.parametrize(
'first_names, last_name, expected',
[
(None, None , None )... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import datetime
import pytest
from byceps.services.user.models.user import User as DbUser
from byceps.services.user.models.detail import UserDetail as DbUserDetail
@pytest.mark.parametrize(
'... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from testfixtures.user import create_user_with_detail
@pytest.mark.parametrize(
'first_names, last_name, expected',
[
(None, None , None ),
('Gie... | <commit_before>"""
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from testfixtures.user import create_user_with_detail
@pytest.mark.parametrize(
'first_names, last_name, expected',
[
(None, None , None )... |
f9e1c8a536c0212414047b941f502bfbee92be92 | l10n_br_fiscal/wizards/document_cancel_wizard.py | l10n_br_fiscal/wizards/document_cancel_wizard.py | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'F... | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'Fisc... | Update Fiscal document cancel wizard | [FIX] Update Fiscal document cancel wizard
| Python | agpl-3.0 | OCA/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'F... | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'Fisc... | <commit_before># Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_d... | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'Fisc... | # Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_description = 'F... | <commit_before># Copyright 2019 KMEE
# Copyright (C) 2020 Renato Lima - Akretion <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
class DocumentCancelWizard(models.TransientModel):
_name = 'l10n_br_fiscal.document.cancel.wizard'
_d... |
cc8624cfa3788dc66e7afb144fc24ef5f1a79ff9 | scripts/json-concat-lists.py | scripts/json-concat-lists.py | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
list_all += json.load(in_f... | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
file_jsons = json.load(in_... | Remove duplicate JSON gaferences when concatenating | Remove duplicate JSON gaferences when concatenating
| Python | bsd-3-clause | geneontology/go-site,geneontology/go-site,geneontology/go-site,geneontology/go-site,geneontology/go-site | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
list_all += json.load(in_f... | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
file_jsons = json.load(in_... | <commit_before>import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
list_all +=... | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
file_jsons = json.load(in_... | import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
list_all += json.load(in_f... | <commit_before>import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('json_file', nargs='+')
parser.add_argument('output_file')
if __name__ == "__main__":
args = parser.parse_args()
list_all = []
for jf in args.json_file:
with open(jf) as in_f:
list_all +=... |
44d8692b6739856170ba5d5b9712a2afe170f4df | presentation/tests.py | presentation/tests.py | from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test import RequestFactory
from presentation.models import Presentation
from presentation.views import PresentationList
from warp.users.models import User
class PresentationL... | from django.core.urlresolvers import reverse
from django.test import Client
from django.test import TestCase
from presentation.models import Presentation
from warp.users.models import User
class PresentationListTest(TestCase):
def setUp(self):
self.client = Client()
self.test_user = self.create_t... | Fix test case with client | Fix test case with client
| Python | mit | SaturDJang/warp,SaturDJang/warp,SaturDJang/warp,SaturDJang/warp | from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test import RequestFactory
from presentation.models import Presentation
from presentation.views import PresentationList
from warp.users.models import User
class PresentationL... | from django.core.urlresolvers import reverse
from django.test import Client
from django.test import TestCase
from presentation.models import Presentation
from warp.users.models import User
class PresentationListTest(TestCase):
def setUp(self):
self.client = Client()
self.test_user = self.create_t... | <commit_before>from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test import RequestFactory
from presentation.models import Presentation
from presentation.views import PresentationList
from warp.users.models import User
clas... | from django.core.urlresolvers import reverse
from django.test import Client
from django.test import TestCase
from presentation.models import Presentation
from warp.users.models import User
class PresentationListTest(TestCase):
def setUp(self):
self.client = Client()
self.test_user = self.create_t... | from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test import RequestFactory
from presentation.models import Presentation
from presentation.views import PresentationList
from warp.users.models import User
class PresentationL... | <commit_before>from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test import RequestFactory
from presentation.models import Presentation
from presentation.views import PresentationList
from warp.users.models import User
clas... |
1a389d686b2dfb1234dff240201e6436d920c131 | posts/config.py | posts/config.py | class DevelopmentConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts-test"
DEBUG = True
| class DevelopmentConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts-test"
DEBUG = True
| Update database URIs for C9. | Update database URIs for C9. | Python | mit | j10sanders/crossword,j10sanders/crossword,j10sanders/crossword | class DevelopmentConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts-test"
DEBUG = True
Update database URIs for C9. | class DevelopmentConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts-test"
DEBUG = True
| <commit_before>class DevelopmentConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts-test"
DEBUG = True
<commit_msg>Update database URIs for C9.<commit_after> | class DevelopmentConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://ubuntu:thinkful@localhost:5432/posts-test"
DEBUG = True
| class DevelopmentConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts-test"
DEBUG = True
Update database URIs for C9.class DevelopmentConfig(object):
DATABASE_URI = ... | <commit_before>class DevelopmentConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts"
DEBUG = True
class TestingConfig(object):
DATABASE_URI = "postgresql://action:action@localhost:5432/posts-test"
DEBUG = True
<commit_msg>Update database URIs for C9.<commit_after>class Devel... |
b307bb4e59598670cf2ee09c4107d9f42d8b7d3c | warehouse/database/mixins.py | warehouse/database/mixins.py | from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql.expression import text
from warehouse import db
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_default=text("uuid_generate_v4()"))
| from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql import func
from sqlalchemy.sql.expression import text
from warehouse import db
from warehouse.database.schema import TableDDL
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_defaul... | Add a database mixin for Timestamping models | Add a database mixin for Timestamping models
| Python | bsd-2-clause | davidfischer/warehouse | from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql.expression import text
from warehouse import db
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_default=text("uuid_generate_v4()"))
Add a database mixin for Timestamping models | from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql import func
from sqlalchemy.sql.expression import text
from warehouse import db
from warehouse.database.schema import TableDDL
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_defaul... | <commit_before>from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql.expression import text
from warehouse import db
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_default=text("uuid_generate_v4()"))
<commit_msg>Add a database mixin f... | from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql import func
from sqlalchemy.sql.expression import text
from warehouse import db
from warehouse.database.schema import TableDDL
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_defaul... | from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql.expression import text
from warehouse import db
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_default=text("uuid_generate_v4()"))
Add a database mixin for Timestamping modelsfrom ... | <commit_before>from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.sql.expression import text
from warehouse import db
class UUIDPrimaryKeyMixin(object):
id = db.Column(pg.UUID(as_uuid=True),
primary_key=True, server_default=text("uuid_generate_v4()"))
<commit_msg>Add a database mixin f... |
22823ca55e4c342149b83d84d18ad879d55023d7 | oslib/__init__.py | oslib/__init__.py | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | Add find import to oslib init | Add find import to oslib init
| Python | mit | Caian/ostools | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | <commit_before>#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitati... | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | <commit_before>#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2017 Caian Benedicto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitati... |
c37eccdf135fbbcb4d153f3e94c916cd0e9361ea | imagersite/imagersite/urls.py | imagersite/imagersite/urls.py | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | Add accounts url for registration backend | Add accounts url for registration backend
| Python | mit | jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | <commit_before>"""imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name... | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | """imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | <commit_before>"""imagersite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name... |
6e89594c231698d4f20590e723a876699876fb52 | utils/__init__.py | utils/__init__.py | from . import util
from . import irc
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
'--short',
'HEA... | # pylint: disable=unused-import
from . import util
from . import irc
# pylint: enable=unused-import
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
... | Make Pylint ignore some unused imports | Make Pylint ignore some unused imports
Ignore them because they are required for the bot to work | Python | mit | wolfy1339/Python-IRC-Bot | from . import util
from . import irc
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
'--short',
'HEA... | # pylint: disable=unused-import
from . import util
from . import irc
# pylint: enable=unused-import
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
... | <commit_before>from . import util
from . import irc
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
'--short',
... | # pylint: disable=unused-import
from . import util
from . import irc
# pylint: enable=unused-import
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
... | from . import util
from . import irc
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
'--short',
'HEA... | <commit_before>from . import util
from . import irc
sysver = "".join(__import__("sys").version.split("\n"))
gitver = __import__("subprocess").check_output(['git',
'rev-parse',
'--short',
... |
5c9a121d9ab8b66c49d7a58d24805c1eecfc8a71 | ce/common.py | ce/common.py | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | Fix infinite recursion of comparing Comparable | Fix infinite recursion of comparing Comparable
| Python | mit | admk/soap | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method name... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method names and correspon... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import inspect
class DynamicMethods(object):
def list_methods(self, predicate):
"""Find all transform methods within the class that satisfies the
predicate.
Returns:
A list of tuples containing method name... |
a49e697e45a0c7a678a852f0c9215bd7a3fa24bf | tests/backends/test_macOS.py | tests/backends/test_macOS.py | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | Add test capturing need for an alternate keyring with an alternate keychain. | Add test capturing need for an alternate keyring with an alternate keychain.
| Python | mit | jaraco/keyring | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | <commit_before>import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
... | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
return ma... | <commit_before>import pytest
import keyring
from keyring.testing.backend import BackendBasicTests
from keyring.backends import macOS
@pytest.mark.skipif(
not keyring.backends.macOS.Keyring.viable,
reason="macOS backend not viable",
)
class Test_macOSKeychain(BackendBasicTests):
def init_keyring(self):
... |
9d35218506368702ac33d78be197ee3151d24ed9 | ledger_type.py | ledger_type.py | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | Order by ledger types by name | Order by ledger types by name
| Python | agpl-3.0 | xcgd/alternate_ledger,xcgd/alternate_ledger | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | <commit_before>from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name ... | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name = 'alternate_le... | <commit_before>from openerp.osv import fields, osv
from openerp.tools.translate import _
_enum_ledger_type = [
('ledger_a', _('Ledger A')),
('ledger_b', _('Ledger B')),
('ledger_c', _('Ledger C')),
('ledger_d', _('Ledger D')),
('ledger_e', _('Ledger E')),
]
class ledger_type(osv.Model):
_name ... |
e5eaf68490098cb89cf9d6ad8b4eaa96bafd0450 | compose/cli/docker_client.py | compose/cli/docker_client.py | import logging
import os
import ssl
from docker import Client
from docker import tls
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker client.
... | import logging
import os
from docker import Client
from docker.utils import kwargs_from_env
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker cl... | Remove custom docker client initialization logic | Remove custom docker client initialization logic
Signed-off-by: Aanand Prasad <[email protected]>
| Python | apache-2.0 | phiroict/docker,denverdino/docker.github.io,phiroict/docker,denverdino/docker.github.io,jzwlqx/denverdino.github.io,docker/docker.github.io,shin-/docker.github.io,swoopla/compose,rillig/docker.github.io,jiekechoo/compose,bdwill/docker.github.io,joeuo/docker.github.io,sanscontext/docker.github.io,amitsaha/compose,GM-Ale... | import logging
import os
import ssl
from docker import Client
from docker import tls
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker client.
... | import logging
import os
from docker import Client
from docker.utils import kwargs_from_env
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker cl... | <commit_before>import logging
import os
import ssl
from docker import Client
from docker import tls
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official D... | import logging
import os
from docker import Client
from docker.utils import kwargs_from_env
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker cl... | import logging
import os
import ssl
from docker import Client
from docker import tls
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official Docker client.
... | <commit_before>import logging
import os
import ssl
from docker import Client
from docker import tls
from ..const import HTTP_TIMEOUT
log = logging.getLogger(__name__)
def docker_client():
"""
Returns a docker-py client configured using environment variables
according to the same logic as the official D... |
03b4575a60cab53629c62eca5df5acdd9688fbbb | project/views/twilioviews.py | project/views/twilioviews.py | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | Add print debug to text function | Add print debug to text function
| Python | apache-2.0 | tjcsl/mhacksiv | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | <commit_before>from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCa... | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCallback='http://... | <commit_before>from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime
def call():
resp = twilio.twiml.Response()
resp.record(timeout=10, transcribe=True,
transcribeCa... |
ee17ff42931e718d77ac2180b23e750bedcd31d4 | test/test_searchentities.py | test/test_searchentities.py | import unittest
from . import models
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
F("c_bar", "c.bar"),
F("c_bar_trans", "c.bar", tra... | import mock
import unittest
from . import models
from xml.etree.ElementTree import Element, tostring
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
... | Add a test for wscompat conversion | Add a test for wscompat conversion
| Python | mit | jeffweeksio/sir | import unittest
from . import models
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
F("c_bar", "c.bar"),
F("c_bar_trans", "c.bar", tra... | import mock
import unittest
from . import models
from xml.etree.ElementTree import Element, tostring
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
... | <commit_before>import unittest
from . import models
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
F("c_bar", "c.bar"),
F("c_bar_trans... | import mock
import unittest
from . import models
from xml.etree.ElementTree import Element, tostring
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
... | import unittest
from . import models
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
F("c_bar", "c.bar"),
F("c_bar_trans", "c.bar", tra... | <commit_before>import unittest
from . import models
from sir.schema.searchentities import SearchEntity as E, SearchField as F
class QueryResultToDictTest(unittest.TestCase):
def setUp(self):
self.entity = E(models.B, [
F("id", "id"),
F("c_bar", "c.bar"),
F("c_bar_trans... |
6637d13202e647058296e0a8a5606bf64598b63e | Lib/misc/setup.py | Lib/misc/setup.py |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
print "########", config
return config
if __name__ == '__main__':
from numpy.distutils.core i... |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**confi... | Remove extra noise on install. | Remove extra noise on install.
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@1549 d6536bca-fef9-0310-8506-e4c0a848fbcf
| Python | bsd-3-clause | scipy/scipy-svn,jasonmccampbell/scipy-refactor,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,scipy/scipy-svn |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
print "########", config
return config
if __name__ == '__main__':
from numpy.distutils.core i... |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**confi... | <commit_before>
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
print "########", config
return config
if __name__ == '__main__':
from numpy.d... |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**confi... |
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
print "########", config
return config
if __name__ == '__main__':
from numpy.distutils.core i... | <commit_before>
import os
from numpy.distutils.misc_util import Configuration
def configuration(parent_package='',top_path=None):
config = Configuration('misc',parent_package, top_path)
config.add_data_files('lena.dat')
print "########", config
return config
if __name__ == '__main__':
from numpy.d... |
ccf3bcfc962a37d088507b542bd8e3af2ce515b6 | tests/test_with_testcase.py | tests/test_with_testcase.py | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | Remove use of context manager. | Remove use of context manager.
| Python | bsd-2-clause | thedrow/pytest-benchmark,aldanor/pytest-benchmark,SectorLabs/pytest-benchmark,ionelmc/pytest-benchmark | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | <commit_before>import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerrib... | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerribleWayToWritePat... | <commit_before>import time
import unittest
import pytest
class TerribleTerribleWayToWriteTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def setupBenchmark(self, benchmark):
self.benchmark = benchmark
def test_foo(self):
self.benchmark(time.sleep, 0.000001)
class TerribleTerrib... |
8a9a0f1dc277d26767ffc3f34c00c18d00bd5e2e | conanfile.py | conanfile.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
url = homepage
license = "MIT"
author = "... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
topics = ("conan", "taocpp", "pegtl", "peg", "gra... | Fix missing generator on Windows | Fix missing generator on Windows
- Since compiler is not listed on settings, CMake is not
able to detect a valid generator, using MingGW by default
- Add topics to be used as tags for searching
Signed-off-by: Uilian Ries <[email protected]>
| Python | mit | ColinH/PEGTL,ColinH/PEGTL | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
url = homepage
license = "MIT"
author = "... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
topics = ("conan", "taocpp", "pegtl", "peg", "gra... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
url = homepage
license = "MIT"... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
topics = ("conan", "taocpp", "pegtl", "peg", "gra... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
url = homepage
license = "MIT"
author = "... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class PEGTLConan(ConanFile):
name = "pegtl"
description = "C++ header-only parser combinator library for creating PEG parsers"
homepage = "https://github.com/taocpp/PEGTL"
url = homepage
license = "MIT"... |
153688b63103a024b126a7c92eb9d0816500d2dc | ircstat/ent.py | ircstat/ent.py | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | Update Struct.__repr__ to show subclass names | Update Struct.__repr__ to show subclass names
| Python | mit | jreese/ircstat,jreese/ircstat | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
s... | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | # Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
self.__dict__.up... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
class Struct(object):
"""A basic object type that, given a dictionary or keyword arguments,
converts the key/value pairs into object attributes."""
def __init__(self, data=None, **kwargs):
if data is not None:
s... |
4a17579478bce6e4c51fc0f6506b090cfea0dfb5 | pyjsonts/time_series_json.py | pyjsonts/time_series_json.py | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default i... | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default ... | Make whitespaces before TimeSeriesJSON for PEP8 | Make whitespaces before TimeSeriesJSON for PEP8
| Python | apache-2.0 | jeongmincha/pyjsonts | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default i... | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default ... | <commit_before>import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this val... | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default ... | import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this value is default i... | <commit_before>import json
import ijson
class TimeSeriesJSON:
def __init__(self, f=None, fn=None, tag='item'):
"""
:param f: file object (_io.TextIOWrapper)
:param fn: file name as a string
:param tag: tag for dividing json items
default value is 'item' because this val... |
497313620772c1cb0d520be1a0024c12ca02742e | tests/python_tests/fontset_test.py | tests/python_tests/fontset_test.py | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | Add a test (currently failing) ensuring that named fontsets created in python are propertly serialized | Add a test (currently failing) ensuring that named fontsets created in python are propertly serialized
| Python | lgpl-2.1 | Mappy/mapnik,qianwenming/mapnik,tomhughes/mapnik,jwomeara/mapnik,pnorman/mapnik,davenquinn/python-mapnik,yiqingj/work,pnorman/mapnik,Mappy/mapnik,yohanboniface/python-mapnik,mapycz/python-mapnik,jwomeara/mapnik,Mappy/mapnik,yiqingj/work,strk/mapnik,kapouer/mapnik,Mappy/mapnik,qianwenming/mapnik,lightmare/mapnik,garnert... | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | <commit_before>#!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m... | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m = mapnik.Map(2... | <commit_before>#!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_loading_fontset_from_map():
m... |
0141340d2abddc954ea4388fe31629d98189632c | tests/test_exceptions.py | tests/test_exceptions.py | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | Add test for storing dictionaries on ValidationError | Add test for storing dictionaries on ValidationError
| Python | mit | 0xDCA/marshmallow,Bachmann1234/marshmallow,xLegoz/marshmallow,bartaelterman/marshmallow,VladimirPal/marshmallow,daniloakamine/marshmallow,mwstobo/marshmallow,dwieeb/marshmallow,etataurov/marshmallow,maximkulkin/marshmallow,marshmallow-code/marshmallow,0xDCA/marshmallow,quxiaolong1504/marshmallow,Tim-Erwin/marshmallow | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | <commit_before># -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['fo... | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | # -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['foo', 'bar'])
... | <commit_before># -*- coding: utf-8 -*-
from marshmallow.exceptions import ValidationError
class TestValidationError:
def test_stores_message_in_list(self):
err = ValidationError('foo')
assert err.messages == ['foo']
def test_can_pass_list_of_messages(self):
err = ValidationError(['fo... |
1181829a0b4e4d395693ad6856876b4be8b6bb90 | ratechecker/migrations/0002_remove_fee_loader.py | ratechecker/migrations/0002_remove_fee_loader.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | Comment out fix_fee_product_index from migration | Comment out fix_fee_product_index from migration
| Python | cc0-1.0 | cfpb/owning-a-home-api | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXIS... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXISTS cfpb.rateche... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'ALTER TABLE IF EXIS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.