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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e77c5acd4fcdb16f17245122212458baf5195064 | bookworm/settings_mobile.py | bookworm/settings_mobile.py | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
| from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| Change cookie name for mobile setting | Change cookie name for mobile setting | Python | bsd-3-clause | google-code-export/threepress,anselmorenato/threepress,anselmorenato/threepress,anselmorenato/threepress,google-code-export/threepress,google-code-export/threepress,lizadaly/threepress,anselmorenato/threepress,lizadaly/threepress,google-code-export/threepress,lizadaly/threepress,lizadaly/threepress | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
Change cookie name for mobile setting | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| <commit_before>from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
<commit_msg>Change cookie name for mobile setting... | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
Change cookie name for mobile settingfrom settings import *
impo... | <commit_before>from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
<commit_msg>Change cookie name for mobile setting... |
d3caf69dfe98aa2fd0f9046c01035cdd7e4e359e | opps/articles/tests/models.py | opps/articles/tests/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | Test recommendation via article class | Test recommendation via article class
| Python | mit | williamroot/opps,jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(self):
s... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Article, Post
class ArticleModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def setUp(self):
self.article = Article.objects.get(id=1)
def test_child_class(s... |
a86eaffa53a18389ea628f37c76900cc24c701f6 | opps/contrib/logging/admin.py | opps/contrib/logging/admin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain')
admin.site.register(Logging, LoggingAdmin)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain', 'mirror_site')
admin.site.register(Logging, LoggingAdmin)
| Add field mirror_site at exclude on LoggingAdmin | Add field mirror_site at exclude on LoggingAdmin
| Python | mit | YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain')
admin.site.register(Logging, LoggingAdmin)
Add field mirror_site at exclude on... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain', 'mirror_site')
admin.site.register(Logging, LoggingAdmin)
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain')
admin.site.register(Logging, LoggingAdmin)
<commit_msg>Add fiel... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain', 'mirror_site')
admin.site.register(Logging, LoggingAdmin)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain')
admin.site.register(Logging, LoggingAdmin)
Add field mirror_site at exclude on... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Logging
class LoggingAdmin(admin.ModelAdmin):
model = Logging
raw_id_fields = ('user',)
exclude = ('site_iid', 'site_domain')
admin.site.register(Logging, LoggingAdmin)
<commit_msg>Add fiel... |
014c726b258a5cb6a147e9919ea6122fd513f8cd | items/admin.py | items/admin.py | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['title',... | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['marker'... | Revert "Adds item title to list editable" | Revert "Adds item title to list editable"
This reverts commit e69869d4945cd72245e9243b3ec3131145ba27c2.
| Python | mit | dhiana/arpostits_api | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['title',... | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['marker'... | <commit_before>from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_edita... | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['marker'... | from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_editable = ['title',... | <commit_before>from django.contrib import admin
from .models import Item
from tasks.models import Task
class TaskInline(admin.TabularInline):
model = Task
class ItemAdmin(admin.ModelAdmin):
inlines = [TaskInline,]
list_display = ['title', 'project', 'marker', 'progress', 'ready', 'blocked']
list_edita... |
714fd7d0c173672f636e8d051b24046b10d3f481 | format_json.py | format_json.py | #! /usr/bin/env python
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oyst... | #! /usr/bin/env python3
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oys... | Make this work for non-ASCII chars as well. | Make this work for non-ASCII chars as well.
| Python | mit | nbeaver/cmd-oysters,nbeaver/cmd-oysters | #! /usr/bin/env python
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oyst... | #! /usr/bin/env python3
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oys... | <commit_before>#! /usr/bin/env python
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
... | #! /usr/bin/env python3
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oys... | #! /usr/bin/env python
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
json.dump(oyst... | <commit_before>#! /usr/bin/env python
import sys
import json
for filepath in sys.argv[1:]:
with open(filepath) as f:
try:
oyster = json.load(f)
except ValueError:
sys.stderr.write("In file: {}\n".format(filepath))
raise
with open(filepath, 'w') as f:
... |
4de23cffa16c71e287efba7d32ba375feeb9bc13 | format_json.py | format_json.py | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
json.dump(data... | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
fp.truncate(0)... | Truncate the file before writing more data. | Truncate the file before writing more data.
| Python | mit | nbeaver/cmd-oysters,nbeaver/cmd-oysters | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
json.dump(data... | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
fp.truncate(0)... | <commit_before>#! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
... | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
fp.truncate(0)... | #! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
json.dump(data... | <commit_before>#! /usr/bin/env python3
import sys
import json
import argparse
def format_json(fp):
try:
data = json.load(fp)
except ValueError:
sys.stderr.write("In file: {}\n".format(fp.name))
raise
# Jump back to the beginning of the file before overwriting it.
fp.seek(0)
... |
860cea2b6d183414d794eb2e2d44beb7728e2d4b | hasjob/models/location.py | hasjob/models/location.py | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | Fix parent synonym for Location model | Fix parent synonym for Location model
| Python | agpl-3.0 | hasgeek/hasjob,hasgeek/hasjob,hasgeek/hasjob,hasgeek/hasjob | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | <commit_before># -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablena... | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | # -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'locatio... | <commit_before># -*- coding: utf-8 -*-
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablena... |
401f98ad74792e9a5d9354dec8c24dc9637d1f5e | tests/gsim/pezeshk_2011_test.py | tests/gsim/pezeshk_2011_test.py | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | Add implementation of gmpe Pezeshk et al 2011 for ENA | Add implementation of gmpe Pezeshk et al 2011 for ENA
| Python | agpl-3.0 | vup1120/oq-hazardlib,gem/oq-engine,g-weatherill/oq-hazardlib,gem/oq-hazardlib,gem/oq-hazardlib,g-weatherill/oq-hazardlib,gem/oq-engine,gem/oq-engine,rcgee/oq-hazardlib,mmpagani/oq-hazardlib,g-weatherill/oq-hazardlib,gem/oq-hazardlib,ROB-Seismology/oq-hazardlib,silviacanessa/oq-hazardlib,vup1120/oq-hazardlib,ROB-Seismol... | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | <commit_before># The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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 ... | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | # The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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.
#
# Th... | <commit_before># The Hazard Library
# Copyright (C) 2013 GEM Foundation
#
# 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 ... |
873a383d8285a94ae1c8c61b515ca96f96e41b0c | migrations/versions/1340_set_suppliers_active_flag_not_nullable.py | migrations/versions/1340_set_suppliers_active_flag_not_nullable.py | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | Fix comparison with NULL bug | Fix comparison with NULL bug
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | <commit_before>"""set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1... | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | """set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1330'
def upgr... | <commit_before>"""set suppliers active flag NOT NULLABLE
Ensure that all suppliers are either active or inactive.
Revision ID: 1340
Revises: 1330
Create Date: 2019-06-26 11:53:56.085586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1340'
down_revision = '1... |
87771bda7fbf46519097ba433a7b4fd3f2cbaa7e | office_lunch_order/office_lunch_order_app/tests.py | office_lunch_order/office_lunch_order_app/tests.py | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | Test add_order and order details with existing order_id url | Test add_order and order details with existing order_id url
| Python | epl-1.0 | MariuszKorotko/Office_Lunch_Order,MariuszKorotko/Office_Lunch_Order | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | <commit_before>from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
resp... | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
response.content
re... | <commit_before>from django.test import TestCase, Client
c = Client()
response = c.get('/officelunchorder/')
response.status_code # 200
response.content
response = c.post('/officelunchorder/login/')
response.status_code # 200
response.content
response = c.get('/officelunchorder/logout/')
response.status_code # 200
resp... |
4c60e42af4b37c260e2a9f00eb82dbd44ee53799 | __init__.py | __init__.py | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | Put Image and Entity into __all__ | Put Image and Entity into __all__
| Python | lgpl-2.1 | momikey/pyrge | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | <commit_before># imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tile... | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | # imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tilemap',
... | <commit_before># imports for Pyrge package
__all__ = ['effects',
'emitter',
'entity',
'gameloop',
'mixin',
'music',
'point',
'quadtree',
'sound',
'spritesheet',
'text',
'tiledimage',
'tile... |
c01a858306d31a5b12e42f30ff01bdbdb2240092 | froide/publicbody/tests.py | froide/publicbody/tests.py | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | from django.test import TestCase
from django.core.urlresolvers import reverse
from publicbody.models import PublicBody
class PublicBodyTest(TestCase):
fixtures = ['auth.json', 'publicbodies.json', 'foirequest.json']
def test_web_page(self):
response = self.client.get(reverse('publicbody-list'))
... | Test public body showing, json view and csv export | Test public body showing, json view and csv export | Python | mit | okfse/froide,ryankanno/froide,catcosmo/froide,ryankanno/froide,okfse/froide,LilithWittmann/froide,okfse/froide,LilithWittmann/froide,ryankanno/froide,CodeforHawaii/froide,stefanw/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,catcosmo/froide,catcosmo/froide,stefanw/froide,ryankanno/froide,fin/froide,f... | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | from django.test import TestCase
from django.core.urlresolvers import reverse
from publicbody.models import PublicBody
class PublicBodyTest(TestCase):
fixtures = ['auth.json', 'publicbodies.json', 'foirequest.json']
def test_web_page(self):
response = self.client.get(reverse('publicbody-list'))
... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tes... | from django.test import TestCase
from django.core.urlresolvers import reverse
from publicbody.models import PublicBody
class PublicBodyTest(TestCase):
fixtures = ['auth.json', 'publicbodies.json', 'foirequest.json']
def test_web_page(self):
response = self.client.get(reverse('publicbody-list'))
... | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tes... |
076f8cf27d3a1b52a1b597e224d23bd2ba18fcd7 | kalamarsite.py | kalamarsite.py | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'(.*)/pages/(.*)\.rst', (... | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'([a-z]*)/pages/(.*)\.rst... | Use [a-z]* pattern to match project ids | Use [a-z]* pattern to match project ids
| Python | bsd-3-clause | Kozea/sitenco | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'(.*)/pages/(.*)\.rst', (... | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'([a-z]*)/pages/(.*)\.rst... | <commit_before>import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'(.*)/page... | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'([a-z]*)/pages/(.*)\.rst... | import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'(.*)/pages/(.*)\.rst', (... | <commit_before>import os
import kalamar.site
from kalamar.access_point.cache import Cache
from kalamar.access_point.xml.rest import Rest, RestProperty, TITLE
from kalamar.access_point.filesystem import FileSystem
from sitenco import PROJECTS_PATH
page = Rest(
FileSystem(
PROJECTS_PATH, r'(.*)/page... |
696010e636f7e30ba331b103ba051422780edf4b | bluebottle/funding/utils.py | bluebottle/funding/utils.py | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | USe payout amount to calculate total | USe payout amount to calculate total
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | <commit_before>from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in P... | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in PaymentProvider.... | <commit_before>from babel.numbers import get_currency_name, get_currency_symbol
from bluebottle.utils.exchange_rates import convert
from django.db.models import Sum
from djmoney.money import Money
from bluebottle.funding.models import PaymentProvider
def get_currency_settings():
result = []
for provider in P... |
1f250c6113ed69dc3373afbc40a93bdc7d8e7894 | pages_scrape.py | pages_scrape.py | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | Handle UTF errors with invalid bytes. | Handle UTF errors with invalid bytes.
| Python | mit | openeventdata/scraper,chilland/scraper | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | <commit_before>import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An insta... | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An instance of Goose th... | <commit_before>import logging
import requests
def scrape(url, extractor):
"""
Function to request and parse a given URL. Returns only the "relevant"
text.
Parameters
----------
url : String.
URL to request and parse.
extractor : Goose class instance.
An insta... |
38746e4f4891f7ad87ce678776be15556d1db449 | gcl/to_json.py | gcl/to_json.py | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def main(argv=None, stdin=None):
parser = argparse.ArgumentParser(description='Convert (parts of) a GCL model file to JSON.')
parser.add_argument('file', metavar='FILE', type=str, nargs='?',
help='F... | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def select(dct, path):
for part in path:
if not hasattr(dct, 'keys'):
raise RuntimeError('Value %r cannot be indexed with %r' % (dct, part))
if part not in dct:
raise RuntimeError('Value %r has no key %... | Add proper root selector to gcl2json | Add proper root selector to gcl2json
| Python | mit | rix0rrr/gcl | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def main(argv=None, stdin=None):
parser = argparse.ArgumentParser(description='Convert (parts of) a GCL model file to JSON.')
parser.add_argument('file', metavar='FILE', type=str, nargs='?',
help='F... | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def select(dct, path):
for part in path:
if not hasattr(dct, 'keys'):
raise RuntimeError('Value %r cannot be indexed with %r' % (dct, part))
if part not in dct:
raise RuntimeError('Value %r has no key %... | <commit_before>import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def main(argv=None, stdin=None):
parser = argparse.ArgumentParser(description='Convert (parts of) a GCL model file to JSON.')
parser.add_argument('file', metavar='FILE', type=str, nargs='?',
... | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def select(dct, path):
for part in path:
if not hasattr(dct, 'keys'):
raise RuntimeError('Value %r cannot be indexed with %r' % (dct, part))
if part not in dct:
raise RuntimeError('Value %r has no key %... | import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def main(argv=None, stdin=None):
parser = argparse.ArgumentParser(description='Convert (parts of) a GCL model file to JSON.')
parser.add_argument('file', metavar='FILE', type=str, nargs='?',
help='F... | <commit_before>import argparse
import json
import sys
import gcl
from gcl import query
from gcl import util
def main(argv=None, stdin=None):
parser = argparse.ArgumentParser(description='Convert (parts of) a GCL model file to JSON.')
parser.add_argument('file', metavar='FILE', type=str, nargs='?',
... |
3c3e9b5f584c23c9359ca9dce71b89635fffd043 | LiSE/LiSE/tests/test_load.py | LiSE/LiSE/tests/test_load.py | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | Make test_multi_keyframe demonstrate what it's supposed to | Make test_multi_keyframe demonstrate what it's supposed to
I was testing a cache that wasn't behaving correctly for
unrelated reasons.
| Python | agpl-3.0 | LogicalDash/LiSE,LogicalDash/LiSE | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | <commit_before>import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_k... | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_keyframe()
e... | <commit_before>import os
import shutil
import pytest
from LiSE.engine import Engine
from LiSE.examples.kobold import inittest
def test_keyframe_load_init(tempdir):
"""Can load a keyframe at start of branch, including locations"""
eng = Engine(tempdir)
inittest(eng)
eng.branch = 'new'
eng.snap_k... |
972cb7c234729d2ce8bbab0937f8efbfe18a2eeb | lab_members/models.py | lab_members/models.py | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | Fix error: __str__ returned non-string (type NoneType) | Fix error: __str__ returned non-string (type NoneType)
| Python | bsd-3-clause | mfcovington/django-lab-members,mfcovington/django-lab-members,mfcovington/django-lab-members | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | <commit_before>from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
ma... | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
max_length=64,
... | <commit_before>from django.db import models
class Position(models.Model):
class Meta:
verbose_name = "Position"
verbose_name_plural = "Positions"
title = models.CharField(u'title',
blank=False,
default='',
help_text=u'Please enter a title for this position',
ma... |
9ad049bdac489e5f500f8bf8ec0cd615ccacadbf | stack/logs.py | stack/logs.py | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | Add logging permissions needed by aws-for-fluent-bit | Add logging permissions needed by aws-for-fluent-bit | Python | mit | tobiasmcnulty/aws-container-basics,caktus/aws-web-stacks | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | <commit_before>from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
... | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
PolicyDocume... | <commit_before>from troposphere import Join, iam, logs
from .common import arn_prefix
from .template import template
container_log_group = logs.LogGroup(
"ContainerLogs",
template=template,
RetentionInDays=365,
DeletionPolicy="Retain",
)
logging_policy = iam.Policy(
PolicyName="LoggingPolicy",
... |
e1ad3190e124163c0e7e0e7fc03cfea6f43f0cf8 | stack/vpc.py | stack/vpc.py | from troposphere.ec2 import (
VPC,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
| from troposphere import (
Ref,
)
from troposphere.ec2 import (
InternetGateway,
VPC,
VPCGatewayAttachment,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
# Allow outgoing to outside VPC
internet_gateway = InternetGateway(
"InternetG... | Attach an `InternetGateway` to the `VPC` | Attach an `InternetGateway` to the `VPC`
| Python | mit | tobiasmcnulty/aws-container-basics,caktus/aws-web-stacks | from troposphere.ec2 import (
VPC,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
Attach an `InternetGateway` to the `VPC` | from troposphere import (
Ref,
)
from troposphere.ec2 import (
InternetGateway,
VPC,
VPCGatewayAttachment,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
# Allow outgoing to outside VPC
internet_gateway = InternetGateway(
"InternetG... | <commit_before>from troposphere.ec2 import (
VPC,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
<commit_msg>Attach an `InternetGateway` to the `VPC`<commit_after> | from troposphere import (
Ref,
)
from troposphere.ec2 import (
InternetGateway,
VPC,
VPCGatewayAttachment,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
# Allow outgoing to outside VPC
internet_gateway = InternetGateway(
"InternetG... | from troposphere.ec2 import (
VPC,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
Attach an `InternetGateway` to the `VPC`from troposphere import (
Ref,
)
from troposphere.ec2 import (
InternetGateway,
VPC,
VPCGatewayAttachment,
)
fr... | <commit_before>from troposphere.ec2 import (
VPC,
)
from .template import template
vpc = VPC(
"Vpc",
template=template,
CidrBlock="10.0.0.0/16",
)
<commit_msg>Attach an `InternetGateway` to the `VPC`<commit_after>from troposphere import (
Ref,
)
from troposphere.ec2 import (
InternetGateway,... |
92aeffe058bfd724309ddcdbdab9226057074afe | masters/master.chromium.lkgr/master_source_cfg.py | masters/master.chromium.lkgr/master_source_cfg.py | # Copyright (c) 2011 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 buildbot.changes.pb import PBChangeSource
def Update(config, active_master, c):
# Polls config.Master.trunk_url for changes
c['change_source'].... | # Copyright (c) 2014 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 master.url_poller import URLPoller
LKGR_URL = 'https://chromium-status.appspot.com/lkgr'
def Update(config, active_master, c):
c['change_source... | Switch master.chromium.lkgr to poll the chromium-status app. | Switch master.chromium.lkgr to poll the chromium-status app.
Using a PBChangeSource is silly, opaque, and potentially dangerous. We already
have a URLPoller for exactly this use-case (already in use by chromium.endure)
so let's use it here too. This also has the advantage of making sure
the LKGR waterfall picks up *al... | Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2011 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 buildbot.changes.pb import PBChangeSource
def Update(config, active_master, c):
# Polls config.Master.trunk_url for changes
c['change_source'].... | # Copyright (c) 2014 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 master.url_poller import URLPoller
LKGR_URL = 'https://chromium-status.appspot.com/lkgr'
def Update(config, active_master, c):
c['change_source... | <commit_before># Copyright (c) 2011 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 buildbot.changes.pb import PBChangeSource
def Update(config, active_master, c):
# Polls config.Master.trunk_url for changes
c['c... | # Copyright (c) 2014 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 master.url_poller import URLPoller
LKGR_URL = 'https://chromium-status.appspot.com/lkgr'
def Update(config, active_master, c):
c['change_source... | # Copyright (c) 2011 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 buildbot.changes.pb import PBChangeSource
def Update(config, active_master, c):
# Polls config.Master.trunk_url for changes
c['change_source'].... | <commit_before># Copyright (c) 2011 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 buildbot.changes.pb import PBChangeSource
def Update(config, active_master, c):
# Polls config.Master.trunk_url for changes
c['c... |
bdbb64dc494ef514deccf6e81423886df19b0b29 | markerutils.py | markerutils.py | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (2, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GREEN... | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (1.95, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GR... | Add a wider margin of accuracy | Add a wider margin of accuracy
| Python | mit | Isaac-W/cpr-vision-measurement,Isaac-W/cpr-vision-measurement,Isaac-W/cpr-vision-measurement | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (2, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GREEN... | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (1.95, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GR... | <commit_before>PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (2, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38... | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (1.95, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GR... | PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (2, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38, 68, 87)
GREEN... | <commit_before>PI = 3.141592654
SAMPLE_TIME = 5
FRAMES_PER_SEC = 30
SEC_PER_MIN = 60
RATE_RANGE = (95, 125) # 100 - 120 BPM (plus some error in measurement)
DEPTH_RANGE = (2, 5) # At least 2 in (plus some error in measurement)
RECOIL_THRESH = 0.2 # Allow for FULL chest recoil
# Color ranges
GREEN_COLOR_MIN = (38... |
7fa20f228a673ee983af47910f10851c126a9308 | src/foremast/plugin_manager.py | src/foremast/plugin_manager.py | from pluginbase import PluginBase
class PluginManager:
def __init__(self, paths, provider):
self.paths = [paths]
self.provider = provider
plugin_base = PluginBase(package='foremast.plugins')
self.plugin_source = plugin_base.make_plugin_source(searchpath=self.paths)
def plugin... | """Manager to handle plugins"""
from pluginbase import PluginBase
class PluginManager:
"""Class to manage and create Spinnaker applications
Args:
paths (str): Path of plugin directory.
provider (str): The name of the cloud provider.
"""
def __init__(self, paths, provider):
se... | Add docstring to plugin manager | chore: Add docstring to plugin manager
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | from pluginbase import PluginBase
class PluginManager:
def __init__(self, paths, provider):
self.paths = [paths]
self.provider = provider
plugin_base = PluginBase(package='foremast.plugins')
self.plugin_source = plugin_base.make_plugin_source(searchpath=self.paths)
def plugin... | """Manager to handle plugins"""
from pluginbase import PluginBase
class PluginManager:
"""Class to manage and create Spinnaker applications
Args:
paths (str): Path of plugin directory.
provider (str): The name of the cloud provider.
"""
def __init__(self, paths, provider):
se... | <commit_before>from pluginbase import PluginBase
class PluginManager:
def __init__(self, paths, provider):
self.paths = [paths]
self.provider = provider
plugin_base = PluginBase(package='foremast.plugins')
self.plugin_source = plugin_base.make_plugin_source(searchpath=self.paths)
... | """Manager to handle plugins"""
from pluginbase import PluginBase
class PluginManager:
"""Class to manage and create Spinnaker applications
Args:
paths (str): Path of plugin directory.
provider (str): The name of the cloud provider.
"""
def __init__(self, paths, provider):
se... | from pluginbase import PluginBase
class PluginManager:
def __init__(self, paths, provider):
self.paths = [paths]
self.provider = provider
plugin_base = PluginBase(package='foremast.plugins')
self.plugin_source = plugin_base.make_plugin_source(searchpath=self.paths)
def plugin... | <commit_before>from pluginbase import PluginBase
class PluginManager:
def __init__(self, paths, provider):
self.paths = [paths]
self.provider = provider
plugin_base = PluginBase(package='foremast.plugins')
self.plugin_source = plugin_base.make_plugin_source(searchpath=self.paths)
... |
a2ced7a752c033cef1a1da1fb246b99f0895f86a | src/objectdictionary.py | src/objectdictionary.py | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
pass
def __getitem__(self,key):
pass
def __iter__():
... | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
if type(key) is str:
self.names[key] = value
else:
... | Add Mapping methods to ObjectDictionary | Add Mapping methods to ObjectDictionary
| Python | mit | aceofwings/Evt-Gateway,aceofwings/Evt-Gateway | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
pass
def __getitem__(self,key):
pass
def __iter__():
... | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
if type(key) is str:
self.names[key] = value
else:
... | <commit_before>import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
pass
def __getitem__(self,key):
pass
def __ite... | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
if type(key) is str:
self.names[key] = value
else:
... | import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
pass
def __getitem__(self,key):
pass
def __iter__():
... | <commit_before>import collections
class ObjectDictionary(collections.Mapping):
def __init__(self):
self.names = {}
self.ids = {}
@classmethod
def initialize(edsPath):
pass
def __setitem__(self,key,value):
pass
def __getitem__(self,key):
pass
def __ite... |
89bf3b348d9849a936cf4f433d0156242fda7f72 | robert/__init__.py | robert/__init__.py | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.join(path.dirname(__file__), 'config.py')
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage():
articl... | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.abspath(path.join(path.dirname(__file__), 'config.py'))
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage... | Use absolute path when loading config. | Use absolute path when loading config.
| Python | mit | thusoy/robertblag,thusoy/robertblag,thusoy/robertblag | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.join(path.dirname(__file__), 'config.py')
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage():
articl... | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.abspath(path.join(path.dirname(__file__), 'config.py'))
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage... | <commit_before>"""
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.join(path.dirname(__file__), 'config.py')
app.config.from_pyfile(config_path)
@app.route('/')
def frontpag... | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.abspath(path.join(path.dirname(__file__), 'config.py'))
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage... | """
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.join(path.dirname(__file__), 'config.py')
app.config.from_pyfile(config_path)
@app.route('/')
def frontpage():
articl... | <commit_before>"""
Entry point and the only view we have.
"""
from .article_utils import get_articles
from flask import Flask, render_template
from os import path
app = Flask(__name__)
config_path = path.join(path.dirname(__file__), 'config.py')
app.config.from_pyfile(config_path)
@app.route('/')
def frontpag... |
c388301a3d6adfe50261557c6a2bf624c257c3a2 | roboime/options.py | roboime/options.py | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | Fix problem of robots going wrong ways with Kalman (problem was really bad R_var_angle=>too big!) | Fix problem of robots going wrong ways with Kalman (problem was really bad R_var_angle=>too big!)
| Python | agpl-3.0 | roboime/pyroboime | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | <commit_before># -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#G... | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | # -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#Gaussian noise a... | <commit_before># -*- coding: utf-8 -*-
"""
General options during execution
"""
#Position Log filename. Use None to disable.
position_log_filename = "math/pos_log.txt"
#position_log_filename = None
#Command and Update Log filename. Use None to disable.
cmdupd_filename = "math/commands.txt"
#cmdupd_filename = None
#G... |
4c63cc67e0dddaec396a1e955645e8c00755d299 | oidc_provider/management/commands/creatersakey.py | oidc_provider/management/commands/creatersakey.py | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(1024)
... | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(2048)
... | Increment RSA key size to 2048. | Enhancement: Increment RSA key size to 2048.
It seems like many lead institutions related with security are
recommending a minimum key length of 112-bits since 2013.
In order to achieve that, a RSA key size of 2048 (or more) is required.
| Python | mit | ByteInternet/django-oidc-provider,juanifioren/django-oidc-provider,ByteInternet/django-oidc-provider,juanifioren/django-oidc-provider | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(1024)
... | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(2048)
... | <commit_before>from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.ge... | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(2048)
... | from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.generate(1024)
... | <commit_before>from Cryptodome.PublicKey import RSA
from django.core.management.base import BaseCommand
from oidc_provider.models import RSAKey
class Command(BaseCommand):
help = 'Randomly generate a new RSA key for the OpenID server'
def handle(self, *args, **options):
try:
key = RSA.ge... |
737cd238308a4584ed296db119ed9eaa132fa2ba | item/models.py | item/models.py | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | Fix Item Model to have max_digits and decimal_places | Fix Item Model to have max_digits and decimal_places
| Python | mit | stevetu717/Databaes,KamLii/Databaes,stevetu717/Databaes,KamLii/Databaes,stevetu717/Databaes,KamLii/Databaes,stevetu717/Databaes,KamLii/Databaes | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | <commit_before>from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship ... | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship with Supplier a... | <commit_before>from django.db import models
# Create your models here.
class Item(models.Model):
"""
Fields-
1. id = models.AutoField(primary_key=True) is created by default
2. Two Foreign Keys
Relationships-
Many to Many with Interest Group
Many to Many with Box
Ternary Relationship ... |
e05a6c95d63a0e33553b0455ad4f35fb816f159a | qr_code/apps.py | qr_code/apps.py | from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR code'
| from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR Code'
| Fix title casing for verbose app name. | Fix title casing for verbose app name.
| Python | bsd-3-clause | dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code,dprog-philippe-docourt/django-qr-code | from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR code'
Fix title casing for verbose app name. | from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR Code'
| <commit_before>from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR code'
<commit_msg>Fix title casing for verbose app name.<commit_after> | from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR Code'
| from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR code'
Fix title casing for verbose app name.from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR Code'
| <commit_before>from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR code'
<commit_msg>Fix title casing for verbose app name.<commit_after>from django.apps import AppConfig
class QrCodeConfig(AppConfig):
name = 'qr_code'
verbose_name = 'Django QR... |
2a8350afb3cd7c94d5c3beb891248a584120fe25 | kitsune/sumo/__init__.py | kitsune/sumo/__init__.py | class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
| class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
from south.signals import post_migrate
# Courtesy of http://devwithpassion.com/felipe/south-django-permissions/
def update_per... | Add post_migrate receiver to create permissions | Add post_migrate receiver to create permissions
This should automatically create permissions for new models we add with
South migrations.
| Python | bsd-3-clause | safwanrahman/kitsune,H1ghT0p/kitsune,MziRintu/kitsune,YOTOV-LIMITED/kitsune,NewPresident1/kitsune,silentbob73/kitsune,safwanrahman/kitsune,mythmon/kitsune,feer56/Kitsune2,MziRintu/kitsune,H1ghT0p/kitsune,Osmose/kitsune,feer56/Kitsune2,philipp-sumo/kitsune,philipp-sumo/kitsune,brittanystoroz/kitsune,anushbmx/kitsune,New... | class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
Add post_migrate receiver to create permissions
This should automatically create permissions for new models we add with
South mig... | class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
from south.signals import post_migrate
# Courtesy of http://devwithpassion.com/felipe/south-django-permissions/
def update_per... | <commit_before>class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
<commit_msg>Add post_migrate receiver to create permissions
This should automatically create permissions for new m... | class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
from south.signals import post_migrate
# Courtesy of http://devwithpassion.com/felipe/south-django-permissions/
def update_per... | class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
Add post_migrate receiver to create permissions
This should automatically create permissions for new models we add with
South mig... | <commit_before>class ProgrammingError(Exception):
"""Somebody made a mistake in the code."""
# Just importing monkeypatch does the trick - don't remove this line
from kitsune.sumo import monkeypatch
<commit_msg>Add post_migrate receiver to create permissions
This should automatically create permissions for new m... |
f0861ff6c817f1f683e69cf362336545ff3d9148 | ledger/admin.py | ledger/admin.py | from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date']
admin.site.register(Entry, EntryAdmin)
admin.site.register(Account)
| from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date', 'debit_account', 'credit_account']
search_fields = ['details', 'debit_account__name', 'credit... | Add a little more functionality to EntryAdmin | Add a little more functionality to EntryAdmin
| Python | mpl-2.0 | jackbravo/condorest-django,jackbravo/condorest-django,jackbravo/condorest-django | from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date']
admin.site.register(Entry, EntryAdmin)
admin.site.register(Account)
Add a little more functiona... | from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date', 'debit_account', 'credit_account']
search_fields = ['details', 'debit_account__name', 'credit... | <commit_before>from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date']
admin.site.register(Entry, EntryAdmin)
admin.site.register(Account)
<commit_msg>... | from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date', 'debit_account', 'credit_account']
search_fields = ['details', 'debit_account__name', 'credit... | from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date']
admin.site.register(Entry, EntryAdmin)
admin.site.register(Account)
Add a little more functiona... | <commit_before>from django.contrib import admin
from ledger.models import Account, Entry
class EntryAdmin(admin.ModelAdmin):
list_display = ['date', 'amount', 'details', 'debit_account', 'credit_account']
list_filter = ['date']
admin.site.register(Entry, EntryAdmin)
admin.site.register(Account)
<commit_msg>... |
1e7361f46f551a2e897040ae47b43cdd5263d328 | dataactcore/models/field.py | dataactcore/models/field.py | class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
class FieldConstraint:
""" Acts a an enum for field constraints """
NONE = ""
PRIMARY_KEY = "PRIMARY KEY"
NOT_NULL = "NOT NULL" | class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
| Remove FieldConstraint class (not used) | Remove FieldConstraint class (not used)
| Python | cc0-1.0 | fedspendingtransparency/data-act-broker-backend,fedspendingtransparency/data-act-broker-backend | class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
class FieldConstraint:
""" Acts a an enum for field constraints """
NONE = ""
PRIMARY_KEY = "PRIMARY KEY"
NOT_NULL = "NOT NULL"Remove FieldConstraint class (not used) | class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
| <commit_before>class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
class FieldConstraint:
""" Acts a an enum for field constraints """
NONE = ""
PRIMARY_KEY = "PRIMARY KEY"
NOT_NULL = "NOT NULL"<commit_msg>Remove FieldConstraint class (not used)<commit... | class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
| class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
class FieldConstraint:
""" Acts a an enum for field constraints """
NONE = ""
PRIMARY_KEY = "PRIMARY KEY"
NOT_NULL = "NOT NULL"Remove FieldConstraint class (not used)class FieldType:
""" Acts as a... | <commit_before>class FieldType:
""" Acts as an enum for field types """
INTEGER = "INTEGER"
TEXT = "TEXT"
class FieldConstraint:
""" Acts a an enum for field constraints """
NONE = ""
PRIMARY_KEY = "PRIMARY KEY"
NOT_NULL = "NOT NULL"<commit_msg>Remove FieldConstraint class (not used)<commit... |
07ee6957d20a1c02b22ed5d91d20211506e7ca54 | 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:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
continue
... | from django import template
from partner_feeds.models import Partner, Post
register = template.Library()
@register.assignment_tag
def get_partners(*partner_names):
"""
Given a list of partner names, return those partners with posts attached to
them in the order that they were passed to this function
... | Update `get_partners` assignment tag to reduce the number of queries | Update `get_partners` assignment tag to reduce the number of queries
Maintains the same interface so no other changes should be required | 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:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
continue
... | from django import template
from partner_feeds.models import Partner, Post
register = template.Library()
@register.assignment_tag
def get_partners(*partner_names):
"""
Given a list of partner names, return those partners with posts attached to
them in the order that they were passed to this function
... | <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:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
... | from django import template
from partner_feeds.models import Partner, Post
register = template.Library()
@register.assignment_tag
def get_partners(*partner_names):
"""
Given a list of partner names, return those partners with posts attached to
them in the order that they were passed to this function
... | 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:
try:
partner = Partner.objects.get(name=name)
except Partner.DoesNotExist:
... |
a3022c915e9dae7ee4d36e4d3d85e302ff2f056c | mozcal/urls.py | mozcal/urls.py | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
# Uncomment the next two lines to enab... | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
#... | Add missing import for HttpResponse | Add missing import for HttpResponse
| Python | bsd-3-clause | yvan-sraka/wprevents,ppapadeas/wprevents,ppapadeas/wprevents,ppapadeas/wprevents,yvan-sraka/wprevents,yvan-sraka/wprevents,yvan-sraka/wprevents | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
# Uncomment the next two lines to enab... | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
#... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
# Uncomment the next tw... | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
#... | from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
# Uncomment the next two lines to enab... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from funfactory.monkeypatches import patch
patch()
from events.api import EventResource
event_resource = EventResource()
# Uncomment the next tw... |
7dbc1359ea4fb1b725fd53869a218856e4dec701 | lswapi/httpie/__init__.py | lswapi/httpie/__init__.py | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | Fix for function signature change in 0.4.0 in fetch_access_token | Fix for function signature change in 0.4.0 in fetch_access_token
| Python | apache-2.0 | nrocco/lswapi | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | <commit_before>"""
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, clie... | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | """
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, client_id, client_s... | <commit_before>"""
LswApi auth plugin for HTTPie.
"""
from json import loads, dumps
from time import time
from os import path
from lswapi import __auth_token_url__, __token_store__, fetch_access_token
from requests import post
from httpie.plugins import AuthPlugin
class LswApiAuth(object):
def __init__(self, clie... |
c0ec6a6a799ab86562b07326eeaf21da4fd23dff | rejected/log.py | rejected/log.py | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | Add the consumer name to the extra values | Add the consumer name to the extra values
| Python | bsd-3-clause | gmr/rejected,gmr/rejected | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | <commit_before>"""
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if se... | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | """
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if self.exists:
... | <commit_before>"""
Logging Related Things
"""
import logging
class CorrelationFilter(logging.Formatter):
"""Filter records that have a correlation_id"""
def __init__(self, exists=None):
super(CorrelationFilter, self).__init__()
self.exists = exists
def filter(self, record):
if se... |
63db2005911abae96eb170af0dd93093cbfeae38 | nimp/utilities/ue4.py | nimp/utilities/ue4.py | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | Build UE4 projects by name rather than by full path. | Build UE4 projects by name rather than by full path.
| Python | mit | dontnod/nimp | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | <commit_before># -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#-------------------------... | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#----------------------------------------... | <commit_before># -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
import socket
import random
import string
import time
import contextlib
import shutil
import os
from nimp.utilities.build import *
from nimp.utilities.deployment import *
#-------------------------... |
11cb3adf0beb19abebbf8345b9244dbcc0f51ca7 | autopoke.py | autopoke.py | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | Add notice on page reload | Add notice on page reload
| Python | mit | matthewbentley/autopoke | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | <commit_before>#!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.f... | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | #!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.find_element_by_... | <commit_before>#!/bin/env python
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenceException
from time import sleep
from getpass import getpass
if __name__ == '__main__':
driver = webdriver.phantomjs.webdriver.WebDriver()
driver.get('https://facebook.com')
driver.f... |
ccfc5e8681eef5e382b6c31abce540cbe179f7b2 | tests/factories/user.py | tests/factories/user.py | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | Allow adjusting of RoomHistoryEntry attributes in UserFactory | Allow adjusting of RoomHistoryEntry attributes in UserFactory
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user i... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User, Roo... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user i... |
e86f62edb2edf9dd5d20eb2bf89b09c76807de50 | tests/cupy_tests/core_tests/test_array_function.py | tests/cupy_tests/core_tests/test_array_function.py | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | Add tests for NumPy _implementation usage | Add tests for NumPy _implementation usage
| Python | mit | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | <commit_before>import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu... | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu = cupy.asarray... | <commit_before>import unittest
import numpy
import six
import cupy
from cupy import testing
@testing.gpu
class TestArrayFunction(unittest.TestCase):
@testing.with_requires('numpy>=1.17.0')
def test_array_function(self):
a = numpy.random.randn(100, 100)
a_cpu = numpy.asarray(a)
a_gpu... |
76a561db119874b17e9a266682e4e4505ba7ff50 | tools/perf/benchmarks/webrtc.py | tools/perf/benchmarks/webrtc.py | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
@benchmark.Disabled('reference')
class We... | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
# Disabled because the reference set beco... | Add a comment saying why the WebRTC ref page set was disabled. | Add a comment saying why the WebRTC ref page set was disabled.
BUG=523517
CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_perf_bisect;tryserver.chromium.perf:win_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect
Review URL: https://codereview.chromium.org/1320333003... | Python | bsd-3-clause | CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM... | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
@benchmark.Disabled('reference')
class We... | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
# Disabled because the reference set beco... | <commit_before># Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
@benchmark.Disabled('refer... | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
# Disabled because the reference set beco... | # Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
@benchmark.Disabled('reference')
class We... | <commit_before># Copyright 2014 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 core import perf_benchmark
from measurements import webrtc
from telemetry import benchmark
import page_sets
@benchmark.Disabled('refer... |
caa2ee0ec42b02c53fc9bd980fa088075d6d50d3 | base/components/social/youtube/admin.py | base/components/social/youtube/admin.py | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | Add ytid to the ChannelAdmin. | Add ytid to the ChannelAdmin.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | <commit_before>from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(No... | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ... | <commit_before>from django.contrib import admin
from .models import Channel, Thumbnail, Video
class VideoInline(admin.StackedInline):
extra = 1
model = Video
class ThumbnailInline(admin.TabularInline):
extra = 1
model = Thumbnail
class ChannelAdmin(admin.ModelAdmin):
fieldsets = (
(No... |
a9a2c13cf947de9bc8ed50a38da5f7191b86ae23 | accounts/tests/test_views.py | accounts/tests/test_views.py | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | """accounts app unittests for views
"""
from django.test import TestCase
from django.core import mail
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the wel... | Add trivial test for the view to send an email | Add trivial test for the view to send an email
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | """accounts app unittests for views
"""
from django.test import TestCase
from django.core import mail
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the wel... | <commit_before>"""accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page temp... | """accounts app unittests for views
"""
from django.test import TestCase
from django.core import mail
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the wel... | """accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page template.
... | <commit_before>"""accounts app unittests for views
"""
from django.test import TestCase
from django.urls import reverse
class WelcomePageTest(TestCase):
"""Tests relating to the welcome_page view.
"""
def test_uses_welcome_template(self):
"""The root url should respond with the welcome page temp... |
018f8e7c7c69eefeb121c8552eb319b4b550f251 | backslash/error_container.py | backslash/error_container.py | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, exception, exception_type, traceback, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'exception': exception,
... | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, message, exception_type=NOTHING, traceback=NOTHING, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'message': mes... | Unify errors and failures in API | Unify errors and failures in API
| Python | bsd-3-clause | vmalloc/backslash-python,slash-testing/backslash-python | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, exception, exception_type, traceback, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'exception': exception,
... | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, message, exception_type=NOTHING, traceback=NOTHING, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'message': mes... | <commit_before>from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, exception, exception_type, traceback, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'exception': ... | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, message, exception_type=NOTHING, traceback=NOTHING, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'message': mes... | from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, exception, exception_type, traceback, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'exception': exception,
... | <commit_before>from sentinels import NOTHING
class ErrorContainer(object):
def add_error(self, exception, exception_type, traceback, timestamp=NOTHING):
return self.client.api.call_function('add_error', {self._get_id_key(): self.id,
'exception': ... |
75a27c416effd2958182b1401e49d6613a28857d | sana_builder/webapp/models.py | sana_builder/webapp/models.py | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True, unique=True)
version = models.CharField(max_length=50, null=True)
owner = mo... | Make uuid on procedures unique | Make uuid on procedures unique
| Python | bsd-3-clause | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True, unique=True)
version = models.CharField(max_length=50, null=True)
owner = mo... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = ... | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True, unique=True)
version = models.CharField(max_length=50, null=True)
owner = mo... | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = ... |
ad1203b9b93d1be499698807e2307413c20bb573 | cisco_olt_http/tests/test_operations.py | cisco_olt_http/tests/test_operations.py |
from cisco_olt_http import operations
|
from cisco_olt_http import operations
from cisco_olt_http.client import Client
def test_get_data():
client = Client('http://base-url')
show_equipment_op = operations.ShowEquipmentOp(client)
op_data = show_equipment_op.get_data()
assert op_data
| Add simple test for operation get_data | Add simple test for operation get_data
| Python | mit | beezz/cisco-olt-http-client,Vnet-as/cisco-olt-http-client |
from cisco_olt_http import operations
Add simple test for operation get_data |
from cisco_olt_http import operations
from cisco_olt_http.client import Client
def test_get_data():
client = Client('http://base-url')
show_equipment_op = operations.ShowEquipmentOp(client)
op_data = show_equipment_op.get_data()
assert op_data
| <commit_before>
from cisco_olt_http import operations
<commit_msg>Add simple test for operation get_data<commit_after> |
from cisco_olt_http import operations
from cisco_olt_http.client import Client
def test_get_data():
client = Client('http://base-url')
show_equipment_op = operations.ShowEquipmentOp(client)
op_data = show_equipment_op.get_data()
assert op_data
|
from cisco_olt_http import operations
Add simple test for operation get_data
from cisco_olt_http import operations
from cisco_olt_http.client import Client
def test_get_data():
client = Client('http://base-url')
show_equipment_op = operations.ShowEquipmentOp(client)
op_data = show_equipment_op.get_data()... | <commit_before>
from cisco_olt_http import operations
<commit_msg>Add simple test for operation get_data<commit_after>
from cisco_olt_http import operations
from cisco_olt_http.client import Client
def test_get_data():
client = Client('http://base-url')
show_equipment_op = operations.ShowEquipmentOp(client)
... |
f3eeb19249fae51a5537735cd5966596194cdc36 | pages/widgets_registry.py | pages/widgets_registry.py | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | Fix widget registry exception handling code | Fix widget registry exception handling code
| Python | bsd-3-clause | batiste/django-page-cms,remik/django-page-cms,batiste/django-page-cms,oliciv/django-page-cms,oliciv/django-page-cms,akaihola/django-page-cms,remik/django-page-cms,remik/django-page-cms,akaihola/django-page-cms,oliciv/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page-cms,akaihola/django-page-cms,pombreda... | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | <commit_before>__all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was... | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | __all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was not found
... | <commit_before>__all__ = ('register_widget',)
from django.utils.translation import ugettext as _
class WidgetAlreadyRegistered(Exception):
"""
An attempt was made to register a widget for Django page CMS more
than once.
"""
pass
class WidgetNotFound(Exception):
"""
The requested widget was... |
3ac86b4c058f920c9ec774c192d84050d61c8cc3 | tests/__init__.py | tests/__init__.py | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
os.remove(os.path.join("tests/resources", path))
def test_build_executable():
hycc_main("tests/resources/hello.hy".split()... | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
path = os.path.join("tests/resources", path)
if os.path.isdir(path):
os.rmdir(path)
else... | Fix bug; os.remove cannot remove directories | Fix bug; os.remove cannot remove directories
| Python | mit | koji-kojiro/hylang-hycc | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
os.remove(os.path.join("tests/resources", path))
def test_build_executable():
hycc_main("tests/resources/hello.hy".split()... | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
path = os.path.join("tests/resources", path)
if os.path.isdir(path):
os.rmdir(path)
else... | <commit_before># -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
os.remove(os.path.join("tests/resources", path))
def test_build_executable():
hycc_main("tests/resources/he... | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
path = os.path.join("tests/resources", path)
if os.path.isdir(path):
os.rmdir(path)
else... | # -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
os.remove(os.path.join("tests/resources", path))
def test_build_executable():
hycc_main("tests/resources/hello.hy".split()... | <commit_before># -*- coding: utf-8 -*-
import os
from hycc.util import hycc_main
def clean():
for path in os.listdir("tests/resources"):
if path not in ["hello.hy", "__init__.py"]:
os.remove(os.path.join("tests/resources", path))
def test_build_executable():
hycc_main("tests/resources/he... |
f4cfad2edaa896b471f4f44b2a3fda2bd6b1bb49 | tests/conftest.py | tests/conftest.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/')
def index():
return app.response_class('OK')
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
| Add index route to test application | Add index route to test application
This endpoint uses to start :class:`LiveServer` instance with minimum
waiting timeout.
| Python | mit | amateja/pytest-flask | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
Add index route to test application
This endpoint uses to start :class:`LiveS... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/')
def index():
return app.response_class('OK')
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
<commit_msg>Add index route to test application
This endpoint ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/')
def index():
return app.response_class('OK')
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
Add index route to test application
This endpoint uses to start :class:`LiveS... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from flask import Flask, jsonify
@pytest.fixture
def app():
app = Flask(__name__)
@app.route('/ping')
def ping():
return jsonify(ping='pong')
return app
<commit_msg>Add index route to test application
This endpoint ... |
dff2120a65daacfb1add8da604483f354abcefa2 | src/pygrapes/serializer/__init__.py | src/pygrapes/serializer/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from abstract import Abstract
from json import Json
from msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygrapes.serializer.abstract import Abstract
from pygrapes.serializer.json import Json
from pygrapes.serializer.msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
| Load resources by absolute path not relative | Load resources by absolute path not relative
| Python | bsd-3-clause | michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from abstract import Abstract
from json import Json
from msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
Load resources by absolute path not relative | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygrapes.serializer.abstract import Abstract
from pygrapes.serializer.json import Json
from pygrapes.serializer.msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from abstract import Abstract
from json import Json
from msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
<commit_msg>Load resources by absolute path not relative<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygrapes.serializer.abstract import Abstract
from pygrapes.serializer.json import Json
from pygrapes.serializer.msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from abstract import Abstract
from json import Json
from msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
Load resources by absolute path not relative#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygrapes.serializer.abstract import Abstract
from pygrap... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from abstract import Abstract
from json import Json
from msgpack import MsgPack
__all__ = ['Abstract', 'Json', 'MsgPack']
<commit_msg>Load resources by absolute path not relative<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygrapes.serial... |
e3d968c2c477a764e7a5b515f3109dbd83f487f7 | django_channels_jsonrpc/django_channels_jsonrpc/consumer.py | django_channels_jsonrpc/django_channels_jsonrpc/consumer.py | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | Print statements updated to be compatible with Python 3. | Print statements updated to be compatible with Python 3.
| Python | mit | millerf/django-channels-jsonrpc | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | <commit_before>from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering ... | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering = False
de... | <commit_before>from channels.generic.websockets import WebsocketConsumer, JsonWebsocketConsumer
from .jsonrpcwebsocketconsumer import JsonRpcWebsocketConsumer
class MyJsonRpcWebsocketConsumer(JsonRpcWebsocketConsumer):
# Set to True if you want them, else leave out
strict_ordering = False
slight_ordering ... |
6f24da8cdcd0ad22cad0cee4e9864de6e695ab6d | packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py | packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py | import TPunitA
import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
| from __future__ import absolute_import
from . import TPunitA
from . import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
| Fix TestImport.py to work with Python 3.5. | Fix TestImport.py to work with Python 3.5.
Differential Revision: http://reviews.llvm.org/D16431
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@258448 91177308-0d34-0410-b5e6-96231b3b80d8
| Python | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb | import TPunitA
import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
Fix TestImport.py to work with Python 3.5.
Differential Revision: http://r... | from __future__ import absolute_import
from . import TPunitA
from . import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
| <commit_before>import TPunitA
import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
<commit_msg>Fix TestImport.py to work with Python 3.5.
Diff... | from __future__ import absolute_import
from . import TPunitA
from . import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
| import TPunitA
import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
Fix TestImport.py to work with Python 3.5.
Differential Revision: http://r... | <commit_before>import TPunitA
import TPunitB
def __lldb_init_module(debugger,*args):
debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")
debugger.HandleCommand("command script add -f thepackage.TPunitB.command TPcommandB")
<commit_msg>Fix TestImport.py to work with Python 3.5.
Diff... |
f203602b5c5e901f54895c1872becf0b48438628 | src/pluggy/_result.py | src/pluggy/_result.py | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | Remove explicit inheritance from object | Remove explicit inheritance from object
| Python | mit | pytest-dev/pluggy,RonnyPfannschmidt/pluggy,hpk42/pluggy,pytest-dev/pluggy,RonnyPfannschmidt/pluggy | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | <commit_before>"""
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
"""... | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | """
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
""" Hook was calle... | <commit_before>"""
Hook wrapper "result" utilities.
"""
import sys
def _raise_wrapfail(wrap_controller, msg):
co = wrap_controller.gi_code
raise RuntimeError(
"wrap_controller at %r %s:%d %s"
% (co.co_name, co.co_filename, co.co_firstlineno, msg)
)
class HookCallError(Exception):
"""... |
caa72e132d2d25fd1e67bfeee88c7498e7e52f21 | analysis/count-markers.py | analysis/count-markers.py | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial[m + '-c']
if s.count() > 0.01 * len(s):
markers.append(m... | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial.df[m + '-c']
if s.count() > 0.1 * len(s):
markers.append... | Increase fraction of non-dropout frames required. | Increase fraction of non-dropout frames required.
| Python | mit | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial[m + '-c']
if s.count() > 0.01 * len(s):
markers.append(m... | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial.df[m + '-c']
if s.count() > 0.1 * len(s):
markers.append... | <commit_before>#!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial[m + '-c']
if s.count() > 0.01 * len(s):
m... | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial.df[m + '-c']
if s.count() > 0.1 * len(s):
markers.append... | #!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial[m + '-c']
if s.count() > 0.01 * len(s):
markers.append(m... | <commit_before>#!/usr/bin/env python
import climate
import collections
import joblib
import database
def count(trial):
trial.load()
trial.reindex(100)
trial.mask_dropouts()
markers = []
for m in trial.marker_columns:
s = trial[m + '-c']
if s.count() > 0.01 * len(s):
m... |
ff37a13d1adec1fe685bd48964ab50ef000f53f5 | loom/config.py | loom/config.py | from fabric.api import env, run, sudo, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.l... | from fabric.api import env, run, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.loom_pu... | Revert "sudo is required to run which <gem-exec> on arch." | Revert "sudo is required to run which <gem-exec> on arch."
This reverts commit 15162c58c27bc84f1c7fc0326f782bd693ca4d7e.
| Python | bsd-3-clause | nithinphilips/loom,nithinphilips/loom | from fabric.api import env, run, sudo, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.l... | from fabric.api import env, run, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.loom_pu... | <commit_before>from fabric.api import env, run, sudo, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the lates... | from fabric.api import env, run, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.loom_pu... | from fabric.api import env, run, sudo, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the latest version
env.l... | <commit_before>from fabric.api import env, run, sudo, settings, hide
# Default system user
env.user = 'ubuntu'
# Default puppet environment
env.environment = 'prod'
# Default puppet module directory
env.puppet_module_dir = 'modules/'
# Default puppet version
# If loom_puppet_version is None, loom installs the lates... |
22a678488d43f4ca7fc53c7894113b7895893e2a | mpltools/style/__init__.py | mpltools/style/__init__.py | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | Remove outdated function from list. | FIX: Remove outdated function from list.
| Python | bsd-3-clause | tonysyu/mpltools,matteoicardi/mpltools | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | <commit_before>"""
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be sp... | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | """
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be specified as sect... | <commit_before>"""
This module defines styles redefine matplotlib rc parameters. In addition, you
can override pre-defined styles with "mplstyle" files in the current
directory and your home directory. The priority of style files is:
1. ./mplstyle
2. ~/.mplstyle
3. mpltools/style/
Style names should be sp... |
137f5542aff91d259e68684c79d41cc47648cee2 | mrburns/settings/server.py | mrburns/settings/server.py | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for monitors)
socket.gethostbyname(socket.gethostn... | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
STATIC_URL = os.getenv('STATIC_URL', STATIC_URL)
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for m... | Set STATIC_URL from an env var if available. | Set STATIC_URL from an env var if available.
| Python | mpl-2.0 | almossawi/mrburns,mozilla/mrburns,almossawi/mrburns,mozilla/mrburns,almossawi/mrburns,almossawi/mrburns,mozilla/mrburns | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for monitors)
socket.gethostbyname(socket.gethostn... | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
STATIC_URL = os.getenv('STATIC_URL', STATIC_URL)
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for m... | <commit_before>import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for monitors)
socket.gethostbyname(... | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
STATIC_URL = os.getenv('STATIC_URL', STATIC_URL)
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for m... | import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for monitors)
socket.gethostbyname(socket.gethostn... | <commit_before>import os
import socket
from .base import * # noqa
SERVER_ENV = os.getenv('DJANGO_SERVER_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
'webwewant.mozilla.org',
'webwewant.allizom.org',
# the server's IP (for monitors)
socket.gethostbyname(... |
9f922f939ec19d0d9a9a91abb3e8b0d5b010c246 | djangoautoconf/management/commands/dump_settings.py | djangoautoconf/management/commands/dump_settings.py | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | Work around for dump setting issue. | Work around for dump setting issue.
| Python | bsd-3-clause | weijia/djangoautoconf,weijia/djangoautoconf | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | <commit_before>import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | <commit_before>import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
... |
4b88dff3df0c82392314efe9c48379e1ad2b1500 | vinotes/apps/api/serializers.py | vinotes/apps/api/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | Add trait's wines to serializer. | Add trait's wines to serializer.
| Python | unlicense | rcutmore/vinotes-api,rcutmore/vinotes-api | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = ... | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = Winery
... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Note, Trait, Wine, Winery
class WinerySerializer(serializers.ModelSerializer):
wines = serializers.PrimaryKeyRelatedField(many=True, queryset=Wine.objects.all())
class Meta:
model = ... |
85a869d29275f4ec8d03a53c0c4a6e82f36b0213 | stackdio/stackdio/settings/local.py | stackdio/stackdio/settings/local.py | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | Disable debug_toolbar from catching http redirects...pretty annoying | PI-27: Disable debug_toolbar from catching http redirects...pretty annoying
| Python | apache-2.0 | clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio,stackdio/stackdio,clarkperkins/stackdio | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | <commit_before># Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'djang... | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | # Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.m... | <commit_before># Grab the base settings
from .base import *
# Override at will!
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
##
#
##
DATABASES = {
'default': {
'ENGINE': 'djang... |
a34c594a13a79a864d1b747d84a0074e7711dd42 | testanalyzer/pythonanalyzer.py | testanalyzer/pythonanalyzer.py | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class [a-zA-Z0-9_]+\(?[a-zA-Z0-9_, ]*\)?:", content))
def get_function_count(self, content):
return len(
re.findall("def [a-... | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class +[a-zA-Z0-9_]+ *\(?[a-zA-Z0-9_, ]*\)? *:", content))
def get_function_count(self, content):
return len(
re.findall("de... | Update regex to allow spaces | Update regex to allow spaces
| Python | mpl-2.0 | CheriPai/TestAnalyzer,CheriPai/TestAnalyzer,CheriPai/TestAnalyzer | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class [a-zA-Z0-9_]+\(?[a-zA-Z0-9_, ]*\)?:", content))
def get_function_count(self, content):
return len(
re.findall("def [a-... | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class +[a-zA-Z0-9_]+ *\(?[a-zA-Z0-9_, ]*\)? *:", content))
def get_function_count(self, content):
return len(
re.findall("de... | <commit_before>import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class [a-zA-Z0-9_]+\(?[a-zA-Z0-9_, ]*\)?:", content))
def get_function_count(self, content):
return len(
re.f... | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class +[a-zA-Z0-9_]+ *\(?[a-zA-Z0-9_, ]*\)? *:", content))
def get_function_count(self, content):
return len(
re.findall("de... | import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class [a-zA-Z0-9_]+\(?[a-zA-Z0-9_, ]*\)?:", content))
def get_function_count(self, content):
return len(
re.findall("def [a-... | <commit_before>import re
from fileanalyzer import FileAnalyzer
class PythonAnalyzer(FileAnalyzer):
def get_class_count(self, content):
return len(
re.findall("class [a-zA-Z0-9_]+\(?[a-zA-Z0-9_, ]*\)?:", content))
def get_function_count(self, content):
return len(
re.f... |
e3835baeb03da43456442fdd2678891cf2b6f957 | DeployUtil/authentication.py | DeployUtil/authentication.py | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | Fix a bug in cleanup | Fix a bug in cleanup
| Python | mit | loarabia/DeployUtil | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | <commit_before>import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persisten... | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persistent=0'
verb = 'P... | <commit_before>import urllib.request
import ssl
import http.cookiejar
#TODO: give an indicator of success
#TODO: handle errors a bit better.
def do_pair(ip, pin, **_args):
# IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS
scheme = 'https://'
port = ''
api = '/api/authorize/pair?pin={pin}&persisten... |
3d8f642460cf5c26dd8f58a5a36786b3ef4069e8 | ogusa/tests/test_txfunc.py | ogusa/tests/test_txfunc.py | import pickle
from ogusa import txfunc
def test_cps_data():
with open("../../regression/cps_test_replace_outliers.pkl", 'rb') as p:
param_arr = pickle.load(p)
sse_big_mat = pickle.load(p)
txfunc.replace_outliers(param_arr, sse_big_mat)
| from ogusa import txfunc
import numpy as np
import pickle
import os
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
def test_replace_outliers():
"""
4 cases:
s is an outlier and is 0
s is an outlier and is in the interior (s > 0 and s < S)
s is not an outlier but the first s - 1... | Use simulated data for test | Use simulated data for test
| Python | mit | OpenSourcePolicyCenter/dynamic,OpenSourcePolicyCenter/dynamic,OpenSourcePolicyCenter/dynamic,OpenSourcePolicyCenter/dynamic,OpenSourcePolicyCenter/dynamic | import pickle
from ogusa import txfunc
def test_cps_data():
with open("../../regression/cps_test_replace_outliers.pkl", 'rb') as p:
param_arr = pickle.load(p)
sse_big_mat = pickle.load(p)
txfunc.replace_outliers(param_arr, sse_big_mat)
Use simulated data for test | from ogusa import txfunc
import numpy as np
import pickle
import os
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
def test_replace_outliers():
"""
4 cases:
s is an outlier and is 0
s is an outlier and is in the interior (s > 0 and s < S)
s is not an outlier but the first s - 1... | <commit_before>import pickle
from ogusa import txfunc
def test_cps_data():
with open("../../regression/cps_test_replace_outliers.pkl", 'rb') as p:
param_arr = pickle.load(p)
sse_big_mat = pickle.load(p)
txfunc.replace_outliers(param_arr, sse_big_mat)
<commit_msg>Use simulated data for test<com... | from ogusa import txfunc
import numpy as np
import pickle
import os
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
def test_replace_outliers():
"""
4 cases:
s is an outlier and is 0
s is an outlier and is in the interior (s > 0 and s < S)
s is not an outlier but the first s - 1... | import pickle
from ogusa import txfunc
def test_cps_data():
with open("../../regression/cps_test_replace_outliers.pkl", 'rb') as p:
param_arr = pickle.load(p)
sse_big_mat = pickle.load(p)
txfunc.replace_outliers(param_arr, sse_big_mat)
Use simulated data for testfrom ogusa import txfunc
impor... | <commit_before>import pickle
from ogusa import txfunc
def test_cps_data():
with open("../../regression/cps_test_replace_outliers.pkl", 'rb') as p:
param_arr = pickle.load(p)
sse_big_mat = pickle.load(p)
txfunc.replace_outliers(param_arr, sse_big_mat)
<commit_msg>Use simulated data for test<com... |
dfa2ef8092af45b01ee504b308fc10623552f406 | devicehive/transports/base_transport.py | devicehive/transports/base_transport.py | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | Rename is_connected method to connected | Rename is_connected method to connected
| Python | apache-2.0 | devicehive/devicehive-python | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | <commit_before>import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_cl... | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_class(**data_form... | <commit_before>import uuid
class BaseTransport(object):
"""Base transport class."""
REQUEST_ID_KEY = 'requestId'
REQUEST_ACTION_KEY = 'action'
def __init__(self, data_format_class, data_format_options, handler_class,
handler_options, name):
self._data_format = data_format_cl... |
ddbd66713fd8f146509413772f4a4e3801f5fbf8 | ynr/apps/sopn_parsing/models.py | ynr/apps/sopn_parsing/models.py | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | Use None rather than -1 for Pandas | Use None rather than -1 for Pandas
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | <commit_before>import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
... | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
)
raw_da... | <commit_before>import json
from django.db import models
from model_utils.models import TimeStampedModel
class ParsedSOPN(TimeStampedModel):
"""
A model for storing the parsed data out of a PDF
"""
sopn = models.OneToOneField(
"official_documents.OfficialDocument", on_delete=models.CASCADE
... |
f9787e6117ffcc1ff9571267f29c7993fbe08f20 | numpy/doc/pyrex/setup.py | numpy/doc/pyrex/setup.py | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | Use get_include instead of get_numpy_include. | Use get_include instead of get_numpy_include.
git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@3525 94b884b6-d6fd-0310-90d3-974f1d3f35e1
| Python | bsd-3-clause | illume/numpy3k,jasonmccampbell/numpy-refactor-sprint,chadnetzer/numpy-gaurdro,jasonmccampbell/numpy-refactor-sprint,illume/numpy3k,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,jasonmccampbell/numpy-refactor-sprint,chadnetzer/numpy-gaurdro,efiring/numpy-work,efiring/numpy-work,jasonmccampbell/num... | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | <commit_before>#!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable b... | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | #!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable by people who do... | <commit_before>#!/usr/bin/env python
"""Install file for example on how to use Pyrex with Numpy.
For more details, see:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex
"""
from distutils.core import setup
from distutils.extension import Extension
# Make this usable b... |
c022774b37130a1c1744aabecb480279802bdeba | linecounter.py | linecounter.py | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | Fix the service name for the LineCounter | Fix the service name for the LineCounter
| Python | mit | paraita/simplerestservice | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | <commit_before>#!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This RES... | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | #!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This REST service expos... | <commit_before>#!/usr/bin/env python
from flask import Flask
from flask_restplus import Resource, Api, reqparse
from werkzeug.datastructures import FileStorage
from time import sleep
from random import randint
import socket
app = Flask(__name__)
api = Api(app, version='1.0', title='LineCounter', description='This RES... |
1b962b12d40a43280de9ab4ed974d69613081bf4 | surok/discovery.py | surok/discovery.py | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | Remove ending '.' in hostname. (for those fucking libs that knows nothing about RFC) | Remove ending '.' in hostname. (for those fucking libs that knows nothing about RFC)
| Python | bsd-3-clause | Difrex/surok,Difrex/surok | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | <commit_before>import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group... | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group = None
if... | <commit_before>import dns.resolver
import dns.query
from dns.exception import DNSException
# Resolve service from mesos-dns SRV record
# return dict {"servicename": [{"name": "service.f.q.d.n.", "port": 9999}]}
def resolve(app, conf):
hosts = {}
services = app['services']
domain = conf['domain']
group... |
0b388559f1e130af84d13991a66cf61448d39429 | common/hil_slurm_settings.py | common/hil_slurm_settings.py | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVATIONS_F... | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/local/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVAT... | Change install directory - now /usr/local/bin | Change install directory - now /usr/local/bin
| Python | mit | mghpcc-projects/user_level_slurm_reservations,mghpcc-projects/user_level_slurm_reservations | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVATIONS_F... | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/local/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVAT... | <commit_before>"""
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL... | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/local/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVAT... | """
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL_RESERVATIONS_F... | <commit_before>"""
MassOpenCloud / Hardware Isolation Layer (HIL)
Slurm / HIL Control Settings
May 2017, Tim Donahue tpd001@gmail.com
"""
DEBUG = True
SLURM_INSTALL_DIR = '/usr/bin/'
HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/slurm-llnl/hil_prolog.log'
HIL_MONITOR_LOGFILE = '/var/log/slurm-llnl/hil_monitor.log'
HIL... |
4fa157dbb0fc7323ca89b3e655469062935f84c1 | Main.py | Main.py | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | Refactor main as a separate function | Refactor main as a separate function
| Python | mit | shunghsiyu/pdf-processor | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | <commit_before>"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by docume... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | <commit_before>"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by docume... |
a4740e9c2bf2e582ab78b8fa1aaf904c72501ee2 | multivid_cl.py | multivid_cl.py | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | Change CL to require a non-blank query | Change CL to require a non-blank query
| Python | mit | jasontbradshaw/multivid,jasontbradshaw/multivid | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | <commit_before>#!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or fr... | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | #!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or from user input
... | <commit_before>#!/usr/bin/env python
import search
import tmap
if __name__ == "__main__":
from pprint import pprint as pp
import sys
to_dict = lambda r: r.to_dict()
h = search.HuluSearch()
a = search.AmazonSearch()
n = search.NetflixSearch()
# get the query from the first argument or fr... |
f5798bd346f939a4e098e09dd44fb08bc04ff1f5 | ircstat/log.py | ircstat/log.py | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
def logger(name=None):
log = logging.getLogger(name)
log.set... | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
sh = None
def logger(name=None):
global sh
log = logging.g... | Fix issue with duplicate output | Fix issue with duplicate output
| Python | mit | jreese/ircstat,jreese/ircstat | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
def logger(name=None):
log = logging.getLogger(name)
log.set... | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
sh = None
def logger(name=None):
global sh
log = logging.g... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
def logger(name=None):
log = logging.getLogger(na... | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
sh = None
def logger(name=None):
global sh
log = logging.g... | # Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
def logger(name=None):
log = logging.getLogger(name)
log.set... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
import logging
logging.addLevelName(logging.DEBUG, 'DBG')
logging.addLevelName(logging.INFO, 'INF')
logging.addLevelName(logging.WARNING, 'WRN')
logging.addLevelName(logging.ERROR, 'ERR')
def logger(name=None):
log = logging.getLogger(na... |
d92c2dba7e549cee8059ecf4f1017956a630cd7a | web3/utils/validation.py | web3/utils/validation.py | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | Raise error specific to address checksum failure | Raise error specific to address checksum failure
Because is_address() also checks for a valid checksum, the old code showed a generic "not an address" error if the checksum failed. | Python | mit | pipermerriam/web3.py | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | <commit_before>from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e i... | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e in abi:
... | <commit_before>from eth_utils import (
is_address,
is_checksum_address,
is_checksum_formatted_address,
is_dict,
is_list_like,
)
def validate_abi(abi):
"""
Helper function for validating an ABI
"""
if not is_list_like(abi):
raise ValueError("'abi' is not a list")
for e i... |
6a827bee5263c9bb5d34d6ac971581c62e827e7d | pinax/comments/models.py | pinax/comments/models.py | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Comm... | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Comment(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, rel... | Change syntax to drop support | Change syntax to drop support
| Python | mit | pinax/pinax-comments,pinax/pinax-comments,eldarion/dialogos | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Comm... | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Comment(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, rel... | <commit_before>from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compat... | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Comment(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, rel... | from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Comm... | <commit_before>from datetime import datetime
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compat... |
af51ef98d8575e7832d79c1068c092d388866dcb | donut/donut_SMTP_handler.py | donut/donut_SMTP_handler.py | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
class DonutSMTPHandler(SMTPHandler):
def __init__(self,
... | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
DEFAULT_DEV_TEAM_EMAILS = ['devteam@donut.caltech.edu']
class DonutS... | Allow error email to still be sent if DB is down | Allow error email to still be sent if DB is down
We were seeing errors in the logs where the database was inaccessible,
but the errors were not being emailed out because the handler makes a DB query.
| Python | mit | ASCIT/donut,ASCIT/donut,ASCIT/donut | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
class DonutSMTPHandler(SMTPHandler):
def __init__(self,
... | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
DEFAULT_DEV_TEAM_EMAILS = ['devteam@donut.caltech.edu']
class DonutS... | <commit_before>from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
class DonutSMTPHandler(SMTPHandler):
def __init... | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
DEFAULT_DEV_TEAM_EMAILS = ['devteam@donut.caltech.edu']
class DonutS... | from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
class DonutSMTPHandler(SMTPHandler):
def __init__(self,
... | <commit_before>from logging.handlers import SMTPHandler
DEV_TEAM_EMAILS_QUERY = '''SELECT DISTINCT email FROM
members NATURAL JOIN current_position_holders NATURAL JOIN positions NATURAL JOIN groups
WHERE group_name = "Devteam"
'''
class DonutSMTPHandler(SMTPHandler):
def __init... |
185f429f2a4309addf446fb382434e1a0ecafb9a | crm_employees/models/crm_employees_range.py | crm_employees/models/crm_employees_range.py | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | Set some fields as tranlate | Set some fields as tranlate
| Python | agpl-3.0 | Therp/partner-contact,open-synergy/partner-contact,diagramsoftware/partner-contact,Endika/partner-contact,acsone/partner-contact | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class CrmEmployeesRa... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class... |
d37b894db633a63d09dd45f6da21a8441b6bce01 | firecares/settings/local.py | firecares/settings/local.py | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | Set registration open by default | Set registration open by default
| Python | mit | FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | <commit_before>from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'1... | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'127.0.0.1',
)
D... | <commit_before>from firecares.settings.base import * # noqa
INSTALLED_APPS += ('debug_toolbar', 'fixture_magic', 'django_extensions') # noqa
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware', ) # noqa
# The Django Debug Toolbar will only be shown to these client IPs.
INTERNAL_IPS = (
'1... |
78b62cd865b5c31a17c982b78dc91127ebf54525 | erpnext/patches/may_2012/same_purchase_rate_patch.py | erpnext/patches/may_2012/same_purchase_rate_patch.py | def execute():
import webnotes
gd = webnotes.model.code.get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
| def execute():
import webnotes
from webnotes.model.code import get_obj
gd = get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
| Maintain same rate throughout pur cycle: in global defaults, by default set true | Maintain same rate throughout pur cycle: in global defaults, by default set true
| Python | agpl-3.0 | rohitwaghchaure/digitales_erpnext,gangadhar-kadam/smrterp,pombredanne/erpnext,saurabh6790/test-med-app,gangadharkadam/johnerp,indictranstech/erpnext,hernad/erpnext,gangadhar-kadam/helpdesk-erpnext,gangadhar-kadam/mic-erpnext,mbauskar/Das_Erpnext,hernad/erpnext,Tejal011089/huntercamp_erpnext,saurabh6790/ON-RISAPP,mbausk... | def execute():
import webnotes
gd = webnotes.model.code.get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
Maintain same rate throughout pur cycle: in global defaults, by default set true | def execute():
import webnotes
from webnotes.model.code import get_obj
gd = get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
| <commit_before>def execute():
import webnotes
gd = webnotes.model.code.get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
<commit_msg>Maintain same rate throughout pur cycle: in global defaults, by default set true<commit_after> | def execute():
import webnotes
from webnotes.model.code import get_obj
gd = get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
| def execute():
import webnotes
gd = webnotes.model.code.get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
Maintain same rate throughout pur cycle: in global defaults, by default set truedef execute():
import webnotes
from webnotes.model.code import get_obj
gd = get_obj('Glob... | <commit_before>def execute():
import webnotes
gd = webnotes.model.code.get_obj('Global Defaults')
gd.doc.maintain_same_rate = 1
gd.doc.save()
gd.on_update()
<commit_msg>Maintain same rate throughout pur cycle: in global defaults, by default set true<commit_after>def execute():
import webnotes
from webnotes.mode... |
840af484f3b0f615167adf9600263e0d8c2e3875 | wrappers/python/setup.py | wrappers/python/setup.py | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | Remove install dependency of pytest from python wrapper | Remove install dependency of pytest from python wrapper
Signed-off-by: Daniel Bluhm <6df8625bb799b640110458f819853f591a9910cb@sovrin.org>
| Python | apache-2.0 | Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/indy-sdk,Artemkaaas/indy-sdk,peacekeeper/... | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | <commit_before>from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
auth... | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyach... | <commit_before>from distutils.core import setup
import os
PKG_VERSION = os.environ.get('PACKAGE_VERSION') or '1.9.0'
setup(
name='python3-indy',
version=PKG_VERSION,
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
auth... |
c95c3e3c505ca46e62fc87690f36326c5579887b | overextends/models.py | overextends/models.py |
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.loader import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
|
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.base import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
| Fix import path of add_to_builtins | Fix import path of add_to_builtins | Python | bsd-2-clause | dwaynebailey/django-overextends,stephenmcd/django-overextends,vinnyrose/django-overextends,biljettshop/django-overextends,taedori81/django-overextends |
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.loader import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
Fix import path of add_to_builtins |
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.base import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
| <commit_before>
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.loader import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
<commit_msg>Fix import path of add_to_builtin... |
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.base import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
|
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.loader import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
Fix import path of add_to_builtins
# This app doesn't contai... | <commit_before>
# This app doesn't contain any models, but as its template tags need to
# be added to built-ins at start-up time, this is a good place to do it.
from django.template.loader import add_to_builtins
add_to_builtins("overextends.templatetags.overextends_tags")
<commit_msg>Fix import path of add_to_builtin... |
7b8a92658ab91e6da548a440f6fa5f6bd8eb85e5 | yatsm/pipeline/_exec.py | yatsm/pipeline/_exec.py | """ Functions for handling the execution of a pipeline graph
"""
from toolz.curried import curry
| """ Functions for handling the execution of a pipeline graph
"""
import logging
from toolz import curry
from dask import delayed
from ._topology import config_to_tasks
from .language import OUTPUT, REQUIRE
from .tasks import pipeline_tasks
logger = logging.getLogger(__name__)
def curry_pipeline_task(func, spec):
... | Add funcs to prepare pipeline execution | Add funcs to prepare pipeline execution
| Python | mit | c11/yatsm,c11/yatsm,valpasq/yatsm,valpasq/yatsm | """ Functions for handling the execution of a pipeline graph
"""
from toolz.curried import curry
Add funcs to prepare pipeline execution | """ Functions for handling the execution of a pipeline graph
"""
import logging
from toolz import curry
from dask import delayed
from ._topology import config_to_tasks
from .language import OUTPUT, REQUIRE
from .tasks import pipeline_tasks
logger = logging.getLogger(__name__)
def curry_pipeline_task(func, spec):
... | <commit_before>""" Functions for handling the execution of a pipeline graph
"""
from toolz.curried import curry
<commit_msg>Add funcs to prepare pipeline execution<commit_after> | """ Functions for handling the execution of a pipeline graph
"""
import logging
from toolz import curry
from dask import delayed
from ._topology import config_to_tasks
from .language import OUTPUT, REQUIRE
from .tasks import pipeline_tasks
logger = logging.getLogger(__name__)
def curry_pipeline_task(func, spec):
... | """ Functions for handling the execution of a pipeline graph
"""
from toolz.curried import curry
Add funcs to prepare pipeline execution""" Functions for handling the execution of a pipeline graph
"""
import logging
from toolz import curry
from dask import delayed
from ._topology import config_to_tasks
from .language... | <commit_before>""" Functions for handling the execution of a pipeline graph
"""
from toolz.curried import curry
<commit_msg>Add funcs to prepare pipeline execution<commit_after>""" Functions for handling the execution of a pipeline graph
"""
import logging
from toolz import curry
from dask import delayed
from ._topol... |
52240834fc2144327094f1f9d319184dcccb3da7 | framework/tasks/handlers.py | framework/tasks/handlers.py | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | Handle queued tasks when working outside request context. | Handle queued tasks when working outside request context.
| Python | apache-2.0 | chrisseto/osf.io,billyhunt/osf.io,mluke93/osf.io,ckc6cz/osf.io,billyhunt/osf.io,haoyuchen1992/osf.io,CenterForOpenScience/osf.io,brandonPurvis/osf.io,Ghalko/osf.io,asanfilippo7/osf.io,hmoco/osf.io,adlius/osf.io,reinaH/osf.io,baylee-d/osf.io,RomanZWang/osf.io,chrisseto/osf.io,dplorimer/osf,TomBaxter/osf.io,HalcyonChimer... | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | <commit_before># -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
... | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | # -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
tasks = ... | <commit_before># -*- coding: utf-8 -*-
import logging
from flask import g
from celery import group
from website import settings
logger = logging.getLogger(__name__)
def celery_before_request():
g._celery_tasks = []
def celery_teardown_request(error=None):
if error is not None:
return
try:
... |
061e0e0702025d99956b7dc606ea0bb4fa5c84ea | flocker/restapi/_logging.py | flocker/restapi/_logging.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | Address review comment: Better documentation. | Address review comment: Better documentation.
| Python | apache-2.0 | Azulinho/flocker,moypray/flocker,wallnerryan/flocker-profiles,mbrukman/flocker,w4ngyi/flocker,adamtheturtle/flocker,runcom/flocker,mbrukman/flocker,LaynePeng/flocker,achanda/flocker,jml/flocker,hackday-profilers/flocker,AndyHuu/flocker,jml/flocker,lukemarsden/flocker,LaynePeng/flocker,achanda/flocker,1d4Nf6/flocker,Azu... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: metho... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: method,
... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
This module defines the Eliot log events emitted by the API implementation.
"""
__all__ = [
"JSON_REQUEST",
"REQUEST",
]
from eliot import Field, ActionType
LOG_SYSTEM = u"api"
METHOD = Field(u"method", lambda method: metho... |
397b48e9837cd66b04cc77c08fb569ca97e935c1 | tests/test_main.py | tests/test_main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
class TestAbbreviationExpansi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
if __name__ == '__main__':
... | Remove original implementation of TestAbbreviationExpansion | Remove original implementation of TestAbbreviationExpansion
| Python | bsd-3-clause | audreyr/cookiecutter,takeflight/cookiecutter,drgarcia1986/cookiecutter,cguardia/cookiecutter,terryjbates/cookiecutter,stevepiercy/cookiecutter,benthomasson/cookiecutter,willingc/cookiecutter,ionelmc/cookiecutter,vincentbernat/cookiecutter,vincentbernat/cookiecutter,vintasoftware/cookiecutter,lucius-feng/cookiecutter,lg... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
class TestAbbreviationExpansi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
if __name__ == '__main__':
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
class TestAbbr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
if __name__ == '__main__':
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
class TestAbbreviationExpansi... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_main
---------
Tests for `cookiecutter.main` module.
"""
import logging
import unittest
from cookiecutter import main
# Log debug and above to console
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
class TestAbbr... |
d2536523770a59ed60bf27e8c0e456a33ca1a804 | billabong/tests/test_main.py | billabong/tests/test_main.py | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | Add test for cli 'add' command | Add test for cli 'add' command
| Python | agpl-3.0 | hoh/Billabong,hoh/Billabong | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | <commit_before># Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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... | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 o... | <commit_before># Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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... |
32ca774aca8fd60a26f6144a98f25fa8b65ad22b | yak/rest_social_auth/serializers.py | yak/rest_social_auth/serializers.py | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import SignUpSerializer
User = get_user_model()
class SocialSignUpSerializer(SignUpSerializer):
password = serializers.CharField(required=False, write_only=True)
class Meta:
model = U... | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import LoginSerializer
User = get_user_model()
class SocialSignUpSerializer(LoginSerializer):
fullname = serializers.CharField(read_only=True)
username = serializers.CharField(read_only=True)
... | Update social sign up serializer to avoid new validation on regular sign up | Update social sign up serializer to avoid new validation on regular sign up
| Python | mit | ParableSciences/YAK-server,sventech/YAK-server,yeti/YAK-server,sventech/YAK-server,ParableSciences/YAK-server,yeti/YAK-server | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import SignUpSerializer
User = get_user_model()
class SocialSignUpSerializer(SignUpSerializer):
password = serializers.CharField(required=False, write_only=True)
class Meta:
model = U... | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import LoginSerializer
User = get_user_model()
class SocialSignUpSerializer(LoginSerializer):
fullname = serializers.CharField(read_only=True)
username = serializers.CharField(read_only=True)
... | <commit_before>from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import SignUpSerializer
User = get_user_model()
class SocialSignUpSerializer(SignUpSerializer):
password = serializers.CharField(required=False, write_only=True)
class Meta:
... | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import LoginSerializer
User = get_user_model()
class SocialSignUpSerializer(LoginSerializer):
fullname = serializers.CharField(read_only=True)
username = serializers.CharField(read_only=True)
... | from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import SignUpSerializer
User = get_user_model()
class SocialSignUpSerializer(SignUpSerializer):
password = serializers.CharField(required=False, write_only=True)
class Meta:
model = U... | <commit_before>from django.contrib.auth import get_user_model
from rest_framework import serializers
from yak.rest_user.serializers import SignUpSerializer
User = get_user_model()
class SocialSignUpSerializer(SignUpSerializer):
password = serializers.CharField(required=False, write_only=True)
class Meta:
... |
9c58f87648034d706ca5df87d7179226e48afa54 | project/profiles/urls.py | project/profiles/urls.py | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | Use Django's username regex in profile URL | Use Django's username regex in profile URL
| Python | mit | compsci-hfh/app,jonsimington/app,compsci-hfh/app,jonsimington/app | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | <commit_before>"""
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/upd... | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | """
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/update/$', profile... | <commit_before>"""
project.profiles URL Configuration
"""
from django.conf.urls import url
from .views import (profile_list_view,
profile_detail_view,
profile_update_view)
urlpatterns = [
url(r'^profiles/$', profile_list_view, name="profile_list"),
url(r'^profiles/upd... |
a42b6d1faa38f92b21d74c1cf258f4b0e9800401 | search/urls.py | search/urls.py | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | Allow any logged-in user to perform image searches. | Allow any logged-in user to perform image searches.
| Python | mit | occrp/id-backend | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', sea... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', search.views.Docum... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from core.auth import perm
import search.views
urlpatterns = patterns('',
url(r'^document/$', perm('any', search.views.DocumentSearchTemplate), name='search'),
url(r'^document/query/$',perm('any', sea... |
afc0ace0767e29f8c2b71ed5ba7f8139e24fc020 | categories/serializers.py | categories/serializers.py | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | Add reverse relationship serializer to Category | Add reverse relationship serializer to Category
| Python | apache-2.0 | belatrix/BackendAllStars | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | <commit_before>from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSe... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
... | <commit_before>from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSe... |
8e9889bb9c2d916f61e5e08416a171777f1c6a2e | samples/gpio_write.py | samples/gpio_write.py | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
# running this in this order blocks :(
# only in run, when debuging it does not block...
# blocks on set_mode for the second gpio
yield from pi.set_mode(LED_GPIO, apigpio.O... | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
yield from pi.set_mode(LED_GPIO, apigpio.OUTPUT)
while True:
yield from pi.write(LED_GPIO, 0)
yield from asyncio.sleep(1)
yield from pi.write(LED_GPIO, 1)
... | Remove wrong comments on samples. | Remove wrong comments on samples.
| Python | mit | PierreRust/apigpio | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
# running this in this order blocks :(
# only in run, when debuging it does not block...
# blocks on set_mode for the second gpio
yield from pi.set_mode(LED_GPIO, apigpio.O... | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
yield from pi.set_mode(LED_GPIO, apigpio.OUTPUT)
while True:
yield from pi.write(LED_GPIO, 0)
yield from asyncio.sleep(1)
yield from pi.write(LED_GPIO, 1)
... | <commit_before>import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
# running this in this order blocks :(
# only in run, when debuging it does not block...
# blocks on set_mode for the second gpio
yield from pi.set_mode(LED_... | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
yield from pi.set_mode(LED_GPIO, apigpio.OUTPUT)
while True:
yield from pi.write(LED_GPIO, 0)
yield from asyncio.sleep(1)
yield from pi.write(LED_GPIO, 1)
... | import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
# running this in this order blocks :(
# only in run, when debuging it does not block...
# blocks on set_mode for the second gpio
yield from pi.set_mode(LED_GPIO, apigpio.O... | <commit_before>import asyncio
import apigpio
LED_GPIO = 21
@asyncio.coroutine
def start_blink(pi, address):
yield from pi.connect(address)
# running this in this order blocks :(
# only in run, when debuging it does not block...
# blocks on set_mode for the second gpio
yield from pi.set_mode(LED_... |
8373afd33efc7594d378e819705fe38f6c1cca57 | src/nyc_trees/apps/core/templatetags/utils.py | src/nyc_trees/apps/core/templatetags/utils.py | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | Add warning message to tricky template tag | Add warning message to tricky template tag
| Python | agpl-3.0 | maurizi/nyc-trees,azavea/nyc-trees,maurizi/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,kdeloach/nyc-trees,maurizi/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,maurizi/nyc-trees,azavea/nyc-trees | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
""... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
"""Joins relative... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django import template
from django.conf import settings
register = template.Library()
_remove_slash_re = re.compile(r'/+')
def _urljoin(*args):
""... |
b25e28c4ee5b81436547ec1cde8d7f471352f08e | config/production-example.py | config/production-example.py | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ python -c 'import secrets; print(secrets.token_hex())'
#SECRET_KEY = ''
... | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ byceps generate-secret-key
#SECRET_KEY = ''
# TODO: Adjust `SQLALCHEMY_D... | Update note in config example on how to generate secret key | Update note in config example on how to generate secret key
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ python -c 'import secrets; print(secrets.token_hex())'
#SECRET_KEY = ''
... | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ byceps generate-secret-key
#SECRET_KEY = ''
# TODO: Adjust `SQLALCHEMY_D... | <commit_before># Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ python -c 'import secrets; print(secrets.token_hex())'
#SE... | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ byceps generate-secret-key
#SECRET_KEY = ''
# TODO: Adjust `SQLALCHEMY_D... | # Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ python -c 'import secrets; print(secrets.token_hex())'
#SECRET_KEY = ''
... | <commit_before># Exemplary production configuration
import os
# Enable this if you want a tool like Sentry
# handle exceptions rather than Flask.
PROPAGATE_EXCEPTIONS = False
# Set a custom secret key before running in production!
# To generate one:
# $ python -c 'import secrets; print(secrets.token_hex())'
#SE... |
ffde5305a2182e566384887d51e4fde90adc9908 | runtests.py | runtests.py | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
fai... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
tests = "tests" if len(sys.argv) == 1 else sys.argv[1]
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = ... | Make it possible to run individual tests. | Tests: Make it possible to run individual tests.
| Python | agpl-3.0 | etesync/journal-manager | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
fai... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
tests = "tests" if len(sys.argv) == 1 else sys.argv[1]
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = ... | <commit_before>#!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestR... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
tests = "tests" if len(sys.argv) == 1 else sys.argv[1]
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = ... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
fai... | <commit_before>#!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestR... |
d34837d2b059ac72d7db85aac2effee83e8cb41c | runtests.py | runtests.py | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasattr(obj, '__dict... | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import sys
if not hasattr(sys, 'pypy_version_info'):
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
... | Fix tox failed on PyPy | Fix tox failed on PyPy
| Python | mit | PyMySQL/Tornado-MySQL,aio-libs/aiomysql,lzedl/PyMySQL,methane/PyMySQL,boneyao/PyMySQL,pymysql/pymysql,pulsar314/Tornado-MySQL,yeyinzhu3211/PyMySQL,nju520/PyMySQL,eibanez/PyMySQL,jwjohns/PyMySQL,jheld/PyMySQL,modulexcite/PyMySQL,anson-tang/PyMySQL,wraziens/PyMySQL,xjzhou/PyMySQL,MartinThoma/PyMySQL,Geoion/Tornado-MySQL,... | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasattr(obj, '__dict... | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import sys
if not hasattr(sys, 'pypy_version_info'):
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
... | <commit_before>#!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasat... | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import sys
if not hasattr(sys, 'pypy_version_info'):
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
... | #!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasattr(obj, '__dict... | <commit_before>#!/usr/bin/env python
try:
import unittest2 as unittest
except ImportError:
import unittest
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasat... |
0362731366e9f3f1bc6d4ddb7a36ea863b46baed | tests/test_invites.py | tests/test_invites.py | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=10, max_uses=20).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 10
assert find_or_create_invite.get('maxUses') == 2... | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=7, max_uses=5).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 7
assert find_or_create_invite.get('maxUses') == 5
... | Change the test values for valid values. | Change the test values for valid values.
The API is only accepting the same values that are available on the client:
0, 1, 7, 15 or 30 days
0, 1, 5, 10, 25, 50 or 100 uses.
| Python | mit | jadolg/rocketchat_API | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=10, max_uses=20).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 10
assert find_or_create_invite.get('maxUses') == 2... | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=7, max_uses=5).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 7
assert find_or_create_invite.get('maxUses') == 5
... | <commit_before>def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=10, max_uses=20).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 10
assert find_or_create_invite.get(... | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=7, max_uses=5).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 7
assert find_or_create_invite.get('maxUses') == 5
... | def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=10, max_uses=20).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 10
assert find_or_create_invite.get('maxUses') == 2... | <commit_before>def test_find_or_create_invite(logged_rocket):
rid = 'GENERAL'
find_or_create_invite = logged_rocket.find_or_create_invite(rid=rid, days=10, max_uses=20).json()
assert find_or_create_invite.get('success')
assert find_or_create_invite.get('days') == 10
assert find_or_create_invite.get(... |
16b2de5a1c4965b1e3a2cb96c6ea3bd847e85c95 | hxl/commands/hxlvalidate.py | hxl/commands/hxlvalidate.py | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | Return result of validation from the command script. | Return result of validation from the command script.
| Python | unlicense | HXLStandard/libhxl-python,HXLStandard/libhxl-python | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | <commit_before>"""
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Doc... | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | """
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Documentation: htt... | <commit_before>"""
Command function to schema-validate a HXL dataset.
David Megginson
November 2014
Can use a whitelist of HXL tags, a blacklist, or both.
Usage:
import sys
from hxl.scripts.hxlvalidate import hxlvalidate
hxlvalidate(sys.stdin, sys.stdout, open('MySchema.csv', 'r'))
License: Public Domain
Doc... |
0aec3c1f935bf3faaa959f33025b0c40f9b3efc1 | tests/test_yamlmod.py | tests/test_yamlmod.py | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.YamlImportHook):
sys.meta_path.remove(hook)
break
... | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
try:
from imp import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.Yam... | Fix tests on python 3.3 | Fix tests on python 3.3
| Python | mit | sciyoshi/yamlmod | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.YamlImportHook):
sys.meta_path.remove(hook)
break
... | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
try:
from imp import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.Yam... | <commit_before>import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.YamlImportHook):
sys.meta_path.remove(... | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
try:
from imp import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.Yam... | import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.YamlImportHook):
sys.meta_path.remove(hook)
break
... | <commit_before>import os
import sys
from nose.tools import *
try:
from importlib import reload
except ImportError:
pass
def setup_yamlmod():
import yamlmod
reload(yamlmod)
def teardown_yamlmod():
import yamlmod
for hook in sys.meta_path:
if isinstance(hook, yamlmod.YamlImportHook):
sys.meta_path.remove(... |
08542b47b127d6bcf128bdedb5f25956f909784e | website_snippet_anchor/__openerp__.py | website_snippet_anchor/__openerp__.py | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | Remove unused keys from manifest. | Remove unused keys from manifest.
| Python | agpl-3.0 | pedrobaeza/website,brain-tec/website,LasLabs/website,gfcapalbo/website,gfcapalbo/website,acsone/website,LasLabs/website,LasLabs/website,open-synergy/website,pedrobaeza/website,brain-tec/website,pedrobaeza/website,nuobit/website,nuobit/website,nuobit/website,gfcapalbo/website,Endika/website,pedrobaeza/website,Yajo/websi... | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | <commit_before># -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"web... | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | # -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"website": "http://... | <commit_before># -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Set Snippet's Anchor",
"summary": "Allow to reach a concrete section in the page",
"version": "8.0.1.0.0",
"category": "Website",
"web... |
bf13d9ed90a7cfed405d4910fd6a70e1813849df | python/servo/packages.py | python/servo/packages.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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | # 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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "8.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | Upgrade to LLVM 8 on Windows. | Upgrade to LLVM 8 on Windows.
| Python | mpl-2.0 | paulrouget/servo,paulrouget/servo,larsbergstrom/servo,nnethercote/servo,nnethercote/servo,larsbergstrom/servo,splav/servo,larsbergstrom/servo,saneyuki/servo,notriddle/servo,DominoTree/servo,paulrouget/servo,saneyuki/servo,notriddle/servo,saneyuki/servo,KiChjang/servo,paulrouget/servo,splav/servo,DominoTree/servo,saneyu... | # 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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | # 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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "8.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | <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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1"... | # 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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "8.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | # 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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | <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 https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1"... |
3f4f3aa23cd7e29f34f10ae3d03a2faf0b086167 | randommap/config.py | randommap/config.py | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | Increase timeout to 2 minutes | Increase timeout to 2 minutes
| Python | mit | oliver-newman/randommap-website | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | <commit_before>"""
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionC... | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | """
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionConfig(BaseConfi... | <commit_before>"""
Configuration variables for different environments.
"""
import os
from . import application
class BaseConfig(object):
DEBUG = False
REDIS_URL = os.environ["REDIS_URL"]
PORT = int(os.environ["PORT"])
ZOOM = 9
MAP_TTL = 60 # seconds
RETINA_IMAGES = True
class ProductionC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.