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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d86cfb740f4119049a7ac293037f9cba12a3516b | sqliteschema/_const.py | sqliteschema/_const.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = [
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
]
SQLITE... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = (
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
)
SQLITE... | Change a constant type from list to tuple | Change a constant type from list to tuple
| Python | mit | thombashi/sqliteschema | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = [
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
]
SQLITE... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = (
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
)
SQLITE... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = [
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_st... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = (
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
)
SQLITE... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = [
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_stat4",
]
SQLITE... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
MAX_VERBOSITY_LEVEL = 100
# https://www.sqlite.org/fileformat2.html
SQLITE_SYSTEM_TABLES = [
"sqlite_master",
"sqlite_sequence",
"sqlite_stat1",
"sqlite_stat2",
"sqlite_stat3",
"sqlite_st... |
eac54b3080c37d2530077f23b0c022ed818ca9a4 | util/fixedpoint-qtcreator.py | util/fixedpoint-qtcreator.py | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
d.putValue(sum(exp) * 2**-value["fractiona... | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
if raw[-1] >= 2**(ss-1):
exp += [ ... | Support negative numbers in qtcreator debugging | Support negative numbers in qtcreator debugging
| Python | mit | Cat-Ion/FixedPoint,Cat-Ion/FixedPoint | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
d.putValue(sum(exp) * 2**-value["fractiona... | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
if raw[-1] >= 2**(ss-1):
exp += [ ... | <commit_before>from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
d.putValue(sum(exp) * 2**-v... | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
if raw[-1] >= 2**(ss-1):
exp += [ ... | from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
d.putValue(sum(exp) * 2**-value["fractiona... | <commit_before>from dumper import *
def qdump__FixedPoint(d, value):
d.putNumChild(3)
raw = [ value["v"]["s"][i].integer() for i in range( value["v"]["numWords"].integer() ) ]
ss = value["v"]["storageSize"].integer()
exp = [raw[i] * 2**(i * ss) for i in range(len(raw)) ]
d.putValue(sum(exp) * 2**-v... |
218b0f9a42c8d3421f80a3b2b77c9f7f3334722d | test_publisher.py | test_publisher.py | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file():
print publisher.md_to_html(publisher.from_file(test_md_filename))
def ... | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_sender = "cpg@yakko.cs.wmich.edu"
test_recipient = "cpgillem@gmail.com"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file()... | Add test case for HTML email messages. | Add test case for HTML email messages.
| Python | mit | cpgillem/markdown_publisher,cpgillem/markdown_publisher | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file():
print publisher.md_to_html(publisher.from_file(test_md_filename))
def ... | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_sender = "cpg@yakko.cs.wmich.edu"
test_recipient = "cpgillem@gmail.com"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file()... | <commit_before>import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file():
print publisher.md_to_html(publisher.from_file(test_md_f... | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_sender = "cpg@yakko.cs.wmich.edu"
test_recipient = "cpgillem@gmail.com"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file()... | import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file():
print publisher.md_to_html(publisher.from_file(test_md_filename))
def ... | <commit_before>import publisher
test_pdf_filename = "test/test.pdf"
test_css_filename = "test/test.css"
test_md_filename = "test/test.md"
test_html_filename = "test/test.html"
test_md = "# Test heading\n\n- test item 1\n- test item 2"
def from_html_file():
print publisher.md_to_html(publisher.from_file(test_md_f... |
348c28bacececb787ab73c9716dc515d0fabbe4b | armstrong/hatband/widgets/visualsearch.py | armstrong/hatband/widgets/visualsearch.py | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | Clean up this code a bit (no functional change) | Clean up this code a bit (no functional change)
| Python | apache-2.0 | armstrong/armstrong.hatband,texastribune/armstrong.hatband,armstrong/armstrong.hatband,armstrong/armstrong.hatband,texastribune/armstrong.hatband,texastribune/armstrong.hatband | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | <commit_before>from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url... | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url("visualsearch/... | <commit_before>from django.forms import Widget
from django.template.loader import render_to_string
from ..utils import static_url
class GenericKeyWidget(Widget):
template = "admin/hatband/widgets/generickey.html"
class Media:
js = (static_url("visualsearch/dependencies.js"),
static_url... |
6b5c32960565775d8b94825087c503e58f5eed27 | openslides/users/migrations/0003_group.py | openslides/users/migrations/0003_group.py | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0008_alter_u... | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
def create_openslides_groups(apps, schema_editor):
"""
Creates the users.models.Gro... | Fix the migration of the groups. | Fix the migration of the groups.
Fixes #2915
| Python | mit | tsiegleauq/OpenSlides,normanjaeckel/OpenSlides,normanjaeckel/OpenSlides,ostcar/OpenSlides,emanuelschuetze/OpenSlides,boehlke/OpenSlides,ostcar/OpenSlides,tsiegleauq/OpenSlides,CatoTH/OpenSlides,emanuelschuetze/OpenSlides,FinnStutzenstein/OpenSlides,OpenSlides/OpenSlides,normanjaeckel/OpenSlides,boehlke/OpenSlides,jwinz... | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0008_alter_u... | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
def create_openslides_groups(apps, schema_editor):
"""
Creates the users.models.Gro... | <commit_before># Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
('auth'... | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
def create_openslides_groups(apps, schema_editor):
"""
Creates the users.models.Gro... | # Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0008_alter_u... | <commit_before># Generated by Django 1.10.5 on 2017-01-11 21:45
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
import openslides.users.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
('auth'... |
8d7f3320a9d3fd3b7365cad7631835a0a46f374e | planner/signals.py | planner/signals.py | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
s... | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
step = kwargs['instance']
if kwargs['action'] == 'post_add':
if step.passengers.count() >= step.... | Make is_joinable automatic based of passenger number | Make is_joinable automatic based of passenger number
| Python | mit | livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
s... | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
step = kwargs['instance']
if kwargs['action'] == 'post_add':
if step.passengers.count() >= step.... | <commit_before>from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, *... | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
step = kwargs['instance']
if kwargs['action'] == 'post_add':
if step.passengers.count() >= step.... | from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, **kwargs):
s... | <commit_before>from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from .models import Step
@receiver(m2m_changed, sender=Step.passengers.through)
def check_passengers(sender, *... |
2247162e277f8d09cc951442673d71cd0a8ece65 | active_link/templatetags/active_link_tags.py | active_link/templatetags/active_link_tags.py | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | Add ability to reverse views with args and kwargs | Add ability to reverse views with args and kwargs | Python | bsd-3-clause | valerymelou/django-active-link | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | <commit_before>from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(... | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(takes_context=T... | <commit_before>from django import VERSION as DJANGO_VERSION
from django import template
from django.conf import settings
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] <= 9:
from django.core.urlresolvers import reverse
else:
from django.urls import reverse
register = template.Library()
@register.simple_tag(... |
ba00bececdcca3d1f224128123f12a9f634798b8 | feedhq/feeds/management/commands/updatefeeds.py | feedhq/feeds/management/commands/updatefeeds.py | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | Set RQ timeout when enqueuing | Set RQ timeout when enqueuing
| Python | bsd-3-clause | vincentbernat/feedhq,feedhq/feedhq,vincentbernat/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq,rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,rmoorman/feedhq,rmoorman/feedhq,vincentbernat/feedhq,feedhq/feedhq,vincentbernat/feedhq,rmoorman/feedhq | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | <commit_before>import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = ... | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = logging.getLogg... | <commit_before>import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connection
from raven import Client
from ....tasks import enqueue
from ...models import UniqueFeed, Feed
from ...tasks import update_feed
from ...utils import FeedUpdater
logger = ... |
1bad824786204353ff4f5b955ae687f088f80837 | employees/tests.py | employees/tests.py | from django.test import TestCase
# Create your tests here.
| from .models import Employee
from .serializers import EmployeeSerializer, EmployeeAvatarSerializer, EmployeeListSerializer
from categories.serializers import CategorySerializer
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator
from rest_framework import status
from rest_framework.... | Add draft testcases for employees views | Add draft testcases for employees views
| Python | apache-2.0 | belatrix/BackendAllStars | from django.test import TestCase
# Create your tests here.
Add draft testcases for employees views | from .models import Employee
from .serializers import EmployeeSerializer, EmployeeAvatarSerializer, EmployeeListSerializer
from categories.serializers import CategorySerializer
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator
from rest_framework import status
from rest_framework.... | <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add draft testcases for employees views<commit_after> | from .models import Employee
from .serializers import EmployeeSerializer, EmployeeAvatarSerializer, EmployeeListSerializer
from categories.serializers import CategorySerializer
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator
from rest_framework import status
from rest_framework.... | from django.test import TestCase
# Create your tests here.
Add draft testcases for employees viewsfrom .models import Employee
from .serializers import EmployeeSerializer, EmployeeAvatarSerializer, EmployeeListSerializer
from categories.serializers import CategorySerializer
from django.core.urlresolvers import reverse... | <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add draft testcases for employees views<commit_after>from .models import Employee
from .serializers import EmployeeSerializer, EmployeeAvatarSerializer, EmployeeListSerializer
from categories.serializers import CategorySerializer
fro... |
eac90ef4d470923bb823f99dc85984faac733f08 | pysuru/services.py | pysuru/services.py | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
'teamOwner',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceI... | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceInstance, ObjectMi... | Remove (currently) unused service instance field | Remove (currently) unused service instance field
| Python | mit | rcmachado/pysuru | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
'teamOwner',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceI... | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceInstance, ObjectMi... | <commit_before># coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
'teamOwner',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceIns... | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceInstance, ObjectMi... | # coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
'teamOwner',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceInstance(_ServiceI... | <commit_before># coding: utf-8
import json
from collections import namedtuple
from pysuru.base import BaseAPI, ObjectMixin
SERVICE_INSTANCE_ATTRS = (
'name',
'description',
'type',
'plan',
'teamOwner',
)
_ServiceInstance = namedtuple('ServiceInstance', SERVICE_INSTANCE_ATTRS)
class ServiceIns... |
1a320cadb37de27964f5973e2860804df3a5e479 | agir/authentication/tasks.py | agir/authentication/tasks.py | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | Send correct expiration timing in login email | Send correct expiration timing in login email
| Python | agpl-3.0 | lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | <commit_before>from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code... | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code, expiry_time):... | <commit_before>from celery import shared_task
from django.conf import settings
from django.utils import timezone
from agir.people.actions.mailing import send_mosaico_email
def interleave_spaces(s, n=3):
return ' '.join([s[i:i+n] for i in range(0, len(s), n)])
@shared_task
def send_login_email(email, short_code... |
487897e4b515a4c514fa0c91dec80d981c3bb98b | tools/telemetry/telemetry/core/profile_types.py | tools/telemetry/telemetry/core/profile_types.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | Use correct profile for power_user. | [Telemetry] Use correct profile for power_user.
TEST=None
BUG=None
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/12775015
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@188294 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,dednal/chromium.src,chuan9/chromium-crosswalk,timo... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/tes... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/test/data/extensio... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
PROFILE_TYPE_MAPPING = {
'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
'power_user': 'chrome/tes... |
761e74feac34c198da75f17b6145b6ca37d7afed | tests/__init__.py | tests/__init__.py | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | Fix test case being unable to fail | Fix test case being unable to fail
| Python | mit | FichteFoll/resumeback | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | <commit_before>import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.s... | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.sleep(sleep)
... | <commit_before>import threading
import time
DEFAULT_SLEEP = 0.01
class CustomError(Exception):
pass
def defer(callback, *args, **kwargs):
sleep = kwargs.pop('sleep', DEFAULT_SLEEP)
expected_return = kwargs.pop('expected_return', None)
call = kwargs.pop('call', True)
def func():
time.s... |
4a549a5d7509fa23fc6787662b4950291baa3407 | tests/conftest.py | tests/conftest.py | import tempfile
import pytest
from coaction import create_app
from coaction.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "sqlite:///" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED = False
DEBU... | import tempfile
import pytest
from toolshed import create_app
from toolshed.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "postgres://localhost/" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED =... | Correct imports, switch to postgresql | Correct imports, switch to postgresql
| Python | mit | PythonClutch/python-clutch,PythonClutch/python-clutch,PythonClutch/python-clutch | import tempfile
import pytest
from coaction import create_app
from coaction.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "sqlite:///" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED = False
DEBU... | import tempfile
import pytest
from toolshed import create_app
from toolshed.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "postgres://localhost/" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED =... | <commit_before>import tempfile
import pytest
from coaction import create_app
from coaction.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "sqlite:///" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABL... | import tempfile
import pytest
from toolshed import create_app
from toolshed.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "postgres://localhost/" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED =... | import tempfile
import pytest
from coaction import create_app
from coaction.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "sqlite:///" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED = False
DEBU... | <commit_before>import tempfile
import pytest
from coaction import create_app
from coaction.extensions import db as _db
dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()
TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "sqlite:///" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABL... |
d14a34bff8e0462ebc2b8da9bc021f9c6f8f432d | libclang_samples/kernel-sigs.py | libclang_samples/kernel-sigs.py | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | Use walk_preorder instead of manual visiting | Use walk_preorder instead of manual visiting
| Python | unlicense | eliben/llvm-clang-samples,eliben/llvm-clang-samples,eliben/llvm-clang-samples,eliben/llvm-clang-samples,eliben/llvm-clang-samples,eliben/llvm-clang-samples | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | <commit_before>import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c i... | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c in children):
... | <commit_before>import pprint
import sys
import clang.cindex
from clang.cindex import CursorKind
def handle_function_decl(fdecl_cursor):
children = list(fdecl_cursor.get_children())
# Only interested in functions that have a CUDAGLOBAL_ATTR attached.
if not any(c.kind == CursorKind.CUDAGLOBAL_ATTR for c i... |
dda9904a756e309047bebcbfecd2120383a257cc | django_countries/settings.py | django_countries/settings.py | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
prefix = '%s/' ... | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or \
getattr(settings, 'STATICFILES_URL', '') or \
settings.M... | Add django 1.3 staticfiles compatibility | Add django 1.3 staticfiles compatibility
| Python | mit | degenhard/django-countries | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
prefix = '%s/' ... | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or \
getattr(settings, 'STATICFILES_URL', '') or \
settings.M... | <commit_before>from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
... | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or \
getattr(settings, 'STATICFILES_URL', '') or \
settings.M... | from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
prefix = '%s/' ... | <commit_before>from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
... |
4b65ab0fbc5839be9a49dd235549a13996a56108 | tests/tabular_output/test_tabulate_adapter.py | tests/tabular_output/test_tabulate_adapter.py | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | Fix tabulate adapter test with numparse on. | Fix tabulate adapter test with numparse on.
| Python | bsd-3-clause | dbcli/cli_helpers,dbcli/cli_helpers | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | <commit_before># -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc... | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | # -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc', 1], ['d', 45... | <commit_before># -*- coding: utf-8 -*-
"""Test the tabulate output adapter."""
from __future__ import unicode_literals
from textwrap import dedent
from cli_helpers.tabular_output import tabulate_adapter
def test_tabulate_wrapper():
"""Test the *output_formatter.tabulate_wrapper()* function."""
data = [['abc... |
d67099ce7d30e31b98251f7386b33caaa5199a01 | censusreporter/config/prod/wsgi.py | censusreporter/config/prod/wsgi.py | import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
| import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
| Correct location of newrelic config | Correct location of newrelic config
| Python | mit | sseguku/simplecensusug,Code4SA/censusreporter,Code4SA/censusreporter,Code4SA/censusreporter,sseguku/simplecensusug,4bic/censusreporter,sseguku/simplecensusug,4bic/censusreporter,Code4SA/censusreporter,4bic/censusreporter | import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
Correct location of newrelic config | import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
| <commit_before>import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
<commit_msg>Correct location of newr... | import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
| import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
Correct location of newrelic configimport os
from d... | <commit_before>import os
from django.core.wsgi import get_wsgi_application
import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
<commit_msg>Correct location of newr... |
f69e6555387d4cb6828baaac3ce1a17217577b48 | faddsdata/format_definitions/__init__.py | faddsdata/format_definitions/__init__.py | from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from arb import ARB_RECORDS
from awos import AWOS_RECORDS
| from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from awos import AWOS_RECORDS
| Remove import for lib not commited yet. | Remove import for lib not commited yet.
| Python | bsd-3-clause | adamfast/faddsdata | from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from arb import ARB_RECORDS
from awos import AWOS_RECORDS
Remove import for lib not commited yet. | from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from awos import AWOS_RECORDS
| <commit_before>from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from arb import ARB_RECORDS
from awos import AWOS_RECORDS
<commit_msg>Remove import for lib not commited yet.<commit_after> | from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from awos import AWOS_RECORDS
| from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from arb import ARB_RECORDS
from awos import AWOS_RECORDS
Remove import for lib not commited yet.from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from awos import AWOS_RECORDS
| <commit_before>from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from arb import ARB_RECORDS
from awos import AWOS_RECORDS
<commit_msg>Remove import for lib not commited yet.<commit_after>from apt import APT_RECORDS, ATT_RECORDS, RWY_RECORDS, RMK_RECORDS, APT_RECORD_MAP
from awos import... |
76177710323f1ccb408fd006ef7b87ff36743f8c | telostats/settings/heroku.py | telostats/settings/heroku.py | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | Fix wrong Redis DB setting | Fix wrong Redis DB setting
| Python | bsd-3-clause | idan/telostats,idan/telostats,idan/telostats | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | <commit_before>from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'defa... | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'default': {
... | <commit_before>from __future__ import absolute_import
import dj_database_url
import urlparse
from os import environ
from .base import *
ENV = 'HEROKU'
# Store files on S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
redis_url = urlparse.urlparse(environ.get('REDISTOGO_URL'))
CACHES = {
'defa... |
5550217c028c422e7dc2d54c3b8b61ea43cfc26f | dosagelib/__pyinstaller/hook-dosagelib.py | dosagelib/__pyinstaller/hook-dosagelib.py | # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2020 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage')
| # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2022 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage') + collect_data_files('dosagelib')
| Make sure data files are included | PyInstaller: Make sure data files are included
| Python | mit | webcomics/dosage,webcomics/dosage | # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2020 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage')
PyInstaller: Make sure data files are included | # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2022 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage') + collect_data_files('dosagelib')
| <commit_before># SPDX-License-Identifier: MIT
# Copyright (C) 2016-2020 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage')
<commit_msg>PyInstaller: Make sure data files are included<commit_aft... | # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2022 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage') + collect_data_files('dosagelib')
| # SPDX-License-Identifier: MIT
# Copyright (C) 2016-2020 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage')
PyInstaller: Make sure data files are included# SPDX-License-Identifier: MIT
# Copyr... | <commit_before># SPDX-License-Identifier: MIT
# Copyright (C) 2016-2020 Tobias Gruetzmacher
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
hiddenimports = collect_submodules('dosagelib.plugins')
datas = copy_metadata('dosage')
<commit_msg>PyInstaller: Make sure data files are included<commit_aft... |
76af6248c479127f1a212c331a2278f69484bcbc | project/api/management/commands/rebuild_data.py | project/api/management/commands/rebuild_data.py | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int,... | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int... | Disable group rebuild until fix indexing | Disable group rebuild until fix indexing
| Python | bsd-2-clause | dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore,barberscore/barberscore-api | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int,... | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int... | <commit_before># Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
... | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int... | # Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
type=int,... | <commit_before># Django
from django.apps import apps
from django.core.management.base import BaseCommand
from django.utils import timezone
import datetime
class Command(BaseCommand):
help = "Command to rebuild denorms."
def add_arguments(self, parser):
parser.add_argument(
'--days',
... |
84490442de881788a7f83bc18ec4eedb7f6edb99 | tests/bugs/test-200908231005.py | tests/bugs/test-200908231005.py | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | Stop writing generated code unnecessarily | Stop writing generated code unnecessarily
| Python | apache-2.0 | jonfoster/pyxb-upstream-mirror,pabigot/pyxb,pabigot/pyxb,jonfoster/pyxb2,balanced/PyXB,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,jonfoster/pyxb2,CantemoInternal/pyxb,balanced/PyXB,balanced/PyXB,jonfoster/pyxb2,CantemoInternal/pyxb,jonfoster/pyxb1,CantemoInternal/pyxb | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | <commit_before>import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute ... | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute processContents... | <commit_before>import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="structure">
<xs:complexType><xs:anyAttribute ... |
ae1a2b73d0c571c49726528f9b8730c9e02ce35f | tests/integration/test_webui.py | tests/integration/test_webui.py | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('http://nginx' + page)
pages = [
{
'page': '/',
'matching_text': 'Diamond',
},
{
'page': '/scoreboard',
},
{
'pa... | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('https://nginx/{0}'.format(page), verify=False)
pages = [
{
'page': '',
'matching_text': 'Diamond',
},
{
'page': 'scoreboard',
},
... | Fix webui integration tests to use https | Fix webui integration tests to use https
| Python | mit | pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('http://nginx' + page)
pages = [
{
'page': '/',
'matching_text': 'Diamond',
},
{
'page': '/scoreboard',
},
{
'pa... | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('https://nginx/{0}'.format(page), verify=False)
pages = [
{
'page': '',
'matching_text': 'Diamond',
},
{
'page': 'scoreboard',
},
... | <commit_before>import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('http://nginx' + page)
pages = [
{
'page': '/',
'matching_text': 'Diamond',
},
{
'page': '/scoreboard',
},
{
... | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('https://nginx/{0}'.format(page), verify=False)
pages = [
{
'page': '',
'matching_text': 'Diamond',
},
{
'page': 'scoreboard',
},
... | import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('http://nginx' + page)
pages = [
{
'page': '/',
'matching_text': 'Diamond',
},
{
'page': '/scoreboard',
},
{
'pa... | <commit_before>import requests
import pytest
class TestWebUI(object):
def get_page(self, page):
return requests.get('http://nginx' + page)
pages = [
{
'page': '/',
'matching_text': 'Diamond',
},
{
'page': '/scoreboard',
},
{
... |
afb8aadcc1dbea109c7882c1a1d65fc328372a74 | resources/Dependencies/DecoraterBotCore/Core.py | resources/Dependencies/DecoraterBotCore/Core.py | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BaseClient, config
__all__ = ['main', 'BotClient']
class BotClient(BaseClient):
"""
Bot Main client Class.
... | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BotClient, config
__all__ = ['main']
def main():
"""
EntryPoint to DecoraterBot.
"""
BotClient(comman... | Update to use new client class name on the DecoraterBotUtils.utils module. | Update to use new client class name on the DecoraterBotUtils.utils module.
| Python | mit | DecoraterBot-devs/DecoraterBot | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BaseClient, config
__all__ = ['main', 'BotClient']
class BotClient(BaseClient):
"""
Bot Main client Class.
... | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BotClient, config
__all__ = ['main']
def main():
"""
EntryPoint to DecoraterBot.
"""
BotClient(comman... | <commit_before># coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BaseClient, config
__all__ = ['main', 'BotClient']
class BotClient(BaseClient):
"""
Bot Main c... | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BotClient, config
__all__ = ['main']
def main():
"""
EntryPoint to DecoraterBot.
"""
BotClient(comman... | # coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BaseClient, config
__all__ = ['main', 'BotClient']
class BotClient(BaseClient):
"""
Bot Main client Class.
... | <commit_before># coding=utf-8
"""
DecoraterBotCore
~~~~~~~~~~~~~~~~~~~
Core to DecoraterBot
:copyright: (c) 2015-2018 AraHaan
:license: MIT, see LICENSE for more details.
"""
from DecoraterBotUtils.utils import BaseClient, config
__all__ = ['main', 'BotClient']
class BotClient(BaseClient):
"""
Bot Main c... |
f862823b24bfe59f6fb15fc417aea8ebacdc092d | autoresponse/__init__.py | autoresponse/__init__.py | import twisted.python.failure
import twisted.web.error
import scrapy.item
class Autoresponder(object):
# The purpose of Autoresponder is to be initialized during a run
# of a test case and used to iterate over scrapy Request objects
# until finally there are no more Requests to execute.
#
# Instea... | Add an implementation that works for testing errbacks | Add an implementation that works for testing errbacks
| Python | apache-2.0 | paulproteus/autoresponse | Add an implementation that works for testing errbacks | import twisted.python.failure
import twisted.web.error
import scrapy.item
class Autoresponder(object):
# The purpose of Autoresponder is to be initialized during a run
# of a test case and used to iterate over scrapy Request objects
# until finally there are no more Requests to execute.
#
# Instea... | <commit_before><commit_msg>Add an implementation that works for testing errbacks<commit_after> | import twisted.python.failure
import twisted.web.error
import scrapy.item
class Autoresponder(object):
# The purpose of Autoresponder is to be initialized during a run
# of a test case and used to iterate over scrapy Request objects
# until finally there are no more Requests to execute.
#
# Instea... | Add an implementation that works for testing errbacksimport twisted.python.failure
import twisted.web.error
import scrapy.item
class Autoresponder(object):
# The purpose of Autoresponder is to be initialized during a run
# of a test case and used to iterate over scrapy Request objects
# until finally ther... | <commit_before><commit_msg>Add an implementation that works for testing errbacks<commit_after>import twisted.python.failure
import twisted.web.error
import scrapy.item
class Autoresponder(object):
# The purpose of Autoresponder is to be initialized during a run
# of a test case and used to iterate over scrapy... | |
ca6508bf6e8a1fd2032baaacb81e9131c088c6f8 | UCP/news_event/serializers.py | UCP/news_event/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | Add venue to event serializer | Add venue to event serializer
| Python | bsd-3-clause | BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
... | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
class ... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from login.models import UserProfile
from discussion.serializers import UserShortSerializer, UserProfileShortSerializer
from news_event.models import Event, News
class EventSerializer(serializers.ModelSerializer):
... |
77b943b8bace86d82f76dfa159c5de48d9379dbb | svenv/blog/settings.py | svenv/blog/settings.py | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'http://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST_... | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'https://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST... | Set base url to https | Set base url to https
| Python | mit | svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app,svenvandescheur/svenv.nl-app | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'http://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST_... | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'https://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST... | <commit_before>BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'http://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'lo... | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'https://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST... | BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'http://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'localhost'
REST_... | <commit_before>BLOG_TITLE = 'Svenv.nl'
BLOG_DESCRIPTION = 'Blogposts about tech related subject like Unix, Linux, Docker and programming.'
BASE_URL = 'http://svenv.nl'
CONTACT_PAGE_PATH = 'contact'
CONTACT_THANK_YOU_PAGE = '/thankyou'
EMAIL = 'svenvandescheur@gmail.com'
EMAIL_FROM = 'noreply@svenv.nl'
SMTP_HOST = 'lo... |
958426d43a5aa8e153e0999417377b54be67f04b | ctypeslib/experimental/byref_at.py | ctypeslib/experimental/byref_at.py | # hack a byref_at function
from ctypes import *
try:
set
except NameError:
from sets import Set as set
def _determine_layout():
result = set()
for obj in (c_int(), c_longlong(), c_float(), c_double(), (c_int * 32)()):
ref = byref(obj)
result.add((c_void_p * 32).from_address(id(ref))[:... | from ctypes import *
"""
struct tagPyCArgObject {
PyObject_HEAD
ffi_type *pffi_type;
char tag;
union {
char c;
char b;
short h;
int i;
long l;
#ifdef HAVE_LONG_LONG
PY_LONG_LONG q;
#endif
double d;
float f;
void *p;
} value;
PyObject *obj;
int size; /* for the 'V' tag */
};
"""
class value(Un... | Define the structure of PyCArgObject in ctypes. | Define the structure of PyCArgObject in ctypes.
git-svn-id: ac2c3632cb6543e7ab5fafd132c7fe15057a1882@52772 6015fed2-1504-0410-9fe1-9d1591cc4771
| Python | mit | trolldbois/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib | # hack a byref_at function
from ctypes import *
try:
set
except NameError:
from sets import Set as set
def _determine_layout():
result = set()
for obj in (c_int(), c_longlong(), c_float(), c_double(), (c_int * 32)()):
ref = byref(obj)
result.add((c_void_p * 32).from_address(id(ref))[:... | from ctypes import *
"""
struct tagPyCArgObject {
PyObject_HEAD
ffi_type *pffi_type;
char tag;
union {
char c;
char b;
short h;
int i;
long l;
#ifdef HAVE_LONG_LONG
PY_LONG_LONG q;
#endif
double d;
float f;
void *p;
} value;
PyObject *obj;
int size; /* for the 'V' tag */
};
"""
class value(Un... | <commit_before># hack a byref_at function
from ctypes import *
try:
set
except NameError:
from sets import Set as set
def _determine_layout():
result = set()
for obj in (c_int(), c_longlong(), c_float(), c_double(), (c_int * 32)()):
ref = byref(obj)
result.add((c_void_p * 32).from_add... | from ctypes import *
"""
struct tagPyCArgObject {
PyObject_HEAD
ffi_type *pffi_type;
char tag;
union {
char c;
char b;
short h;
int i;
long l;
#ifdef HAVE_LONG_LONG
PY_LONG_LONG q;
#endif
double d;
float f;
void *p;
} value;
PyObject *obj;
int size; /* for the 'V' tag */
};
"""
class value(Un... | # hack a byref_at function
from ctypes import *
try:
set
except NameError:
from sets import Set as set
def _determine_layout():
result = set()
for obj in (c_int(), c_longlong(), c_float(), c_double(), (c_int * 32)()):
ref = byref(obj)
result.add((c_void_p * 32).from_address(id(ref))[:... | <commit_before># hack a byref_at function
from ctypes import *
try:
set
except NameError:
from sets import Set as set
def _determine_layout():
result = set()
for obj in (c_int(), c_longlong(), c_float(), c_double(), (c_int * 32)()):
ref = byref(obj)
result.add((c_void_p * 32).from_add... |
93650f0ae762949affcee4bfcf4a94093fe651d5 | neuralmonkey/runners/perplexity_runner.py | neuralmonkey/runners/perplexity_runner.py | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | Revert "small fix in perplexity runner" | Revert "small fix in perplexity runner"
This reverts commit b195416761f12df496baa389df4686b2cf60c675.
| Python | bsd-3-clause | ufal/neuralmonkey,ufal/neuralmonkey,ufal/neuralmonkey,ufal/neuralmonkey,ufal/neuralmonkey | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | <commit_before>from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class Perplexit... | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class PerplexityRunner(BaseRun... | <commit_before>from typing import Dict, List
from typeguard import check_argument_types
import tensorflow as tf
import numpy as np
from neuralmonkey.decoders.autoregressive import AutoregressiveDecoder
from neuralmonkey.decorators import tensor
from neuralmonkey.runners.base_runner import BaseRunner
class Perplexit... |
db537ab80444b9e4cc22f332577c2cba640fca0a | tasks/factory_utils.py | tasks/factory_utils.py | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | Make it easy to get a single item. | Make it easy to get a single item.
| Python | bsd-3-clause | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | <commit_before>from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you w... | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you want.
class Adde... | <commit_before>from factory import enums
from collections import namedtuple
import gc
# Factoryboy uses "__" and Salesforce uses "__". Luckily Factoryboy makes
# theirs easy to override!
enums.SPLITTER = "____"
# More flexible than FactoryBoy's sequences because you can create and
# destroy them where-ever you w... |
180062c4d1159185ab113e98f41bb219d52086e8 | test.py | test.py | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color:
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
class Tile... | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color(object):
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
cl... | Fix base class for python 2.x | Fix base class for python 2.x
| Python | mit | numberoverzero/origami | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color:
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
class Tile... | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color(object):
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
cl... | <commit_before>from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color:
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserial... | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color(object):
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
cl... | from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color:
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserialized
class Tile... | <commit_before>from pyserializable import serialize, deserialize, autoserialized
from pyserializable.util import repr_func
@autoserialized
class Color:
serial_format = 'r=uint:8, g=uint:8, b=uint:8, a=uint:8'
serial_attr_converters = {'r': [int, str]}
__repr__ = repr_func('r', 'g', 'b', 'a')
@autoserial... |
42f67bdbf94a1a186518788f9685786b5c767eec | performance/web.py | performance/web.py | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | Update Request, only return response time | Update Request, only return response time
Request: remove status_code and get_response_time() and only return the
response time on do() function
| Python | mit | BakeCode/performance-testing,BakeCode/performance-testing | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | <commit_before>import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET,... | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET, data=None):
... | <commit_before>import requests
from time import time
class Client:
def __init__(self, host, requests, do_requests_counter):
self.host = host
self.requests = requests
self.counter = do_requests_counter
class Request:
GET = 'get'
POST = 'post'
def __init__(self, url, type=GET,... |
24fa27e05e0ed58e955ed6365de101b2e9653a7b | cli.py | cli.py | #!/usr/bin/env python
import sys,os
from copy import deepcopy
from scrabble import make_board,top_moves,read_dictionary
def show_board(board,play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x.lower()
show_board(b)
if _... | #!/usr/bin/env python
import os
from copy import deepcopy
from optparse import OptionParser
from scrabble import make_board,top_moves,read_dictionary
def show_board(board, play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x... | Use optparse instead of hand-rolled options | Use optparse instead of hand-rolled options
| Python | mit | perimosocordiae/wwf,perimosocordiae/wwf | #!/usr/bin/env python
import sys,os
from copy import deepcopy
from scrabble import make_board,top_moves,read_dictionary
def show_board(board,play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x.lower()
show_board(b)
if _... | #!/usr/bin/env python
import os
from copy import deepcopy
from optparse import OptionParser
from scrabble import make_board,top_moves,read_dictionary
def show_board(board, play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x... | <commit_before>#!/usr/bin/env python
import sys,os
from copy import deepcopy
from scrabble import make_board,top_moves,read_dictionary
def show_board(board,play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x.lower()
show... | #!/usr/bin/env python
import os
from copy import deepcopy
from optparse import OptionParser
from scrabble import make_board,top_moves,read_dictionary
def show_board(board, play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x... | #!/usr/bin/env python
import sys,os
from copy import deepcopy
from scrabble import make_board,top_moves,read_dictionary
def show_board(board,play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x.lower()
show_board(b)
if _... | <commit_before>#!/usr/bin/env python
import sys,os
from copy import deepcopy
from scrabble import make_board,top_moves,read_dictionary
def show_board(board,play=None):
if not play:
for row in board:
print ''.join(row)
else:
b = deepcopy(board)
for x,r,c in play:
b[r][c] = x.lower()
show... |
1bd540f43c25dec125085acee7bbe0904363c204 | test.py | test.py | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | Test if rotor encodes with different setting properly | Test if rotor encodes with different setting properly
| Python | mit | ranisalt/enigma | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | <commit_before>import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_e... | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_encoding(self):
... | <commit_before>import unittest
from enigma import Enigma, Steckerbrett, Umkehrwalze, Walzen
class RotorTestCase(unittest.TestCase):
def test_rotor_encoding(self):
rotor = Walzen(wiring='EKMFLGDQVZNTOWYHXUSPAIBRCJ', notch='Q')
self.assertEqual('E', rotor.encode('A'))
def test_rotor_reverse_e... |
0b2d523665f3989d9375cd83970400ace0e40336 | sites/docs/conf.py | sites/docs/conf.py | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | Connect to Python stdlib intersphinx | Connect to Python stdlib intersphinx
| Python | lgpl-2.1 | torkil/paramiko,ameily/paramiko,SebastianDeiss/paramiko,dorianpula/paramiko,remram44/paramiko,zarr12steven/paramiko,mirrorcoder/paramiko,fvicente/paramiko,davidbistolas/paramiko,CptLemming/paramiko,redixin/paramiko,digitalquacks/paramiko,reaperhulk/paramiko,thisch/paramiko,rcorrieri/paramiko,mhdaimi/paramiko,paramiko/p... | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | <commit_before># Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members'... | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | # Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members', 'special-memb... | <commit_before># Obtain shared config values
import os, sys
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../..'))
from shared_conf import *
# Enable autodoc, intersphinx
extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'])
# Autodoc settings
autodoc_default_flags = ['members'... |
890c0d919aba273489c27243c513c822399c5d35 | datasurvey/packages.py | datasurvey/packages.py | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
with self.archive.open(name) as ar:
# TODO: Handle archives
... | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
info = self.archive.getinfo(name)
if hasattr(info, 'isdir') and info.isdir... | Fix recursion issue with zip/rar files | Fix recursion issue with zip/rar files
| Python | mit | occrp/datasurvey | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
with self.archive.open(name) as ar:
# TODO: Handle archives
... | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
info = self.archive.getinfo(name)
if hasattr(info, 'isdir') and info.isdir... | <commit_before>import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
with self.archive.open(name) as ar:
# TODO: Handle arch... | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
info = self.archive.getinfo(name)
if hasattr(info, 'isdir') and info.isdir... | import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
with self.archive.open(name) as ar:
# TODO: Handle archives
... | <commit_before>import gzip
import bz2
import rarfile
import zipfile
import tarfile
class PackageHandler:
def __init__(self, buffer):
self.buffer = buffer
def __iter__(self):
for name in self.archive.namelist():
with self.archive.open(name) as ar:
# TODO: Handle arch... |
bb7de7e76302fbd3eeeeb740d00c234faadef4ef | tests/test_nonsensefilter.py | tests/test_nonsensefilter.py | from unittest import TestCase
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestCase):
# TODO: This test will likely fail spectacularly because of a lack of
# training.
def test_classify(self):
nonsense = NonsenseFilter()
nonsense.filter_match = 1
... | from tests.test_classifierbase import TestClassifierBase
from spicedham.backend import load_backend
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestClassifierBase):
def test_train(self):
backend = load_backend()
nonsense = NonsenseFilter()
alphabet = map(c... | Add a base class and a test_train function | Add a base class and a test_train function
Overall, fix a very incomplete test.
| Python | mpl-2.0 | mozilla/spicedham,mozilla/spicedham | from unittest import TestCase
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestCase):
# TODO: This test will likely fail spectacularly because of a lack of
# training.
def test_classify(self):
nonsense = NonsenseFilter()
nonsense.filter_match = 1
... | from tests.test_classifierbase import TestClassifierBase
from spicedham.backend import load_backend
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestClassifierBase):
def test_train(self):
backend = load_backend()
nonsense = NonsenseFilter()
alphabet = map(c... | <commit_before>from unittest import TestCase
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestCase):
# TODO: This test will likely fail spectacularly because of a lack of
# training.
def test_classify(self):
nonsense = NonsenseFilter()
nonsense.filter_m... | from tests.test_classifierbase import TestClassifierBase
from spicedham.backend import load_backend
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestClassifierBase):
def test_train(self):
backend = load_backend()
nonsense = NonsenseFilter()
alphabet = map(c... | from unittest import TestCase
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestCase):
# TODO: This test will likely fail spectacularly because of a lack of
# training.
def test_classify(self):
nonsense = NonsenseFilter()
nonsense.filter_match = 1
... | <commit_before>from unittest import TestCase
from spicedham.nonsensefilter import NonsenseFilter
class TestNonsenseFilter(TestCase):
# TODO: This test will likely fail spectacularly because of a lack of
# training.
def test_classify(self):
nonsense = NonsenseFilter()
nonsense.filter_m... |
4672e447617e754d6b4d229ce775fbf9ee0b35aa | tests/test_requesthandler.py | tests/test_requesthandler.py | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | Add test for irrelevant input. | Add test for irrelevant input.
| Python | mit | ProjetPP/PPP-Spell-Checker,ProjetPP/PPP-Spell-Checker | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | <commit_before>from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original... | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original = 'What is the... | <commit_before>from unittest import TestCase
from ppp_datamodel.communication import Request
from ppp_datamodel import Triple, Resource, Missing
from ppp_libmodule.tests import PPPTestCase
from ppp_spell_checker import app
class RequestHandlerTest(PPPTestCase(app)):
def testCorrectSentence(self):
original... |
978dd0161552458331870af0b524cdcff25fd71d | furious/handlers/__init__.py | furious/handlers/__init__.py | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | Adjust async run handler to use the JobContext manager. | Adjust async run handler to use the JobContext manager.
| Python | apache-2.0 | mattsanders-wf/furious,beaulyddon-wf/furious,Workiva/furious,andreleblanc-wf/furious,rosshendrickson-wf/furious,andreleblanc-wf/furious,beaulyddon-wf/furious,robertkluin/furious,rosshendrickson-wf/furious,Workiva/furious,mattsanders-wf/furious | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | <commit_before>#
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | #
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | <commit_before>#
# Copyright 2012 WebFilings, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
713b91c4d7dc3737223bc70aa329ec9de2c48fb8 | mycli/packages/special/utils.py | mycli/packages/special/utils.py | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
directory = ''
error = False
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1]
try:
os.chdir(directory)
subprocess.call(['pwd'])
... | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1] if len(tokens) > 1 else None
if not directory:
return False, "No folder name was provided."
try:... | Add validation for 'cd' command argument | Add validation for 'cd' command argument
| Python | bsd-3-clause | mdsrosa/mycli,mdsrosa/mycli | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
directory = ''
error = False
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1]
try:
os.chdir(directory)
subprocess.call(['pwd'])
... | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1] if len(tokens) > 1 else None
if not directory:
return False, "No folder name was provided."
try:... | <commit_before>import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
directory = ''
error = False
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1]
try:
os.chdir(directory)
subprocess.ca... | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1] if len(tokens) > 1 else None
if not directory:
return False, "No folder name was provided."
try:... | import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
directory = ''
error = False
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1]
try:
os.chdir(directory)
subprocess.call(['pwd'])
... | <commit_before>import os
import subprocess
def handle_cd_command(arg):
"""Handles a `cd` shell command by calling python's os.chdir."""
CD_CMD = 'cd'
directory = ''
error = False
tokens = arg.split(CD_CMD + ' ')
directory = tokens[-1]
try:
os.chdir(directory)
subprocess.ca... |
75b1fdc9f290c85b4d469cdce5e5d1154aed4881 | indra/tests/test_util.py | indra/tests/test_util.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
xml = u'<html><bar>asdf</bar></h... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB, kappy_json_to_graph
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
... | Implement test for basic graph. | Implement test for basic graph.
| Python | bsd-2-clause | pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/indra,sorgerlab/indra,pvtodorov/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,bgyori/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/belpy,bgyori/indra,johnbachman/indra | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
xml = u'<html><bar>asdf</bar></h... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB, kappy_json_to_graph
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
xml = u'<html><ba... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB, kappy_json_to_graph
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
xml = u'<html><bar>asdf</bar></h... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import xml.etree.ElementTree as ET
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import unicode_strs
from io import BytesIO
def test_unicode_tree_builder():
xml = u'<html><ba... |
052367e1239e918cdcb9106b4494a48e34e92643 | pychecker2/File.py | pychecker2/File.py | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | Add more ways to suck line numbers from nodes | Add more ways to suck line numbers from nodes
| Python | bsd-3-clause | akaihola/PyChecker,thomasvs/pychecker,akaihola/PyChecker,thomasvs/pychecker | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | <commit_before>from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.nam... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | <commit_before>from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.nam... |
68dee1cfef3a765a82fe7b51395219f8e1270a12 | reason/__init__.py | reason/__init__.py | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | Revert "Removed connections to nvd database" | Revert "Removed connections to nvd database"
This reverts commit 4b2edb4bc6d9c525d0d5c825174fbd5dbfac0ac1.
| Python | mit | pombredanne/reason,pombredanne/reason,pombredanne/reason | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | <commit_before>import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name_... | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config['... | <commit_before>import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from datetime import datetime
from flask.ext.moment import Moment
from flask_debugtoolbar import DebugToolbarExtension
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name_... |
381bb4e11cf6951d819fa2cf298e2cc558464fc9 | utils/nflc-get-categories.py | utils/nflc-get-categories.py | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | Simplify NFLC utils script stripping and sort categories case-insensitive | Simplify NFLC utils script stripping and sort categories case-insensitive
| Python | mit | Tenzer/plugin.video.nfl-teams | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | <commit_before>#!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(descri... | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | #!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(description='Get the ... | <commit_before>#!/usr/bin/env python3
import argparse
import json
from urllib.request import urlopen
def get_data(domain):
response = urlopen('http://{}/media/nflc-playlist-video.json'.format(domain)).read()
return json.loads(response.decode('utf-8'))
def main():
parser = argparse.ArgumentParser(descri... |
a0c2e64c92d89276d73b5e4ca31e10a352ab37f1 | analyser/api.py | analyser/api.py | import os
import requests
from flask import Blueprint
from utils.decorators import validate, require
from utils.validators import validate_url
from .parser import Parser
endpoint = Blueprint('analyse_url', __name__)
@endpoint.route('analyse/', methods=['POST'])
@require('url')
@validate({
'url': validate_url
... | import os
import json
import requests
import rethinkdb as r
from flask import Blueprint, current_app
from utils.decorators import validate, require
from utils.validators import validate_url
from krunchr.vendors.rethinkdb import db
from .parser import Parser
from .tasks import get_file
endpoint = Blueprint('analys... | Put job id in rethink db | Put job id in rethink db
| Python | apache-2.0 | vtemian/kruncher | import os
import requests
from flask import Blueprint
from utils.decorators import validate, require
from utils.validators import validate_url
from .parser import Parser
endpoint = Blueprint('analyse_url', __name__)
@endpoint.route('analyse/', methods=['POST'])
@require('url')
@validate({
'url': validate_url
... | import os
import json
import requests
import rethinkdb as r
from flask import Blueprint, current_app
from utils.decorators import validate, require
from utils.validators import validate_url
from krunchr.vendors.rethinkdb import db
from .parser import Parser
from .tasks import get_file
endpoint = Blueprint('analys... | <commit_before>import os
import requests
from flask import Blueprint
from utils.decorators import validate, require
from utils.validators import validate_url
from .parser import Parser
endpoint = Blueprint('analyse_url', __name__)
@endpoint.route('analyse/', methods=['POST'])
@require('url')
@validate({
'url'... | import os
import json
import requests
import rethinkdb as r
from flask import Blueprint, current_app
from utils.decorators import validate, require
from utils.validators import validate_url
from krunchr.vendors.rethinkdb import db
from .parser import Parser
from .tasks import get_file
endpoint = Blueprint('analys... | import os
import requests
from flask import Blueprint
from utils.decorators import validate, require
from utils.validators import validate_url
from .parser import Parser
endpoint = Blueprint('analyse_url', __name__)
@endpoint.route('analyse/', methods=['POST'])
@require('url')
@validate({
'url': validate_url
... | <commit_before>import os
import requests
from flask import Blueprint
from utils.decorators import validate, require
from utils.validators import validate_url
from .parser import Parser
endpoint = Blueprint('analyse_url', __name__)
@endpoint.route('analyse/', methods=['POST'])
@require('url')
@validate({
'url'... |
de69c4048fe8533185a4eca6f98c7d74967618bf | opentreemap/opentreemap/util.py | opentreemap/opentreemap/util.py | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import json
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, HttpResponseRedirect, Http404
def route(**kwargs):
@csrf_exempt
def rou... | Return a 404, not a 500 on a verb mismatch | Return a 404, not a 500 on a verb mismatch
Fixes #1101
| Python | agpl-3.0 | maurizi/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,RickMohr/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,maurizi/otm-core,RickMohr/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,clever-cr... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import json
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, HttpResponseRedirect, Http404
def route(**kwargs):
@csrf_exempt
def rou... | <commit_before>from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import json
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, HttpResponseRedirect, Http404
def route(**kwargs):
@csrf_exempt
def rou... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | <commit_before>from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_... |
0019cfc3d6bc8b81520e09daa0b84662d76aff93 | opps/core/models/publishable.py | opps/core/models/publishable.py | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableMnager(models.Manager):
def all_publishe... | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableManager(models.Manager):
def all_publish... | Fix spelling error on core published PublishableMnager to PublishableManager | Fix spelling error on core published PublishableMnager to PublishableManager
| Python | mit | jeanmask/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableMnager(models.Manager):
def all_publishe... | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableManager(models.Manager):
def all_publish... | <commit_before>#!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableMnager(models.Manager):
d... | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableManager(models.Manager):
def all_publish... | #!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableMnager(models.Manager):
def all_publishe... | <commit_before>#!/usr/bin/env python
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from opps.core.models.date import Date
from datetime import datetime
class PublishableMnager(models.Manager):
d... |
ee33022db50a66b6e2db12972a2ed107276cc666 | apps/common/tests/python/mediawords/key_value_store/test_cached_amazon_s3.py | apps/common/tests/python/mediawords/key_value_store/test_cached_amazon_s3.py | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAmazonS3CredentialsTestCase):
def _initialize... | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from mediawords.util.text import random_string
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAm... | Append random string to S3 test directory name to be able to run parallel tests | Append random string to S3 test directory name to be able to run parallel tests
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAmazonS3CredentialsTestCase):
def _initialize... | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from mediawords.util.text import random_string
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAm... | <commit_before>from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAmazonS3CredentialsTestCase):
... | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from mediawords.util.text import random_string
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAm... | from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAmazonS3CredentialsTestCase):
def _initialize... | <commit_before>from mediawords.key_value_store.cached_amazon_s3 import CachedAmazonS3Store
from .amazon_s3_credentials import (
TestAmazonS3CredentialsTestCase,
get_test_s3_credentials,
)
test_credentials = get_test_s3_credentials()
class TestCachedAmazonS3StoreTestCase(TestAmazonS3CredentialsTestCase):
... |
94197717719b580aa9b8bf7a6cbe28f95000a2dc | gcouchbase/tests/test_api.py | gcouchbase/tests/test_api.py | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | Disable include_docs test for GCouchbase | Disable include_docs test for GCouchbase
The gevent api cannot cleanly use include_docs here; previously we
relied on the server to retrieve this, but the server no longer supports
this. Perhaps in some future time we can implement this within
libcouchbase itself, but until then, it's left unimplemented.
Change-Id: I... | Python | apache-2.0 | couchbase/couchbase-python-client,couchbase/couchbase-python-client,mnunberg/couchbase-python-client,mnunberg/couchbase-python-client | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | <commit_before>from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bu... | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bucket
viewfa... | <commit_before>from couchbase.tests.base import ApiImplementationMixin, SkipTest
try:
import gevent
except ImportError as e:
raise SkipTest(e)
from gcouchbase.bucket import Bucket, GView
from couchbase.tests.importer import get_configured_classes
class GEventImplMixin(ApiImplementationMixin):
factory = Bu... |
a33df3c34cf69102831c8878b71266aaa41ac8fb | feed/setup.py | feed/setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'beautifulsoup>=3.2.0', 'html5lib']
setup(
name='feed',
version='0.... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'html5lib']
setup(
name='feed',
version='0.2',
url='http://bitb... | Remove beautifulsoup from the feed extension's requirements. | Remove beautifulsoup from the feed extension's requirements.
| Python | bsd-2-clause | sphinx-contrib/spelling,sphinx-contrib/spelling | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'beautifulsoup>=3.2.0', 'html5lib']
setup(
name='feed',
version='0.... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'html5lib']
setup(
name='feed',
version='0.2',
url='http://bitb... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'beautifulsoup>=3.2.0', 'html5lib']
setup(
name='feed',
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'html5lib']
setup(
name='feed',
version='0.2',
url='http://bitb... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'beautifulsoup>=3.2.0', 'html5lib']
setup(
name='feed',
version='0.... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the feed Sphinx extension.
It creates an RSS feed of recently updated sphinx pages.
'''
requires = ['Sphinx>=0.6', 'python-dateutil', 'beautifulsoup>=3.2.0', 'html5lib']
setup(
name='feed',
... |
53780b6d16d631a3c0e8859ff9771a1379de16f1 | calaccess_raw/admin/tracking.py | calaccess_raw/admin/tracking.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | Cut dupe admin display fields | Cut dupe admin display fields
| Python | mit | california-civic-data-coalition/django-calaccess-raw-data | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for the RawDataVer... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom administration panels for tracking models.
"""
from django.contrib import admin
from calaccess_raw import models
from .base import BaseAdmin
@admin.register(models.RawDataVersion)
class RawDataVersionAdmin(BaseAdmin):
"""
Custom admin for... |
7fc4e7382665cf9eac4d19efcf9641ad57271e87 | organizer/models.py | organizer/models.py | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | Declare Meta class in Startup model. | Ch03: Declare Meta class in Startup model. [skip ci]
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | <commit_before>from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label for URL config... | <commit_before>from django.db import models
# Model Field Reference
# https://docs.djangoproject.com/en/1.8/ref/models/fields/
class Tag(models.Model):
name = models.CharField(
max_length=31, unique=True)
slug = models.SlugField(
max_length=31,
unique=True,
help_text='A label... |
bcb4d14e7be413a08ca9c3f98656ff7b2bcb3d7d | test/test_wikilinks.py | test/test_wikilinks.py | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | Write forgotten test replace debugging output. | Write forgotten test replace debugging output.
| Python | bsd-2-clause | tiddlyweb/tiddlywebplugins.markdown | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | <commit_before>from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http:/... | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http://example.org/Ca... | <commit_before>from tiddlywebplugins.markdown import render
from tiddlyweb.model.tiddler import Tiddler
sample = """# Hello
This is WikiLink
* List
* List
"""
sample_linked = """
This is WikiLink and this is not: [NotLink](http://example.com).
This forthcoming in camel case but actually
a link [label](http:/... |
8d50846847852741410463d98de2c4f9e5fea844 | zaqar_ui/content/queues/urls.py | zaqar_ui/content/queues/urls.py | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | Update URLs to Django 1.8 style | Update URLs to Django 1.8 style
django.conf.urls.patterns() is deprecated since 1.8.
We should not use patterns(), so this patch updates URLs to
1.8 style.
Change-Id: I6f2b6f44d843ca5e0cdb5db9828df94fa4df5f88
Closes-Bug: #1539354
| Python | apache-2.0 | openstack/zaqar-ui,openstack/zaqar-ui,openstack/zaqar-ui,openstack/zaqar-ui | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | <commit_before># Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | <commit_before># Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
1d2a62b87b98513bd84a0ae1433781157cb45f70 | admin.py | admin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
list_display = (
'creation_time',
'hit_id',
'hit_type_id',
'title',
'reward'
)
list_filter = (
'creation_time',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
date_hierarchy = 'creation_time'
fieldsets = (
(None, {
'fields': (('hit_id','hit_type_id'),
('creation_time', ... | Customize HIT Admin to "fit your brain" | Customize HIT Admin to "fit your brain"
| Python | bsd-3-clause | glenjarvis/djurk | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
list_display = (
'creation_time',
'hit_id',
'hit_type_id',
'title',
'reward'
)
list_filter = (
'creation_time',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
date_hierarchy = 'creation_time'
fieldsets = (
(None, {
'fields': (('hit_id','hit_type_id'),
('creation_time', ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
list_display = (
'creation_time',
'hit_id',
'hit_type_id',
'title',
'reward'
)
list_filter = (
'cre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
date_hierarchy = 'creation_time'
fieldsets = (
(None, {
'fields': (('hit_id','hit_type_id'),
('creation_time', ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
list_display = (
'creation_time',
'hit_id',
'hit_type_id',
'title',
'reward'
)
list_filter = (
'creation_time',
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from djurk.models import HIT
class HIT_Admin(admin.ModelAdmin):
list_display = (
'creation_time',
'hit_id',
'hit_type_id',
'title',
'reward'
)
list_filter = (
'cre... |
053bfa79b54a95d405d6401c86dcce3c6065bf32 | appium/conftest.py | appium/conftest.py | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = True
return g... | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = (runs_on_aws() ==... | Remove no reset for devicefarm | Remove no reset for devicefarm
| Python | mit | getsentry/react-native-sentry,getsentry/react-native-sentry,getsentry/react-native-sentry,getsentry/react-native-sentry,getsentry/react-native-sentry,getsentry/react-native-sentry | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = True
return g... | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = (runs_on_aws() ==... | <commit_before>import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = Tr... | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = (runs_on_aws() ==... | import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = True
return g... | <commit_before>import os
import pytest
from appium import webdriver
@pytest.fixture(scope='function')
def driver(request):
return get_driver(request, default_capabilities())
@pytest.fixture(scope='function')
def no_reset_driver(request):
desired_caps = default_capabilities()
desired_caps['noReset'] = Tr... |
8b8e206c21d08fee74fd43dc4b7e4d1d95a93060 | sconsole/cmdbar.py | sconsole/cmdbar.py | '''
Define the command bar
'''
# Import third party libs
import urwid
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.tgt_txt = urwid.Text('Target')
self.tgt_edit = urwid.Edit()
self.fun_txt = urwid.... | '''
Define the command bar
'''
# Import third party libs
import urwid
# Import salt libs
import salt.client
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.local = salt.client.LocalClient(mopts=opts)
self.t... | Add functionality to the go button | Add functionality to the go button
| Python | apache-2.0 | saltstack/salt-console | '''
Define the command bar
'''
# Import third party libs
import urwid
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.tgt_txt = urwid.Text('Target')
self.tgt_edit = urwid.Edit()
self.fun_txt = urwid.... | '''
Define the command bar
'''
# Import third party libs
import urwid
# Import salt libs
import salt.client
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.local = salt.client.LocalClient(mopts=opts)
self.t... | <commit_before>'''
Define the command bar
'''
# Import third party libs
import urwid
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.tgt_txt = urwid.Text('Target')
self.tgt_edit = urwid.Edit()
self.f... | '''
Define the command bar
'''
# Import third party libs
import urwid
# Import salt libs
import salt.client
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.local = salt.client.LocalClient(mopts=opts)
self.t... | '''
Define the command bar
'''
# Import third party libs
import urwid
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.tgt_txt = urwid.Text('Target')
self.tgt_edit = urwid.Edit()
self.fun_txt = urwid.... | <commit_before>'''
Define the command bar
'''
# Import third party libs
import urwid
class CommandBar(object):
'''
The object to manage the command bar
'''
def __init__(self, opts):
self.opts = opts
self.tgt_txt = urwid.Text('Target')
self.tgt_edit = urwid.Edit()
self.f... |
f4170ec0cff71e8bcce834bbf8f4336410d45e76 | klab/cluster/__init__.py | klab/cluster/__init__.py | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | Make require_qsub() crash if qsub isn't found. | Make require_qsub() crash if qsub isn't found.
| Python | mit | Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | <commit_before>#!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
... | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | #!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
command = 'qsub... | <commit_before>#!/usr/bin/env python2
def is_this_chef():
from socket import gethostname
return gethostname() == 'chef.compbio.ucsf.edu'
def require_chef():
if not is_this_chef():
raise SystemExit("This script must be run on chef.")
def require_qsub():
import os, subprocess
try:
... |
65fb294c17130985e6549702a1df728126de8cb0 | addon.py | addon.py | import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
| import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
| Make sure we use our own vendored packages | Make sure we use our own vendored packages
| Python | apache-2.0 | neno1978/xbmctorrent | import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
Make sure we use our own vendored packages | import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
| <commit_before>import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
<commit_msg>Make sure we use our own vendored packages<commit_after> | import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
| import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
Make sure we use our own vendored packagesimport sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'resources', 'site-packag... | <commit_before>import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'site-packages'))
from xbmctorrent import plugin
if __name__ == '__main__':
plugin.run()
<commit_msg>Make sure we use our own vendored packages<commit_after>import sys, os
sys.path.insert(0, os.path.join(os.path.dir... |
0cc89fe31729a485a0e055b343acfde3d71745d7 | apps/metricsmanager/api.py | apps/metricsmanager/api.py | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | Fix error format of check formula endpoint | Fix error format of check formula endpoint
| Python | agpl-3.0 | mmilaprat/policycompass-services,almey/policycompass-services,mmilaprat/policycompass-services,policycompass/policycompass-services,almey/policycompass-services,policycompass/policycompass-services,almey/policycompass-services,mmilaprat/policycompass-services,policycompass/policycompass-services | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | <commit_before>from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_fo... | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_formula
class Me... | <commit_before>from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework import generics, status
from django.core.exceptions import ValidationError
from .models import *
from .serializers import *
from .formula import validate_fo... |
a8601d8a17c9ba8e87b8336870e0d52f79e0ffa2 | indra/tests/test_omnipath.py | indra/tests/test_omnipath.py | from __future__ import unicode_literals
from builtins import dict, str
from indra.statements import Phosphorylation
from indra.databases import omnipath as op
def test_query_ptms():
stmts = op.get_ptms(['Q13873'])
assert len(stmts) == 1
assert isinstance(stmts[0], Phosphorylation)
assert stmts[0].enz.n... | import requests
from indra.sources.omnipath import OmniPathModificationProcessor,\
OmniPathLiganReceptorProcessor
from indra.sources.omnipath.api import op_url
from indra.statements import Agent, Phosphorylation
from indra.preassembler.grounding_mapper import GroundingMapper
BRAF_UPID = 'P15056'
JAK2_UPID = 'O6067... | Update imports, test general web api | Update imports, test general web api
| Python | bsd-2-clause | johnbachman/indra,johnbachman/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/indra,sorgerlab/indra,bgyori/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/belpy | from __future__ import unicode_literals
from builtins import dict, str
from indra.statements import Phosphorylation
from indra.databases import omnipath as op
def test_query_ptms():
stmts = op.get_ptms(['Q13873'])
assert len(stmts) == 1
assert isinstance(stmts[0], Phosphorylation)
assert stmts[0].enz.n... | import requests
from indra.sources.omnipath import OmniPathModificationProcessor,\
OmniPathLiganReceptorProcessor
from indra.sources.omnipath.api import op_url
from indra.statements import Agent, Phosphorylation
from indra.preassembler.grounding_mapper import GroundingMapper
BRAF_UPID = 'P15056'
JAK2_UPID = 'O6067... | <commit_before>from __future__ import unicode_literals
from builtins import dict, str
from indra.statements import Phosphorylation
from indra.databases import omnipath as op
def test_query_ptms():
stmts = op.get_ptms(['Q13873'])
assert len(stmts) == 1
assert isinstance(stmts[0], Phosphorylation)
assert... | import requests
from indra.sources.omnipath import OmniPathModificationProcessor,\
OmniPathLiganReceptorProcessor
from indra.sources.omnipath.api import op_url
from indra.statements import Agent, Phosphorylation
from indra.preassembler.grounding_mapper import GroundingMapper
BRAF_UPID = 'P15056'
JAK2_UPID = 'O6067... | from __future__ import unicode_literals
from builtins import dict, str
from indra.statements import Phosphorylation
from indra.databases import omnipath as op
def test_query_ptms():
stmts = op.get_ptms(['Q13873'])
assert len(stmts) == 1
assert isinstance(stmts[0], Phosphorylation)
assert stmts[0].enz.n... | <commit_before>from __future__ import unicode_literals
from builtins import dict, str
from indra.statements import Phosphorylation
from indra.databases import omnipath as op
def test_query_ptms():
stmts = op.get_ptms(['Q13873'])
assert len(stmts) == 1
assert isinstance(stmts[0], Phosphorylation)
assert... |
2083c0079a70783deff54a7acd6f3ef6bba25302 | tests/test_pyglmnet.py | tests/test_pyglmnet.py | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | Fix glmnet test and add multinomial gradient test | Fix glmnet test and add multinomial gradient test
| Python | mit | the872/pyglmnet,glm-tools/pyglmnet,pavanramkumar/pyglmnet | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | <commit_before>import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 1... | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 100
density ... | <commit_before>import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import StandardScaler
from numpy.testing import assert_allclose
from pyglmnet import GLM
def test_glmnet():
"""Test glmnet."""
glm = GLM(distr='poisson')
scaler = StandardScaler()
n_samples, n_features = 10000, 1... |
2296ef02345f51666ff6653abe372e7965ef361c | categories_i18n/admin.py | categories_i18n/admin.py | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | Set `mptt_indent_field` explicitly for proper MPTT list columns | Set `mptt_indent_field` explicitly for proper MPTT list columns
| Python | apache-2.0 | edoburu/django-categories-i18n,edoburu/django-categories-i18n | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | <commit_before>from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
F... | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
Form for categor... | <commit_before>from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from mptt.forms import MPTTAdminForm
from parler.admin import TranslatableAdmin
from .models import Category
from parler.forms import TranslatableModelForm
class CategoryAdminForm(MPTTAdminForm, TranslatableModelForm):
"""
F... |
70d3bf1043af965da56339ce1c50b258f184ccb2 | lib/bio.py | lib/bio.py | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Revers... | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx-',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx-')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Reve... | Add gaps "-" to reverse complement function | Add gaps "-" to reverse complement function
| Python | bsd-3-clause | juliema/aTRAM | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Revers... | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx-',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx-')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Reve... | <commit_before>"""Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq)... | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx-',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx-')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Reve... | """Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq):
"""Revers... | <commit_before>"""Utilities for working with sequences."""
import re
from Bio import SeqIO
CODON_LEN = 3
COMPLEMENT = str.maketrans('ACGTUWSMKRYBDHVNXacgtuwsmkrybdhvnx',
'TGCAAWSKMYRVHDBNXtgcaawskmyrvhdbnx')
IS_PROTEIN = re.compile(r'[EFILPQ]', re.IGNORECASE)
def reverse_complement(seq)... |
c0dc0c644fd8912d58deb416955e85259d22618e | tests/github_controller/test_request_parsing.py | tests/github_controller/test_request_parsing.py | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == 'json'
async def test_get_req_event_header(gh_sut: GithubController, mock_req... | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == {'json': 'json'}
async def test_get_req_event_header(gh_sut: GithubController... | Fix test in request parsing | Fix test in request parsing
| Python | mit | futuresimple/triggear | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == 'json'
async def test_get_req_event_header(gh_sut: GithubController, mock_req... | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == {'json': 'json'}
async def test_get_req_event_header(gh_sut: GithubController... | <commit_before>import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == 'json'
async def test_get_req_event_header(gh_sut: GithubContr... | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == {'json': 'json'}
async def test_get_req_event_header(gh_sut: GithubController... | import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == 'json'
async def test_get_req_event_header(gh_sut: GithubController, mock_req... | <commit_before>import pytest
from app.controllers.github_controller import GithubController
pytestmark = pytest.mark.asyncio
async def test_get_req_json(gh_sut: GithubController, mock_request):
assert await gh_sut.get_request_json(mock_request) == 'json'
async def test_get_req_event_header(gh_sut: GithubContr... |
8982d3f5ea40b688ec7e1da18403d89ab2994a95 | comics/comics/yamac.py | comics/comics/yamac.py | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | Remove history capable date for "you and me and cats" | Remove history capable date for "you and me and cats"
| Python | agpl-3.0 | jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | <commit_before>from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
clas... | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
class Crawler(Crawl... | <commit_before>from comics.aggregator.crawler import CrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "you and me and cats"
language = "en"
url = "http://strawberry-pie.net/SA/"
start_date = "2009-07-01"
rights = "bubble"
active = False
clas... |
26861b183085e8fe2c7c21f4e3631ddd7d30e5e8 | csibe.py | csibe.py | #!/usr/bin/env python
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
| #!/usr/bin/env python
import argparse
import os
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
args = parser.parse_args()
make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_dir... | Add logic and error-handling for CMake and make invocations | Add logic and error-handling for CMake and make invocations
| Python | bsd-3-clause | szeged/csibe,bgabor666/csibe,szeged/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,bgabor666/csibe,loki04/csibe,loki04/csibe,loki04/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,bgabor666/csibe,loki04/csibe,loki04/csibe,szeged/csibe,szeged/csibe,loki04/csibe,loki04/csibe,szeged/csibe | #!/usr/bin/env python
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
Add logic and error-handling... | #!/usr/bin/env python
import argparse
import os
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
args = parser.parse_args()
make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_dir... | <commit_before>#!/usr/bin/env python
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
<commit_msg>A... | #!/usr/bin/env python
import argparse
import os
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
args = parser.parse_args()
make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_dir... | #!/usr/bin/env python
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
Add logic and error-handling... | <commit_before>#!/usr/bin/env python
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
<commit_msg>A... |
f87bab8a808e4bda3b3b7482633eaca069682b9e | build.py | build.py | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.1',
description='BlockCheck',
executables=executables,
opti... | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.0.5',
description='BlockCheck',
executables=executables,
op... | Include all the files from dns module and bump version | Include all the files from dns module and bump version | Python | mit | Acharvak/blockcheck,Renji/blockcheck,ValdikSS/blockcheck | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.1',
description='BlockCheck',
executables=executables,
opti... | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.0.5',
description='BlockCheck',
executables=executables,
op... | <commit_before># -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.1',
description='BlockCheck',
executables=executab... | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.0.5',
description='BlockCheck',
executables=executables,
op... | # -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.1',
description='BlockCheck',
executables=executables,
opti... | <commit_before># -*- coding: utf-8 -*-
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable('blockcheck.py', base=base)
]
setup(name='blockcheck',
version='0.1',
description='BlockCheck',
executables=executab... |
89c005e2fd7d7f7727ba225cc20789fea992b1d4 | backend/scripts/mktemplate.py | backend/scripts/mktemplate.py | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | Update script to show which file it is loading. | Update script to show which file it is loading.
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | <commit_before>#!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="f... | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | #!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="filename",
... | <commit_before>#!/usr/bin/env python
import json
import rethinkdb as r
import sys
import optparse
if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option("-p", "--port", dest="port",
help="rethinkdb port", default=30815)
parser.add_option("-f", "--file", dest="f... |
6ac4764790526f435ffc6337145439d710dd455f | virtualenv/__init__.py | virtualenv/__init__.py | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__aut... | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
def create_environment(
home_dir,
site_packages=False, clear=False,
... | Add a backwards compatible create_environment. | Add a backwards compatible create_environment.
| Python | mit | ionelmc/virtualenv,ionelmc/virtualenv,ionelmc/virtualenv | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__aut... | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
def create_environment(
home_dir,
site_packages=False, clear=False,
... | <commit_before>from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
__all__ = [
"__title__", "__summary__", "__uri__", "__ver... | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
def create_environment(
home_dir,
site_packages=False, clear=False,
... | from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__aut... | <commit_before>from __future__ import absolute_import, division, print_function
from virtualenv.__about__ import (
__author__, __copyright__, __email__, __license__, __summary__, __title__,
__uri__, __version__
)
from virtualenv.core import create
__all__ = [
"__title__", "__summary__", "__uri__", "__ver... |
7822687bb78cbe422af0d707a1ed7fc94011628d | castor/tasks.py | castor/tasks.py | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | Return event dictionary at the end of the task. | Return event dictionary at the end of the task.
| Python | mit | sourcelair/castor | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | <commit_before>from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])... | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])
for url in... | <commit_before>from celery import Celery
from settings import SETTINGS
import requests
HOOKS = SETTINGS.get('hooks', [])
CELERY_SETTINGS = SETTINGS.get('celery', {})
app = Celery()
app.conf.update(**CELERY_SETTINGS)
@app.task
def dispatch_event(event):
event_repr = '%s:%s' % (event['id'][:10], event['status'])... |
84d743476261d30b352e3bfc103d76e7e8350b4c | tests/test_urls.py | tests/test_urls.py | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from urltools import compare
class TestURLs(TestCase):
"""Verify project level URL configuration."""
def test_cas_enabled(self):
"""Verify tha... | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
import ssl
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context # noqa pylint: disable=protec... | Disable SSL validation for a test which uses urltools | Disable SSL validation for a test which uses urltools
This is currently a common problem with python >= 2.7.9:
http://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error
| Python | agpl-3.0 | mitodl/lore,amir-qayyum-khan/lore,amir-qayyum-khan/lore,amir-qayyum-khan/lore,amir-qayyum-khan/lore,mitodl/lore,mitodl/lore,mitodl/lore,amir-qayyum-khan/lore,mitodl/lore | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from urltools import compare
class TestURLs(TestCase):
"""Verify project level URL configuration."""
def test_cas_enabled(self):
"""Verify tha... | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
import ssl
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context # noqa pylint: disable=protec... | <commit_before>"""
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from urltools import compare
class TestURLs(TestCase):
"""Verify project level URL configuration."""
def test_cas_enabled(self):
... | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
import ssl
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context # noqa pylint: disable=protec... | """
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from urltools import compare
class TestURLs(TestCase):
"""Verify project level URL configuration."""
def test_cas_enabled(self):
"""Verify tha... | <commit_before>"""
Testing of project level URLs.
"""
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from urltools import compare
class TestURLs(TestCase):
"""Verify project level URL configuration."""
def test_cas_enabled(self):
... |
8b0c08962d18536b87a948c96f7ec7daabd8b4e1 | NEO_flyby.py | NEO_flyby.py |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
unix = time.time()
datestamp = datetime.datetime.fromtimestamp(unix).strftime("%Y-%b-%d")
json_data_url = requests.get("https://ssd-api.jpl.nasa.gov/cad.api?body=Earth&dist-max=20LD")
json_data = json.lo... |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
des = 0
orbit_id = 1
jd = 2
cd = 3
dist = 4
dist_min = 5
dist_max = 6
v_rel = 7
v_inf = 8
t_signma_F = 9
body = 10
h = 11
unix = time.time()
datestamp = datetime.d... | Update 0.1.1 - Added api number reference | Update 0.1.1
- Added api number reference
| Python | mit | FXelix/space_facts_bot |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
unix = time.time()
datestamp = datetime.datetime.fromtimestamp(unix).strftime("%Y-%b-%d")
json_data_url = requests.get("https://ssd-api.jpl.nasa.gov/cad.api?body=Earth&dist-max=20LD")
json_data = json.lo... |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
des = 0
orbit_id = 1
jd = 2
cd = 3
dist = 4
dist_min = 5
dist_max = 6
v_rel = 7
v_inf = 8
t_signma_F = 9
body = 10
h = 11
unix = time.time()
datestamp = datetime.d... | <commit_before>
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
unix = time.time()
datestamp = datetime.datetime.fromtimestamp(unix).strftime("%Y-%b-%d")
json_data_url = requests.get("https://ssd-api.jpl.nasa.gov/cad.api?body=Earth&dist-max=20LD")
json... |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
des = 0
orbit_id = 1
jd = 2
cd = 3
dist = 4
dist_min = 5
dist_max = 6
v_rel = 7
v_inf = 8
t_signma_F = 9
body = 10
h = 11
unix = time.time()
datestamp = datetime.d... |
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
unix = time.time()
datestamp = datetime.datetime.fromtimestamp(unix).strftime("%Y-%b-%d")
json_data_url = requests.get("https://ssd-api.jpl.nasa.gov/cad.api?body=Earth&dist-max=20LD")
json_data = json.lo... | <commit_before>
import time
import datetime
import requests
import json
def get_NEO_flyby():
neo_data = []
unix = time.time()
datestamp = datetime.datetime.fromtimestamp(unix).strftime("%Y-%b-%d")
json_data_url = requests.get("https://ssd-api.jpl.nasa.gov/cad.api?body=Earth&dist-max=20LD")
json... |
9e5b6ea80dd1039952bb5ff821ae15555ad591be | iterm2_tools/images.py | iterm2_tools/images.py | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | Fix Python 2 compatibility issue | Fix Python 2 compatibility issue
| Python | mit | asmeurer/iterm2-tools | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | <commit_before>import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('... | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('ascii'),
... | <commit_before>import sys
import os
import base64
# See https://iterm2.com/images.html
IMAGE_CODE= '\033]1337;File={file};inline={inline};size={size}:{base64_img}\a'
def iterm2_image_bytes(b, filename=None, inline=1):
data = {
'file': base64.b64encode((filename or 'Unnamed file').encode('utf-8')).decode('... |
7570b9dd8fada221e5059a00e107ce6665b9c563 | nailgun/nailgun/db/sqlalchemy/models/base.py | nailgun/nailgun/db/sqlalchemy/models/base.py | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | Fix select order for Capacity Log | Fix select order for Capacity Log
Change-Id: I0db3de15e65bb300d75741e5c86e164b1966ac89
Closes: bug #1281986
| Python | apache-2.0 | nebril/fuel-web,SmartInfrastructures/fuel-web-dev,stackforge/fuel-web,nebril/fuel-web,huntxu/fuel-web,nebril/fuel-web,eayunstack/fuel-web,zhaochao/fuel-web,huntxu/fuel-web,koder-ua/nailgun-fcert,zhaochao/fuel-web,huntxu/fuel-web,stackforge/fuel-web,koder-ua/nailgun-fcert,prmtl/fuel-web,SmartInfrastructures/fuel-web-dev... | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
dd8d4515f5e39dcc3f23db5a5acf3478c9c16ae2 | codebox/conf.py | codebox/conf.py | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1\xd1@ku'
REDIS_DB = 0
... | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = os.environ.get('SECRET_KEY', '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1... | Read janrain/secret key from env | Read janrain/secret key from env
| Python | apache-2.0 | disqus/codebox,disqus/codebox | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1\xd1@ku'
REDIS_DB = 0
... | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = os.environ.get('SECRET_KEY', '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1... | <commit_before>"""
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1\xd1@ku'
R... | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = os.environ.get('SECRET_KEY', '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1... | """
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1\xd1@ku'
REDIS_DB = 0
... | <commit_before>"""
codebox.conf
~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import os, os.path
import urlparse
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = '\x89\x1d\xec\x8eJ\xda=C`\xf3<X\x81\xff\x1e\r{+\x1b\xe1\xd1@ku'
R... |
a17d3fbf19b25e1da568266b17abe575071e3f80 | server/lib/utils.py | server/lib/utils.py | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType) as file:
fileContents = file.read()
file.close()
... | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType, encoding='utf-8') as file:
fileContents = file.read()
... | Fix not being able to parse diacritics | Fix not being able to parse diacritics
| Python | agpl-3.0 | MakersLab/custom-print | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType) as file:
fileContents = file.read()
file.close()
... | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType, encoding='utf-8') as file:
fileContents = file.read()
... | <commit_before>import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType) as file:
fileContents = file.read()
... | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType, encoding='utf-8') as file:
fileContents = file.read()
... | import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType) as file:
fileContents = file.read()
file.close()
... | <commit_before>import yaml
import json
import os
import uuid
def loadFromFile(path, bytes=False):
from config import PATH
if not os.path.isabs(path):
path = os.path.join(PATH, path)
readType = 'r' if not bytes else 'rb'
with open(path, readType) as file:
fileContents = file.read()
... |
09572d5f24c33b6a604cc038c4e1c13ddb977af6 | db/db.py | db/db.py | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | Return subaccounts with their balances on account query. | Return subaccounts with their balances on account query.
| Python | agpl-3.0 | vincebusam/pyWebCash,vincebusam/pyWebCash,vincebusam/pyWebCash | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | <commit_before>#!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(c... | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | #!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(config.dbdir, se... | <commit_before>#!/usr/bin/python
import sys
import copy
import json
import getpass
import aesjsonfile
sys.path.append("../")
import config
class DB(object):
def __init__(self, username, password):
self.username = username
self.password = password
self.db = aesjsonfile.load("%s/%s.json"%(c... |
79e22a810638fbf2098f87525fa5a68d3c3b8c49 | hitcount/management/commands/hitcount_cleanup.py | hitcount/management/commands/hitcount_cleanup.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | Use count() on queryset instead of len() | Use count() on queryset instead of len()
Ensure a fast query even for millions of rows.
| Python | mit | thornomad/django-hitcount,thornomad/django-hitcount,thornomad/django-hitcount | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand as BaseCommand
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
try:
from django.core.management.base import BaseCommand
except ImportError:
from django.core.management.base import NoArgsCommand a... |
da193c2606daac82d0693cc10decdbf2d3162fa5 | lib/markdown_deux/conf/settings.py | lib/markdown_deux/conf/settings.py | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | Fix debug flag import error | Fix debug flag import error
| Python | mit | gogobook/django-markdown-deux,gogobook/django-markdown-deux,trentm/django-markdown-deux,douzepouze/django-markdown-tag | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | <commit_before># Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe... | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | # Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe_mode": "escape... | <commit_before># Copyright (c) 2010 ActiveState Software Inc.
from django.conf import settings
MARKDOWN_DEUX_HELP_URL = getattr(settings, "MARKDOWN_DEUX_HELP_URL",
"http://daringfireball.net/projects/markdown/syntax")
MARKDOWN_DEUX_DEFAULT_STYLE = {
"extras": {
"code-friendly": None,
},
"safe... |
57b1dbc45e7b78f7aa272fd5b7d4bd022850beb9 | lametro/migrations/0007_update_packet_links.py | lametro/migrations/0007_update_packet_links.py | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
for packet in ('BillPacket', 'EventPacket'):
packet_model = apps.get_m... | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
# for packet in ('BillPacket', 'EventPacket'):
# packet_model = apps.get... | Disable data migration for deployment | Disable data migration for deployment
| Python | mit | datamade/la-metro-councilmatic,datamade/la-metro-councilmatic,datamade/la-metro-councilmatic,datamade/la-metro-councilmatic | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
for packet in ('BillPacket', 'EventPacket'):
packet_model = apps.get_m... | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
# for packet in ('BillPacket', 'EventPacket'):
# packet_model = apps.get... | <commit_before># Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
for packet in ('BillPacket', 'EventPacket'):
packet_mod... | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
# for packet in ('BillPacket', 'EventPacket'):
# packet_model = apps.get... | # Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
for packet in ('BillPacket', 'EventPacket'):
packet_model = apps.get_m... | <commit_before># Generated by Django 2.2.24 on 2021-10-22 19:54
from django.db import migrations
def resave_packets(apps, schema_editor):
'''
Re-save all existing packets to update their URLs based on the
new value of MERGE_HOST.
'''
for packet in ('BillPacket', 'EventPacket'):
packet_mod... |
ce36dd825635c8487fcd9f83bd686a2dce7c318c | hello.py | hello.py | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | Use the right style of request. | Use the right style of request.
| Python | apache-2.0 | darron/mailgun_datadog | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | <commit_before>from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.... | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.event', (reques... | <commit_before>from flask import Flask
from flask import request
import os
from dogapi import dog_http_api as api
app = Flask(__name__)
api.api_key = os.environ.get('DD_API_KEY')
action_url = "/" + os.environ.get('BASE_URL') + "/"
@app.route(action_url, methods=['POST', 'GET'])
def hello():
api.metric('mailgun.... |
c711d5e2dbca4b95bebc0eed4d48a35eb3c7a998 | website/addons/dropbox/settings/local-dist.py | website/addons/dropbox/settings/local-dist.py | # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'changeme'
DROPBOX_SECRET = 'changeme'
| # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'jnpncg5s2fc7cj8'
DROPBOX_SECRET = 'sjqv1hrk7sonhu1' | Add dropbox credentials for testing. | Add dropbox credentials for testing.
| Python | apache-2.0 | crcresearch/osf.io,acshi/osf.io,felliott/osf.io,TomHeatwole/osf.io,RomanZWang/osf.io,jnayak1/osf.io,baylee-d/osf.io,TomBaxter/osf.io,mluke93/osf.io,mluo613/osf.io,pattisdr/osf.io,samchrisinger/osf.io,wearpants/osf.io,mfraezz/osf.io,kch8qx/osf.io,Nesiehr/osf.io,adlius/osf.io,RomanZWang/osf.io,abought/osf.io,felliott/osf... | # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'changeme'
DROPBOX_SECRET = 'changeme'
Add dropbox credentials for testing. | # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'jnpncg5s2fc7cj8'
DROPBOX_SECRET = 'sjqv1hrk7sonhu1' | <commit_before># -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'changeme'
DROPBOX_SECRET = 'changeme'
<commit_msg>Add dropbox credentials for testing.<commit_aft... | # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'jnpncg5s2fc7cj8'
DROPBOX_SECRET = 'sjqv1hrk7sonhu1' | # -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'changeme'
DROPBOX_SECRET = 'changeme'
Add dropbox credentials for testing.# -*- coding: utf-8 -*-
"""Example Dro... | <commit_before># -*- coding: utf-8 -*-
"""Example Dropbox local settings file. Copy this file to local.py and change
these settings.
"""
# Get an app key and secret at https://www.dropbox.com/developers/apps
DROPBOX_KEY = 'changeme'
DROPBOX_SECRET = 'changeme'
<commit_msg>Add dropbox credentials for testing.<commit_aft... |
df3bbdcf08dafbf2fd6997638a575fb4e47ac61f | factory/tools/cat_StarterLog.py | factory/tools/cat_StarterLog.py | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | Add support for monitor starterlog | Add support for monitor starterlog
| Python | bsd-3-clause | holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | <commit_before>#!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logna... | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | #!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logname>"
def main(... | <commit_before>#!/bin/env python
#
# cat_StarterLog.py
#
# Print out the StarterLog for a glidein output file
#
# Usage: cat_StarterLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StarterLog.py [-monitor] <logna... |
dd6c3abcfc01b22528440e5dd62a1d3d3453b8b3 | djangopress/templatetags/djangopress_tags.py | djangopress/templatetags/djangopress_tags.py | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | Sort the months in archive_templatetag | Sort the months in archive_templatetag
| Python | mit | gilmrjc/djangopress,gilmrjc/djangopress,gilmrjc/djangopress | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | <commit_before>"""Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List pos... | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | """Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List post by date"""
... | <commit_before>"""Templatetags for djangopress."""
from datetime import date
from collections import defaultdict
from django import template
from djangopress.models import Post, Category
register = template.Library()
@register.inclusion_tag('djangopress/tags/archive_list.html')
def archive_list():
"""List pos... |
226cb45ba39d13c4bf2b40f3998b2631f9f461a6 | Lib/cluster/__init__.py | Lib/cluster/__init__.py | #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
| #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
from numpy.testing import NumpyTest
test = NumpyTest().test
| Add missing test definition in scipy.cluster | Add missing test definition in scipy.cluster
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf
| Python | bsd-3-clause | jasonmccampbell/scipy-refactor,scipy/scipy-svn,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor | #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
Add missing test definition in scipy.cluster
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf | #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
from numpy.testing import NumpyTest
test = NumpyTest().test
| <commit_before>#
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
<commit_msg>Add missing test definition in scipy.cluster
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf<commit_after> | #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
from numpy.testing import NumpyTest
test = NumpyTest().test
| #
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
Add missing test definition in scipy.cluster
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf#
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ ... | <commit_before>#
# cluster - Vector Quantization / Kmeans
#
from info import __doc__
__all__ = ['vq']
import vq
<commit_msg>Add missing test definition in scipy.cluster
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@2941 d6536bca-fef9-0310-8506-e4c0a848fbcf<commit_after>#
# cluster - Vector Quantization / Kme... |
1317d645092d94c95bcaf7a0341ac18208f9df0d | patient/admin.py | patient/admin.py | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__init__(*args, **kwargs)... | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
exclude = []
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__in... | Fix deprecated warning in CustomPatientForm | Fix deprecated warning in CustomPatientForm
| Python | mit | sigurdsa/angelika-api | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__init__(*args, **kwargs)... | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
exclude = []
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__in... | <commit_before>from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__init__(*... | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
exclude = []
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__in... | from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__init__(*args, **kwargs)... | <commit_before>from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Patient
from django import forms
class CustomPatientForm(forms.ModelForm):
class Meta:
model = Patient
def __init__(self, *args, **kwargs):
super(CustomPatientForm, self).__init__(*... |
39461a97ef6e6b988466f41ddfee17687dd59ee1 | notifications/match_score.py | notifications/match_score.py | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | Add event key to match score notification | Add event key to match score notification | Python | mit | bdaroz/the-blue-alliance,tsteward/the-blue-alliance,jaredhasenklein/the-blue-alliance,fangeugene/the-blue-alliance,phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-allianc... | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | <commit_before>from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.ge... | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.get()
sel... | <commit_before>from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification
class MatchScoreNotification(BaseNotification):
def __init__(self, match):
self.match = match
self.event = match.event.ge... |
aca68618e5f1549faa1adfc1a1351a472ba0246d | gettingstarted/urls.py | gettingstarted/urls.py | from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
| from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
| Remove the dollar from the regex to avoid problems including URLs. | Remove the dollar from the regex to avoid problems including URLs.
| Python | bsd-2-clause | kenyansongithub/django-rog,kenyansongithub/django-rog,kenyansongithub/django-rog | from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
Remove t... | from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
| <commit_before>from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', include('rog.urls')),
url(r'^admin/', include(admin.site.urls... | from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
| from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', include('rog.urls')),
url(r'^admin/', include(admin.site.urls)),
]
Remove t... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
# Examples:
# url(r'^$', 'gettingstarted.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', include('rog.urls')),
url(r'^admin/', include(admin.site.urls... |
6623d5679eef2c3db70edce7334582b5d524786d | micro.py | micro.py | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def evaluate(tokens):
name = tokens[0]
tokens = tokens[1:]
if ... | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def parse_function(tokens):
return 'test', (23, None), tokens[-1... | Add a detection of a function definition. | Add a detection of a function definition.
| Python | mit | thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def evaluate(tokens):
name = tokens[0]
tokens = tokens[1:]
if ... | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def parse_function(tokens):
return 'test', (23, None), tokens[-1... | <commit_before>#!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def evaluate(tokens):
name = tokens[0]
tokens = ... | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def parse_function(tokens):
return 'test', (23, None), tokens[-1... | #!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def evaluate(tokens):
name = tokens[0]
tokens = tokens[1:]
if ... | <commit_before>#!/usr/bin/env python
from sys import argv
from operator import add, sub, mul, div
functions = { \
'+': (2, add), \
'-': (2, sub), \
'*': (2, mul), \
'/': (2, div) \
}
def get_code():
return argv[1]
def get_tokens(code):
return code.split(' ')
def evaluate(tokens):
name = tokens[0]
tokens = ... |
46afcd0e5e958e22647ef9c708918489027277e2 | modeltranslation/tests/settings.py | modeltranslation/tests/settings.py | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | Disable timezone support for tests, as the date / time fields' tests use naive datatime objects and fail if it's enabled. | Disable timezone support for tests, as the date / time fields' tests use naive datatime objects and fail if it's enabled.
| Python | bsd-3-clause | extertioner/django-modeltranslation,marctc/django-modeltranslation,yoza/django-modeltranslation,nanuxbe/django-modeltranslation,akheron/django-modeltranslation,vstoykov/django-modeltranslation,SideStudios/django-modeltranslation,yoza/django-modeltranslation,marctc/django-modeltranslation,deschler/django-modeltranslatio... | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | <commit_before># -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1]... | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | # -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
#INS... | <commit_before># -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
import os
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1]... |
f0b96aa0d4921e161eee9bb1a83846442f7f63b2 | likelihood.py | likelihood.py | import math
#Log-likelihood
def ll(ciphertext,perm,mat,k=2):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
| import math
#Log-likelihood
def ll(ciphertext,perm,mat):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
| Remove default value for k - this should never be necessary for this function | Remove default value for k - this should never be necessary for this function
| Python | mit | gputzel/decode | import math
#Log-likelihood
def ll(ciphertext,perm,mat,k=2):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
Remove default value for k - this should never be necessary for this function | import math
#Log-likelihood
def ll(ciphertext,perm,mat):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
| <commit_before>import math
#Log-likelihood
def ll(ciphertext,perm,mat,k=2):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
<commit_msg>Remove default value for k - this should never be necessary for this fu... | import math
#Log-likelihood
def ll(ciphertext,perm,mat):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
| import math
#Log-likelihood
def ll(ciphertext,perm,mat,k=2):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
Remove default value for k - this should never be necessary for this functionimport math
#Log-like... | <commit_before>import math
#Log-likelihood
def ll(ciphertext,perm,mat,k=2):
s=0.0
for i in range(len(ciphertext)-(k-1)):
kmer = tuple([perm[c] for c in ciphertext[i:i+k]])
s = s + math.log(mat[kmer])
return s
<commit_msg>Remove default value for k - this should never be necessary for this fu... |
6b868e9bbb88dadbf27b7f1f6a4ab5fedc6c23e5 | foolbox/tests/test_attacks_carlini_wagner.py | foolbox/tests/test_attacks_carlini_wagner.py | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | Revert "added new line at end of file to please flake8" | Revert "added new line at end of file to please flake8"
This reverts commit 65fbfbc9117ba2ff06b4360faa8dddbf1ef8faa6.
| Python | mit | bethgelab/foolbox,bethgelab/foolbox | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | <commit_before>import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(b... | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(bn_impossible):
... | <commit_before>import numpy as np
from foolbox.attacks import CarliniWagnerAttack as Attack
def test_targeted_attack(bn_targeted_adversarial):
adv = bn_targeted_adversarial
attack = Attack()
attack(adv)
assert adv.image is not None
assert adv.distance.value < np.inf
def test_attack_impossible(b... |
9e27c8f803c42e65ec333ed1679ea70a5618f3c6 | dunya/test_settings.py | dunya/test_settings.py | from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
TEST_RUNNER = "xmlrunner.extra.djangotestrunner.XMLTestRunner"
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = "xmlrunner"
| from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
from xmlrunner.extra.djangotestrunner import XMLTestRunner
from django.test.runner import DiscoverRunner
from django.db import connections, DEFAULT_DB_ALIAS
# We use the XMLTestRunner on CI
class DunyaTestRunner(XMLTestRunner):
#class DunyaTe... | Update test settings to create the unaccent ext if needed | Update test settings to create the unaccent ext if needed
| Python | agpl-3.0 | MTG/dunya,MTG/dunya,MTG/dunya,MTG/dunya | from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
TEST_RUNNER = "xmlrunner.extra.djangotestrunner.XMLTestRunner"
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = "xmlrunner"
Update test settings to create the unaccent ext if needed | from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
from xmlrunner.extra.djangotestrunner import XMLTestRunner
from django.test.runner import DiscoverRunner
from django.db import connections, DEFAULT_DB_ALIAS
# We use the XMLTestRunner on CI
class DunyaTestRunner(XMLTestRunner):
#class DunyaTe... | <commit_before>from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
TEST_RUNNER = "xmlrunner.extra.djangotestrunner.XMLTestRunner"
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = "xmlrunner"
<commit_msg>Update test settings to create the unaccent ext if needed<commi... | from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
from xmlrunner.extra.djangotestrunner import XMLTestRunner
from django.test.runner import DiscoverRunner
from django.db import connections, DEFAULT_DB_ALIAS
# We use the XMLTestRunner on CI
class DunyaTestRunner(XMLTestRunner):
#class DunyaTe... | from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
TEST_RUNNER = "xmlrunner.extra.djangotestrunner.XMLTestRunner"
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = "xmlrunner"
Update test settings to create the unaccent ext if neededfrom settings import *
if "motif... | <commit_before>from settings import *
if "motif" in DATABASES:
del DATABASES["motif"]
TEST_RUNNER = "xmlrunner.extra.djangotestrunner.XMLTestRunner"
TEST_OUTPUT_VERBOSE = True
TEST_OUTPUT_DESCRIPTIONS = True
TEST_OUTPUT_DIR = "xmlrunner"
<commit_msg>Update test settings to create the unaccent ext if needed<commi... |
ad415f26eec5c6a20c26123ccb6ce3e320ea9a69 | zou/app/blueprints/crud/asset_instance.py | zou/app/blueprints/crud/asset_instance.py | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | Change asset instance update permissions | Change asset instance update permissions
* Do not allow to change instance number
* Allow to change instance name by a CG artist
| Python | agpl-3.0 | cgwire/zou | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | <commit_before>from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModels... | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init... | <commit_before>from zou.app.models.asset_instance import AssetInstance
from zou.app.services import assets_service, user_service
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class AssetInstancesResource(BaseModelsResource):
def __init__(self):
BaseModels... |
1cdcc3ada4096a8352acc7f7c3e7825a7f44e0ac | examples/structures.py | examples/structures.py | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | Comment out printing of function. | Comment out printing of function.
| Python | bsd-2-clause | numba/numba,seibert/numba,stonebig/numba,jriehl/numba,sklam/numba,GaZ3ll3/numba,ssarangi/numba,shiquanwang/numba,cpcloud/numba,stuartarchibald/numba,pitrou/numba,GaZ3ll3/numba,pitrou/numba,cpcloud/numba,IntelLabs/numba,pitrou/numba,sklam/numba,cpcloud/numba,gdementen/numba,seibert/numba,jriehl/numba,gmarkall/numba,seib... | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | <commit_before>from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are infe... | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | <commit_before>from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are infe... |
b78aebed4771015e6292638ac1980e3acaed4db9 | heufybot/connection.py | heufybot/connection.py | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | Add dictionaries for channels and usermodes | Add dictionaries for channels and usermodes
| Python | mit | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | <commit_before>from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a config... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a configuration at some... | <commit_before>from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nick = "PyHeufyBot" # TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" # TODO This will be set by a config... |
2afe09bcbcc728e98ec8da39b68ea65f4c270fdb | html5lib/trie/_base.py | html5lib/trie/_base.py | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super().keys()
if prefix is None:
return set(keys)
# Python 2.6: no set compre... | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super(Trie, self).keys()
if prefix is None:
return set(keys)
# Python 2.6: no ... | Make this in practice unreachable code work on Py2 | Make this in practice unreachable code work on Py2
| Python | mit | html5lib/html5lib-python,html5lib/html5lib-python,html5lib/html5lib-python | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super().keys()
if prefix is None:
return set(keys)
# Python 2.6: no set compre... | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super(Trie, self).keys()
if prefix is None:
return set(keys)
# Python 2.6: no ... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super().keys()
if prefix is None:
return set(keys)
# Python 2.6... | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super(Trie, self).keys()
if prefix is None:
return set(keys)
# Python 2.6: no ... | from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super().keys()
if prefix is None:
return set(keys)
# Python 2.6: no set compre... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
class Trie(Mapping):
"""Abstract base class for tries"""
def keys(self, prefix=None):
keys = super().keys()
if prefix is None:
return set(keys)
# Python 2.6... |
2de06cda19c2d50c1362c9babd7c4bce735fb44a | product_configurator_mrp/__manifest__.py | product_configurator_mrp/__manifest__.py | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | Set product_configurator_mrp to uninstallable until fixing / refactoring | Set product_configurator_mrp to uninstallable until fixing / refactoring
| Python | agpl-3.0 | pledra/odoo-product-configurator,pledra/odoo-product-configurator,pledra/odoo-product-configurator | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | <commit_before>{
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'... | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | {
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'],
"data": ... | <commit_before>{
'name': 'Product Configurator Manufacturing',
'version': '11.0.1.0.0',
'category': 'Manufacturing',
'summary': 'BOM Support for configurable products',
'author': 'Pledra',
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'depends': ['mrp', 'product_configurator'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.