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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
851579b14a34b8acc1977b2f4d2c991d8e5f5f2c | ledlight.py | ledlight.py | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.1
duration = 4
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(samp... | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.25
duration = 30
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(sa... | Print out 0/1 values as we sense them real-time. | Print out 0/1 values as we sense them real-time.
| Python | mit | zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.1
duration = 4
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(samp... | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.25
duration = 30
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(sa... | <commit_before>#!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.1
duration = 4
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for ... | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.25
duration = 30
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(sa... | #!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.1
duration = 4
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for i in range(samp... | <commit_before>#!/usr/bin/env python
import RPi.GPIO as GPIO
from time import sleep
pin_switch = 12
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_switch, GPIO.IN)
period = 0.1
duration = 4
samples = int(duration / float(period))
freq = 1.0 / period
series = []
print "inputting", samples, "samples,", "at", freq, "Hz"
for ... |
d2e52377f90c81365bd0ff62c8bea95207b44328 | indra/sources/sofia/api.py | indra/sources/sofia/api.py | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.sou... | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.so... | Handle Causal and Relations worksheets | Handle Causal and Relations worksheets
| Python | bsd-2-clause | pvtodorov/indra,bgyori/indra,sorgerlab/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.sou... | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.so... | <commit_before>import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
... | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.so... | import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
sp : indra.sou... | <commit_before>import openpyxl
from .processor import SofiaProcessor
def process_table(fname):
"""Return processor by processing a given sheet of a spreadsheet file.
Parameters
----------
fname : str
The name of the Excel file (typically .xlsx extension) to process
Returns
-------
... |
e2cad9831c3d3658e096c05ba45a9285744549dd | tnm/urls.py | tnm/urls.py | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^n... | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^$... | Move code to / from /nearby. Move to tnm.com. | Move code to / from /nearby. Move to tnm.com.
| Python | mit | chosak/TransitNearMe,MobilityLab/TransitNearMe,chosak/TransitNearMe,MobilityLab/TransitNearMe,chosak/TransitNearMe | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^n... | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^$... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patt... | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^$... | from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('',
(r'^n... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from django.contrib.gis import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('')
urlpatterns += patterns('',
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patt... |
a555737e2d594a67078a15be9d5eb3c8524d0698 | app/models.py | app/models.py | from . import db
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
age = db.Column(db.Date())
def __repr__(self):
return '<User {} {}>'.format(self.id,... | from . import db
from werkzeug.security import generate_password_hash, check_password_hash
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
password_hash = db.Column... | Add password hash to Monkey model | Add password hash to Monkey model
| Python | mit | timzdevz/fm-flask-app | from . import db
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
age = db.Column(db.Date())
def __repr__(self):
return '<User {} {}>'.format(self.id,... | from . import db
from werkzeug.security import generate_password_hash, check_password_hash
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
password_hash = db.Column... | <commit_before>from . import db
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
age = db.Column(db.Date())
def __repr__(self):
return '<User {} {}>'.... | from . import db
from werkzeug.security import generate_password_hash, check_password_hash
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
password_hash = db.Column... | from . import db
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
age = db.Column(db.Date())
def __repr__(self):
return '<User {} {}>'.format(self.id,... | <commit_before>from . import db
class Monkey(db.Model):
__tablename__ = 'monkeys'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
email = db.Column(db.String(64), unique=True)
age = db.Column(db.Date())
def __repr__(self):
return '<User {} {}>'.... |
f333f29d4170527c985bc695cd7b8331041769d5 | eva/layers/out_channels.py | eva/layers/out_channels.py | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | Make mono channel output activation more readable | Make mono channel output activation more readable
| Python | apache-2.0 | israelg99/eva | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | <commit_before>from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self... | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self.channels = cha... | <commit_before>from keras.layers import Convolution2D, Reshape, Lambda, Activation
from eva.layers.masked_convolution2d import MaskedConvolution2D
class OutChannels(object):
def __init__(self, height, width, channels, masked=False, palette=256):
self.height = height
self.width = width
self... |
a21d484cc1131b56d793e75fbb6ab1531205dae6 | joueur/base_game_object.py | joueur/base_game_object.py | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | Update BaseGameObject to be hashable | Update BaseGameObject to be hashable
| Python | mit | JacobFischer/Joueur.py,siggame/Joueur.py,siggame/Joueur.py,JacobFischer/Joueur.py | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | <commit_before>from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
... | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
return "{... | <commit_before>from joueur.delta_mergeable import DeltaMergeable
# the base class that every game object within a game inherit from for Python
# manipulation that would be redundant via Creer
class BaseGameObject(DeltaMergeable):
def __init__(self):
DeltaMergeable.__init__(self)
def __str__(self):
... |
aa9cb1bc1a04de4e4a4a787881123e2a60aaeb4e | docs/apps.py | docs/apps.py | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | Increase the ES timeout to 1 minute. | Increase the ES timeout to 1 minute.
| Python | bsd-3-clause | rmoorman/djangoproject.com,hassanabidpk/djangoproject.com,relekang/djangoproject.com,django/djangoproject.com,khkaminska/djangoproject.com,django/djangoproject.com,hassanabidpk/djangoproject.com,gnarf/djangoproject.com,vxvinh1511/djangoproject.com,xavierdutreilh/djangoproject.com,hassanabidpk/djangoproject.com,django/d... | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | <commit_before>import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
... | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
super(DocsC... | <commit_before>import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections
class DocsConfig(AppConfig):
name = 'docs'
verbose_name = _('Documentation')
def ready(self):
... |
2a2b11f78ee64cd54cdfb8d105606215c42dcaa5 | bot.py | bot.py |
import tweepy
from secrets import *
# standard for accessing Twitter API
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
| Update 0.0.1 - Added imports - Added standards for accessing Twitter API | Update 0.0.1
- Added imports
- Added standards for accessing Twitter API
| Python | mit | FXelix/space_facts_bot |
Update 0.0.1
- Added imports
- Added standards for accessing Twitter API |
import tweepy
from secrets import *
# standard for accessing Twitter API
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
| <commit_before>
<commit_msg>Update 0.0.1
- Added imports
- Added standards for accessing Twitter API<commit_after> |
import tweepy
from secrets import *
# standard for accessing Twitter API
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
|
Update 0.0.1
- Added imports
- Added standards for accessing Twitter API
import tweepy
from secrets import *
# standard for accessing Twitter API
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
| <commit_before>
<commit_msg>Update 0.0.1
- Added imports
- Added standards for accessing Twitter API<commit_after>
import tweepy
from secrets import *
# standard for accessing Twitter API
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
| |
9efa42ae172e240c01be9caed5bb942bc0459494 | tools/perf/benchmarks/session_restore.py | tools/perf/benchmarks/session_restore.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.
from measurements import session_restore
from telemetry import test
# crbug.com/325479: Disabling this test for now since it never ran before.
@test.Disabl... | # 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.
from measurements import session_restore
from telemetry import test
@test.Disabled('android') # crbug.com/325479
class SessionRestoreColdTypical25(test.Te... | Enable session restore benchmark on linux. | [Telemetry] Enable session restore benchmark on linux.
I believe it was disabled because the clear_system_cache binary wasn't checked
into cloud storage yet. It is now.
BUG=325479
Review URL: https://codereview.chromium.org/311053006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@275163 0039d316-1c4b-4281-b95... | Python | bsd-3-clause | dushu1203/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crossw... | # 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.
from measurements import session_restore
from telemetry import test
# crbug.com/325479: Disabling this test for now since it never ran before.
@test.Disabl... | # 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.
from measurements import session_restore
from telemetry import test
@test.Disabled('android') # crbug.com/325479
class SessionRestoreColdTypical25(test.Te... | <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.
from measurements import session_restore
from telemetry import test
# crbug.com/325479: Disabling this test for now since it never ran befor... | # 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.
from measurements import session_restore
from telemetry import test
@test.Disabled('android') # crbug.com/325479
class SessionRestoreColdTypical25(test.Te... | # 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.
from measurements import session_restore
from telemetry import test
# crbug.com/325479: Disabling this test for now since it never ran before.
@test.Disabl... | <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.
from measurements import session_restore
from telemetry import test
# crbug.com/325479: Disabling this test for now since it never ran befor... |
763d9f8ef45aff357e318d73cfd10512228d85f3 | src/zeit/content/article/edit/browser/tests/test_preview.py | src/zeit/content/article/edit/browser/tests/test_preview.py | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | Update test to work with current jquery-ui | Update test to work with current jquery-ui
| Python | bsd-3-clause | ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | <commit_before># Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium... | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | # Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium
select... | <commit_before># Copyright (c) 2012 gocept gmbh & co. kg
# See also LICENSE.txt
import zeit.content.article.testing
class Preview(zeit.content.article.testing.SeleniumTestCase):
def test_selected_tab_is_stored_across_reload(self):
self.open('/repository/online/2007/01/Somalia')
s = self.selenium... |
23ceddaff1752797fe775df950f6e62769b285a6 | foyer/tests/test_plugin.py | foyer/tests/test_plugin.py | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
def test_forcefields_exist(ff_loader):
assert ff_loader in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_f... | Update test to properly assert loaders | Update test to properly assert loaders
| Python | mit | iModels/foyer,mosdef-hub/foyer,mosdef-hub/foyer,iModels/foyer | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
def test_forcefields_exist(ff_loader):
assert ff_loader in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_f... | <commit_before>import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefiel... | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
def test_forcefields_exist(ff_loader):
assert ff_loader in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_f... | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | <commit_before>import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefiel... |
183aacf12405eec38ba8b2193f8f89904d415c4a | yagocd/resources/base.py | yagocd/resources/base.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | Return internal data for string representation. | Return internal data for string representation.
| Python | isc | grundic/yagocd,grundic/yagocd | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated doc... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated doc... |
77fd12a850fbca0b3308e964e457f234d12d7c11 | src/wad.blog/wad/blog/utils.py | src/wad.blog/wad/blog/utils.py | from zope.component import getUtility, getMultiAdapter, ComponentLookupError
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
def find_assignment_context(assignment, context):
# Finds the creation context of the assignment
context = context.... | from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import aq_base
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
from zope.component import getUtility, getMultiAdapter, ComponentLookupError
def find_assignment_con... | Fix portlet assignment context utility | Fix portlet assignment context utility
| Python | mit | potzenheimer/buildout.wad,potzenheimer/buildout.wad | from zope.component import getUtility, getMultiAdapter, ComponentLookupError
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
def find_assignment_context(assignment, context):
# Finds the creation context of the assignment
context = context.... | from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import aq_base
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
from zope.component import getUtility, getMultiAdapter, ComponentLookupError
def find_assignment_con... | <commit_before>from zope.component import getUtility, getMultiAdapter, ComponentLookupError
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
def find_assignment_context(assignment, context):
# Finds the creation context of the assignment
con... | from Acquisition import aq_inner
from Acquisition import aq_parent
from Acquisition import aq_base
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
from zope.component import getUtility, getMultiAdapter, ComponentLookupError
def find_assignment_con... | from zope.component import getUtility, getMultiAdapter, ComponentLookupError
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
def find_assignment_context(assignment, context):
# Finds the creation context of the assignment
context = context.... | <commit_before>from zope.component import getUtility, getMultiAdapter, ComponentLookupError
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.portlets.interfaces import IPortletManager
def find_assignment_context(assignment, context):
# Finds the creation context of the assignment
con... |
eea0a6bc56d69377519e5441074f32f5eb9fb01e | examples/storage/ext_flash_fatfs/example_test.py | examples/storage/ext_flash_fatfs/example_test.py | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash')
def test_exam... | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
from IDF.IDFDUT import ESP32DUT
@IDF.idf_example_test(env_tag=... | Add ESP32 DUT class to ext_flash_fatfs example test | examples: Add ESP32 DUT class to ext_flash_fatfs example test
| Python | apache-2.0 | espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash')
def test_exam... | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
from IDF.IDFDUT import ESP32DUT
@IDF.idf_example_test(env_tag=... | <commit_before>from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash'... | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
from IDF.IDFDUT import ESP32DUT
@IDF.idf_example_test(env_tag=... | from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash')
def test_exam... | <commit_before>from __future__ import print_function
import os
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash'... |
5a310285c6e528555136a95221b628827d04cb81 | l10n_br_base/__init__.py | l10n_br_base/__init__.py | # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
| # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
from odoo.addons import account
from odoo import api, SUPERUSER_ID
# Install Simple Chart of Account Template for Brazilian Companies
_auto_install_l10n_original = ac... | Define l10n_br_simple as default COA for brazilian companies | Define l10n_br_simple as default COA for brazilian companies
| Python | agpl-3.0 | akretion/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil | # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
Define l10n_br_simple as default COA for brazilian companies | # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
from odoo.addons import account
from odoo import api, SUPERUSER_ID
# Install Simple Chart of Account Template for Brazilian Companies
_auto_install_l10n_original = ac... | <commit_before># Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
<commit_msg>Define l10n_br_simple as default COA for brazilian companies<commit_after> | # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
from odoo.addons import account
from odoo import api, SUPERUSER_ID
# Install Simple Chart of Account Template for Brazilian Companies
_auto_install_l10n_original = ac... | # Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
Define l10n_br_simple as default COA for brazilian companies# Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.htm... | <commit_before># Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models
from . import tests
<commit_msg>Define l10n_br_simple as default COA for brazilian companies<commit_after># Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See... |
08797de13a88bc742d905f2067df533a1a319c83 | yawf/revision/models.py | yawf/revision/models.py | from django.db import models
from django.contrib.contenttypes import generic
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
versions = generic.GenericR... | from django.db import models
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
def save(self, *args, **kwargs):
self.revision += 1
super(R... | Remove generic relation to reversion.Version from RevisionModelMixin | Remove generic relation to reversion.Version from RevisionModelMixin
| Python | mit | freevoid/yawf | from django.db import models
from django.contrib.contenttypes import generic
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
versions = generic.GenericR... | from django.db import models
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
def save(self, *args, **kwargs):
self.revision += 1
super(R... | <commit_before>from django.db import models
from django.contrib.contenttypes import generic
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
versions = g... | from django.db import models
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
def save(self, *args, **kwargs):
self.revision += 1
super(R... | from django.db import models
from django.contrib.contenttypes import generic
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
versions = generic.GenericR... | <commit_before>from django.db import models
from django.contrib.contenttypes import generic
class RevisionModelMixin(models.Model):
class Meta:
abstract = True
_has_revision_support = True
revision = models.PositiveIntegerField(default=0,
db_index=True, editable=False)
versions = g... |
adb33e7240029bf842213ab8157ae872fe2298fd | subiquity/models/installpath.py | subiquity/models/installpath.py | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | Fix dynamic translation of install_path labels. | Fix dynamic translation of install_path labels.
| Python | agpl-3.0 | CanonicalLtd/subiquity,CanonicalLtd/subiquity | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | <commit_before># Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This progra... | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | # Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | <commit_before># Copyright 2015 Canonical, Ltd.
#
# 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 3 of the
# License, or (at your option) any later version.
#
# This progra... |
cd09a040270eb3cf1b1966e76382e9e92f4323a8 | soco/__init__.py | soco/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | Fix for logger configuration errors | Fix for logger configuration errors
| Python | mit | dajobe/SoCo,flavio/SoCo,KennethNielsen/SoCo,lawrenceakka/SoCo,lawrenceakka/SoCo,bwhaley/SoCo,dundeemt/SoCo,dsully/SoCo,dsully/SoCo,TrondKjeldas/SoCo,bwhaley/SoCo,simonalpha/SoCo,petteraas/SoCo,flavio/SoCo,xxdede/SoCo,SoCo/SoCo,fgend31/SoCo,TrondKjeldas/SoCo,SoCo/SoCo,xxdede/SoCo,dundeemt/SoCo,petteraas/SoCo,intfrr/SoCo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://githu... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://github.com/SoCo/SoCo... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
""" SoCo (Sonos Controller) is a simple library to control Sonos speakers """
# Will be parsed by setup.py to determine package metadata
__author__ = 'Rahim Sonawalla <[email protected]>'
__version__ = '0.6'
__website__ = 'https://githu... |
46c1378f345c8290fa34fc7f756ef6fafa8e2aa8 | lucid/modelzoo/aligned_activations.py | lucid/modelzoo/aligned_activations.py | # Copyright 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 stray print statement O_o | Remove stray print statement O_o
| Python | apache-2.0 | tensorflow/lucid,tensorflow/lucid,tensorflow/lucid,tensorflow/lucid | # Copyright 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 2018 The Lucid Authors. 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 ... |
1e5a956eb289b8333ecf3c3cc00f51295f37870a | api_tests/institutions/views/test_institution_users_list.py | api_tests/institutions/views/test_institution_users_list.py | from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase
from osf_tests.factories import InstitutionFactory, UserFactory
from api.base.settings.defaults import API_BASE
class TestInstitutionUsersList(ApiTestCase):
def setUp(self):
super(TestInstitutionUsersList, self).setUp()
s... | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
InstitutionFactory,
UserFactory,
)
@pytest.mark.django_db
class TestInstitutionUsersList:
@pytest.fixture()
def institution(self):
return InstitutionFactory()
@pytest.fixture()
def user_on... | Convert institutions users to pytest | Convert institutions users to pytest
| Python | apache-2.0 | cslzchen/osf.io,chennan47/osf.io,crcresearch/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,leb2dg/osf.io,icereval/osf.io,crcresearch/osf.io,cslzchen/osf.io,sloria/osf.io,felliott/osf.io,binoculars/osf.io,laurenrevere/osf.io,mfraezz/osf.io,felliott/osf.io,Johnetordoff/osf.io,aaxelb/osf.io,crcresearch/osf.io,adlius/osf.i... | from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase
from osf_tests.factories import InstitutionFactory, UserFactory
from api.base.settings.defaults import API_BASE
class TestInstitutionUsersList(ApiTestCase):
def setUp(self):
super(TestInstitutionUsersList, self).setUp()
s... | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
InstitutionFactory,
UserFactory,
)
@pytest.mark.django_db
class TestInstitutionUsersList:
@pytest.fixture()
def institution(self):
return InstitutionFactory()
@pytest.fixture()
def user_on... | <commit_before>from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase
from osf_tests.factories import InstitutionFactory, UserFactory
from api.base.settings.defaults import API_BASE
class TestInstitutionUsersList(ApiTestCase):
def setUp(self):
super(TestInstitutionUsersList, self).se... | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
InstitutionFactory,
UserFactory,
)
@pytest.mark.django_db
class TestInstitutionUsersList:
@pytest.fixture()
def institution(self):
return InstitutionFactory()
@pytest.fixture()
def user_on... | from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase
from osf_tests.factories import InstitutionFactory, UserFactory
from api.base.settings.defaults import API_BASE
class TestInstitutionUsersList(ApiTestCase):
def setUp(self):
super(TestInstitutionUsersList, self).setUp()
s... | <commit_before>from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase
from osf_tests.factories import InstitutionFactory, UserFactory
from api.base.settings.defaults import API_BASE
class TestInstitutionUsersList(ApiTestCase):
def setUp(self):
super(TestInstitutionUsersList, self).se... |
b4627ab3448ab70db44d8e9af3310a0755eeca64 | mediacloud/mediawords/db/schema/version.py | mediacloud/mediawords/db/schema/version.py | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class SchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_bytes... | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class McSchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_byt... | Prepend “Mc” to exception name | Prepend “Mc” to exception name
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class SchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_bytes... | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class McSchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_byt... | <commit_before>import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class SchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_st... | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class McSchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_byt... | import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class SchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_string_from_bytes... | <commit_before>import re
from mediawords.util.perl import decode_string_from_bytes_if_needed
class SchemaVersionFromLinesException(Exception):
pass
def schema_version_from_lines(sql: str) -> int:
"""Utility function to determine a database schema version from a bunch of SQL commands."""
sql = decode_st... |
97fa1de8a22ff8fd9fd80a39328ec57be672575d | mlabdata.py | mlabdata.py | import collections
"""All of the datatypes that get passed around inside Signal Searcher."""
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | """All of the datatypes that get passed around inside Signal Searcher."""
import collections
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | Make the string be an actual docstring | Make the string be an actual docstring
| Python | apache-2.0 | m-lab/signal-searcher | import collections
"""All of the datatypes that get passed around inside Signal Searcher."""
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | """All of the datatypes that get passed around inside Signal Searcher."""
import collections
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | <commit_before>import collections
"""All of the datatypes that get passed around inside Signal Searcher."""
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migr... | """All of the datatypes that get passed around inside Signal Searcher."""
import collections
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | import collections
"""All of the datatypes that get passed around inside Signal Searcher."""
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migration away from... | <commit_before>import collections
"""All of the datatypes that get passed around inside Signal Searcher."""
InternetData = collections.namedtuple(
'InternetData',
['key', 'table', 'time', 'upload', 'download', 'rtt', 'samples'])
# Everything below this line is temporary and should be deleted when the
# migr... |
ca31ecaf79e42cacc023277aa163af8887a360ad | mlog/log.py | mlog/log.py | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | Use with statement when writing to a file | Use with statement when writing to a file
| Python | agpl-3.0 | fajran/mlog | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | <commit_before>import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
... | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | <commit_before>import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
... |
d1e5cce57da49bd93950004b1a4e8766b525106a | backend/unpp_api/apps/common/tests/test_views.py | backend/unpp_api/apps/common/tests/test_views.py | from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_AGENCY
agency_role = AgencyRole.ADMINISTRATOR
def test_view(self):
... | from django.core.management import call_command
from django.test import TestCase
from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_A... | Add testin for unmigrated changes in models | Add testin for unmigrated changes in models
| Python | apache-2.0 | unicef/un-partner-portal,unicef/un-partner-portal,unicef/un-partner-portal,unicef/un-partner-portal | from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_AGENCY
agency_role = AgencyRole.ADMINISTRATOR
def test_view(self):
... | from django.core.management import call_command
from django.test import TestCase
from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_A... | <commit_before>from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_AGENCY
agency_role = AgencyRole.ADMINISTRATOR
def test_vie... | from django.core.management import call_command
from django.test import TestCase
from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_A... | from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_AGENCY
agency_role = AgencyRole.ADMINISTRATOR
def test_view(self):
... | <commit_before>from django.urls import reverse
from agency.roles import AgencyRole
from common.tests.base import BaseAPITestCase
from rest_framework import status
class TestGeneralConfigAPIView(BaseAPITestCase):
user_type = BaseAPITestCase.USER_AGENCY
agency_role = AgencyRole.ADMINISTRATOR
def test_vie... |
df385ac3c06018a2d151ead1e07293166ff92614 | erpnext/patches/v11_0/move_leave_approvers_from_employee.py | erpnext/patches/v11_0/move_leave_approvers_from_employee.py | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | Check if table exists else return | Check if table exists else return
| Python | agpl-3.0 | gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | <commit_before>import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', ... | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', 'leave_approver... | <commit_before>import frappe
from frappe import _
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("hr", "doctype", "department_approver")
frappe.reload_doc("hr", "doctype", "employee")
frappe.reload_doc("hr", "doctype", "department")
if frappe.db.has_column('Department', ... |
a50ff464da06a92edd23d743fecdfa65aa40bedd | test_swift.py | test_swift.py | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
interpreter.l... | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
# interpreter... | Fix small bug in swift test runner | Fix small bug in swift test runner
| Python | mit | hashemi/slox,hashemi/slox | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
interpreter.l... | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
# interpreter... | <commit_before>#!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
... | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
# interpreter... | #!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
interpreter.l... | <commit_before>#!/usr/bin/env python3
from os.path import dirname, realpath
import sys
from test import JAVA_SUITES, INTERPRETERS, run_suites, run_suite
import test
test.REPO_DIR = dirname(realpath(__file__))
SWIFT_SUITES = JAVA_SUITES
def java_to_swift_interpreter(interpreter):
if interpreter.language == 'java':
... |
8f484f4e79d50f71c0a593429f3e2dad0db56fff | microcosm_flask/matchers.py | microcosm_flask/matchers.py | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | Add get operation to JSON wrapper | Add get operation to JSON wrapper
| Python | apache-2.0 | globality-corp/microcosm-flask,globality-corp/microcosm-flask | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | <commit_before>"""
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
... | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | """
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
Dictionary wra... | <commit_before>"""
Hamcrest matching support for JSON responses.
"""
from json import dumps, loads
from hamcrest.core.base_matcher import BaseMatcher
def prettify(value):
return dumps(
value,
sort_keys=True,
indent=4,
separators=(',', ': '),
)
class JSON(object):
"""
... |
a326f2daad6817f426099518da77bc241fd9b51e | bibpy/doi/__init__.py | bibpy/doi/__init__.py | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def download(doi, source='http://dx.doi.org/{0}', raw=False):
"""Download a bibtex fil... | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def retrieve(doi, source='http://dx.doi.org/{0}', raw=False, **options):
"""Download a... | Rename doi function, add keyword options | Rename doi function, add keyword options
| Python | mit | MisanthropicBit/bibpy,MisanthropicBit/bibpy | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def download(doi, source='http://dx.doi.org/{0}', raw=False):
"""Download a bibtex fil... | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def retrieve(doi, source='http://dx.doi.org/{0}', raw=False, **options):
"""Download a... | <commit_before># -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def download(doi, source='http://dx.doi.org/{0}', raw=False):
"""Downlo... | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def retrieve(doi, source='http://dx.doi.org/{0}', raw=False, **options):
"""Download a... | # -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def download(doi, source='http://dx.doi.org/{0}', raw=False):
"""Download a bibtex fil... | <commit_before># -*- coding: utf-8 -*-
"""Tools for downloading bibtex files from digital object identifiers."""
import bibpy
try:
from urllib.request import Request, urlopen
except ImportError:
from urllib2 import Request, urlopen
def download(doi, source='http://dx.doi.org/{0}', raw=False):
"""Downlo... |
8cceb96ae2d8352107dc2e03b336e84e9f2bdfb3 | partner_feeds/templatetags/partner_feed_tags.py | partner_feeds/templatetags/partner_feed_tags.py | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
partner = Partner.objects.get(name=name)
partner.posts = partner.post_set.all().order_by('-date')
partners... | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
continue
... | Make Django template tag forgiving of nonexistent partners. | Make Django template tag forgiving of nonexistent partners.
| Python | bsd-2-clause | theatlantic/django-partner-feeds | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
partner = Partner.objects.get(name=name)
partner.posts = partner.post_set.all().order_by('-date')
partners... | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
continue
... | <commit_before>from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
partner = Partner.objects.get(name=name)
partner.posts = partner.post_set.all().order_by('-date')
... | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
continue
... | from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
partner = Partner.objects.get(name=name)
partner.posts = partner.post_set.all().order_by('-date')
partners... | <commit_before>from django import template
from partner_feeds.models import Partner
register = template.Library()
@register.assignment_tag
def get_partners(*args):
partners = []
for name in args:
partner = Partner.objects.get(name=name)
partner.posts = partner.post_set.all().order_by('-date')
... |
f0bcc52a73d4efcc498e9c6d180552188af2359d | IPython/html/kernelspecs/handlers.py | IPython/html/kernelspecs/handlers.py | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | Fix HEAD requests for kernelspec resources | Fix HEAD requests for kernelspec resources
Closes gh-7237
Closes gh-7258
StaticFileHandler.get() is a coroutine. When Tornado calls a handler
method, it uses the return value to determine whether or not it's a
coroutine. So when head() calls get(), it needs to pass the return value
on for Tornado to handle it properl... | Python | bsd-3-clause | ipython/ipython,ipython/ipython | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | <commit_before>from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initia... | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initialize(self, path... | <commit_before>from tornado import web
from ..base.handlers import IPythonHandler
from ..services.kernelspecs.handlers import kernel_name_regex
class KernelSpecResourceHandler(web.StaticFileHandler, IPythonHandler):
SUPPORTED_METHODS = ('GET', 'HEAD')
def initialize(self):
web.StaticFileHandler.initia... |
27ee2752a71ee415154c40e1978edb9d5221a331 | IPython/lib/tests/test_deepreload.py | IPython/lib/tests/test_deepreload.py | """Test suite for the deepreload module."""
from IPython.testing import decorators as dec
from IPython.lib.deepreload import reload as dreload
@dec.skipif_not_numpy
def test_deepreload_numpy():
import numpy
exclude = [
# Standard exclusions:
'sys', 'os.path', '__builtin__', '__main__',
... | # -*- coding: utf-8 -*-
"""Test suite for the deepreload module."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from IPython.testing import decorators as dec
from IPython.lib.deepreload import r... | Reformat test to a standard style. | Reformat test to a standard style.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Test suite for the deepreload module."""
from IPython.testing import decorators as dec
from IPython.lib.deepreload import reload as dreload
@dec.skipif_not_numpy
def test_deepreload_numpy():
import numpy
exclude = [
# Standard exclusions:
'sys', 'os.path', '__builtin__', '__main__',
... | # -*- coding: utf-8 -*-
"""Test suite for the deepreload module."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from IPython.testing import decorators as dec
from IPython.lib.deepreload import r... | <commit_before>"""Test suite for the deepreload module."""
from IPython.testing import decorators as dec
from IPython.lib.deepreload import reload as dreload
@dec.skipif_not_numpy
def test_deepreload_numpy():
import numpy
exclude = [
# Standard exclusions:
'sys', 'os.path', '__builtin__', '__m... | # -*- coding: utf-8 -*-
"""Test suite for the deepreload module."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from IPython.testing import decorators as dec
from IPython.lib.deepreload import r... | """Test suite for the deepreload module."""
from IPython.testing import decorators as dec
from IPython.lib.deepreload import reload as dreload
@dec.skipif_not_numpy
def test_deepreload_numpy():
import numpy
exclude = [
# Standard exclusions:
'sys', 'os.path', '__builtin__', '__main__',
... | <commit_before>"""Test suite for the deepreload module."""
from IPython.testing import decorators as dec
from IPython.lib.deepreload import reload as dreload
@dec.skipif_not_numpy
def test_deepreload_numpy():
import numpy
exclude = [
# Standard exclusions:
'sys', 'os.path', '__builtin__', '__m... |
c2f2acc518f017a0d7b8ccfa6640595f2769aa98 | nib/plugins/prettyurls.py | nib/plugins/prettyurls.py | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | Add nginx rules for pretty URLs | Add nginx rules for pretty URLs
| Python | mit | jreese/nib | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
Rewrite... | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1... | <commit_before>from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
Rewrite... |
cec7ee7e98498ec8d15f35c4aef77ea44baefe6b | adhocracy/tests/lib/test_text.py | adhocracy/tests/lib/test_text.py | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | Fix tests after markdown library change | Fix tests after markdown library change
Addendum to da03b3f033cce2b957a71cf6cb334a8c207c5047
| Python | agpl-3.0 | alkadis/vcv,phihag/adhocracy,phihag/adhocracy,phihag/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,liqd/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,SysTheron/adhocracy,SysTheron/adhocracy,alkadis/vcv,SysTheron/adhocracy,l... | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | <commit_before>from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self... | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self.assertEqual(re... | <commit_before>from adhocracy.tests import TestController
from adhocracy.tests.testtools import tt_make_user
class TestText(TestController):
def test_render(self):
from adhocracy.lib.text import render
source = ('header\n'
'========')
result = render(source)
self... |
13208d4656adcf52a5842200ee1d9e079fdffc2b | bin/rate_limit_watcher.py | bin/rate_limit_watcher.py | #!/usr/bin/env python
import requests
URL = 'http://tutorials.pluralsight.com/gh_rate_limit'
def main():
resp = requests.get(URL)
if resp.status_code == 200:
print resp.content
else:
print 'Failed checking rate limit, status_code: %d' % (resp.status_code)
if __name__ == '__main__':
... | #!/usr/bin/env python
"""
Script to print out Github API rate limit for REPO_OWNER user i.e. the main
github user account used for the guides-cms application.
"""
import argparse
from datetime import datetime
import requests
DOMAIN = 'http://tutorials.pluralsight.com/'
URL = '/gh_rate_limit'
def main(domain):
... | Print rate limits from new JSON response url in a pretty, parsable format | Print rate limits from new JSON response url in a pretty, parsable format
| Python | agpl-3.0 | paulocheque/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms | #!/usr/bin/env python
import requests
URL = 'http://tutorials.pluralsight.com/gh_rate_limit'
def main():
resp = requests.get(URL)
if resp.status_code == 200:
print resp.content
else:
print 'Failed checking rate limit, status_code: %d' % (resp.status_code)
if __name__ == '__main__':
... | #!/usr/bin/env python
"""
Script to print out Github API rate limit for REPO_OWNER user i.e. the main
github user account used for the guides-cms application.
"""
import argparse
from datetime import datetime
import requests
DOMAIN = 'http://tutorials.pluralsight.com/'
URL = '/gh_rate_limit'
def main(domain):
... | <commit_before>#!/usr/bin/env python
import requests
URL = 'http://tutorials.pluralsight.com/gh_rate_limit'
def main():
resp = requests.get(URL)
if resp.status_code == 200:
print resp.content
else:
print 'Failed checking rate limit, status_code: %d' % (resp.status_code)
if __name__ == '... | #!/usr/bin/env python
"""
Script to print out Github API rate limit for REPO_OWNER user i.e. the main
github user account used for the guides-cms application.
"""
import argparse
from datetime import datetime
import requests
DOMAIN = 'http://tutorials.pluralsight.com/'
URL = '/gh_rate_limit'
def main(domain):
... | #!/usr/bin/env python
import requests
URL = 'http://tutorials.pluralsight.com/gh_rate_limit'
def main():
resp = requests.get(URL)
if resp.status_code == 200:
print resp.content
else:
print 'Failed checking rate limit, status_code: %d' % (resp.status_code)
if __name__ == '__main__':
... | <commit_before>#!/usr/bin/env python
import requests
URL = 'http://tutorials.pluralsight.com/gh_rate_limit'
def main():
resp = requests.get(URL)
if resp.status_code == 200:
print resp.content
else:
print 'Failed checking rate limit, status_code: %d' % (resp.status_code)
if __name__ == '... |
f5a856b6c6c64ff8bba56a04a25bb639e98ff0e2 | navigator/settings/prod.py | navigator/settings/prod.py | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | Add locust testing box to allowed IPs, and get the SSL redirect from the environment so that it can be turned off for load testing | Add locust testing box to allowed IPs, and get the SSL redirect from the environment so that it can be turned off for load testing
pep8
| Python | mit | dahfool/navigator,uktrade/navigator,uktrade/navigator,dahfool/navigator,dahfool/navigator,dahfool/navigator,uktrade/navigator,uktrade/navigator | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | <commit_before>from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | <commit_before>from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', '[email protected]'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
... |
63af2d4267f7107232777fa0d8b222dc00f07a90 | test_setup.py | test_setup.py | """Test setup.py."""
import os
import subprocess
import sys
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).returncode == 0
... | """Test setup.py."""
import os
import subprocess
import sys
import sysconfig
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).... | Check sysconfig 'scripts' instead of scanning PATH | Check sysconfig 'scripts' instead of scanning PATH
| Python | lgpl-2.1 | dmtucker/backlog | """Test setup.py."""
import os
import subprocess
import sys
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).returncode == 0
... | """Test setup.py."""
import os
import subprocess
import sys
import sysconfig
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).... | <commit_before>"""Test setup.py."""
import os
import subprocess
import sys
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).re... | """Test setup.py."""
import os
import subprocess
import sys
import sysconfig
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).... | """Test setup.py."""
import os
import subprocess
import sys
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).returncode == 0
... | <commit_before>"""Test setup.py."""
import os
import subprocess
import sys
import setup
def test_setup():
"""Run setup.py check."""
command = [
sys.executable,
setup.__file__,
'check',
'--metadata',
'--strict',
]
assert subprocess.run(command, check=False).re... |
36ceeed4ff6b578e8b63b222cd9beea4e788a819 | mongo_thingy/__init__.py | mongo_thingy/__init__.py | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | Define __all__ to restrict global imports | Define __all__ to restrict global imports
| Python | mit | numberly/mongo-thingy | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | <commit_before>from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
retu... | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
return cls.collecti... | <commit_before>from pymongo import MongoClient
from thingy import classproperty, DatabaseThingy
class Thingy(DatabaseThingy):
client = None
_collection = None
@classproperty
def collection(cls):
return cls._collection or cls.table
@classproperty
def collection_name(cls):
retu... |
2b30ebfb05d64dac4663ab4e37dca65c0130f83a | goodtablesio/tasks.py | goodtablesio/tasks.py | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | Make settings optional on validation task | Make settings optional on validation task
| Python | agpl-3.0 | frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | <commit_before>import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_... | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_object(config)
... | <commit_before>import datetime
import logging
import dataset
from celery import Celery
from sqlalchemy.types import DateTime
from sqlalchemy.dialects.postgresql import JSONB
from goodtables import Inspector
from . import config
log = logging.getLogger(__name__)
# Module API
app = Celery('tasks')
app.config_from_... |
fb49d44cd1cb8ea8a3d291d79546914f15a58491 | greenwich/__init__.py | greenwich/__init__.py | from greenwich.raster import (driver_for_path, frombytes, geom_to_array, open,
AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
| from greenwich.raster import (driver_for_path, fromarray, frombytes,
geom_to_array, open, AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
| Add fromarray to package root | Add fromarray to package root
| Python | bsd-3-clause | bkg/greenwich | from greenwich.raster import (driver_for_path, frombytes, geom_to_array, open,
AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
Add fromarray to package root | from greenwich.raster import (driver_for_path, fromarray, frombytes,
geom_to_array, open, AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
| <commit_before>from greenwich.raster import (driver_for_path, frombytes, geom_to_array, open,
AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
<commit_msg>Add fromarray to package root<commit_after> | from greenwich.raster import (driver_for_path, fromarray, frombytes,
geom_to_array, open, AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
| from greenwich.raster import (driver_for_path, frombytes, geom_to_array, open,
AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
Add fromarray to package rootfrom greenwich.raster import (driver_for_path, fromarray, frombytes,
geom... | <commit_before>from greenwich.raster import (driver_for_path, frombytes, geom_to_array, open,
AffineTransform, ImageDriver, Raster)
from greenwich.geometry import Envelope, Geometry
from greenwich.srs import SpatialReference
<commit_msg>Add fromarray to package root<commit_after>from greenwich.raster import (driver... |
71088ebbed3f6060def0455814036185c70ba194 | shopify_auth/context_processors.py | shopify_auth/context_processors.py | import shopify
def current_shop(request):
if not shopify.ShopifyResource.site:
return {'current_shop': None}
return {'current_shop': shopify.Shop.current()} | from django.conf import settings
import shopify
def shopify_context(request):
return {
'shopify_current_shop': shopify.Shop.current() if shopify.ShopifyResource.site else None,
'shopify_app_api_key': settings.SHOPIFY_APP_API_KEY,
} | Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information. | Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information. | Python | mit | funkybob/django-shopify-auth,RafaAguilar/django-shopify-auth,discolabs/django-shopify-auth,RafaAguilar/django-shopify-auth,discolabs/django-shopify-auth,funkybob/django-shopify-auth | import shopify
def current_shop(request):
if not shopify.ShopifyResource.site:
return {'current_shop': None}
return {'current_shop': shopify.Shop.current()}Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information. | from django.conf import settings
import shopify
def shopify_context(request):
return {
'shopify_current_shop': shopify.Shop.current() if shopify.ShopifyResource.site else None,
'shopify_app_api_key': settings.SHOPIFY_APP_API_KEY,
} | <commit_before>import shopify
def current_shop(request):
if not shopify.ShopifyResource.site:
return {'current_shop': None}
return {'current_shop': shopify.Shop.current()}<commit_msg>Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information.<commit_after> | from django.conf import settings
import shopify
def shopify_context(request):
return {
'shopify_current_shop': shopify.Shop.current() if shopify.ShopifyResource.site else None,
'shopify_app_api_key': settings.SHOPIFY_APP_API_KEY,
} | import shopify
def current_shop(request):
if not shopify.ShopifyResource.site:
return {'current_shop': None}
return {'current_shop': shopify.Shop.current()}Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information.from django.conf import settings
import shop... | <commit_before>import shopify
def current_shop(request):
if not shopify.ShopifyResource.site:
return {'current_shop': None}
return {'current_shop': shopify.Shop.current()}<commit_msg>Rename `current_shop` context processor to `shopify_context`, and add a little more useful Shopify information.<commit_after>fro... |
4c39c270af91ddbc213e077fc06b4bf67c7c6e99 | django/core/checks/compatibility/django_1_7_0.py | django/core/checks/compatibility/django_1_7_0.py | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | Add missing spaces to implicitly joined strings | Add missing spaces to implicitly joined strings
| Python | bsd-3-clause | liu602348184/django,yask123/django,RevelSystems/django,sgzsh269/django,wweiradio/django,Anonymous-X6/django,spisneha25/django,adamchainz/django,dfunckt/django,Anonymous-X6/django,abomyi/django,jasonbot/django,syphar/django,mttr/django,ckirby/django,tbeadle/django,rmboggs/django,megaumi/django,blindroot/django,rrrene/dj... | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | <commit_before>from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
... | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
"""
Checks ... | <commit_before>from __future__ import unicode_literals
from .. import Warning, register, Tags
@register(Tags.compatibility)
def check_1_7_compatibility(**kwargs):
errors = []
errors.extend(_check_middleware_classes(**kwargs))
return errors
def _check_middleware_classes(app_configs=None, **kwargs):
... |
12cf94f7cccad5d9fce8b44726756c33f4219a0c | automata/pda/exceptions.py | automata/pda/exceptions.py | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | Add blank line to comply with PEP 8 | Add blank line to comply with PEP 8
| Python | mit | caleb531/automata | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | <commit_before>#!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhib... | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | #!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhibiting nondeterm... | <commit_before>#!/usr/bin/env python3
"""Exception classes specific to pushdown automata."""
from automata.base.exceptions import AutomatonException
class PDAException(AutomatonException):
"""The base class for all PDA-related errors."""
pass
class NondeterminismError(PDAException):
"""A DPDA is exhib... |
85dcb6ff036d03fd1fadc62a519147cf6b9ca8de | floq/blockmatrix.py | floq/blockmatrix.py | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,column):
start_row = row*dim_block
start_column = column*dim_block
stop_row = start_row+dim_block
stop_column = start_column+dim_block
return matrix[start_row:stop_row,... | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,col):
start_row = row*dim_block
start_col = col*dim_block
stop_row = start_row+dim_block
stop_col = start_col+dim_block
return matrix[start_row:stop_row,start_col:stop_... | Rename column -> col for consistency with row | Rename column -> col for consistency with row
| Python | mit | sirmarcel/floq | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,column):
start_row = row*dim_block
start_column = column*dim_block
stop_row = start_row+dim_block
stop_column = start_column+dim_block
return matrix[start_row:stop_row,... | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,col):
start_row = row*dim_block
start_col = col*dim_block
stop_row = start_row+dim_block
stop_col = start_col+dim_block
return matrix[start_row:stop_row,start_col:stop_... | <commit_before>import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,column):
start_row = row*dim_block
start_column = column*dim_block
stop_row = start_row+dim_block
stop_column = start_column+dim_block
return matrix[star... | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,col):
start_row = row*dim_block
start_col = col*dim_block
stop_row = start_row+dim_block
stop_col = start_col+dim_block
return matrix[start_row:stop_row,start_col:stop_... | import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,column):
start_row = row*dim_block
start_column = column*dim_block
stop_row = start_row+dim_block
stop_column = start_column+dim_block
return matrix[start_row:stop_row,... | <commit_before>import numpy as np
# Provide functions to get/set blocks in numpy arrays
def get_block_from_matrix(matrix,dim_block,n_block,row,column):
start_row = row*dim_block
start_column = column*dim_block
stop_row = start_row+dim_block
stop_column = start_column+dim_block
return matrix[star... |
980cbb13e874f7d3769dff12992779f676a5b2f3 | plotly/plotly/__init__.py | plotly/plotly/__init__.py | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | Add get_config to the list of public functions for plotly.py | Add get_config to the list of public functions for plotly.py
| Python | mit | plotly/python-api,plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/plotly.py,ee-in/python-api | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | <commit_before>"""
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_pl... | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | """
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_plot_options, get... | <commit_before>"""
plotly
======
This module defines functionality that requires interaction between your
local machine and Plotly. Almost all functionality used here will require a
verifiable account (username/api-key pair) and a network connection.
"""
from . plotly import (
sign_in, update_plot_options, get_pl... |
388826605b556a9632c3dea22ca3ba1219dfc5ea | wallp/main.py | wallp/main.py | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | Change default subcommand to "source random" | Change default subcommand to "source random"
| Python | mit | amol9/wallp | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | <commit_before>import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
... | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
from . import c... | <commit_before>import sys
from redcmd.api import execute_commandline
def main():
from .db.manage.db import DB
db = DB()
response = db.check()
from util.printer import printer
response and printer.printf('program maintenance', response)
from .util import log
from .db.app.config import Config, ConfigError
... |
e7691a775dc745984155a5f2e07140c207c3ab20 | api/base/parsers.py | api/base/parsers.py | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ValidationError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = '... | Enforce that request data is a dictionary. | Enforce that request data is a dictionary.
| Python | apache-2.0 | DanielSBrown/osf.io,asanfilippo7/osf.io,cwisecarver/osf.io,sloria/osf.io,Ghalko/osf.io,felliott/osf.io,caseyrygt/osf.io,jnayak1/osf.io,caneruguz/osf.io,mfraezz/osf.io,kch8qx/osf.io,KAsante95/osf.io,emetsger/osf.io,caseyrygt/osf.io,mluo613/osf.io,samchrisinger/osf.io,wearpants/osf.io,billyhunt/osf.io,chennan47/osf.io,Ne... | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ValidationError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = '... | <commit_before>from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ValidationError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = '... | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | <commit_before>from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_... |
bc9488b6954c172d903521df9f00c7ff71243fff | tests.py | tests.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | Fix F401 error (module imported but unused) | Fix F401 error (module imported but unused)
[ci skip] | Python | mit | le717/linescan.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | <commit_before>#! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import ... | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import print_function
... | <commit_before>#! /usr/bin/python
# -*- coding: utf-8 -*-
"""
linescan.py - Effortlessly read lines from a text file using any encoding
Created 2013-2014 Triangle717
<http://Triangle717.WordPress.com/>
Licensed under The MIT License
<http://opensource.org/licenses/MIT/>
"""
from __future__ import ... |
d2106c0a6cb4bbf523914786ded873261cb174c2 | nipype/pipeline/__init__.py | nipype/pipeline/__init__.py | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from .engine import Node, MapNode, Workflow
from .utils import write_prov
| # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from engine import Node, MapNode, JoinNode, Workflow
from .utils import write_prov
| Add JoinNode to pipeline init | Add JoinNode to pipeline init
| Python | bsd-3-clause | arokem/nipype,gerddie/nipype,Leoniela/nipype,fprados/nipype,pearsonlab/nipype,blakedewey/nipype,carolFrohlich/nipype,blakedewey/nipype,gerddie/nipype,dgellis90/nipype,glatard/nipype,arokem/nipype,carlohamalainen/nipype,carolFrohlich/nipype,Leoniela/nipype,glatard/nipype,dmordom/nipype,grlee77/nipype,carolFrohlich/nipyp... | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from .engine import Node, MapNode, Workflow
from .utils import write_prov
Add JoinNode to pipel... | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from engine import Node, MapNode, JoinNode, Workflow
from .utils import write_prov
| <commit_before># emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from .engine import Node, MapNode, Workflow
from .utils import write_prov
<commi... | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from engine import Node, MapNode, JoinNode, Workflow
from .utils import write_prov
| # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from .engine import Node, MapNode, Workflow
from .utils import write_prov
Add JoinNode to pipel... | <commit_before># emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Package contains modules for generating pipelines using interfaces
"""
__docformat__ = 'restructuredtext'
from .engine import Node, MapNode, Workflow
from .utils import write_prov
<commi... |
780d1fa408677994c739ce489bd0fde2ed6242f0 | ideascaly/__init__.py | ideascaly/__init__.py | __author__ = 'jorgesaldivar'
| # IdeaScaly
# Copyright 2015 Jorge Saldivar
# See LICENSE for details.
"""
IdeaScaly: IdeaScale API client
"""
__version__ = '0.1'
__author__ = 'Jorge Saldivar'
__license__ = 'MIT'
from ideascaly.api import API
from ideascaly.auth import AuthNonSSO, AuthNonSSOMem, AuthSSO, AuthResearch
from ideascaly.error import Id... | Add details of the project | Add details of the project
| Python | mit | joausaga/ideascaly | __author__ = 'jorgesaldivar'
Add details of the project | # IdeaScaly
# Copyright 2015 Jorge Saldivar
# See LICENSE for details.
"""
IdeaScaly: IdeaScale API client
"""
__version__ = '0.1'
__author__ = 'Jorge Saldivar'
__license__ = 'MIT'
from ideascaly.api import API
from ideascaly.auth import AuthNonSSO, AuthNonSSOMem, AuthSSO, AuthResearch
from ideascaly.error import Id... | <commit_before>__author__ = 'jorgesaldivar'
<commit_msg>Add details of the project<commit_after> | # IdeaScaly
# Copyright 2015 Jorge Saldivar
# See LICENSE for details.
"""
IdeaScaly: IdeaScale API client
"""
__version__ = '0.1'
__author__ = 'Jorge Saldivar'
__license__ = 'MIT'
from ideascaly.api import API
from ideascaly.auth import AuthNonSSO, AuthNonSSOMem, AuthSSO, AuthResearch
from ideascaly.error import Id... | __author__ = 'jorgesaldivar'
Add details of the project# IdeaScaly
# Copyright 2015 Jorge Saldivar
# See LICENSE for details.
"""
IdeaScaly: IdeaScale API client
"""
__version__ = '0.1'
__author__ = 'Jorge Saldivar'
__license__ = 'MIT'
from ideascaly.api import API
from ideascaly.auth import AuthNonSSO, AuthNonSSOMe... | <commit_before>__author__ = 'jorgesaldivar'
<commit_msg>Add details of the project<commit_after># IdeaScaly
# Copyright 2015 Jorge Saldivar
# See LICENSE for details.
"""
IdeaScaly: IdeaScale API client
"""
__version__ = '0.1'
__author__ = 'Jorge Saldivar'
__license__ = 'MIT'
from ideascaly.api import API
from ideas... |
30b56f27cff21b93d68524fc992d6e731fb80e57 | tests.py | tests.py | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class BoardTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
print "list boards"
se... | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class TrelloTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
self.assertEquals(
... | Make it a single test case | Make it a single test case
| Python | bsd-3-clause | Wooble/py-trello,mehdy/py-trello,ntrepid8/py-trello,portante/py-trello,nMustaki/py-trello,WoLpH/py-trello,sarumont/py-trello,merlinpatt/py-trello,gchp/py-trello | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class BoardTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
print "list boards"
se... | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class TrelloTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
self.assertEquals(
... | <commit_before>from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class BoardTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
print "li... | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class TrelloTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
self.assertEquals(
... | from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class BoardTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
print "list boards"
se... | <commit_before>from models import AuthenticationError,AuthenticationRequired
from trello import Trello
import unittest
import os
class BoardTestCase(unittest.TestCase):
def setUp(self):
self._trello = Trello(os.environ['TRELLO_TEST_USER'], os.environ['TRELLO_TEST_PASS'])
def test01_list_boards(self):
print "li... |
7e2565007c926765750641b048607ed29b8aada0 | cmsplugin_zinnia/admin.py | cmsplugin_zinnia/admin.py | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | Add comment about why excepting KeyError | Add comment about why excepting KeyError
| Python | bsd-3-clause | bittner/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,bittner/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,bittner/cmsplugin-zinnia | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | <commit_before>"""Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models impor... | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | """Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models import Entry
from zi... | <commit_before>"""Admin of Zinnia CMS Plugins"""
from django.contrib import admin
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _
from cms.plugin_rendering import render_placeholder
from cms.admin.placeholderadmin import PlaceholderAdminMixin
from zinnia.models impor... |
6d143e8b3d060ca4639b08c15d7e826e0ee68c8c | neutron/tests/unit/objects/test_address_scope.py | neutron/tests/unit/objects/test_address_scope.py | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | Use BaseDbObjectTestCase in AddressScope UT | Use BaseDbObjectTestCase in AddressScope UT
AddressScopeDbObjectTestCase class is using _BaseObjectTestCase class
which doesn't contain all the unit test cases for Oslo-Versioned
classes. This patch replace that class.
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I180046743471487a9f... | Python | apache-2.0 | huntxu/neutron,noironetworks/neutron,noironetworks/neutron,eayunstack/neutron,openstack/neutron,mahak/neutron,mahak/neutron,cloudbase/neutron,mahak/neutron,sebrandon1/neutron,huntxu/neutron,sebrandon1/neutron,openstack/neutron,cloudbase/neutron,openstack/neutron,eayunstack/neutron | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | <commit_before># Copyright (c) 2016 Intel Corporation.
#
# 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 b... | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | # Copyright (c) 2016 Intel Corporation.
#
# 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 la... | <commit_before># Copyright (c) 2016 Intel Corporation.
#
# 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 b... |
ca62db36a14c9bcc447cb612a8fba4dd2c678629 | functional_tests.py | functional_tests.py | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
import pickle
b = mechanize.Browser()
r = b.open("http://wwwsearch.sf.net/bits/cctest2.txt")
r.read()
r.close()
r.seek(0)
... | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
print ("This test is expected to fail unless Python standard library"
"patch http://python.org/sf/1144636 has been applied")
import pickle
... | Add warning about failing functional test | Add warning about failing functional test
| Python | bsd-3-clause | python-mechanize/mechanize,python-mechanize/mechanize | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
import pickle
b = mechanize.Browser()
r = b.open("http://wwwsearch.sf.net/bits/cctest2.txt")
r.read()
r.close()
r.seek(0)
... | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
print ("This test is expected to fail unless Python standard library"
"patch http://python.org/sf/1144636 has been applied")
import pickle
... | <commit_before>#!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
import pickle
b = mechanize.Browser()
r = b.open("http://wwwsearch.sf.net/bits/cctest2.txt")
r.read()
r.close()
r.... | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
print ("This test is expected to fail unless Python standard library"
"patch http://python.org/sf/1144636 has been applied")
import pickle
... | #!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
import pickle
b = mechanize.Browser()
r = b.open("http://wwwsearch.sf.net/bits/cctest2.txt")
r.read()
r.close()
r.seek(0)
... | <commit_before>#!/usr/bin/env python
from unittest import TestCase
import mechanize
class ResponseTests(TestCase):
def test_close_pickle_load(self):
import pickle
b = mechanize.Browser()
r = b.open("http://wwwsearch.sf.net/bits/cctest2.txt")
r.read()
r.close()
r.... |
baaeb4fe0998bac8e0cb853d8124aa6134f55996 | poradnia/letters/admin.py | poradnia/letters/admin.py | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlines = [
Attachmen... | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
@admin.register(Letter)
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlin... | Rewrite DjangoAdmin in letters for decorators | Rewrite DjangoAdmin in letters for decorators
| Python | mit | rwakulszowa/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,rwakulszowa/poradnia | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlines = [
Attachmen... | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
@admin.register(Letter)
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlin... | <commit_before>from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlines = [
... | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
@admin.register(Letter)
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlin... | from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlines = [
Attachmen... | <commit_before>from django.contrib import admin
from .models import Attachment, Letter
class AttachmentInline(admin.StackedInline):
'''
Stacked Inline View for Attachment
'''
model = Attachment
class LetterAdmin(admin.ModelAdmin):
'''
Admin View for Letter
'''
inlines = [
... |
e36e6c4db61381ca9f29ce1dc5f645cb65d3ba21 | capstone/util/play.py | capstone/util/play.py | from __future__ import print_function
import random
from capstone.util import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur... | from __future__ import print_function
import random
from . import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur_player.choo... | Change absolute import to relative | Change absolute import to relative
| Python | mit | davidrobles/mlnd-capstone-code | from __future__ import print_function
import random
from capstone.util import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur... | from __future__ import print_function
import random
from . import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur_player.choo... | <commit_before>from __future__ import print_function
import random
from capstone.util import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
... | from __future__ import print_function
import random
from . import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur_player.choo... | from __future__ import print_function
import random
from capstone.util import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
move = cur... | <commit_before>from __future__ import print_function
import random
from capstone.util import print_header
def play_match(game, players, verbose=True):
"""Plays a match between the given players"""
if verbose:
print(game)
while not game.is_over():
cur_player = players[game.cur_player()]
... |
5486503c3e9664c1683e5de9381b4d0d413182c3 | ipywidgets/widgets/widget_description.py | ipywidgets/widgets/widget_description.py | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | Tweak the help text for the new tooltip attribute. | Tweak the help text for the new tooltip attribute. | Python | bsd-3-clause | ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | <commit_before># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .wi... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .widget_core impor... | <commit_before># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""Contains the DOMWidget class"""
from traitlets import Unicode
from .widget import Widget, widget_serialization, register
from .trait_types import InstanceDict
from .widget_style import Style
from .wi... |
0b41090984647de0e5b3228e871c26c57a005938 | omp/__init__.py | omp/__init__.py | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | Fix gomp library dynamic loading issues | Fix gomp library dynamic loading issues
* bug introduce from commit : 4a4676258bfd47a7fbefc51644eb58ffc60ab6ad
| Python | bsd-3-clause | pbrunet/pythran,artas360/pythran,pbrunet/pythran,hainm/pythran,pbrunet/pythran,hainm/pythran,pombredanne/pythran,artas360/pythran,pombredanne/pythran,artas360/pythran,hainm/pythran,serge-sans-paille/pythran,pombredanne/pythran,serge-sans-paille/pythran | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | <commit_before>'''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*... | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | '''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*/")
def __... | <commit_before>'''
OpenMP wrapper using a (user provided) libgomp dynamically loaded library
'''
import sys
import glob
import ctypes
class omp(object):
LD_LIBRARY_PATHS = [
"/usr/lib/x86_64-linux-gnu/",
# MacPorts install gcc in a "non standard" path on OSX
] + glob.glob("/opt/local/lib/gcc*... |
3fcb69fbb623184a30d1d5ecb41e4c3c33128f1a | src/lyra/tests/dictionary/dict_descr_example.py | src/lyra/tests/dictionary/dict_descr_example.py |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #... |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #t... | Fix to typing of loop variables | Fix to typing of loop variables
| Python | mpl-2.0 | caterinaurban/Lyra |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #... |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #t... | <commit_before>
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in i... |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #t... |
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in important: #... | <commit_before>
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
freqdict: Dict[str, int] = {} # defaultdict(int) err: int recognized as varId #initialized to 0
a: str = "" #necessary?
b: str = ""
for a, b in texts.items():
if a in i... |
e99a0bdde697a0508bc17a8dd66943cdf97bdc3d | Main_program/src/main_program.py | Main_program/src/main_program.py | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
print "Hello World"
| # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
print("Hello World")
print("Hessel is een home") | Test commit push and pull | Test commit push and pull
| Python | apache-2.0 | HesselTjeerdsma/Cyber-Physical-Pacman-Game,HesselTjeerdsma/Cyber-Physical-Pacman-Game,HesselTjeerdsma/Cyber-Physical-Pacman-Game,HesselTjeerdsma/Cyber-Physical-Pacman-Game,HesselTjeerdsma/Cyber-Physical-Pacman-Game,HesselTjeerdsma/Cyber-Physical-Pacman-Game | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
print "Hello World"
Test commit push and pull | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
print("Hello World")
print("Hessel is een home") | <commit_before># To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
print "Hello World"
<commit_msg>Test commit push and pull<commit_after> | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
print("Hello World")
print("Hessel is een home") | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
print "Hello World"
Test commit push and pull# To change this license header, choose License Headers in Project P... | <commit_before># To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
print "Hello World"
<commit_msg>Test commit push and pull<commit_after># To change this license he... |
70cb8045b00445089db6aaa710a0899e1f4cbab1 | porick/settings.py | porick/settings.py | SITE_NAME = 'Porick'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'new... | SITE_NAME = 'Porick.'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'ne... | Add hipster full-stop to the front-page | Add hipster full-stop to the front-page
| Python | apache-2.0 | kopf/porick,kopf/porick,kopf/porick | SITE_NAME = 'Porick'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'new... | SITE_NAME = 'Porick.'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'ne... | <commit_before>SITE_NAME = 'Porick'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_ev... | SITE_NAME = 'Porick.'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'ne... | SITE_NAME = 'Porick'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_events',
'new... | <commit_before>SITE_NAME = 'Porick'
WELCOME_TEXT = '''Porick is yet another IRC Quotes web application, designed to replace <i>Chirpy!</i>'''
HOMEPAGE_BUTTON_TEXT = 'Start browsing'
QUOTES_PER_PAGE = 10
TABLES = {
'accounts': 'chirpy_accounts',
'event_metadata': 'chirpy_event_metadata',
'events': 'chirpy_ev... |
43a672574d13ce3ce267f5e4773c5d26827a4b9a | app/sso/backends.py | app/sso/backends.py | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | Switch authenticator to migrate back to Django style passwords | Switch authenticator to migrate back to Django style passwords
| Python | bsd-3-clause | nikdoof/test-auth | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(se... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(self, username=No... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from hashlib import sha1
class SimpleHashModelBackend(ModelBackend):
supports_anonymous_user = False
supports_object_permissions = False
supports_inactive_user = False
def authenticate(se... |
74cd91babf7466c35fbb680c10d5f2451b1409b0 | appengine_config.py | appengine_config.py | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath(os.environ.get('ISB_CGC_COMMON_MODU... | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath('./ISB-CGC-Common')
]
# Add the sh... | Use hardcoded path for ISB-CGC-Common | Use hardcoded path for ISB-CGC-Common
| Python | apache-2.0 | isb-cgc/ISB-CGC-API,isb-cgc/ISB-CGC-API,isb-cgc/ISB-CGC-API | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath(os.environ.get('ISB_CGC_COMMON_MODU... | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath('./ISB-CGC-Common')
]
# Add the sh... | <commit_before>import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath(os.environ.get('ISB_... | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath('./ISB-CGC-Common')
]
# Add the sh... | import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath(os.environ.get('ISB_CGC_COMMON_MODU... | <commit_before>import os
import sys
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + os.sep
SHARED_SOURCE_DIRECTORIES = [
os.path.abspath(os.environ.get('ISB_... |
edfc43f4c6041166845e5e4ffd2db58802d3e8c6 | ml/pytorch/image_classification/architectures.py | ml/pytorch/image_classification/architectures.py | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | Add custom FC layer module | FEAT: Add custom FC layer module
| Python | apache-2.0 | ronrest/convenience_py,ronrest/convenience_py | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | <commit_before>import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
############################################################################... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | <commit_before>import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
############################################################################... |
23606cec326b75cb73ba31b93410770659481d41 | test_echo.py | test_echo.py | # -*- coding: utf-8 -*-
import subprocess
import pytest
def test_basic(string="This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == proces... | # -*- coding: utf-8 -*-
import subprocess
def test_basic(string=u"This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == process.stdout.read... | Change unicode test, to test decoding and encoding is done correctly. | Change unicode test, to test decoding and encoding is done correctly.
| Python | mit | bm5w/network_tools | # -*- coding: utf-8 -*-
import subprocess
import pytest
def test_basic(string="This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == proces... | # -*- coding: utf-8 -*-
import subprocess
def test_basic(string=u"This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == process.stdout.read... | <commit_before># -*- coding: utf-8 -*-
import subprocess
import pytest
def test_basic(string="This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert s... | # -*- coding: utf-8 -*-
import subprocess
def test_basic(string=u"This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == process.stdout.read... | # -*- coding: utf-8 -*-
import subprocess
import pytest
def test_basic(string="This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert string == proces... | <commit_before># -*- coding: utf-8 -*-
import subprocess
import pytest
def test_basic(string="This is a test."):
"""Test function to test echo server and client with inputted string."""
process = subprocess.Popen(['./echo_client.py', string],
stdout=subprocess.PIPE)
assert s... |
54461c89b61ba118ef98389c09b45138b32224ab | stagecraft/apps/datasets/admin/backdrop_user.py | stagecraft/apps/datasets/admin/backdrop_user.py | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | Add filter_horizontal to backdrop user admin | Add filter_horizontal to backdrop user admin
- Provides a much more usable interface to filter and add data_sets for backdrop admin users
| Python | mit | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | <commit_before>from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model ... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | <commit_before>from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model ... |
3af95029c3f784e17247abcd0123156ff9384513 | pronto/serializers/base.py | pronto/serializers/base.py | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO, encoding: str ... | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO) -> None:
... | Fix signature of `BaseSerializer.dump` to remove `encoding` argument | Fix signature of `BaseSerializer.dump` to remove `encoding` argument
| Python | mit | althonos/pronto | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO, encoding: str ... | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO) -> None:
... | <commit_before>import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO,... | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO) -> None:
... | import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO, encoding: str ... | <commit_before>import abc
import io
import typing
from typing import BinaryIO, ClassVar
from ..ontology import Ontology
class BaseSerializer(abc.ABC):
format: ClassVar[str] = NotImplemented
def __init__(self, ont: Ontology):
self.ont = ont
@abc.abstractmethod
def dump(self, file: BinaryIO,... |
dbc234df7541f6aab32bce0c8f8ba149f9e4ad22 | speeches/management/commands/populatespeakers.py | speeches/management/commands/populatespeakers.py | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | Make speaker population code use get_or_create instead of exception | Make speaker population code use get_or_create instead of exception
| Python | agpl-3.0 | opencorato/sayit,opencorato/sayit,opencorato/sayit,opencorato/sayit | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | <commit_before>from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
... | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
# Do popu... | <commit_before>from django.core.management.base import NoArgsCommand
import pprint
from popit import PopIt
from speeches.models import Speaker
class Command(NoArgsCommand):
help = 'Populates the database with people from Popit'
def handle_noargs(self, **options):
pp = pprint.PrettyPrinter(indent=4)
... |
93e7703e6b7c9115e441c1a285e508a7d0738639 | mica/starcheck/__init__.py | mica/starcheck/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, get_mp_dir, get_monitor_windows
| # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import (get_starcheck_catalog, get_starcheck_catalog_at_date,
get_mp_dir, get_monitor_windows, get_dither, get_att, get_starcat)
| Add new get_ starcheck methods to exported/init methods | Add new get_ starcheck methods to exported/init methods
| Python | bsd-3-clause | sot/mica,sot/mica | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, get_mp_dir, get_monitor_windows
Add new get_ starcheck methods to exported/init methods | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import (get_starcheck_catalog, get_starcheck_catalog_at_date,
get_mp_dir, get_monitor_windows, get_dither, get_att, get_starcat)
| <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, get_mp_dir, get_monitor_windows
<commit_msg>Add new get_ starcheck methods to exported/init methods<commit_after> | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import (get_starcheck_catalog, get_starcheck_catalog_at_date,
get_mp_dir, get_monitor_windows, get_dither, get_att, get_starcat)
| # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, get_mp_dir, get_monitor_windows
Add new get_ starcheck methods to exported/init methods# Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import (get_... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, get_mp_dir, get_monitor_windows
<commit_msg>Add new get_ starcheck methods to exported/init methods<commit_after># Licensed under a 3-clause BSD style license - see... |
ab16cd72a2f2ed093f206b48379fb9f03f8d2f36 | tests/example.py | tests/example.py | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def test_example(self):
dojo = Dojo()
self.assertEqual(dojo.get_random_number(), 4)
if __name__ == '__main__':
uni... | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def setUp(self):
""" This method will be called *before* each test run. """
pass
def tearDown(self):
""" T... | Add setUp and tearDown to test file | Add setUp and tearDown to test file
| Python | mit | pawel-lewtak/coding-dojo-template-python | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def test_example(self):
dojo = Dojo()
self.assertEqual(dojo.get_random_number(), 4)
if __name__ == '__main__':
uni... | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def setUp(self):
""" This method will be called *before* each test run. """
pass
def tearDown(self):
""" T... | <commit_before>import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def test_example(self):
dojo = Dojo()
self.assertEqual(dojo.get_random_number(), 4)
if __name__ == '__m... | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def setUp(self):
""" This method will be called *before* each test run. """
pass
def tearDown(self):
""" T... | import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def test_example(self):
dojo = Dojo()
self.assertEqual(dojo.get_random_number(), 4)
if __name__ == '__main__':
uni... | <commit_before>import unittest
from src.dojo import Dojo
"""
Call "python -m tests.example" while being in parent directory to run tests in this file.
"""
class ExampleTest(unittest.TestCase):
def test_example(self):
dojo = Dojo()
self.assertEqual(dojo.get_random_number(), 4)
if __name__ == '__m... |
0ff0a3137ea938b7db8167d132b08b9e8620e864 | contrib/internal/run-pyflakes.py | contrib/internal/run-pyflakes.py | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'settings_local.py',
'ReviewBoard.egg-info',
]
... | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'htdocs',
'settings_local.py',
'ReviewBoard.e... | Exclude htdocs, because that just takes way too long to scan. | Exclude htdocs, because that just takes way too long to scan.
| Python | mit | atagar/ReviewBoard,atagar/ReviewBoard,sgallagher/reviewboard,chazy/reviewboard,chipx86/reviewboard,Khan/reviewboard,custode/reviewboard,atagar/ReviewBoard,Khan/reviewboard,chazy/reviewboard,atagar/ReviewBoard,bkochendorfer/reviewboard,davidt/reviewboard,asutherland/opc-reviewboard,Khan/reviewboard,Khan/reviewboard,beol... | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'settings_local.py',
'ReviewBoard.egg-info',
]
... | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'htdocs',
'settings_local.py',
'ReviewBoard.e... | <commit_before>#!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'settings_local.py',
'ReviewBoard.... | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'htdocs',
'settings_local.py',
'ReviewBoard.e... | #!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'settings_local.py',
'ReviewBoard.egg-info',
]
... | <commit_before>#!/usr/bin/env python
#
# Utility script to run pyflakes with the modules we care about and
# exclude errors we know to be fine.
import os
import subprocess
import sys
module_exclusions = [
'djblets',
'django_evolution',
'dist',
'ez_setup.py',
'settings_local.py',
'ReviewBoard.... |
16d928d67b76843d8eeea4e145e43e3d073b1410 | qiskit/__init__.py | qiskit/__init__.py | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | Change version number to next major stable | Change version number to next major stable
Master branch is used as a development branch, so the version number should point to the next major stable version. | Python | apache-2.0 | ChristopheVuillot/qiskit-sdk-py,ChristopheVuillot/qiskit-sdk-py,QISKit/qiskit-sdk-py,ChristopheVuillot/qiskit-sdk-py,atilag/qiskit-sdk-py,atilag/qiskit-sdk-py,atilag/qiskit-sdk-py,QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | <commit_before>from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qis... | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qiskiterror import... | <commit_before>from ._classicalregister import ClassicalRegister
from ._quantumregister import QuantumRegister
from ._quantumcircuit import QuantumCircuit
from ._gate import Gate
from ._compositegate import CompositeGate
from ._instruction import Instruction
from ._instructionset import InstructionSet
from ._qis... |
84257aaf865a913a0ed1888cdf6ce6f22d63f4e5 | tests/functional/firefox/os/test_fxos_navigation.py | tests/functional/firefox/os/test_fxos_navigation.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.fxos_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parametr... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.family_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parame... | Fix incorrect import for FxOS nav tests. | Fix incorrect import for FxOS nav tests.
| Python | mpl-2.0 | mozilla/bedrock,Sancus/bedrock,TheJJ100100/bedrock,flodolo/bedrock,MichaelKohler/bedrock,Sancus/bedrock,ericawright/bedrock,sgarrity/bedrock,CSCI-462-01-2017/bedrock,jgmize/bedrock,TheoChevalier/bedrock,sylvestre/bedrock,analytics-pros/mozilla-bedrock,gerv/bedrock,mkmelin/bedrock,analytics-pros/mozilla-bedrock,kyoshino... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.fxos_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parametr... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.family_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parame... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.fxos_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytes... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.family_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parame... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.fxos_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytest.mark.parametr... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.fxos_navigation import FirefoxPage
@pytest.mark.nondestructive
@pytes... |
63146c651817ebad688bbcd154fefbf109a39ba0 | server.py | server.py | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | Scale back threading, beacause Rasp Pi doesn't have enough threads | Scale back threading, beacause Rasp Pi doesn't have enough threads
| Python | agpl-3.0 | pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker,pac-club-2017/instant-grade-checker | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | <commit_before>from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"... | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"
app.config['SQ... | <commit_before>from igc.util import cache, util
util.setupLog()
from flask import Flask
from flask import send_from_directory
from flask_cors import CORS
from igc.controller.controller_register import register_controllers
app = Flask(__name__)
CORS(app)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///./sqllite.db"... |
f996038681aed05645164642c8fed7d46735ca4b | deferrable/backend/sqs.py | deferrable/backend/sqs.py | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_or_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
if callable(sqs_connection_or_thunk):
self.sqs_connection_thunk = sqs_co... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
"""To allow backends to be initialized lazily, this factory requires a thunk
(p... | Remove option for non-thunk SQS initialization | Remove option for non-thunk SQS initialization
| Python | mit | gamechanger/deferrable | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_or_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
if callable(sqs_connection_or_thunk):
self.sqs_connection_thunk = sqs_co... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
"""To allow backends to be initialized lazily, this factory requires a thunk
(p... | <commit_before>from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_or_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
if callable(sqs_connection_or_thunk):
self.sqs_connection... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
"""To allow backends to be initialized lazily, this factory requires a thunk
(p... | from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_or_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
if callable(sqs_connection_or_thunk):
self.sqs_connection_thunk = sqs_co... | <commit_before>from .base import BackendFactory, Backend
from ..queue.sqs import SQSQueue
class SQSBackendFactory(BackendFactory):
def __init__(self, sqs_connection_or_thunk, visibility_timeout=30, wait_time=10, create_if_missing=False):
if callable(sqs_connection_or_thunk):
self.sqs_connection... |
48f6329a74bde4b045aff31e6b2def11c151d294 | couchdb/tests/testutil.py | couchdb/tests/testutil.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | Use a random number instead of uuid for temp database name. | Use a random number instead of uuid for temp database name.
| Python | bsd-3-clause | gcarranza/couchdb-python,jur9526/couchdb-python | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_db... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_db... |
f87585d51493157e89c0117a25bf7a6d4b2b135f | runtests.py | runtests.py | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME': ':memory:'
... | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'django.contrib.gis',
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
... | Enable contrib.gis for test runs so templates are found | Enable contrib.gis for test runs so templates are found
| Python | bsd-3-clause | kuzmich/django-spillway,barseghyanartur/django-spillway,bkg/django-spillway | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME': ':memory:'
... | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'django.contrib.gis',
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
... | <commit_before>#!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME... | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'django.contrib.gis',
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
... | #!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME': ':memory:'
... | <commit_before>#!/usr/bin/env python
import os
import sys
from django.conf import settings
import django
DEFAULT_SETTINGS = {
'INSTALLED_APPS': (
'spillway',
'tests',
),
'DATABASES': {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
'NAME... |
e01140053a2a906084d0ba50801b17d4ae7ce850 | samples/unmanage_node.py | samples/unmanage_node.py | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT TOP 1 NodeID FROM Orion.Nodes')
interfaceId = results['resu... | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT NodeID, Caption FROM Orion.Nodes WHERE IPAddress = @ip_addr', i... | Correct node variable name and validate results | Correct node variable name and validate results
| Python | apache-2.0 | solarwinds/orionsdk-python | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT TOP 1 NodeID FROM Orion.Nodes')
interfaceId = results['resu... | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT NodeID, Caption FROM Orion.Nodes WHERE IPAddress = @ip_addr', i... | <commit_before>import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT TOP 1 NodeID FROM Orion.Nodes')
interfaceId ... | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT NodeID, Caption FROM Orion.Nodes WHERE IPAddress = @ip_addr', i... | import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT TOP 1 NodeID FROM Orion.Nodes')
interfaceId = results['resu... | <commit_before>import requests
from orionsdk import SwisClient
from datetime import datetime, timedelta
def main():
hostname = 'localhost'
username = 'admin'
password = ''
swis = SwisClient(hostname, username, password)
results = swis.query('SELECT TOP 1 NodeID FROM Orion.Nodes')
interfaceId ... |
fd3c24537b9af6f7c79fc17b932c01372a569856 | brake/backends/dummybe.py | brake/backends/dummybe.py | import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
| import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
def limit(self, func_name, request,
ip=True, ... | Make the dummy limit function always return nothing. | Make the dummy limit function always return nothing.
| Python | bsd-3-clause | SilentCircle/django-brake,SilentCircle/django-brake,skorokithakis/django-brake,skorokithakis/django-brake | import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
Make the dummy limit function always return nothing. | import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
def limit(self, func_name, request,
ip=True, ... | <commit_before>import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
<commit_msg>Make the dummy limit function always ... | import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
def limit(self, func_name, request,
ip=True, ... | import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
Make the dummy limit function always return nothing.import rando... | <commit_before>import random
from cachebe import CacheBackend
class DummyBackend(CacheBackend):
"""
A dummy rate-limiting backend that disables rate-limiting,
for testing.
"""
def get_ip(self, request):
return str(random.randrange(10e20))
<commit_msg>Make the dummy limit function always ... |
ded82a3f9f438206a5f6ffb02739ad2fe71a08ce | rtrss/config_production.py | rtrss/config_production.py | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | Add DABUG config value to production config | Add DABUG config value to production config
| Python | apache-2.0 | notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | <commit_before>import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIV... | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIVATEKEY_URL = os... | <commit_before>import os
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL')
# directory to store runtime data, write access required
DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR')
SECRET_KEY = os.environ.get('RTRSS_SECRET_KEY')
FILESTORAGE_URL = os.environ.get('RTRSS_FILESTORAGE_URL')
GCS_PRIV... |
f9b87aa94295473fa1a630cb812058554a1cf542 | openacademy/__openerp__.py | openacademy/__openerp__.py | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | Fix missing extension in course view file | Fix missing extension in course view file
| Python | mit | tebanep/odoo_training_addons | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | <commit_before># -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
... | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | # -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
'website': ... | <commit_before># -*- coding: utf-8 -*-
{
'name': "Open Academy",
'summary': """Manage trainings""",
'description': """
Open Academy module for managing trainings:
- training courses
- training sessions
- attendees registration
""",
'author': "tebanep",
... |
f1939ef0eadb164dfbe95bf90b3a4cd8757c8a75 | src/ovirtsdk/infrastructure/common.py | src/ovirtsdk/infrastructure/common.py | #
# Copyright (c) 2010 Red Hat, 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 t... | #
# Copyright (c) 2010 Red Hat, 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 t... | Add empty export method to decorator base | sdk: Add empty export method to decorator base
Decorators for resources and collections extend a common base class, for
example:
class VMSnapshotDisks(Base)
The resource decorators also extend the corresponding parameter class:
class VMSnapshotDisk(params.Disk, Base)
This means that resource decorators impleme... | Python | apache-2.0 | DragonRoman/ovirt-engine-sdk,DragonRoman/ovirt-engine-sdk,DragonRoman/ovirt-engine-sdk | #
# Copyright (c) 2010 Red Hat, 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 t... | #
# Copyright (c) 2010 Red Hat, 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 t... | <commit_before>#
# Copyright (c) 2010 Red Hat, 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 ... | #
# Copyright (c) 2010 Red Hat, 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 t... | #
# Copyright (c) 2010 Red Hat, 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 t... | <commit_before>#
# Copyright (c) 2010 Red Hat, 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 ... |
18e07d14cf0c0f72e1af50b55bd054d917cb346b | docs/source/parameters.py | docs/source/parameters.py |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
return _getvar("__version__", os.path.jo... |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line and "=" in line and "__all__" not in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
... | Read doc version number from _metadata.py | Read doc version number from _metadata.py
| Python | apache-2.0 | datawire/bakerstreet,datawire/bakerstreet |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
return _getvar("__version__", os.path.jo... |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line and "=" in line and "__all__" not in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
... | <commit_before>
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
return _getvar("__version... |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line and "=" in line and "__all__" not in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
... |
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
return _getvar("__version__", os.path.jo... | <commit_before>
def _getvar(var, path, default=None):
with open(path) as f:
for line in f:
if var in line:
g = {}
l = {}
exec line in g, l
return l[var]
return default
def _version():
import os
return _getvar("__version... |
b2a56e8f731f3f0d35e8fe4d2379909a3151a667 | services/flickr.py | services/flickr.py | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | Move Flickr over to its newly-secured API domain | Move Flickr over to its newly-secured API domain
| Python | bsd-3-clause | foauth/foauth.org,foauth/foauth.org,foauth/foauth.org | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | <commit_before>import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | <commit_before>import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr... |
b1b4b0efd8619e1cb00ee317cc4d57e4dce00eec | projects/wsgi.py | projects/wsgi.py | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | Read the script name if the proxy passes it | Read the script name if the proxy passes it
| Python | mit | cmheisel/project-status-dashboard,cmheisel/project-status-dashboard,cmheisel/project-status-dashboard | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | <commit_before>"""
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefau... | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | """
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | <commit_before>"""
WSGI config for projects project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefau... |
5ab86a2456b54d5af73e15b61de95994b95be8cb | kovot/remote_mod.py | kovot/remote_mod.py | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/get_responses".for... | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/generate_responses... | Fix bug; no generate_responses method in RemoteCallerMod | Fix bug; no generate_responses method in RemoteCallerMod
| Python | mit | kenkov/kovot,kenkov/kovot | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/get_responses".for... | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/generate_responses... | <commit_before>#! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/get... | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/generate_responses... | #! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/get_responses".for... | <commit_before>#! /usr/bin/env python
# coding:utf-8
import requests
import logging
from kovot.response import Response
class RemoteCallerMod:
def __init__(self, server, port):
self._root_url = "http://{}:{}".format(server, port)
def generate_responses(self, bot, message):
url = "{}/api/get... |
d8e5dce3489817a5065c045688b03f9e85c0b9a4 | tests/data_structures/commons/binary_search_tree_unit_test.py | tests/data_structures/commons/binary_search_tree_unit_test.py | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | Increase the unit test coverage for the binary search tree | Increase the unit test coverage for the binary search tree
| Python | bsd-3-clause | chen0040/pyalgs | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | <commit_before>import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3... | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3)
bst.p... | <commit_before>import unittest
from pyalgs.data_structures.commons.binary_search_tree import BinarySearchTree
class BinarySearchTreeUnitTest(unittest.TestCase):
def test_binarySearchTree(self):
bst = BinarySearchTree.create()
bst.put("one", 1)
bst.put("two", 2)
bst.put("three", 3... |
c8e7400008f19f89519cbfd067c8e82f41fc503a | signac/__init__.py | signac/__init__.py | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
# The VERSION string represents the actual (development) version o... | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
from . import contrib
from . import db
# The VERSION string repre... | Put contrib and db into global API. | Put contrib and db into global API.
| Python | bsd-3-clause | csadorf/signac,csadorf/signac | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
# The VERSION string represents the actual (development) version o... | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
from . import contrib
from . import db
# The VERSION string repre... | <commit_before>"""
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
# The VERSION string represents the actual (develop... | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
from . import contrib
from . import db
# The VERSION string repre... | """
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
# The VERSION string represents the actual (development) version o... | <commit_before>"""
signac aids in the management, access and analysis of large-scale
computational investigations.
The framework provides a simple data model, which helps to organize
data production and post-processing as well as distribution among collaboratos.
"""
# The VERSION string represents the actual (develop... |
17198f73f66190711a2df3c7b47008b2a0c50f8e | transaction_downloader/transaction_downloader.py | transaction_downloader/transaction_downloader.py | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
from d... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | Add function to read in plaid + account credentials into one structure. | Add function to read in plaid + account credentials into one structure.
| Python | mit | ebridges/plaid2qif,ebridges/plaid2qif,ebridges/plaid2qif | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
from d... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | <commit_before>"""Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work w... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
from d... | <commit_before>"""Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work w... |
c9372c38fb86494f1b7d0ba32ecfafa073d6da77 | tohu/v6/utils.py | tohu/v6/utils.py | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | Add helper function to create a list of namedtuples useful for testing and debugging | Add helper function to create a list of namedtuples useful for testing and debugging
| Python | mit | maxalbert/tohu | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | <commit_before>from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", ... | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", fmt='', seed=No... | <commit_before>from collections import namedtuple
__all__ = ['identity', 'print_generated_sequence']
def identity(x):
"""
Helper function which returns its argument unchanged.
That is, `identity(x)` returns `x` for any input `x`.
"""
return x
def print_generated_sequence(gen, num, *, sep=", ", ... |
d9adcad2b67b7e25e5997f3bfafb0208ab225fa9 | tests/integration/cattletest/core/test_proxy.py | tests/integration/cattletest/core/test_proxy.py | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | Use http for proxy test | Use http for proxy test
| Python | apache-2.0 | cjellick/cattle,vincent99/cattle,vincent99/cattle,cloudnautique/cattle,jimengliu/cattle,wlan0/cattle,rancher/cattle,cjellick/cattle,Cerfoglg/cattle,rancherio/cattle,rancherio/cattle,rancherio/cattle,wlan0/cattle,cloudnautique/cattle,jimengliu/cattle,rancher/cattle,cjellick/cattle,cloudnautique/cattle,Cerfoglg/cattle,Ce... | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | <commit_before>from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s,... | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s, value=s.value)... | <commit_before>from common_fixtures import * # NOQA
import requests
def test_proxy(client, admin_user_client):
domain = 'releases.rancher.com'
s = admin_user_client.by_id_setting('api.proxy.whitelist')
if domain not in s.value:
s.value += ',{}'.format(domain)
admin_user_client.update(s,... |
e39bcde813d35c8079743fbed7e77f2c8e4b4596 | examples/mainwindow.py | examples/mainwindow.py | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | Update example to switch between light and dark themes | Update example to switch between light and dark themes | Python | mit | gmarull/qtmodern | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | <commit_before>import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWind... | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __... | <commit_before>import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWind... |
990d98b323e21d8824b2aead8700f56d66fe6ba3 | plasmapy/utils/__init__.py | plasmapy/utils/__init__.py | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | Fix AppVeyor build or break it in a different way | Fix AppVeyor build or break it in a different way
| Python | bsd-3-clause | StanczakDominik/PlasmaPy | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | <commit_before>from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
... | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
AtomicError,
... | <commit_before>from .checks import (check_quantity,
check_relativistic,
_check_quantity,
_check_relativistic)
from .exceptions import (PlasmaPyError,
PhysicsError,
RelativityError,
... |
8da480a92f3e27807275868c27cb41cbde8504d8 | neo/test/rawiotest/test_alphaomegarawio.py | neo/test/rawiotest/test_alphaomegarawio.py | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | Set logging level higher so we don't spam tests with debug messages | Set logging level higher so we don't spam tests with debug messages
| Python | bsd-3-clause | INM-6/python-neo,apdavison/python-neo,JuliaSprenger/python-neo,NeuralEnsemble/python-neo,samuelgarcia/python-neo | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | <commit_before>"""
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if ... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | <commit_before>"""
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if ... |
369adf5a3a303612edf9f0169c7b37b7c711a852 | frappe/website/page_renderers/web_page.py | frappe/website/page_renderers/web_page.py | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = None
self.basename = None
self.name = None
self.r... | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = ''
self.basename = ''
self.name = ''
self.route =... | Set default value as empty string | fix: Set default value as empty string
| Python | mit | frappe/frappe,mhbu50/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,almeidapaulopt/frappe,yashodhank/frappe,almeidapaulopt/frappe,mhbu50/frappe,yashodhank/frappe,StrellaGroup/frappe,mhbu50/frappe,almeidapaulopt/frappe,yashodhank/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,mhbu50/frappe,yashodhank/frappe | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = None
self.basename = None
self.name = None
self.r... | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = ''
self.basename = ''
self.name = ''
self.route =... | <commit_before>import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = None
self.basename = None
self.name ... | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = ''
self.basename = ''
self.name = ''
self.route =... | import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = None
self.basename = None
self.name = None
self.r... | <commit_before>import frappe
class WebPage(object):
def __init__(self, path=None, http_status_code=None):
self.headers = None
self.http_status_code = http_status_code or 200
if not path:
path = frappe.local.request.path
self.path = path.strip('/ ')
self.basepath = None
self.basename = None
self.name ... |
5c6dd036e9fc14d04805a0f31af5a9c28fe51cf5 | tx_salaries/management/commands/generate_transformer_hash.py | tx_salaries/management/commands/generate_transformer_hash.py | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | Add message if transformer_hash already exists | Add message if transformer_hash already exists
| Python | apache-2.0 | texastribune/tx_salaries,texastribune/tx_salaries | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | <commit_before>from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet nam... | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet name'),
ma... | <commit_before>from django.core.management.base import BaseCommand
from optparse import make_option
from ...utils import transformer
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--sheet', action='store', dest='sheet', default=None,
help='Sheet nam... |
3c742914bd032648665f9069456d78c0a03e5568 | bluebottle/projects/documents.py | bluebottle/projects/documents.py | from django_elasticsearch_dsl import DocType, Index
from bluebottle.projects.models import Project
# The name of your index
project = Index('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,
number_of_replicas=0
)
@project.doc_type
class Projec... | from django_elasticsearch_dsl import DocType
from bluebottle.projects.models import Project
from bluebottle.utils.documents import MultiTenantIndex
# The name of your index
project = MultiTenantIndex('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,... | Use a different index for different tenants | Use a different index for different tenants
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | from django_elasticsearch_dsl import DocType, Index
from bluebottle.projects.models import Project
# The name of your index
project = Index('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,
number_of_replicas=0
)
@project.doc_type
class Projec... | from django_elasticsearch_dsl import DocType
from bluebottle.projects.models import Project
from bluebottle.utils.documents import MultiTenantIndex
# The name of your index
project = MultiTenantIndex('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,... | <commit_before>from django_elasticsearch_dsl import DocType, Index
from bluebottle.projects.models import Project
# The name of your index
project = Index('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,
number_of_replicas=0
)
@project.doc_ty... | from django_elasticsearch_dsl import DocType
from bluebottle.projects.models import Project
from bluebottle.utils.documents import MultiTenantIndex
# The name of your index
project = MultiTenantIndex('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,... | from django_elasticsearch_dsl import DocType, Index
from bluebottle.projects.models import Project
# The name of your index
project = Index('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,
number_of_replicas=0
)
@project.doc_type
class Projec... | <commit_before>from django_elasticsearch_dsl import DocType, Index
from bluebottle.projects.models import Project
# The name of your index
project = Index('projects')
# See Elasticsearch Indices API reference for available settings
project.settings(
number_of_shards=1,
number_of_replicas=0
)
@project.doc_ty... |
3f81676d8bc39b459d98a1a91b9ced97be58451d | celestial/exoplanets_importer.py | celestial/exoplanets_importer.py | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | Refactor importer slightly to avoid creation problems | Refactor importer slightly to avoid creation problems
| Python | mit | Floppy/kepler-explorer,Floppy/kepler-explorer,Floppy/kepler-explorer | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | <commit_before>import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.ge... | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.get('http://exopl... | <commit_before>import requests
import csv
from models import Planet, SolarSystem
from django.core.exceptions import ValidationError
class ExoplanetsImporter:
@staticmethod
def run(filename = None):
if filename!=None:
csv_data = open(filename)
else:
csv_data = requests.ge... |
5387fa4c96bb0cdc62e83203065dda84d91c8a57 | project_recalculate/models/resource_calendar.py | project_recalculate/models/resource_calendar.py | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | Define UTC as tz in get_working_days_of_date method | [FIX] Define UTC as tz in get_working_days_of_date method
| Python | agpl-3.0 | OCA/project,OCA/project | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | <commit_before># -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, star... | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, start_dt=None, end_... | <commit_before># -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
from openerp import models, api
from datetime import datetime, timedelta
class ResourceCalendar(models.Model):
_inherit = 'resource.calendar'
@api.v7
def get_working_days_of_date(self, cr, uid, id, star... |
354af0bd82da57e718e9612ffb11e3b56d335fbf | projects/search_indexes.py | projects/search_indexes.py | import datetime
import os
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
project = CharFiel... | import datetime
import os
import codecs
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
pro... | Fix unicode fail in search indexing. | Fix unicode fail in search indexing.
| Python | mit | atsuyim/readthedocs.org,tddv/readthedocs.org,singingwolfboy/readthedocs.org,raven47git/readthedocs.org,LukasBoersma/readthedocs.org,stevepiercy/readthedocs.org,johncosta/private-readthedocs.org,michaelmcandrew/readthedocs.org,espdev/readthedocs.org,wijerasa/readthedocs.org,Tazer/readthedocs.org,sid-kap/readthedocs.org,... | import datetime
import os
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
project = CharFiel... | import datetime
import os
import codecs
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
pro... | <commit_before>import datetime
import os
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
pro... | import datetime
import os
import codecs
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
pro... | import datetime
import os
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
project = CharFiel... | <commit_before>import datetime
import os
from haystack.indexes import *
from haystack import site
from projects.models import File, ImportedFile
from projects import constants
class FileIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='project__user')
pro... |
a4e402caf7b5a90607b6a206046c96c53a37e860 | slack_client/exceptions.py | slack_client/exceptions.py | class SlackError(Exception):
pass
class SlackNo(SlackError):
def __init__(self, msg_error):
self.msg = msg_error
def __str__(self):
return repr(self.msg)
class SlackTooManyRequests(SlackError):
def __init__(self, time_to_wait):
self.time_to_wait = time_to_wait
def __str__... | class SlackError(Exception):
pass
class SlackNo(SlackError):
pass
class SlackMissingAPI(SlackError):
pass
| Add a custom exception (SlackMissingAPI) | Add a custom exception (SlackMissingAPI)
This exception is raised when a SlackObject is created without
any way to get an API.
Remove custom implementation for exceptions. There is no reason strong
enough for this.
| Python | mit | Shir0kamii/slack-client | class SlackError(Exception):
pass
class SlackNo(SlackError):
def __init__(self, msg_error):
self.msg = msg_error
def __str__(self):
return repr(self.msg)
class SlackTooManyRequests(SlackError):
def __init__(self, time_to_wait):
self.time_to_wait = time_to_wait
def __str__... | class SlackError(Exception):
pass
class SlackNo(SlackError):
pass
class SlackMissingAPI(SlackError):
pass
| <commit_before>class SlackError(Exception):
pass
class SlackNo(SlackError):
def __init__(self, msg_error):
self.msg = msg_error
def __str__(self):
return repr(self.msg)
class SlackTooManyRequests(SlackError):
def __init__(self, time_to_wait):
self.time_to_wait = time_to_wait
... | class SlackError(Exception):
pass
class SlackNo(SlackError):
pass
class SlackMissingAPI(SlackError):
pass
| class SlackError(Exception):
pass
class SlackNo(SlackError):
def __init__(self, msg_error):
self.msg = msg_error
def __str__(self):
return repr(self.msg)
class SlackTooManyRequests(SlackError):
def __init__(self, time_to_wait):
self.time_to_wait = time_to_wait
def __str__... | <commit_before>class SlackError(Exception):
pass
class SlackNo(SlackError):
def __init__(self, msg_error):
self.msg = msg_error
def __str__(self):
return repr(self.msg)
class SlackTooManyRequests(SlackError):
def __init__(self, time_to_wait):
self.time_to_wait = time_to_wait
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.