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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e103191a347baf446e76a12b9bc77986aa95dc2d | udata/__init__.py | udata/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.2.11.dev'
__description__ = 'Open data portal'
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.3.0.dev'
__description__ = 'Open data portal'
| Set working version to 1.3.0.dev | Set working version to 1.3.0.dev
| Python | agpl-3.0 | opendatateam/udata,opendatateam/udata,opendatateam/udata,etalab/udata,etalab/udata,etalab/udata | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.2.11.dev'
__description__ = 'Open data portal'
Set working version to 1.3.0.dev | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.3.0.dev'
__description__ = 'Open data portal'
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.2.11.dev'
__description__ = 'Open data portal'
<commit_msg>Set working version to 1.3.0.dev<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.3.0.dev'
__description__ = 'Open data portal'
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.2.11.dev'
__description__ = 'Open data portal'
Set working version to 1.3.0.dev#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.3.0.d... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import unicode_literals
__version__ = '1.2.11.dev'
__description__ = 'Open data portal'
<commit_msg>Set working version to 1.3.0.dev<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
uData
'''
from __future__ import... |
84e80ed4d36b102761e2c9b6900d46c4e126e9e6 | main.py | main.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
companies ... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
# Initial... | Use separate instances of analysis and trading for each thread | Use separate instances of analysis and trading for each thread
| Python | mit | maxbbraun/trump2cash | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
companies ... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
# Initial... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
# Initial... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link):
companies ... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from google.cloud import error_reporting
from google.cloud import logging
from analysis import Analysis
from trading import Trading
from twitter import Twitter
# Analyzes Trump tweets, makes stock trades, and sends tweet alerts.
def twitter_callback(text, link... |
bd7ef1be82a6cd68060dee47046d90202b3a9e0c | tempest/api/volume/test_availability_zone.py | tempest/api/volume/test_availability_zone.py | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | Remove unnecessary client alias in AvailabilityZoneTestJson | Remove unnecessary client alias in AvailabilityZoneTestJson
The class AvailabilityZoneTestJson is inherited from base.BaseVolumeTest,
and the latter has already declared the availability_zone_client. This
patch removes the unnecessary client alias for availability_zone_client.
Change-Id: I287d742087a72928774325681bb7... | Python | apache-2.0 | masayukig/tempest,masayukig/tempest,Juniper/tempest,Juniper/tempest,openstack/tempest,cisco-openstack/tempest,cisco-openstack/tempest,openstack/tempest | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | <commit_before># Copyright 2014 NEC Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | # Copyright 2014 NEC Corporation
# 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 2014 NEC Corporation
# 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 ... | <commit_before># Copyright 2014 NEC Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... |
bbfb09205974efa969fc636b6e1079a84dad3619 | mcstatus/application.py | mcstatus/application.py | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
try:
query = MinecraftQuery("mc.voltaire.sh", 25565, 10, 3)
basicQuery = query.get_status()
fullQuery = query.get_rules()
except socket.error as e... | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
query = MinecraftQuery("142.54.162.42", 25565)
basic_status = query.get_status()
all_status = query.get_rules()
server_info = 'The server has %d / %d players.' % (basic_... | Revert "check for connection failure" | Revert "check for connection failure"
This reverts commit cf4bd49e150f5542a5a7abba908ca81ebe1b9e75.
| Python | bsd-3-clause | voltaire/minecraft-site-old,voltaire/minecraft-site-old | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
try:
query = MinecraftQuery("mc.voltaire.sh", 25565, 10, 3)
basicQuery = query.get_status()
fullQuery = query.get_rules()
except socket.error as e... | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
query = MinecraftQuery("142.54.162.42", 25565)
basic_status = query.get_status()
all_status = query.get_rules()
server_info = 'The server has %d / %d players.' % (basic_... | <commit_before>from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
try:
query = MinecraftQuery("mc.voltaire.sh", 25565, 10, 3)
basicQuery = query.get_status()
fullQuery = query.get_rules()
except so... | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
query = MinecraftQuery("142.54.162.42", 25565)
basic_status = query.get_status()
all_status = query.get_rules()
server_info = 'The server has %d / %d players.' % (basic_... | from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
try:
query = MinecraftQuery("mc.voltaire.sh", 25565, 10, 3)
basicQuery = query.get_status()
fullQuery = query.get_rules()
except socket.error as e... | <commit_before>from flask import Flask
from minecraft_query import MinecraftQuery
app = Flask(__name__)
@app.route('/mcstatus')
def returnStatus():
try:
query = MinecraftQuery("mc.voltaire.sh", 25565, 10, 3)
basicQuery = query.get_status()
fullQuery = query.get_rules()
except so... |
906247c6431b85c90f8aec8a7f4f73f1064abeba | mezzanine/pages/urls.py | mezzanine/pages/urls.py |
from django.conf.urls.defaults import patterns, url
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)/$", "page", name="page"),
)
|
from django.conf.urls.defaults import patterns, url
from django.conf import settings
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)" + ("/" if settings.APPEND_SLASH else "") + "$", "... | Use Page URLs without trailing slash when settings.APPEND_SLASH is False | Use Page URLs without trailing slash when settings.APPEND_SLASH is False
| Python | bsd-2-clause | biomassives/mezzanine,AlexHill/mezzanine,spookylukey/mezzanine,frankchin/mezzanine,saintbird/mezzanine,adrian-the-git/mezzanine,jjz/mezzanine,agepoly/mezzanine,geodesign/mezzanine,jerivas/mezzanine,saintbird/mezzanine,wyzex/mezzanine,Skytorn86/mezzanine,industrydive/mezzanine,ryneeverett/mezzanine,eino-makitalo/mezzani... |
from django.conf.urls.defaults import patterns, url
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)/$", "page", name="page"),
)
Use Page URLs without trailing slash when settings.APPE... |
from django.conf.urls.defaults import patterns, url
from django.conf import settings
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)" + ("/" if settings.APPEND_SLASH else "") + "$", "... | <commit_before>
from django.conf.urls.defaults import patterns, url
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)/$", "page", name="page"),
)
<commit_msg>Use Page URLs without traili... |
from django.conf.urls.defaults import patterns, url
from django.conf import settings
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)" + ("/" if settings.APPEND_SLASH else "") + "$", "... |
from django.conf.urls.defaults import patterns, url
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)/$", "page", name="page"),
)
Use Page URLs without trailing slash when settings.APPE... | <commit_before>
from django.conf.urls.defaults import patterns, url
# Page patterns.
urlpatterns = patterns("mezzanine.pages.views",
url("^admin_page_ordering/$", "admin_page_ordering",
name="admin_page_ordering"),
url("^(?P<slug>.*)/$", "page", name="page"),
)
<commit_msg>Use Page URLs without traili... |
a9a5b9007f44495806bbdb876553974cd2d44e04 | src/libpepper/utils/type_is.py | src/libpepper/utils/type_is.py | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that instance is of (exact) type... | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that inst is of (exact) type typ... | Fix incorrect name in comment. | Fix incorrect name in comment.
| Python | mit | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that instance is of (exact) type... | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that inst is of (exact) type typ... | <commit_before># Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that instance is ... | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that inst is of (exact) type typ... | # Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that instance is of (exact) type... | <commit_before># Copyright (C) 2013 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
# I assure you before God that what I am writing to you is no lie.
# Galations 1 v20
import types
import abc
def type_is( typ, inst ):
"""
Check that instance is ... |
32d5f2bfcaad65230632f1854fabd2e9de1c151b | tests/query_test/test_chars.py | tests/query_test/test_chars.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | Fix char test to only run on test/none. | Fix char test to only run on test/none.
Change-Id: I8f5ac5a6e7399ce2fdbe78d07ae24deaa1d7532d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4326
Tested-by: jenkins
Reviewed-by: Alex Behm <[email protected]>
| Python | apache-2.0 | ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
r... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
r... |
9909ce7e900097b74b701ad52c0aae5ba68b8823 | morenines/repository.py | morenines/repository.py | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'repo_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.... | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'mn_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.in... | Rework Repository to include paths | Rework Repository to include paths
| Python | mit | mcgid/morenines,mcgid/morenines | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'repo_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.... | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'mn_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.in... | <commit_before>import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'repo_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = Non... | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'mn_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.in... | import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'repo_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = None
self.... | <commit_before>import os
from morenines import output
from morenines import util
from morenines.index import Index
from morenines.ignores import Ignores
NAMES = {
'repo_dir': '.morenines',
'index': 'index',
'ignore': 'ignore',
}
class Repository(object):
def __init__(self):
self.path = Non... |
df95836c39f859a455afd06e32840f5e68fc2c1d | XIA2Version.py | XIA2Version.py | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | Update xia2 version prior to release of DIALS 1.0 | Update xia2 version prior to release of DIALS 1.0
| Python | bsd-3-clause | xia2/xia2,xia2/xia2 | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | <commit_before>#!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.... | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | #!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.
#
VersionNumb... | <commit_before>#!/usr/bin/env python
# XIA2Version.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 6th June 2006
#
# A file containing the version number of the current xia2. Generally useful.... |
0fe3d41a4aa69f1ce39f61623d10985c20e012e8 | network/ipv4_network.py | network/ipv4_network.py | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | Revert "Minor tweak to make netmask checking more flashy :V" | Revert "Minor tweak to make netmask checking more flashy :V"
This reverts commit 6a1bfc3ae8dda1932555a7aada3dd5f0e792507f.
| Python | mit | foxfluff/network-py | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | <commit_before>import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr... | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr):
sel... | <commit_before>import network
import math
class Ipv4Net(network.Network):
def __init__(self, net_id, netmask):
self.netmask = netmask
self.network_id = net_id
@property
def network_id(self):
return self._netid
@network_id.setter
def network_id(self, addr... |
dc071e4961c7db7e98e7dfdcd74cce368ce31039 | dataportal/tests/test_examples.py | dataportal/tests/test_examples.py | from nose.tools import assert_true
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
def run_example(example):
events = example.run()
assert_true(isinstance(events, list))
assert_true(isinsta... | import subprocess
from nose.tools import assert_true, assert_equal
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
examples = [temperature_ramp, multisource_event, image_and_scalar]
def run_example_... | Test commandline execution of examples. | TST: Test commandline execution of examples.
| Python | bsd-3-clause | tacaswell/dataportal,NSLS-II/datamuxer,tacaswell/dataportal,danielballan/datamuxer,NSLS-II/dataportal,ericdill/datamuxer,NSLS-II/dataportal,ericdill/databroker,ericdill/datamuxer,ericdill/databroker,danielballan/dataportal,danielballan/datamuxer,danielballan/dataportal | from nose.tools import assert_true
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
def run_example(example):
events = example.run()
assert_true(isinstance(events, list))
assert_true(isinsta... | import subprocess
from nose.tools import assert_true, assert_equal
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
examples = [temperature_ramp, multisource_event, image_and_scalar]
def run_example_... | <commit_before>from nose.tools import assert_true
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
def run_example(example):
events = example.run()
assert_true(isinstance(events, list))
asse... | import subprocess
from nose.tools import assert_true, assert_equal
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
examples = [temperature_ramp, multisource_event, image_and_scalar]
def run_example_... | from nose.tools import assert_true
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
def run_example(example):
events = example.run()
assert_true(isinstance(events, list))
assert_true(isinsta... | <commit_before>from nose.tools import assert_true
from ..examples.sample_data import (temperature_ramp, multisource_event,
image_and_scalar)
from metadatastore.api import Document
def run_example(example):
events = example.run()
assert_true(isinstance(events, list))
asse... |
cba6d3639f348d60133069fadec223837fde0005 | setup.py | setup.py | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | Update notes on how to publish | Update notes on how to publish
| Python | mit | witchard/ipython-wavedrom,witchard/ipython-wavedrom,witchard/ipython-wavedrom | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | <commit_before>""" Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://githu... | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | """ Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://github.com/witchard/... | <commit_before>""" Setup script for python packaging """
from setuptools import setup
setup(
name="nbwavedrom",
packages=["nbwavedrom"],
version="0.3.0",
description="Wavedrom timing diagrams for Jupyter Notebook",
author="witchard",
author_email="[email protected]",
url="https://githu... |
e6cbf0c51e3bd0f639584a3bbd97c394bd844c57 | setup.py | setup.py | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | Include versions tested on Travis in Trove classifiers | Include versions tested on Travis in Trove classifiers | Python | mit | mewwts/addict | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | <commit_before>from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute a... | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... | <commit_before>from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute a... |
1915cde046c1817c45317ad8ce882e807671fca3 | oauth_api/permissions.py | oauth_api/permissions.py | from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, request, view):
token = request.auth
read_on... | from django.core.exceptions import ImproperlyConfigured
from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, req... | Raise ImproperlyConfigured if resource has no scopes defined | Raise ImproperlyConfigured if resource has no scopes defined
| Python | bsd-2-clause | eofs/django-oauth-api,eofs/django-oauth-api | from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, request, view):
token = request.auth
read_on... | from django.core.exceptions import ImproperlyConfigured
from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, req... | <commit_before>from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, request, view):
token = request.auth
... | from django.core.exceptions import ImproperlyConfigured
from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, req... | from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, request, view):
token = request.auth
read_on... | <commit_before>from rest_framework.permissions import BasePermission
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
class OAuth2ScopePermission(BasePermission):
"""
Make sure request is authenticated and token has right scope set.
"""
def has_permission(self, request, view):
token = request.auth
... |
846a005c20ddc2e7702be48f5b2839b1c9fd1576 | project/apps/api/management/commands/denormalize.py | project/apps/api/management/commands/denormalize.py | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | Remove ranking from denormalization command | Remove ranking from denormalization command
| Python | bsd-2-clause | barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | <commit_before>from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all(... | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all()
for v... | <commit_before>from django.core.management.base import (
BaseCommand,
)
from apps.api.models import (
Convention,
Contest,
Contestant,
Performance,
)
class Command(BaseCommand):
help = "Command to denormailze data."
def handle(self, *args, **options):
vs = Convention.objects.all(... |
5da0d563070f3a966f005a6987dd3e83d52bcaf9 | tailorscad/builder/openscad.py | tailorscad/builder/openscad.py | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | Fix params not being generated for other files | Fix params not being generated for other files
| Python | mit | savorywatt/tailorSCAD | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | <commit_before>import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
... | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
try:
... | <commit_before>import subprocess
import os
#from tailorscad.config import ScadConfig
BASE_DIR = '/usr/bin/'
DEFAULT = BASE_DIR + 'openscad'
def build_with_openscad(state):
args = build_args_from_state(state)
out_call = ''
for arg in args:
out_call += ' ' + arg
print 'args:', out_call
... |
b98ab1c800a13792bdca69c5788e91bc07f1e215 | rpp/encoder.py | rpp/encoder.py | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | Insert new line for each Symbol object | Insert new line for each Symbol object
| Python | bsd-3-clause | Perlence/rpp | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | <commit_before>from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return... | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return '{%s}' % str(v... | <commit_before>from uuid import UUID
from scanner import Symbol
def tostr(value):
if isinstance(value, Symbol):
return str(value)
elif isinstance(value, str):
return '"%s"' % value
elif isinstance(value, float):
return '%.14f' % value
elif isinstance(value, UUID):
return... |
ec768a1aac8429f0c2c1f27c521c8a5f40d32411 | enocean/consolelogger.py | enocean/consolelogger.py | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(logging.DEBUG)
... | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(level)
ch = lo... | Use proper logging level in `init_logging`. | Use proper logging level in `init_logging`.
| Python | mit | Ethal/enocean,kipe/enocean,kipe/enocean,Ethal/enocean | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(logging.DEBUG)
... | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(level)
ch = lo... | <commit_before># -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(logg... | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(level)
ch = lo... | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(logging.DEBUG)
... | <commit_before># -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
import logging
def init_logging(level=logging.DEBUG):
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('enocean')
logger.setLevel(logg... |
42be31155361e5b91c445844da8aefbfd0f44348 | ezoutlet/__init__.py | ezoutlet/__init__.py | # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev2'
| # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev3'
| Increment version number for release. | Increment version number for release.
| Python | mit | jtpereyda/ezoutlet | # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev2'
Increment version number for releas... | # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev3'
| <commit_before># Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev2'
<commit_msg>Incremen... | # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev3'
| # Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev2'
Increment version number for releas... | <commit_before># Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from .ez_outlet import EzOutlet, EzOutletError, EzOutletUsageError, main
__version__ = '0.0.1-dev2'
<commit_msg>Incremen... |
2b70879e2d73453d81ed738f34cf20d39afdc3ad | byceps/blueprints/authorization/decorators.py | byceps/blueprints/authorization/decorators.py | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | Call `has_permission` method instead of accessing the collection directly | Call `has_permission` method instead of accessing the collection directly
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission):
"""Ensur... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.authorization.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from functools import wraps
from flask import abort, g
def permission_required(permission... |
c7d522393930dabc1bb6997bbc2b450d043817e8 | wagtail/utils/widgets.py | wagtail/utils/widgets.py | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | Fix WidgetWithScript to accept renderer kwarg | Fix WidgetWithScript to accept renderer kwarg
| Python | bsd-3-clause | FlipperPA/wagtail,nimasmi/wagtail,timorieber/wagtail,kaedroho/wagtail,wagtail/wagtail,takeflight/wagtail,zerolab/wagtail,kaedroho/wagtail,gasman/wagtail,timorieber/wagtail,zerolab/wagtail,wagtail/wagtail,mikedingjan/wagtail,jnns/wagtail,zerolab/wagtail,mixxorz/wagtail,nimasmi/wagtail,zerolab/wagtail,mixxorz/wagtail,wag... | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | <commit_before>from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self,... | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self, name, value, a... | <commit_before>from django.forms.widgets import Widget
from django.utils.safestring import mark_safe
class WidgetWithScript(Widget):
def render_html(self, name, value, attrs):
"""Render the HTML (non-JS) portion of the field markup"""
return super().render(name, value, attrs)
def render(self,... |
ea3576e16b0a8278cd9d35715c8881e9d136eec8 | paystackapi/tests/test_cpanel.py | paystackapi/tests/test_cpanel.py | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | Add control panel test for update | Add control panel test for update
| Python | mit | andela-sjames/paystack-python | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | <commit_before>import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
ht... | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
httpretty.registe... | <commit_before>import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.cpanel import ControlPanel
class TestPage(BaseTestCase):
@httpretty.activate
def test_fetch_payment_session_timeout(self):
"""Method defined to test fetch payment session timeout."""
ht... |
3d88e62cdd2521472d0475a5f4c8598d49f88571 | code/python/echomesh/sound/CPlayer.py | code/python/echomesh/sound/CPlayer.py | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
de... | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
cla... | Remove tiny amounts of cruft. | Remove tiny amounts of cruft.
| Python | mit | rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
de... | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
cla... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger... | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
cla... | from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger(__name__)
de... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
import cechomesh
from echomesh.expression.Envelope import Envelope
from echomesh.sound import PlayerSetter
from echomesh.util import Log
from echomesh.util.thread.MasterRunnable import MasterRunnable
LOGGER = Log.logger... |
8e0d61aa69a15a9efc967ec263bc73c3018f9b3d | process_to_only_word.py | process_to_only_word.py | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
###########################################################################
argvs = sys.a... | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
# <How to use>
# python process_to_only_word.py <Target file(Already morphological analysi... | Add a "How to use(comment)" | Add a "How to use(comment)"
| Python | mit | shinshin86/little-magnifying-py-glass,shinshin86/little-magnifying-py-glass | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
###########################################################################
argvs = sys.a... | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
# <How to use>
# python process_to_only_word.py <Target file(Already morphological analysi... | <commit_before># -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
###########################################################################... | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
# <How to use>
# python process_to_only_word.py <Target file(Already morphological analysi... | # -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
###########################################################################
argvs = sys.a... | <commit_before># -*- coding: utf-8 -*-
import re
import sys
###########################################################################
# This code is developing yet!!
# Target file(Already morphological analysis file) to process to word only.
###########################################################################... |
c2a8e69a5deee8f72c561f50732570801d4fc9ae | tests/test_stack_operations.py | tests/test_stack_operations.py | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | Add test for variables declared inside a scope (and accessed outside) | Add test for variables declared inside a scope (and accessed outside)
| Python | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | <commit_before>import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("ins... | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("inside before, i =... | <commit_before>import pytest
from thinglang.execution.errors import UnknownVariable
from thinglang.runner import run
def test_stack_resolution_in_block():
assert run("""
thing Program
does start
number i = 0
Output.write("outside before, i =", i)
if true
Output.write("ins... |
aefa8a3d6d4c809c7e470b22a0c9fb2c0875ba8b | project/project/urls.py | project/project/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk', app_name='silk')
),
url(
... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk')
),
url(
r'^exampl... | Remove unneeded app_name from test project to be django 2 compatible | Remove unneeded app_name from test project to be django 2 compatible
| Python | mit | crunchr/silk,mtford90/silk,jazzband/silk,crunchr/silk,mtford90/silk,jazzband/silk,crunchr/silk,django-silk/silk,django-silk/silk,jazzband/silk,django-silk/silk,crunchr/silk,mtford90/silk,jazzband/silk,mtford90/silk,django-silk/silk | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk', app_name='silk')
),
url(
... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk')
),
url(
r'^exampl... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk', app_name='silk')
... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk')
),
url(
r'^exampl... | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk', app_name='silk')
),
url(
... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.auth import views
urlpatterns = [
url(
r'^silk/',
include('silk.urls', namespace='silk', app_name='silk')
... |
aae29a385129e6a1573fac2c631eff8db8ea3079 | stackdio/stackdio/__init__.py | stackdio/stackdio/__init__.py | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Print a more useful warning message | Print a more useful warning message
| Python | apache-2.0 | stackdio/stackdio,clarkperkins/stackdio,stackdio/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# 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 requ... | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2014, Digital Reasoning
#
# 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 requ... |
f457cb13325cbc4b83a3450032856e86fe1285cf | kokki/cookbooks/mongodb/libraries/server.py | kokki/cookbooks/mongodb/libraries/server.py |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... | Make sure to end upstart script with .conf | Make sure to end upstart script with .conf
| Python | bsd-3-clause | samuel/kokki |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... | <commit_before>
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, ... |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... |
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, name)
if 'l... | <commit_before>
import os
from kokki import *
def setup(name, **kwargs):
env = Environment.get_instance()
config = env.config.mongodb.copy()
config.update(kwargs)
config['configpath'] = "/etc/mongodb/%s.conf" % name
if 'dbpath' not in kwargs:
config['dbpath'] = os.path.join(config.dbpath, ... |
067bbbc6c9edbf55606fe6f236c70affd86a1fc0 | tests/convert/test_unit.py | tests/convert/test_unit.py | from unittest.mock import patch
from smif.convert.unit import parse_unit
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_unit_invalid(warning_logger):
"""Warn if unit not recogni... | import numpy as np
from unittest.mock import patch
from smif.convert.unit import parse_unit
from smif.convert import UnitConvertor
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_uni... | Add test for normal unit conversion | Add test for normal unit conversion
| Python | mit | tomalrussell/smif,tomalrussell/smif,nismod/smif,nismod/smif,tomalrussell/smif,nismod/smif,nismod/smif,willu47/smif,willu47/smif,willu47/smif,willu47/smif,tomalrussell/smif | from unittest.mock import patch
from smif.convert.unit import parse_unit
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_unit_invalid(warning_logger):
"""Warn if unit not recogni... | import numpy as np
from unittest.mock import patch
from smif.convert.unit import parse_unit
from smif.convert import UnitConvertor
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_uni... | <commit_before>from unittest.mock import patch
from smif.convert.unit import parse_unit
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_unit_invalid(warning_logger):
"""Warn if u... | import numpy as np
from unittest.mock import patch
from smif.convert.unit import parse_unit
from smif.convert import UnitConvertor
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_uni... | from unittest.mock import patch
from smif.convert.unit import parse_unit
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_unit_invalid(warning_logger):
"""Warn if unit not recogni... | <commit_before>from unittest.mock import patch
from smif.convert.unit import parse_unit
def test_parse_unit_valid():
"""Parse a valid unit
"""
meter = parse_unit('m')
assert str(meter) == 'meter'
@patch('smif.convert.unit.LOGGER.warning')
def test_parse_unit_invalid(warning_logger):
"""Warn if u... |
c56a6c2f861d50d2bdc38ee33d30e4ef614a2de0 | tests/sim/test_entities.py | tests/sim/test_entities.py | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_minimum_speed_is_one(self):
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=0).speed, 1)
| import unittest
from hunting.sim.entities import *
class TestPropertyEffect(unittest.TestCase):
def setUp(self):
self.fighter = Fighter(100, 100, 100, 0, base_speed=100)
def test_add_remove_power(self):
power_buff = PropertyEffect(PROPERTY_POWER, value=100)
self.fighter.add_effect(po... | Add failing tests for buffs | Add failing tests for buffs
| Python | mit | MoyTW/RL_Arena_Experiment | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_minimum_speed_is_one(self):
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=0).speed, 1)
Add failing tests for buffs | import unittest
from hunting.sim.entities import *
class TestPropertyEffect(unittest.TestCase):
def setUp(self):
self.fighter = Fighter(100, 100, 100, 0, base_speed=100)
def test_add_remove_power(self):
power_buff = PropertyEffect(PROPERTY_POWER, value=100)
self.fighter.add_effect(po... | <commit_before>import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_minimum_speed_is_one(self):
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=0).speed, 1)
<commit_msg>Add failing tests for ... | import unittest
from hunting.sim.entities import *
class TestPropertyEffect(unittest.TestCase):
def setUp(self):
self.fighter = Fighter(100, 100, 100, 0, base_speed=100)
def test_add_remove_power(self):
power_buff = PropertyEffect(PROPERTY_POWER, value=100)
self.fighter.add_effect(po... | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_minimum_speed_is_one(self):
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=0).speed, 1)
Add failing tests for buffsimport unittest
from h... | <commit_before>import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_minimum_speed_is_one(self):
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)
self.assertEqual(Fighter(1, 1, 1, 1, base_speed=0).speed, 1)
<commit_msg>Add failing tests for ... |
51660291b043b88eab599c59d8c1ef7ae9dc74d7 | src/core/models.py | src/core/models.py | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now... | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
sta... | Use the existing default name. | Use the existing default name. | Python | mit | uxebu/tddbin-backend,uxebu/tddbin-backend | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now... | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
sta... | <commit_before>from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('starte... | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
sta... | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now... | <commit_before>from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('starte... |
9c6f3e1994f686e57092a7cd947c49b4f857743e | apps/predict/urls.py | apps/predict/urls.py | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | Remove callback url and bring uploads together | Remove callback url and bring uploads together
| Python | agpl-3.0 | IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | <commit_before>"""
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^... | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | """
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^$', Datasets.as... | <commit_before>"""
Predict app's urls
"""
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url
from .views import *
def url_tree(regex, *urls):
"""Quick access to stitching url patterns"""
return url(regex, include(patterns('', *urls)))
urlpatterns = patterns('',
url(r'^... |
a077a5b7731e7d609b5c3adc8f8176ad79053f17 | rmake/lib/twisted_extras/tools.py | rmake/lib/twisted_extras/tools.py | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | Fix Serializer locking bug that caused it to skip calls it should have made | Fix Serializer locking bug that caused it to skip calls it should have made
| Python | apache-2.0 | sassoftware/rmake3,sassoftware/rmake3,sassoftware/rmake3 | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before>#
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before>#
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
42e16bf376a64995a8b70a91829a82d7b0f3e1a1 | gameanalysis/__main__.py | gameanalysis/__main__.py | """Command line module"""
import argparse
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path__)]
parser ... | """Command line module"""
import argparse
import logging
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path_... | Add logging verbosity to game analysis | Add logging verbosity to game analysis
| Python | apache-2.0 | egtaonline/GameAnalysis | """Command line module"""
import argparse
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path__)]
parser ... | """Command line module"""
import argparse
import logging
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path_... | <commit_before>"""Command line module"""
import argparse
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path_... | """Command line module"""
import argparse
import logging
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path_... | """Command line module"""
import argparse
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path__)]
parser ... | <commit_before>"""Command line module"""
import argparse
import pkgutil
import sys
import gameanalysis
from gameanalysis import script
def create_parser():
"""Create the default parser"""
modules = [imp.find_module(name).load_module(name) for imp, name, _
in pkgutil.iter_modules(script.__path_... |
ccc57956f83af2c8ef8c9e064fadfe5db2155302 | avatar/conf.py | avatar/conf.py | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'http://www.gravatar.com/avatar/'
GRAVAT... | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'https://www.gravatar.com/avatar/'
GRAVA... | Use https url to avoid serving insecure content | Gravatar: Use https url to avoid serving insecure content
| Python | bsd-3-clause | tbabej/django-avatar,tbabej/django-avatar | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'http://www.gravatar.com/avatar/'
GRAVAT... | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'https://www.gravatar.com/avatar/'
GRAVA... | <commit_before>from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'http://www.gravatar.com/avat... | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'https://www.gravatar.com/avatar/'
GRAVA... | from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'http://www.gravatar.com/avatar/'
GRAVAT... | <commit_before>from django.conf import settings
from PIL import Image
from appconf import AppConf
class AvatarConf(AppConf):
DEFAULT_SIZE = 80
RESIZE_METHOD = Image.ANTIALIAS
STORAGE_DIR = 'avatars'
STORAGE_PARAMS = {}
GRAVATAR_FIELD = 'email'
GRAVATAR_BASE_URL = 'http://www.gravatar.com/avat... |
f5d0f8cd145c759cff6d5f6cfeb46459efaa63ca | sale_line_description/__openerp__.py | sale_line_description/__openerp__.py | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | Remove active key since is deprecated | Remove active key since is deprecated
| Python | agpl-3.0 | anas-taji/sale-workflow,brain-tec/sale-workflow,luistorresm/sale-workflow,factorlibre/sale-workflow,BT-fgarbely/sale-workflow,adhoc-dev/sale-workflow,jjscarafia/sale-workflow,richard-willowit/sale-workflow,VitalPet/sale-workflow,akretion/sale-workflow,ddico/sale-workflow,fevxie/sale-workflow,xpansa/sale-workflow,Endika... | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | <commit_before># -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, ... | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version ... | <commit_before># -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, ... |
032ce88cbee5399c97486122e7bd3b8013e88dda | djangae/__init__.py | djangae/__init__.py | import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from patches import json
json.patch()
| import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from .patches import json
json.patch()
| Make import of `patches` explicitly relative. | Make import of `patches` explicitly relative.
Avoids potential conflict if you add a global package called `patches`, and will avoid breakage if this moves to Python 3.
| Python | bsd-3-clause | armirusco/djangae,potatolondon/djangae,armirusco/djangae,potatolondon/djangae,kirberich/djangae,grzes/djangae,kirberich/djangae,armirusco/djangae,asendecka/djangae,grzes/djangae,kirberich/djangae,asendecka/djangae,asendecka/djangae,grzes/djangae | import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from patches import json
json.patch()
Make import of `patches` explicitly relat... | import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from .patches import json
json.patch()
| <commit_before>import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from patches import json
json.patch()
<commit_msg>Make import of... | import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from .patches import json
json.patch()
| import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from patches import json
json.patch()
Make import of `patches` explicitly relat... | <commit_before>import os
import sys
extra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lib")
if extra_library_path not in sys.path:
sys.path.insert(1, extra_library_path)
default_app_config = 'djangae.apps.DjangaeConfig'
from patches import json
json.patch()
<commit_msg>Make import of... |
c6926dda0a9e6e1515721e54788c29d0ef8b58a4 | tests/test_sqlcompletion.py | tests/test_sqlcompletion.py | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_lparen_suggest_cols():
suggestion = suggest_type('SELECT MAX( FROM tbl', 'SEL... | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_where_suggests_columns_functions():
suggestion = suggest_type('SELECT * FROM ... | Add a test for where clause and rename all tests functions. | Add a test for where clause and rename all tests functions.
| Python | bsd-3-clause | thedrow/pgcli,d33tah/pgcli,n-someya/pgcli,bitmonk/pgcli,joewalnes/pgcli,yx91490/pgcli,TamasNo1/pgcli,MattOates/pgcli,TamasNo1/pgcli,j-bennet/pgcli,lk1ngaa7/pgcli,zhiyuanshi/pgcli,koljonen/pgcli,dbcli/vcli,dbcli/pgcli,lk1ngaa7/pgcli,dbcli/pgcli,j-bennet/pgcli,suzukaze/pgcli,janusnic/pgcli,darikg/pgcli,johshoff/pgcli,nos... | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_lparen_suggest_cols():
suggestion = suggest_type('SELECT MAX( FROM tbl', 'SEL... | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_where_suggests_columns_functions():
suggestion = suggest_type('SELECT * FROM ... | <commit_before>from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_lparen_suggest_cols():
suggestion = suggest_type('SELECT MAX( ... | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_where_suggests_columns_functions():
suggestion = suggest_type('SELECT * FROM ... | from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_lparen_suggest_cols():
suggestion = suggest_type('SELECT MAX( FROM tbl', 'SEL... | <commit_before>from pgcli.packages.sqlcompletion import suggest_type
def test_select_suggests_cols_with_table_scope():
suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')
assert suggestion == ('columns-and-functions', ['tabl'])
def test_lparen_suggest_cols():
suggestion = suggest_type('SELECT MAX( ... |
52982c735f729ddf0a9c020d495906c4a4899462 | txircd/modules/rfc/umode_i.py | txircd/modules/rfc/umode_i.py | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | Make the invisible check action not necessarily require an accompanying channel | Make the invisible check action not necessarily require an accompanying channel
| Python | bsd-3-clause | Heufneutje/txircd,ElementalAlchemist/txircd | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core ... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core = True
affe... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class InvisibleMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "InvisibleMode"
core ... |
8d8eeaa9fd06cd1fc9860a4e5b215e8ed7f107af | openprocurement/tender/esco/views/award_complaint.py | openprocurement/tender/esco/views/award_complaint.py | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:TenderAward Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/co... | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:Tender Award Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/c... | Fix in award complaint view | Fix in award complaint view
| Python | apache-2.0 | Scandie/openprocurement.tender.esco,openprocurement/openprocurement.tender.esco | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:TenderAward Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/co... | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:Tender Award Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/c... | <commit_before># -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:TenderAward Complaints',
collection_path='/tenders/{tender_id}/award... | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:Tender Award Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/c... | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:TenderAward Complaints',
collection_path='/tenders/{tender_id}/awards/{award_id}/co... | <commit_before># -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource
@optendersresource(name='esco.EU:TenderAward Complaints',
collection_path='/tenders/{tender_id}/award... |
0ce8e39bc641c2b68c3c2bd460a38efc5e4eff01 | automate.py | automate.py | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | Increase timer on automation to avoid raising suspicion | Increase timer on automation to avoid raising suspicion
| Python | mit | jshaker/igbot | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | <commit_before>import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.... | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.message)
nav... | <commit_before>import login
import time
import navigate
import modal
def automate(username, password, tag):
driver = login.login(username, password)
navigate.tag(driver, tag)
modal.open(driver)
while True:
try:
modal.follow(driver)
modal.next(driver)
except Exception as e:
print(e.__doc__)
print(e.... |
c447ca3d85d9862be38034be85b2328e3d6b02a3 | vcproj/tests/test_solution.py | vcproj/tests/test_solution.py | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')
def test_all_projects(test_sol):
projects = test_sol.project_names()
len(list(projects)) == 59
def test_project_n... | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/test.sln')
def test_project_files(test_sol):
assert list(test_sol.project_files()) == ['test\\test.vcxproj', 'lib1\\lib1.vcxproj', 'lib2\\lib2... | Add back in test of 2010 solution | Add back in test of 2010 solution
| Python | unlicense | jhandley/pyvcproj,jhandley/pyvcproj,jhandley/pyvcproj | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')
def test_all_projects(test_sol):
projects = test_sol.project_names()
len(list(projects)) == 59
def test_project_n... | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/test.sln')
def test_project_files(test_sol):
assert list(test_sol.project_files()) == ['test\\test.vcxproj', 'lib1\\lib1.vcxproj', 'lib2\\lib2... | <commit_before>import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')
def test_all_projects(test_sol):
projects = test_sol.project_names()
len(list(projects)) == 59
def... | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/test.sln')
def test_project_files(test_sol):
assert list(test_sol.project_files()) == ['test\\test.vcxproj', 'lib1\\lib1.vcxproj', 'lib2\\lib2... | import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')
def test_all_projects(test_sol):
projects = test_sol.project_names()
len(list(projects)) == 59
def test_project_n... | <commit_before>import vcproj.solution
import tempfile, filecmp
import pytest
@pytest.fixture(scope="session")
def test_sol():
return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')
def test_all_projects(test_sol):
projects = test_sol.project_names()
len(list(projects)) == 59
def... |
fb91bf1e7c1677124f4aa1ce9c534fb437145980 | pygametemplate/helper.py | pygametemplate/helper.py | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | Replace % with f-string :) | Replace % with f-string :)
| Python | mit | AndyDeany/pygame-template | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | <commit_before>"""Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_n... | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | """Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_name, assets_dic... | <commit_before>"""Module containing helper functions for using pygame."""
def load_class_assets(calling_object, assets_dict):
"""Load class assets. Only call if class_assets_loaded is False."""
calling_class = type(calling_object)
for attribute_name in assets_dict:
setattr(calling_class, attribute_n... |
b57d0b0d3d65995270318d94b551d8bacda73d22 | baseline.py | baseline.py | #/usr/bin/python
""" Baseline example that needs to be beaten """
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.dot(cov, n... | #/usr/bin/python
""" Baseline example that needs to be beaten """
import os
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.... | Add results to environment parameters RESULT_M, RESULT_B | Add results to environment parameters RESULT_M, RESULT_B
| Python | mit | arfon/dottravis,arfon/dottravis | #/usr/bin/python
""" Baseline example that needs to be beaten """
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.dot(cov, n... | #/usr/bin/python
""" Baseline example that needs to be beaten """
import os
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.... | <commit_before>#/usr/bin/python
""" Baseline example that needs to be beaten """
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls ... | #/usr/bin/python
""" Baseline example that needs to be beaten """
import os
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.... | #/usr/bin/python
""" Baseline example that needs to be beaten """
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls = np.dot(cov, n... | <commit_before>#/usr/bin/python
""" Baseline example that needs to be beaten """
import numpy as np
import matplotlib.pyplot as plt
x, y, yerr = np.loadtxt("data/data.txt", unpack=True)
A = np.vstack((np.ones_like(x), x)).T
C = np.diag(yerr * yerr)
cov = np.linalg.inv(np.dot(A.T, np.linalg.solve(C, A)))
b_ls, m_ls ... |
b960962472f1c40fbaa1338d2cba316810ba119b | tt_dailyemailblast/admin.py | tt_dailyemailblast/admin.py | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | Include all dates in blast list display | Include all dates in blast list display
| Python | apache-2.0 | texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | <commit_before>from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
c... | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
class RecipientI... | <commit_before>from django.contrib import admin
from django.db import models as django_models
from tinymce.widgets import TinyMCE
from .models import (Recipient, RecipientList, DailyEmailBlast,
DailyEmailBlastType)
def send_blasts(model_admin, request, qs):
for blast in qs:
print blast.send()
c... |
ef404dad280ec2f7317e0176d3e91b20d1bbe7c0 | inbox/notify/__init__.py | inbox/notify/__init__.py | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | Add logger an try/except logic | Add logger an try/except logic
| Python | agpl-3.0 | jobscore/sync-engine,jobscore/sync-engine,jobscore/sync-engine,jobscore/sync-engine | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | <commit_before>from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | <commit_before>from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS... |
45261d57bdb1ee23c84ea6c5d83550b7e84c26f1 | highlander/highlander.py | highlander/highlander.py | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | Check to make sure the file doesn't exist if we get to the set running state. | Check to make sure the file doesn't exist if we get to the set running state.
| Python | mit | chriscannon/highlander | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | <commit_before>from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is... | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is_running(pid_fi... | <commit_before>from functools import wraps
from logging import getLogger
from os import getcwd, unlink
from os.path import join, realpath, isfile
from psutil import Process
logger = getLogger(__name__)
def one(f):
@wraps(f)
def decorator():
pid_file = realpath(join(getcwd(), '.pid'))
if _is... |
3d1612e5f9e20cf74a962dd4ca1b538776d5ec7e | StationPopWithoutTrain.py | StationPopWithoutTrain.py | def before_train_station_pop(station, escalator):
# calculate the number of people waiting to depart on the train by the time the train arive.
station.travelers_departing = station.travelers_departing + (escalator.rate * escalators.entering * station.train_wait)
# number of people who have arived and want t... | """This module calculates the number of people in the station by the time the next train arives"""
def before_train_station_pop(station, escalator):
"""This function calculates the total number of people as a sume of people
waiting to board the next train, and the number of people waiting to leave
the stat... | Simplify the function to calculate the platform population between trains | Simplify the function to calculate the platform population between trains
The function to calculate the change in platform population in the time
between trains was needlessly complex. It has now been simplified.
ref #17
| Python | mit | ForestPride/rail-problem | def before_train_station_pop(station, escalator):
# calculate the number of people waiting to depart on the train by the time the train arive.
station.travelers_departing = station.travelers_departing + (escalator.rate * escalators.entering * station.train_wait)
# number of people who have arived and want t... | """This module calculates the number of people in the station by the time the next train arives"""
def before_train_station_pop(station, escalator):
"""This function calculates the total number of people as a sume of people
waiting to board the next train, and the number of people waiting to leave
the stat... | <commit_before>def before_train_station_pop(station, escalator):
# calculate the number of people waiting to depart on the train by the time the train arive.
station.travelers_departing = station.travelers_departing + (escalator.rate * escalators.entering * station.train_wait)
# number of people who have ar... | """This module calculates the number of people in the station by the time the next train arives"""
def before_train_station_pop(station, escalator):
"""This function calculates the total number of people as a sume of people
waiting to board the next train, and the number of people waiting to leave
the stat... | def before_train_station_pop(station, escalator):
# calculate the number of people waiting to depart on the train by the time the train arive.
station.travelers_departing = station.travelers_departing + (escalator.rate * escalators.entering * station.train_wait)
# number of people who have arived and want t... | <commit_before>def before_train_station_pop(station, escalator):
# calculate the number of people waiting to depart on the train by the time the train arive.
station.travelers_departing = station.travelers_departing + (escalator.rate * escalators.entering * station.train_wait)
# number of people who have ar... |
88bd31ebfcaafe7de386f8d00869eed6286066f7 | cetacean/response.py | cetacean/response.py | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | Make Response.is_hal() return a literal boolean. | Make Response.is_hal() return a literal boolean.
| Python | mit | nanorepublica/cetacean-python,benhamill/cetacean-python | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
... | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | #!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
"""
sel... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import re
class Response(object):
"""Represents an HTTP response that is hopefully a HAL document."""
def __init__(self, response):
"""Pass it a Requests response object.
:response: A response object from the Requests library.
... |
b3befb47d4b48e83b42fc6b10a10269d32cafb4e | src-backend/api/urls.py | src-backend/api/urls.py | from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
| from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter(trailing_slash=False)
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
| Remove trailing slash from the router | Remove trailing slash from the router
| Python | bsd-3-clause | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
Remove trailing slash from the router | from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter(trailing_slash=False)
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
| <commit_before>from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
<commit_msg>Remove trailing slash from the router<commi... | from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter(trailing_slash=False)
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
| from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
Remove trailing slash from the routerfrom django.conf.urls import url,... | <commit_before>from django.conf.urls import url, include
from views import ProcedureViewSet
from rest_framework import routers
router = routers.SimpleRouter()
router.register(r'procedures', ProcedureViewSet)
urlpatterns = [
url(r'^', include(router.urls))
]
<commit_msg>Remove trailing slash from the router<commi... |
c40fc13dca5a0596a72d5c26214777f8a2845675 | tests/test_repr.py | tests/test_repr.py | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = p.__str__()
# verify
... | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = str(p)
# verify
... | Use str(p) and not p.__str__() | Use str(p) and not p.__str__()
| Python | isc | bangi123/pexpect,Depado/pexpect,dongguangming/pexpect,Depado/pexpect,quatanium/pexpect,Wakeupbuddy/pexpect,Wakeupbuddy/pexpect,Depado/pexpect,crdoconnor/pexpect,crdoconnor/pexpect,quatanium/pexpect,nodish/pexpect,quatanium/pexpect,crdoconnor/pexpect,dongguangming/pexpect,Wakeupbuddy/pexpect,Wakeupbuddy/pexpect,Depado/p... | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = p.__str__()
# verify
... | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = str(p)
# verify
... | <commit_before>""" Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = p.__str__()
... | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = str(p)
# verify
... | """ Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = p.__str__()
# verify
... | <commit_before>""" Test __str__ methods. """
import pexpect
from . import PexpectTestCase
class TestCaseMisc(PexpectTestCase.PexpectTestCase):
def test_str_spawnu(self):
""" Exercise spawnu.__str__() """
# given,
p = pexpect.spawnu('cat')
# exercise,
value = p.__str__()
... |
6110bc1137f5e3f1f12249c366323c6c0b48dbe3 | IPython/nbconvert/utils/base.py | IPython/nbconvert/utils/base.py | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | Revert "Moved JS in front of HTML" | Revert "Moved JS in front of HTML"
This reverts commit 8b0164edde418138d4e28c20d63fa422931ae6a8.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | <commit_before>"""Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software... | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | """Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------... | <commit_before>"""Global configuration class."""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software... |
9a6467688f567abc405a3fca6c4bfda7b6cd0351 | FileWatcher.py | FileWatcher.py | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | Handle filepaths in an OS independent manner. | Handle filepaths in an OS independent manner.
--CAR
| Python | apache-2.0 | BBN-Q/PyQLab,calebjordan/PyQLab,Plourde-Research-Lab/PyQLab,rmcgurrin/PyQLab | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | <commit_before>from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callbac... | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callback
def on_m... | <commit_before>from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
class MyEventHandler(FileSystemEventHandler):
def __init__(self, filePath, callback):
super(MyEventHandler, self).__init__()
self.filePath = filePath
self.callback = callbac... |
b50ef13cb25c795a1ad3b2bfdbbb47b709fcbd39 | binding/python/__init__.py | binding/python/__init__.py | # This file is part of SpaceVecAlg.
#
# SpaceVecAlg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SpaceVecAlg is distribut... | # This file is part of RBDyn.
#
# RBDyn is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RBDyn is distributed in the hope tha... | Fix bad copy/past in licence header. | Fix bad copy/past in licence header.
| Python | bsd-2-clause | jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn | # This file is part of SpaceVecAlg.
#
# SpaceVecAlg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SpaceVecAlg is distribut... | # This file is part of RBDyn.
#
# RBDyn is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RBDyn is distributed in the hope tha... | <commit_before># This file is part of SpaceVecAlg.
#
# SpaceVecAlg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SpaceVecA... | # This file is part of RBDyn.
#
# RBDyn is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RBDyn is distributed in the hope tha... | # This file is part of SpaceVecAlg.
#
# SpaceVecAlg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SpaceVecAlg is distribut... | <commit_before># This file is part of SpaceVecAlg.
#
# SpaceVecAlg is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SpaceVecA... |
02ea7389a364fe1f7df48542d4727c32374da452 | scripts/master/factory/dart/channels.py | scripts/master/factory/dart/channels.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | Update stable channel builders to pull from 1.3 | Update stable channel builders to pull from 1.3
Review URL: https://codereview.chromium.org/225263024
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@262391 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... |
c1e5822f07e2fe4ca47633ed3dfda7d7bee64b6c | nvchecker/source/aiohttp_httpclient.py | nvchecker/source/aiohttp_httpclient.py | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.message = messag... | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import asyncio
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.m... | Handle graceful exit and timeout | Handle graceful exit and timeout
Timeout was refactored and the defaults work correctly here.
| Python | mit | lilydjwg/nvchecker | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.message = messag... | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import asyncio
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.m... | <commit_before># MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.m... | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import asyncio
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.m... | # MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.message = messag... | <commit_before># MIT licensed
# Copyright (c) 2013-2017 lilydjwg <[email protected]>, et al.
import atexit
import aiohttp
connector = aiohttp.TCPConnector(limit=20)
__all__ = ['session', 'HTTPError']
class HTTPError(Exception):
def __init__(self, code, message, response):
self.code = code
self.m... |
9f81cc80e1a82f4a26e400dd2ae5c290abe48382 | Discord/tree.py | Discord/tree.py |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, command, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {comman... |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {interaction.com... | Update CommandTree.on_error to only take two parameters | [Discord] Update CommandTree.on_error to only take two parameters
Remove command parameter, matching discord.py update, and use Interaction.command instead
| Python | mit | Harmon758/Harmonbot,Harmon758/Harmonbot |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, command, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {comman... |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {interaction.com... | <commit_before>
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, command, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash ... |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {interaction.com... |
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, command, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash command {comman... | <commit_before>
from discord import app_commands
import logging
import sys
import traceback
import sentry_sdk
class CommandTree(app_commands.CommandTree):
async def on_error(self, interaction, command, error):
sentry_sdk.capture_exception(error)
print(
f"Ignoring exception in slash ... |
9bab06465d2b2665efaac4edea2e3c538c600908 | installer/hooks/hook-moduleManager.py | installer/hooks/hook-moduleManager.py | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | Update installer to new scheme. | Update installer to new scheme.
| Python | bsd-3-clause | chrisidefix/devide,zhangfangyan/devide,nagyistoce/devide,ivoflipse/devide,fvpolpeta/devide,chrisidefix/devide,fvpolpeta/devide,ivoflipse/devide,nagyistoce/devide,zhangfangyan/devide | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | <commit_before>import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook ... | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook for moduleManag... | <commit_before>import os
import sys
if sys.platform.startswith('win'):
sys.path.insert(0, 'c:/work/code/dscas3/')
else:
sys.path.insert(0, '/home/cpbotha/work/code/dscas3/')
import modules
# * we need to give the module paths relative to the directory moduleManager
# is in (I think, since this is the hook ... |
3856b48af3e83f49a66c0c29b81e0a80ad3248d9 | nubes/connectors/aws/connector.py | nubes/connectors/aws/connector.py | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | Move client and resource to __init__ | Move client and resource to __init__
* moved the calls to create the ec2 session resource session client
to the init
| Python | apache-2.0 | omninubes/nubes | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | <commit_before>import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access... | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret... | <commit_before>import boto3.session
from nubes.connectors import base
class AWSConnector(base.BaseConnector):
def __init__(self, aws_access_key_id, aws_secret_access_key, region_name):
self.connection = boto3.session.Session(
aws_access_key_id=aws_access_key_id,
aws_secret_access... |
770bbf80a78d2f418e47ca2dc641c7dccbb86cac | rollbar/test/asgi_tests/helper.py | rollbar/test/asgi_tests/helper.py | import asyncio
import functools
from rollbar.contrib.asgi import ASGIApp
def async_test_func_wrapper(asyncfunc):
@functools.wraps(asyncfunc)
def wrapper(*args, **kwargs):
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
... | import asyncio
import functools
import inspect
import sys
from rollbar.contrib.asgi import ASGIApp
def run(coro):
if sys.version_info >= (3, 7):
return asyncio.run(coro)
assert inspect.iscoroutine(coro)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
return loo... | Refactor async wrapper. Use asyncio.run() for Py3.7 | Refactor async wrapper. Use asyncio.run() for Py3.7
| Python | mit | rollbar/pyrollbar | import asyncio
import functools
from rollbar.contrib.asgi import ASGIApp
def async_test_func_wrapper(asyncfunc):
@functools.wraps(asyncfunc)
def wrapper(*args, **kwargs):
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
... | import asyncio
import functools
import inspect
import sys
from rollbar.contrib.asgi import ASGIApp
def run(coro):
if sys.version_info >= (3, 7):
return asyncio.run(coro)
assert inspect.iscoroutine(coro)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
return loo... | <commit_before>import asyncio
import functools
from rollbar.contrib.asgi import ASGIApp
def async_test_func_wrapper(asyncfunc):
@functools.wraps(asyncfunc)
def wrapper(*args, **kwargs):
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.new_even... | import asyncio
import functools
import inspect
import sys
from rollbar.contrib.asgi import ASGIApp
def run(coro):
if sys.version_info >= (3, 7):
return asyncio.run(coro)
assert inspect.iscoroutine(coro)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
return loo... | import asyncio
import functools
from rollbar.contrib.asgi import ASGIApp
def async_test_func_wrapper(asyncfunc):
@functools.wraps(asyncfunc)
def wrapper(*args, **kwargs):
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
... | <commit_before>import asyncio
import functools
from rollbar.contrib.asgi import ASGIApp
def async_test_func_wrapper(asyncfunc):
@functools.wraps(asyncfunc)
def wrapper(*args, **kwargs):
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.new_even... |
c32e87894d4baf404d5b300459fc68a6d9d973c8 | zun/db/__init__.py | zun/db/__init__.py | # Copyright 2015 NEC Corporation. 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 2015 NEC Corporation. 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... | Remove the duplicated config sqlite_db | Remove the duplicated config sqlite_db
The config sqlite_db has been removed from oslo.db. See here:
https://review.openstack.org/#/c/449437/
Change-Id: I9197b08aeb7baabf2d3fdd4cf4bd06b57a6782ff
| Python | apache-2.0 | kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun | # Copyright 2015 NEC Corporation. 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 2015 NEC Corporation. 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 2015 NEC Corporation. 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 2015 NEC Corporation. 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 2015 NEC Corporation. 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 2015 NEC Corporation. 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 ... |
a0b7ba97cd996209ce2e9770ba0ec25111c85dd2 | rapcom/__init__.py | rapcom/__init__.py | # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
| # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 1, 'dev')
__version__ = '.'.join(map(str, __version_info__... | Update the version to 0.1.1.dev | Update the version to 0.1.1.dev
| Python | mit | contains-io/rcli | # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
Upda... | # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 1, 'dev')
__version__ = '.'.join(map(str, __version_info__... | <commit_before># -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __versio... | # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 1, 'dev')
__version__ = '.'.join(map(str, __version_info__... | # -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
Upda... | <commit_before># -*- coding: utf-8 -*-
"""The primary module for the program.
Variables:
__version_info__: A tuple containing the individual parts of the version.
__version__: The version string.
"""
from __future__ import unicode_literals
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __versio... |
b8ac8edbd12c6b021815e4fa4fd68cfee7dc18cf | frigg/builds/api.py | frigg/builds/api.py | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_required
from .models import Build, Project
@token_req... | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_re... | Add @never_cache decorator to the badge view | Add @never_cache decorator to the badge view
| Python | mit | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_required
from .models import Build, Project
@token_req... | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_re... | <commit_before># -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_required
from .models import Build, Proje... | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_re... | # -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_required
from .models import Build, Project
@token_req... | <commit_before># -*- coding: utf8 -*-
import json
from django.http import HttpResponse, Http404
from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from frigg.decorators import token_required
from .models import Build, Proje... |
04b7e79ce3fed1afac129098badb632ca226fdee | dispatch.py | dispatch.py | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | Add wsgi handler by default | Add wsgi handler by default
| Python | isc | Lagg/optf2,FlaminSarge/optf2,Lagg/optf2,FlaminSarge/optf2,Lagg/optf2,FlaminSarge/optf2 | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | <commit_before>#!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOF... | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | #!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVID... | <commit_before>#!/usr/bin/env python
"""
Copyright (c) 2008-2011, Anthony Garcia <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOF... |
67255ac86d2ef91ce355655112c919f2e08045b4 | django_uwsgi/urls.py | django_uwsgi/urls.py | from django.conf.urls import patterns, url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
| Remove usage of patterns in import line | Remove usage of patterns in import line
| Python | mit | unbit/django-uwsgi,unbit/django-uwsgi | from django.conf.urls import patterns, url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
Remove usage ... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
| <commit_before>from django.conf.urls import patterns, url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
| from django.conf.urls import patterns, url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
]
Remove usage ... | <commit_before>from django.conf.urls import patterns, url
from . import views
urlpatterns = [
url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),
url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),
url(r'^clear_cache/$', views.UwsgiCacheClear.as_view(), name='uwsgi_cache_clear'),
... |
e2ac721cb3e745a149e039aec0f71d33d1e28efc | api/base/renderers.py | api/base/renderers.py | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
stuff = super(JSONAPIRenderer, self).render(dat... | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
# TODO: There should be a way to do this that ... | Add TODO and clean up render function | Add TODO and clean up render function
[#OSF-5081]
| Python | apache-2.0 | adlius/osf.io,brandonPurvis/osf.io,mattclark/osf.io,Johnetordoff/osf.io,amyshi188/osf.io,CenterForOpenScience/osf.io,SSJohns/osf.io,emetsger/osf.io,kch8qx/osf.io,samchrisinger/osf.io,samchrisinger/osf.io,kch8qx/osf.io,rdhyee/osf.io,binoculars/osf.io,aaxelb/osf.io,samchrisinger/osf.io,hmoco/osf.io,binoculars/osf.io,TomH... | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
stuff = super(JSONAPIRenderer, self).render(dat... | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
# TODO: There should be a way to do this that ... | <commit_before>import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
stuff = super(JSONAPIRenderer, s... | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
# TODO: There should be a way to do this that ... | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
stuff = super(JSONAPIRenderer, self).render(dat... | <commit_before>import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer
class JSONAPIRenderer(JSONRenderer):
format = "jsonapi"
media_type = 'application/vnd.api+json'
def render(self, data, accepted_media_type=None, renderer_context=None):
stuff = super(JSONAPIRenderer, s... |
b2cac05be3f6c510edfaf1ae478fabdcf06fd19a | mgsv_names.py | mgsv_names.py | import random
global adjectives, animals, rares
with open('adjectives.txt') as f:
adjectives = f.readlines()
with open('animals.txt') as f:
animals = f.readlines()
with open('rares.txt') as f:
rares = f.readlines()
uncommons = {
# Adjectives:
'master': 'miller',
'raging': 'bull'... | import random, os
global adjectives, animals, rares
with open(os.path.join(os.path.dirname(__file__), 'adjectives.txt')) as f:
adjectives = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'animals.txt')) as f:
animals = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'rares.t... | Load text files from the same dir as the script. | Load text files from the same dir as the script.
Also renamed our name generator.
| Python | unlicense | rotated8/mgsv_names | import random
global adjectives, animals, rares
with open('adjectives.txt') as f:
adjectives = f.readlines()
with open('animals.txt') as f:
animals = f.readlines()
with open('rares.txt') as f:
rares = f.readlines()
uncommons = {
# Adjectives:
'master': 'miller',
'raging': 'bull'... | import random, os
global adjectives, animals, rares
with open(os.path.join(os.path.dirname(__file__), 'adjectives.txt')) as f:
adjectives = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'animals.txt')) as f:
animals = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'rares.t... | <commit_before>import random
global adjectives, animals, rares
with open('adjectives.txt') as f:
adjectives = f.readlines()
with open('animals.txt') as f:
animals = f.readlines()
with open('rares.txt') as f:
rares = f.readlines()
uncommons = {
# Adjectives:
'master': 'miller',
'... | import random, os
global adjectives, animals, rares
with open(os.path.join(os.path.dirname(__file__), 'adjectives.txt')) as f:
adjectives = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'animals.txt')) as f:
animals = f.readlines()
with open(os.path.join(os.path.dirname(__file__), 'rares.t... | import random
global adjectives, animals, rares
with open('adjectives.txt') as f:
adjectives = f.readlines()
with open('animals.txt') as f:
animals = f.readlines()
with open('rares.txt') as f:
rares = f.readlines()
uncommons = {
# Adjectives:
'master': 'miller',
'raging': 'bull'... | <commit_before>import random
global adjectives, animals, rares
with open('adjectives.txt') as f:
adjectives = f.readlines()
with open('animals.txt') as f:
animals = f.readlines()
with open('rares.txt') as f:
rares = f.readlines()
uncommons = {
# Adjectives:
'master': 'miller',
'... |
40edd4a635dd8f83a21f15f22883e7dae8d8d0a8 | test/test_modes/test_backspace.py | test/test_modes/test_backspace.py | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | Fix test backspace (this test has to be changed since the parent implementation is now called when there is no space to eat) | Fix test backspace (this test has to be changed since the parent implementation is now called when there is no space to eat)
| Python | mit | pyQode/pyqode.core,zwadar/pyqode.core,pyQode/pyqode.core | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | <commit_before>from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
... | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
assert mode.... | <commit_before>from pyqode.qt import QtCore
from pyqode.qt.QtTest import QTest
from pyqode.core.api import TextHelper
from pyqode.core import modes
from test.helpers import editor_open
def get_mode(editor):
return editor.modes.get(modes.SmartBackSpaceMode)
def test_enabled(editor):
mode = get_mode(editor)
... |
e68836173dec1e1fe80e07cca8eb67ebe19e424e | cegui/src/ScriptingModules/PythonScriptModule/bindings/distutils/PyCEGUI/__init__.py | cegui/src/ScriptingModules/PythonScriptModule/bindings/distutils/PyCEGUI/__init__.py | import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(str(fake).split()[3][1:])
libpath = os.path.abspath(get_my_path())
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
| import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(os.path.abspath(fake.__file__))
libpath = get_my_path()
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
| Use a less pathetic method to retrieve the PyCEGUI dirname | MOD: Use a less pathetic method to retrieve the PyCEGUI dirname
| Python | mit | ruleless/CEGUI,OpenTechEngine/CEGUI,ruleless/CEGUI,ruleless/CEGUI,ruleless/CEGUI,OpenTechEngine/CEGUI,OpenTechEngine/CEGUI,OpenTechEngine/CEGUI | import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(str(fake).split()[3][1:])
libpath = os.path.abspath(get_my_path())
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
MOD: Use a less pathetic method t... | import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(os.path.abspath(fake.__file__))
libpath = get_my_path()
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
| <commit_before>import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(str(fake).split()[3][1:])
libpath = os.path.abspath(get_my_path())
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
<commit_msg>MOD: U... | import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(os.path.abspath(fake.__file__))
libpath = get_my_path()
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
| import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(str(fake).split()[3][1:])
libpath = os.path.abspath(get_my_path())
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
MOD: Use a less pathetic method t... | <commit_before>import os
import os.path
# atrocious and unholy!
def get_my_path():
import fake
return os.path.dirname(str(fake).split()[3][1:])
libpath = os.path.abspath(get_my_path())
#print "libpath =", libpath
os.environ['PATH'] = libpath + ";" + os.environ['PATH']
from PyCEGUI import *
<commit_msg>MOD: U... |
cd30723af9f82b7a91d1ad1e2a5b86f88d8f4b17 | harvester/post_processing/dedup_sourceresource.py | harvester/post_processing/dedup_sourceresource.py | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if not isinstance(val... | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if isinstance(value, ... | Make sure dedup item is a list. | Make sure dedup item is a list.
| Python | bsd-3-clause | barbarahui/harvester,ucldc/harvester,ucldc/harvester,mredar/harvester,mredar/harvester,barbarahui/harvester | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if not isinstance(val... | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if isinstance(value, ... | <commit_before># pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if not... | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if isinstance(value, ... | # pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if not isinstance(val... | <commit_before># pass in a Couchdb doc, get back one with de-duplicated sourceResource values
def dedup_sourceresource(doc):
''' Look for duplicate values in the doc['sourceResource'] and
remove.
Values must be *exactly* the same
'''
for key, value in doc['sourceResource'].items():
if not... |
b98bd25a8b25ca055ca92393f24b6a04382457a8 | forms.py | forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email
class Login(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
| from flask import flash
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length
def flash_errors(form):
""" Universal interface to handle form error.
Handles form error with the help of flash message
"""
for field, error... | Add universal interface for validation error message | Add universal interface for validation error message
| Python | mit | openedoo/module_employee,openedoo/module_employee,openedoo/module_employee | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email
class Login(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
Add universal interface fo... | from flask import flash
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length
def flash_errors(form):
""" Universal interface to handle form error.
Handles form error with the help of flash message
"""
for field, error... | <commit_before>from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email
class Login(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
<commit_msg... | from flask import flash
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length
def flash_errors(form):
""" Universal interface to handle form error.
Handles form error with the help of flash message
"""
for field, error... | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email
class Login(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
Add universal interface fo... | <commit_before>from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email
class Login(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
<commit_msg... |
1af120a5ce7f2fc35aeb7e77a747b0e8382bba51 | api_tests/utils.py | api_tests/utils.py | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(node, user, filename='test_file', create_guid=True):
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.get_root()
te... | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(target, user, filename='test_file', create_guid=True):
osfstorage = target.get_addon('osfstorage')
root_node = osfstorage.get_root()
... | Update api test util to create files to use target name instead | Update api test util to create files to use target name instead
| Python | apache-2.0 | mattclark/osf.io,cslzchen/osf.io,HalcyonChimera/osf.io,mfraezz/osf.io,mattclark/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,adlius/osf.io,pattisdr/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,mattclark/osf.io,mfraezz/osf.io,mfraezz/osf.io,cslzchen/osf.i... | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(node, user, filename='test_file', create_guid=True):
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.get_root()
te... | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(target, user, filename='test_file', create_guid=True):
osfstorage = target.get_addon('osfstorage')
root_node = osfstorage.get_root()
... | <commit_before>from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(node, user, filename='test_file', create_guid=True):
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.ge... | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(target, user, filename='test_file', create_guid=True):
osfstorage = target.get_addon('osfstorage')
root_node = osfstorage.get_root()
... | from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(node, user, filename='test_file', create_guid=True):
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.get_root()
te... | <commit_before>from blinker import ANY
from urlparse import urlparse
from contextlib import contextmanager
from addons.osfstorage import settings as osfstorage_settings
def create_test_file(node, user, filename='test_file', create_guid=True):
osfstorage = node.get_addon('osfstorage')
root_node = osfstorage.ge... |
21dbb8af7412c04b768a9d68e1f8566786d5100c | mdot_rest/serializers.py | mdot_rest/serializers.py | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | Add image field to the resource serialization. | Add image field to the resource serialization.
| Python | apache-2.0 | uw-it-aca/mdot-rest,uw-it-aca/mdot-rest | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | <commit_before>from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializ... | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializer):
class ... | <commit_before>from .models import Resource, ResourceLink, IntendedAudience
from rest_framework import serializers
class ResourceLinkSerializer(serializers.ModelSerializer):
class Meta:
model = ResourceLink
fields = ('link_type', 'url',)
class IntendedAudienceSerializer(serializers.ModelSerializ... |
f7c9bbd5ac49254d564a56ba3713b55abcfa4079 | byceps/blueprints/news/views.py | byceps/blueprints/news/views.py | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.news import service as news_service
from ...util.framework import create_blueprint
from ..... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, current_app, g
from ...services.news import service as news_service
from ...util.framework import create_blue... | Allow configuration of the number of news items per page | Allow configuration of the number of news items per page
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.news import service as news_service
from ...util.framework import create_blueprint
from ..... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, current_app, g
from ...services.news import service as news_service
from ...util.framework import create_blue... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.news import service as news_service
from ...util.framework import create_bl... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, current_app, g
from ...services.news import service as news_service
from ...util.framework import create_blue... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.news import service as news_service
from ...util.framework import create_blueprint
from ..... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.news import service as news_service
from ...util.framework import create_bl... |
5352e164b38099cbc7fe4eba87c00bc1c1d30d44 | bluezero/eddystone.py | bluezero/eddystone.py | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url):
service_data = tools.url_to_advert(url, 0x10, 0x00)
url_beacon = broadcaster.Beacon()
url_beacon.add_service_data('FEAA', service_dat... | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url, tx_power=0x08):
"""
The Eddystone-URL frame broadcasts a URL using a compressed encoding
format in order to fit more within the limite... | Test for URL length error | Test for URL length error
| Python | mit | ukBaz/python-bluezero,ukBaz/python-bluezero | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url):
service_data = tools.url_to_advert(url, 0x10, 0x00)
url_beacon = broadcaster.Beacon()
url_beacon.add_service_data('FEAA', service_dat... | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url, tx_power=0x08):
"""
The Eddystone-URL frame broadcasts a URL using a compressed encoding
format in order to fit more within the limite... | <commit_before>"""
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url):
service_data = tools.url_to_advert(url, 0x10, 0x00)
url_beacon = broadcaster.Beacon()
url_beacon.add_service_data('FEA... | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url, tx_power=0x08):
"""
The Eddystone-URL frame broadcasts a URL using a compressed encoding
format in order to fit more within the limite... | """
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url):
service_data = tools.url_to_advert(url, 0x10, 0x00)
url_beacon = broadcaster.Beacon()
url_beacon.add_service_data('FEAA', service_dat... | <commit_before>"""
Level 1 file for creating Eddystone beacons
"""
from bluezero import tools
from bluezero import broadcaster
class EddystoneURL:
def __init__(self, url):
service_data = tools.url_to_advert(url, 0x10, 0x00)
url_beacon = broadcaster.Beacon()
url_beacon.add_service_data('FEA... |
8d229401ea69799638d8cd005bc4dc87bb4327a4 | src/mist/io/tests/MyRequestsClass.py | src/mist/io/tests/MyRequestsClass.py | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None):
self.headers = {'Cookie': cookie}
self.time... | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None, csrf=None):
self.headers = {'Cookie': cookie, 'Csrf-... | Add csrf token in MyRequests class | Add csrf token in MyRequests class
| Python | agpl-3.0 | kelonye/mist.io,munkiat/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney/mist.io,afivos/mist.io,DimensionDataCBUSydney/mist.io,afivos/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney/mist.io,kelonye/mist.io,zBMNForks/mist.io,Lao-liu/mist.io,johnnyWalnut/mist.io,munkiat/mist.io,DimensionDataCBUSydney/mist.io,Lao-liu/mist.io... | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None):
self.headers = {'Cookie': cookie}
self.time... | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None, csrf=None):
self.headers = {'Cookie': cookie, 'Csrf-... | <commit_before>import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None):
self.headers = {'Cookie': cookie}
... | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None, csrf=None):
self.headers = {'Cookie': cookie, 'Csrf-... | import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None):
self.headers = {'Cookie': cookie}
self.time... | <commit_before>import requests
class MyRequests(object):
"""
Simple class to make requests with or withour cookies etc.
This way we can have the same request methods both in io and core
"""
def __init__(self, uri, data=None, cookie=None, timeout=None):
self.headers = {'Cookie': cookie}
... |
6dceb819f86fd469a4d817dec0156646a5f574cf | matchzoo/data_generator/callbacks/lambda_callback.py | matchzoo/data_generator/callbacks/lambda_callback.py | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> from matchzoo.data_generator.callbacks im... | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> import matchzoo as mz
>>> from m... | Update data generator lambda callback docs. | Update data generator lambda callback docs.
| Python | apache-2.0 | faneshion/MatchZoo,faneshion/MatchZoo | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> from matchzoo.data_generator.callbacks im... | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> import matchzoo as mz
>>> from m... | <commit_before>from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> from matchzoo.data_generat... | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> import matchzoo as mz
>>> from m... | from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> from matchzoo.data_generator.callbacks im... | <commit_before>from matchzoo.data_generator.callbacks.callback import Callback
class LambdaCallback(Callback):
"""
LambdaCallback. Just a shorthand for creating a callback class.
See :class:`matchzoo.data_generator.callbacks.Callback` for more details.
Example:
>>> from matchzoo.data_generat... |
73e4f2c333e7b4f02dbb0ec344a3a671ba97cac3 | library-examples/read-replace-export-excel.py | library-examples/read-replace-export-excel.py | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
shutil.copy... | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
#point to t... | Change so original input does not change. | Change so original input does not change.
| Python | apache-2.0 | iku000888/Excel_Translation_Helper | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
shutil.copy... | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
#point to t... | <commit_before>"""
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbo... | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
#point to t... | """
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbook
shutil.copy... | <commit_before>"""
Proto type that does the following:
input:Excel file in language A
output 1:Copy of input file, with original strings replaced with serial numbers
output 2:Single xlsx file that contains serial numbers and original texts from input file.
"""
import shutil
from openpyxl import load_workbook, Workbo... |
dfaffd1e2c189a9d85c493db76b9751b4c802bce | python/scannerpy/stdlib/tensorflow.py | python/scannerpy/stdlib/tensorflow.py | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | Fix TF using all the GPU memory | Fix TF using all the GPU memory
| Python | apache-2.0 | scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | <commit_before>from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
vis... | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_lis... | <commit_before>from ..kernel import Kernel
from scannerpy import DeviceType
class TensorFlowKernel(Kernel):
def __init__(self, config):
import tensorflow as tf
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
vis... |
9172166ee492e73865c69f76d76690034ef5a402 | adcode/context_processors.py | adcode/context_processors.py | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | Order by priority in context_processor. | Order by priority in context_processor.
| Python | bsd-2-clause | mlavin/django-ad-code,mlavin/django-ad-code | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | <commit_before>"Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
#... | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | "Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
# TODO: Add cach... | <commit_before>"Context processors for adding current sections and placements in the context."
import re
from .conf import SECTION_CONTEXT_KEY, PLACEMENTS_CONTEXT_KEY
from .models import Section, Placement
def current_placements(request):
"Match current section to request path and get related placements."
#... |
4426fe1b6c77bb3c38a4324470a3d46461ef4661 | orchestrator/__init__.py | orchestrator/__init__.py | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.8'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.9'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| Prepare for next dev version | Prepare for next dev version | Python | mit | totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.8'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
Prepare for next dev version | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.9'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| <commit_before>from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.8'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
<commit_msg>Prepare for next dev version<commit_after> | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.9'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.8'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
Prepare for next dev versionfrom __future__ import absolute_import
fr... | <commit_before>from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.3.8'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
<commit_msg>Prepare for next dev version<commit_after>... |
f26e6fb7e7fbf9eedd181bea65d091f24262a14f | backend/util.py | backend/util.py | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | Allow test version in via CORS | Allow test version in via CORS
| Python | apache-2.0 | Rio517/pledgeservice,MayOneUS/pledgeservice,Rio517/pledgeservice,Rio517/pledgeservice,MayOneUS/pledgeservice | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | <commit_before>"""General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pul... | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | """General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pull into some kin... | <commit_before>"""General utilities."""
import urlparse
import logging
def ConstantTimeIsEqual(a, b):
"""Securely compare two strings without leaking timing information."""
if len(a) != len(b):
return False
acc = 0
for x, y in zip(a, b):
acc |= ord(x) ^ ord(y)
return acc == 0
# TODO(hjfreyer): Pul... |
23d4081392f84f2d5359f44ed4dde41611bb4cd2 | tests/race_deleting_keys_test.py | tests/race_deleting_keys_test.py | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | Replace finish order requirement with a duration requirement | Replace finish order requirement with a duration requirement
| Python | bsd-2-clause | p/redis-dump-load,hyunchel/redis-dump-load,p/redis-dump-load,hyunchel/redis-dump-load | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | <commit_before>import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
... | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
self.r = re... | <commit_before>import nose.plugins.attrib
import time as _time
import subprocess
import sys
import redisdl
import unittest
import json
import os.path
from . import util
from . import big_data
@nose.plugins.attrib.attr('slow')
class RaceDeletingKeysTest(unittest.TestCase):
def setUp(self):
import redis
... |
93903d065cd1ff8f3f0c715668f05c804c5561f9 | profile/linearsvc.py | profile/linearsvc.py | import cProfile
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
cProfile.runctx('svc.fit(X, y)', {'svc': svc, 'X': X, 'y': y}, {})
svc.fit(X, y)
results = svc.predict(X)
accuracy = a... | import timeit
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
setup = """
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
"""
time = timeit.timeit('s... | Use timeit instead of cProfile | Use timeit instead of cProfile
| Python | mit | JuliaPackageMirrors/SoftConfidenceWeighted.jl,IshitaTakeshi/SoftConfidenceWeighted.jl | import cProfile
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
cProfile.runctx('svc.fit(X, y)', {'svc': svc, 'X': X, 'y': y}, {})
svc.fit(X, y)
results = svc.predict(X)
accuracy = a... | import timeit
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
setup = """
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
"""
time = timeit.timeit('s... | <commit_before>import cProfile
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
cProfile.runctx('svc.fit(X, y)', {'svc': svc, 'X': X, 'y': y}, {})
svc.fit(X, y)
results = svc.predict(... | import timeit
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
setup = """
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
"""
time = timeit.timeit('s... | import cProfile
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
cProfile.runctx('svc.fit(X, y)', {'svc': svc, 'X': X, 'y': y}, {})
svc.fit(X, y)
results = svc.predict(X)
accuracy = a... | <commit_before>import cProfile
from sklearn.svm import LinearSVC
from sklearn.datasets import load_svmlight_file
from sklearn.metrics import accuracy_score
X, y = load_svmlight_file("data.txt")
svc = LinearSVC()
cProfile.runctx('svc.fit(X, y)', {'svc': svc, 'X': X, 'y': y}, {})
svc.fit(X, y)
results = svc.predict(... |
7ee8bbc5cb1527c55a04aff1421f043fdfa292cf | sample-code/examples/python/android_web_view.py | sample-code/examples/python/android_web_view.py | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | Update android web view example. | Update android web view example.
| Python | apache-2.0 | appium/appium,Sw0rdstream/appium,appium/appium,appium/appium,appium/appium,appium/appium,appium/appium | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | <commit_before>import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... | <commit_before>import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(
os.path.dirname(__file__), '../../apps/WebViewDemo/target')
... |
3ecfdf41da3eb3b881c112254b913ff907424bd7 | Scripts/2-Upload.py | Scripts/2-Upload.py |
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamPassword = steamConfig... | #!/usr/bin/env python
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamP... | Make steam upload script works for Linux | Make steam upload script works for Linux
| Python | bsd-3-clause | arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain,arbonagw/HeliumRain |
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamPassword = steamConfig... | #!/usr/bin/env python
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamP... | <commit_before>
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamPasswor... | #!/usr/bin/env python
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamP... |
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamPassword = steamConfig... | <commit_before>
import os
import json
# Get Steam settings
steamData = open("steam.json")
steamConfig = json.load(steamData)
steamSDKDir = steamConfig["sdkDir"]
steamBuilder = steamConfig["builder"]
steamCommand = steamConfig["command"]
steamAppFile = steamConfig["appFile"]
steamUser = steamConfig["user"]
steamPasswor... |
92b7a5463e505f84862dd96e07c9caa5a97107a9 | client/test/server_tests.py | client/test/server_tests.py | from nose.tools import *
from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class MyTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_c... | from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class ServerTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_code = 200
json = ... | Change function names to camelCase | Change function names to camelCase
| Python | mit | CaminsTECH/owncloud-test | from nose.tools import *
from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class MyTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_c... | from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class ServerTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_code = 200
json = ... | <commit_before>from nose.tools import *
from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class MyTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
re... | from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class ServerTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_code = 200
json = ... | from nose.tools import *
from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class MyTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
response.status_c... | <commit_before>from nose.tools import *
from mockito import *
import unittest
from source.server import *
from source.exception import *
from source.commands.system import *
class MyTestCase(unittest.TestCase):
def createCommandResponse(self, command, parameters = {}, timeout = None):
response = mock()
re... |
52584725e462ab304bc2e976fa691f0d830e7efb | Speech/processor.py | Speech/processor.py | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_offline as STT_o
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./a... | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./audio/retrieved_audio')
reg_ex = '\w+.mp4'
file_name =... | Modify ffmpeg path heroku 3 | Modify ffmpeg path heroku 3
| Python | mit | hungtraan/FacebookBot,hungtraan/FacebookBot,hungtraan/FacebookBot | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_offline as STT_o
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./a... | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./audio/retrieved_audio')
reg_ex = '\w+.mp4'
file_name =... | <commit_before># Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_offline as STT_o
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
o... | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./audio/retrieved_audio')
reg_ex = '\w+.mp4'
file_name =... | # Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_offline as STT_o
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
os.makedirs('./a... | <commit_before># Retrieve file from Facebook
import urllib, convert, re, os
# from speech_py import speech_to_text_offline as STT_o
# from speech_py import speech_to_text_google as STT
from speech_py import speech_to_text_ibm_rest as STT
def transcribe(audio_url):
if not os.path.isdir('./audio/retrieved_audio'):
o... |
14e000acafe7c374294a7de6ffe295c9d56df68f | tests/test_postgresql_specific.py | tests/test_postgresql_specific.py | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | Update postgresql json_field to reflect deepcopy fix | Update postgresql json_field to reflect deepcopy fix
| Python | bsd-3-clause | jdotjdot/django-dirtyfields,romgar/django-dirtyfields,smn/django-dirtyfields | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | <commit_before>import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField... | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField
tm = Test... | <commit_before>import pytest
from tests.utils import is_postgresql_env_with_json_field
@pytest.mark.skipif(not is_postgresql_env_with_json_field(),
reason="requires postgresql and Django 1.9+")
@pytest.mark.django_db
def test_dirty_json_field():
from tests.models import TestModelWithJSONField... |
db8e02661df65e1a50c5810968afef7ecd44db42 | braid/bazaar.py | braid/bazaar.py | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | Make bzr always pull from the specified remote. | Make bzr always pull from the specified remote.
Refs: #5.
| Python | mit | alex/braid,alex/braid | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | <commit_before>import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, l... | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, location))
e... | <commit_before>import os
from fabric.api import run
from braid import package, fails
def install():
package.install('bzr')
def branch(branch, location):
if fails('[ -d {}/.bzr ]'.format(location)):
run('mkdir -p {}'.format(os.path.dirname(location)))
run('bzr branch {} {}'.format(branch, l... |
3d5d6d093420294ed7b5fa834285d1d55da82d5d | pyroSAR/tests/test_snap_exe.py | pyroSAR/tests/test_snap_exe.py | import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when it s... | from contextlib import contextmanager
import pytest
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when i... | Add unit test to determine if the classes ExamineExe and ExamineSnap will work properly. | Add unit test to determine if the classes ExamineExe and ExamineSnap will work properly.
Fixed a bug `assert len(record) == 1` in 'test_not_exception' method in class `TestExamineExe`.
| Python | mit | johntruckenbrodt/pyroSAR,johntruckenbrodt/pyroSAR | import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when it s... | from contextlib import contextmanager
import pytest
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when i... | <commit_before>import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exceptio... | from contextlib import contextmanager
import pytest
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when i... | import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exception {0} when it s... | <commit_before>import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap
@contextmanager
def not_raises(ExpectedException):
try:
yield
except ExpectedException:
raise AssertionError(
"Did raise exceptio... |
b55c4c0536ca23484375d93f2ef011de0d5ce417 | app/app.py | app/app.py | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
| from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
| Remove __name__ == __main__ becuase it'll never be used | Remove __name__ == __main__ becuase it'll never be used
| Python | mit | everett-toews/guestbook,rackerlabs/guestbook,everett-toews/guestbook,rackerlabs/guestbook | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
Remove __name__ == __main__ becuase it'll never be used | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
| <commit_before>from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
<commit_msg>Remove __name__ == __main__ becuase it'll never be used<commit_after> | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
| from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
Remove __name__ == __main__ becuase it'll never be usedfrom flask import Flask
app = Flask(__name__)
@app.route('/... | <commit_before>from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello Docker + Nginx + Gunicorn + Flask!'
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
<commit_msg>Remove __name__ == __main__ becuase it'll never be used<commit_after>from flask import Flas... |
ed326fba4f44552eeb206f3c5af9ad6f5e89ca44 | localeurl/models.py | localeurl/models.py | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.get_language()))
... | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
if reverse_kwargs!=None:
locale = utils.supported_language(reverse_kwargs.pop('locale',
... | Handle situation when kwargs is None | Handle situation when kwargs is None
| Python | mit | eugena/django-localeurl | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.get_language()))
... | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
if reverse_kwargs!=None:
locale = utils.supported_language(reverse_kwargs.pop('locale',
... | <commit_before>from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.ge... | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
if reverse_kwargs!=None:
locale = utils.supported_language(reverse_kwargs.pop('locale',
... | from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.get_language()))
... | <commit_before>from django.conf import settings
from django.core import urlresolvers
from django.utils import translation
from localeurl import utils
def reverse(*args, **kwargs):
reverse_kwargs = kwargs.get('kwargs', {})
locale = utils.supported_language(reverse_kwargs.pop('locale',
translation.ge... |
a247cd42a79fa96d6b61fcd131a6e0c8d8cf57fe | setup.py | setup.py | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | Fix copying of files in herc/data during installation. | Fix copying of files in herc/data during installation.
| Python | bsd-3-clause | broadinstitute/herc,broadinstitute/herc,broadinstitute/herc | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | <commit_before>from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description... | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description=readme(),
... | <commit_before>from setuptools import setup, find_packages
import os
import os.path
import urllib.parse
def readme():
with open('README.md') as f:
return f.read()
setup(name='herc',
version='0.1',
description='Herc is a webservice that dispatches jobs to Apache Aurora.',
long_description... |
4b35247fe384d4b2b206fa7650398511a493253c | setup.py | setup.py | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'opsimsummary')
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as... | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
PACKAGENAME)
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as f:... | Revert "Revert "Changed back due to problems, will fix later"" | Revert "Revert "Changed back due to problems, will fix later""
This reverts commit 5e92c0ef714dea823e1deeef21b5141d9e0111a0.
modified: setup.py
| Python | mit | rbiswas4/simlib | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'opsimsummary')
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as... | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
PACKAGENAME)
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as f:... | <commit_before>from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'opsimsummary')
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versi... | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
PACKAGENAME)
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as f:... | from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'opsimsummary')
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versionFile, 'r') as... | <commit_before>from distutils.core import setup
import sys
import os
import re
PACKAGENAME = 'OpSimSummary'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'opsimsummary')
versionFile = os.path.join(packageDir, 'version.py')
# Obtain the package version
with open(versi... |
83c0cb83a5eeaff693765c7d297b470adfdcec9e | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="http://bitbucket.org/jpar... | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="https://github.com/jparis... | Use the GitHub URL instead of the BitBucket URL | Use the GitHub URL instead of the BitBucket URL
| Python | mit | jparise/stale | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="http://bitbucket.org/jpar... | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="https://github.com/jparis... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="http://bit... | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="https://github.com/jparis... | #!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="http://bitbucket.org/jpar... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
version = __import__('stale').__version__
setup(
name="stale",
version=version,
description="Identifies (and optionally removes) stale Delicious links",
author="Jon Parise",
author_email="[email protected]",
url="http://bit... |
2aeeb23e9771b67234dd6fef338e57000412b784 | setup.py | setup.py | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | Add Development Status :: 7 - Inactive classifier. | Add Development Status :: 7 - Inactive classifier.
| Python | apache-2.0 | haypo/trollius,haypo/trollius,haypo/trollius | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | <commit_before>import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ... | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ['six']
if sys.... | <commit_before>import os
import sys
from setuptools import setup, Extension
with open("README.rst") as fp:
long_description = fp.read()
extensions = []
if os.name == 'nt':
ext = Extension(
'trollius._overlapped', ['overlapped.c'], libraries=['ws2_32'],
)
extensions.append(ext)
requirements = ... |
2266ca63ec23fd768c659ee4b3988fce7cd523c6 | setup.py | setup.py | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
from six.moves.configparser import ConfigParser
c = ConfigParser()
c.read('{}/setup.cfg'.for... | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
import sys
if sys.version_info[0] == 3:
from configparser import ConfigParser
else:
f... | Remove six dependency when pip installing from sources | Remove six dependency when pip installing from sources
Signed-off-by: Daniel Mizyrycki <[email protected]>
| Python | mit | mzdaniel/loadconfig,mzdaniel/loadconfig | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
from six.moves.configparser import ConfigParser
c = ConfigParser()
c.read('{}/setup.cfg'.for... | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
import sys
if sys.version_info[0] == 3:
from configparser import ConfigParser
else:
f... | <commit_before>#!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
from six.moves.configparser import ConfigParser
c = ConfigParser()
c.read('{}... | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
import sys
if sys.version_info[0] == 3:
from configparser import ConfigParser
else:
f... | #!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
from six.moves.configparser import ConfigParser
c = ConfigParser()
c.read('{}/setup.cfg'.for... | <commit_before>#!/usr/bin/env python
# Create wheel with: python setup.py bdist_wheel
# Install with: pip install dist/loadconfig-*-none-any.whl
from os import environ
from os.path import dirname, abspath
from setuptools import setup
from six.moves.configparser import ConfigParser
c = ConfigParser()
c.read('{}... |
11f6fd6e2401af03730afccb14f843928c27c37a | setup.py | setup.py | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'Inte... | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'In... | Update to version 0.1.1 for the next push | Update to version 0.1.1 for the next push | Python | apache-2.0 | mjn19172/Savu,swtp1v07/Savu,mjn19172/Savu,swtp1v07/Savu,swtp1v07/Savu,swtp1v07/Savu,mjn19172/Savu,mjn19172/Savu,mjn19172/Savu | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'Inte... | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'In... | <commit_before>from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',... | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'In... | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'Inte... | <commit_before>from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='savu',
version='0.1',
description='Savu Python Tomography Pipeline',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',... |
32240a553a456e03b18c23fc6c32dd65865aa372 | setup.py | setup.py | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | Fix django version in requirements | Fix django version in requirements
| Python | bsd-3-clause | diadzine/django-simple-multilingual-survey,diadzine/django-simple-multilingual-survey | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | <commit_before>import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
n... | <commit_before>import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
import multilingual_survey
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.