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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d698b1df6da2d5a0b3697891744d3c05e99cb95 | sympy/core/tests/test_compatibility.py | sympy/core/tests/test_compatibility.py | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | from sympy.core.compatibility import default_sort_key, as_int, ordered, iterable
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def t... | Test some basic properties of iterable() | Test some basic properties of iterable()
| Python | bsd-3-clause | Gadal/sympy,jerli/sympy,souravsingh/sympy,Curious72/sympy,wanglongqi/sympy,chaffra/sympy,atsao72/sympy,sahilshekhawat/sympy,moble/sympy,skidzo/sympy,madan96/sympy,atreyv/sympy,lindsayad/sympy,skidzo/sympy,asm666/sympy,beni55/sympy,asm666/sympy,oliverlee/sympy,saurabhjn76/sympy,grevutiu-gabriel/sympy,drufat/sympy,postva... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | from sympy.core.compatibility import default_sort_key, as_int, ordered, iterable
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def t... | <commit_before>from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
... | from sympy.core.compatibility import default_sort_key, as_int, ordered, iterable
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def t... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | <commit_before>from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
... |
e632fa3e12d3627abaf26f41a9f0483aaea24adf | imager/ImagerProfile/tests.py | imager/ImagerProfile/tests.py | from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.ImagerProfile'
django_get_or_create = ('username',)
username = 'John'
| from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.User'
django_get_or_create = ('username',)
username = factory.Sequence(lambda n: "Agent %03d" % n)
| Change test UserFactory model to point to User | Change test UserFactory model to point to User
| Python | mit | nbeck90/django-imager,nbeck90/django-imager | from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.ImagerProfile'
django_get_or_create = ('username',)
username = 'John'
Change test UserFactory model to point to User | from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.User'
django_get_or_create = ('username',)
username = factory.Sequence(lambda n: "Agent %03d" % n)
| <commit_before>from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.ImagerProfile'
django_get_or_create = ('username',)
username = 'John'
<commit_msg>Change test UserFactory model to point to User<commit_after... | from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.User'
django_get_or_create = ('username',)
username = factory.Sequence(lambda n: "Agent %03d" % n)
| from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.ImagerProfile'
django_get_or_create = ('username',)
username = 'John'
Change test UserFactory model to point to Userfrom django.test import TestCase
import ... | <commit_before>from django.test import TestCase
import factory
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'imagerprofile.ImagerProfile'
django_get_or_create = ('username',)
username = 'John'
<commit_msg>Change test UserFactory model to point to User<commit_after... |
a0e8c92a9d12846c8cfe6819ea26d1e08dd4098a | example/models.py | example/models.py | import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=512)
filefield = i18n.LocalizedFileField(null=True, upload_to='files')
imagefield = i18n.LocalizedImageField(null=... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | Make fields in example app non required | Make fields in example app non required
| Python | bsd-3-clause | jonasundderwolf/django-localizedfields,jonasundderwolf/django-localizedfields | import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=512)
filefield = i18n.LocalizedFileField(null=True, upload_to='files')
imagefield = i18n.LocalizedImageField(null=... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | <commit_before>import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=512)
filefield = i18n.LocalizedFileField(null=True, upload_to='files')
imagefield = i18n.LocalizedI... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=512)
filefield = i18n.LocalizedFileField(null=True, upload_to='files')
imagefield = i18n.LocalizedImageField(null=... | <commit_before>import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=512)
filefield = i18n.LocalizedFileField(null=True, upload_to='files')
imagefield = i18n.LocalizedI... |
d93014618636ba23ebfd99c466072e8b4c265a42 | wikiwhere/plot_data_generation/count_generation.py | wikiwhere/plot_data_generation/count_generation.py | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
feature ... | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
import operator
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
... | Add reverse sorting of count_array | Add reverse sorting of count_array | Python | mit | mkrnr/wikiwhere | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
feature ... | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
import operator
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
... | <commit_before>'''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
... | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
import operator
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
... | '''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
feature ... | <commit_before>'''
Created on May 3, 2016
@author: Martin Koerner <[email protected]>
'''
class CountGeneration(object):
def generate_counts(self,collected_features_array,feature_name):
feature_counts = {}
for instance in collected_features_array:
if feature_name in instance:
... |
3ea1c6b718e19d99d123feb734ca5f1a44174bf9 | Lib/test/test_fcntl.py | Lib/test/test_fcntl.py | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.O_NDELAY, 1)
if verbose:
... | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, FCNTL.FNDELAY)
if v... | Fix the NDELAY test; avoid outputting binary garbage. | Fix the NDELAY test; avoid outputting binary garbage.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.O_NDELAY, 1)
if verbose:
... | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, FCNTL.FNDELAY)
if v... | <commit_before>#! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.O_NDELAY, 1)
... | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, FCNTL.FNDELAY)
if v... | #! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.O_NDELAY, 1)
if verbose:
... | <commit_before>#! /usr/bin/env python
"""Test program for the fcntl C module.
Roger E. Masse
"""
import struct
import fcntl
import FCNTL
import os
from test_support import verbose
filename = '/tmp/delete-me'
# the example from the library docs
f = open(filename,'w')
rv = fcntl.fcntl(f.fileno(), FCNTL.O_NDELAY, 1)
... |
ad7d331868706c97caa0bf0abff88d6ab5537d8d | pyramid_skosprovider/__init__.py | pyramid_skosprovider/__init__.py | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | Add skos_registry to the request. | Add skos_registry to the request.
Add the skos_registry to the request through the add_request_method
directive.
| Python | mit | koenedaele/pyramid_skosprovider | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | <commit_before># -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry... | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | # -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry
skos_regi... | <commit_before># -*- coding: utf8 -*-
from zope.interface import Interface
from skosprovider.registry import Registry
class ISkosRegistry(Interface):
pass
def _build_skos_registry(registry):
skos_registry = registry.queryUtility(ISkosRegistry)
if skos_registry is not None:
return skos_registry... |
6b2ae24a3989728dcf5015fbb7768ba1b4eed723 | messaging/message_producer.py | messaging/message_producer.py | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | Use sendall instead of send for socket messages | Use sendall instead of send for socket messages
I kept getting Errno 111 connection refused errors; I hope this fixes
it.
| Python | mit | bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | <commit_before>"""Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
... | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | """Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
('.... | <commit_before>"""Message broker that sends to Unix domain sockets."""
import os
import socket
import time
class MessageProducer(object):
"""Message broker that sends to Unix domain sockets."""
def __init__(self, message_type):
self._message_type = message_type
socket_address = os.sep.join(
... |
638ea1b12b71f74b357d60b09f1284625db73b2d | migrations/versions/0040_adjust_mmg_provider_rate.py | migrations/versions/0040_adjust_mmg_provider_rate.py | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | Set the start date for the new rate as July 1 | Set the start date for the new rate as July 1
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | <commit_before>"""mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
fr... | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | """mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
from datetime imp... | <commit_before>"""mmg rates now set to 1.65 pence per sms
Revision ID: 0040_adjust_mmg_provider_rate
Revises: 0039_fix_notifications
Create Date: 2016-07-06 15:19:23.124212
"""
# revision identifiers, used by Alembic.
revision = '0040_adjust_mmg_provider_rate'
down_revision = '0039_fix_notifications'
import uuid
fr... |
0ceedd5b22a42634889b572018db1153e1ef2855 | tests/integration/services/user_avatar/test_update_avatar_image.py | tests/integration/services/user_avatar/test_update_avatar_image.py | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | Use `/` operator to assemble path | Use `/` operator to assemble path
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | <commit_before>"""
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_... | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_extension, imag... | <commit_before>"""
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from pathlib import Path
import pytest
from byceps.services.user_avatar import service as user_avatar_service
from byceps.util.image.models import ImageType
@pytest.mark.parametrize(
'image_... |
1da520787717117b0413715f9a6df834f2d9e7e1 | press_releases/migrations/0009_auto_20170519_1308.py | press_releases/migrations/0009_auto_20170519_1308.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | Change help text wording to follow WorkflowStateMixin | Change help text wording to follow WorkflowStateMixin
| Python | mit | ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-press-releases | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_n... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_name='pressrelea... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('icekit_press_releases', '0008_auto_20161128_1049'),
]
operations = [
migrations.AddField(
model_n... |
f05cd9d2249ea5ef616accf931418f413bce00ba | appengine/swarming/swarming_bot/bot_code/common.py | appengine/swarming/swarming_bot/bot_code/common.py | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | Fix regression on 6269f48ba356c4e7f in cygwin. | Fix regression on 6269f48ba356c4e7f in cygwin.
signal.SIGBREAK is not defined on cygwin, causing an exception.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/1349183005
| Python | apache-2.0 | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | <commit_before># Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes... | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | # Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes a python proce... | <commit_before># Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
"""Utilities."""
import logging
import os
import signal
import sys
from utils import subprocess42
def exec_python(args):
"""Executes... |
3f2be07e5df6bcf8bcfa9fce143291d476e93d9b | lib/reinteract/doc_format.py | lib/reinteract/doc_format.py | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | Fix typo breaking doc popups | Fix typo breaking doc popups
| Python | bsd-2-clause | rschroll/reinteract,johnrizzo1/reinteract,johnrizzo1/reinteract,alexey4petrov/reinteract,johnrizzo1/reinteract,alexey4petrov/reinteract,rschroll/reinteract,rschroll/reinteract,jbaayen/reinteract,jbaayen/reinteract,alexey4petrov/reinteract,jbaayen/reinteract | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | <commit_before>import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert... | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert the documentat... | <commit_before>import re
import pydoc
import gtk
from data_format import insert_with_tag, is_data_object
BOLD_RE = re.compile("(?:(.)\b(.))+")
STRIP_BOLD_RE = re.compile("(.)\b(.)")
def insert_docs(buf, iter, obj, bold_tag):
"""Insert documentation about obj into a gtk.TextBuffer
buf -- the buffer to insert... |
199f9ace071b95822a9a0fb53c9becfb0ab4abd2 | tests/pytests/unit/modules/test_win_servermanager.py | tests/pytests/unit/modules/test_win_servermanager.py | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {win_servermanager: {}}
def test_install():
mock_out = {
"FeatureResult": {
}
}
with patch.obje... | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {
win_servermanager: {
"__grains__": {"osversion": "6.2"}
}
}
def test_install():
mock_ou... | Add some unit tests for install | Add some unit tests for install
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {win_servermanager: {}}
def test_install():
mock_out = {
"FeatureResult": {
}
}
with patch.obje... | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {
win_servermanager: {
"__grains__": {"osversion": "6.2"}
}
}
def test_install():
mock_ou... | <commit_before>import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {win_servermanager: {}}
def test_install():
mock_out = {
"FeatureResult": {
}
}
... | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {
win_servermanager: {
"__grains__": {"osversion": "6.2"}
}
}
def test_install():
mock_ou... | import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {win_servermanager: {}}
def test_install():
mock_out = {
"FeatureResult": {
}
}
with patch.obje... | <commit_before>import os
import pytest
import salt.modules.win_servermanager as win_servermanager
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {win_servermanager: {}}
def test_install():
mock_out = {
"FeatureResult": {
}
}
... |
6c40079139e714ff145e0a4adff8c3a537172ef5 | erpnext/patches/v4_1/fix_delivery_and_billing_status_for_draft_so.py | erpnext/patches/v4_1/fix_delivery_and_billing_status_for_draft_so.py | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | Update delivery and billing status in SO | Update delivery and billing status in SO
| Python | agpl-3.0 | gangadharkadam/saloon_erp,njmube/erpnext,Tejal011089/fbd_erpnext,anandpdoshi/erpnext,SPKian/Testing,indictranstech/focal-erpnext,mbauskar/helpdesk-erpnext,4commerce-technologies-AG/erpnext,mbauskar/helpdesk-erpnext,indictranstech/vestasi-erpnext,indictranstech/internal-erpnext,indictranstech/phrerp,indictranstech/buyba... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' ... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status... |
b745e05cd4f2ca2a6683f2e057d52dee454d5b23 | lib/authenticator.py | lib/authenticator.py | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | Throw exception if no login credentials are provided | Throw exception if no login credentials are provided
| Python | mit | MobileXLabs/hamper | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | <commit_before>#
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperE... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | #
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperError
from term... | <commit_before>#
# HamperAuthenticator is the class to handle the authentication part of the provisioning portal.
# Instantiate with the email and password you want, it'll pass back the cookie jar if successful,
# or an error message on failure
#
from helpers.driver import HamperDriver
from helpers.error import HamperE... |
a6f8e42d3e297776a19c8e76dd7f1cfded32a266 | pycon/tutorials/tests/test_utils.py | pycon/tutorials/tests/test_utils.py | """Test for the tutorials.utils package"""
import datetime
import unittest
from mock import patch
from django.template import Template
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(unittest.TestCase):
@patch('dj... | """Test for the tutorials.utils package"""
import datetime
from mock import patch
from django.template import Template
from django.test import TestCase
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(TestCase):
@p... | Use django TestCase in tutorial send email test | Use django TestCase in tutorial send email test
It was using regular Python unittest.TestCase for some
reason, resulting in leaving old BulkEmail objects in
the database that other tests weren't expecting.
| Python | bsd-3-clause | PyCon/pycon,PyCon/pycon,PyCon/pycon,njl/pycon,PyCon/pycon,njl/pycon,njl/pycon,njl/pycon | """Test for the tutorials.utils package"""
import datetime
import unittest
from mock import patch
from django.template import Template
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(unittest.TestCase):
@patch('dj... | """Test for the tutorials.utils package"""
import datetime
from mock import patch
from django.template import Template
from django.test import TestCase
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(TestCase):
@p... | <commit_before>"""Test for the tutorials.utils package"""
import datetime
import unittest
from mock import patch
from django.template import Template
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(unittest.TestCase):... | """Test for the tutorials.utils package"""
import datetime
from mock import patch
from django.template import Template
from django.test import TestCase
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(TestCase):
@p... | """Test for the tutorials.utils package"""
import datetime
import unittest
from mock import patch
from django.template import Template
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(unittest.TestCase):
@patch('dj... | <commit_before>"""Test for the tutorials.utils package"""
import datetime
import unittest
from mock import patch
from django.template import Template
from pycon.bulkemail.models import BulkEmail
from ..utils import queue_email_message
today = datetime.date.today()
class TestSendEmailMessage(unittest.TestCase):... |
d62ec0008b4ca65a784a1017e2c9253f0e0ab749 | taiga/projects/migrations/0006_auto_20141029_1040.py | taiga/projects/migrations/0006_auto_20141029_1040.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
for project in Project.objects.filter(total_milestones__isnull=True):
project.total_milestones = 0
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
qs = Project.objects.filter(total_milestones__isnull=True)
qs.update(total_milestones=0)
class Migrat... | Make 0006 migration of project more efficient. | Make 0006 migration of project more efficient.
| Python | agpl-3.0 | frt-arch/taiga-back,dycodedev/taiga-back,obimod/taiga-back,19kestier/taiga-back,EvgeneOskin/taiga-back,bdang2012/taiga-back-casting,gauravjns/taiga-back,xdevelsistemas/taiga-back-community,Tigerwhit4/taiga-back,Zaneh-/bearded-tribble-back,bdang2012/taiga-back-casting,CoolCloud/taiga-back,bdang2012/taiga-back-casting,ta... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
for project in Project.objects.filter(total_milestones__isnull=True):
project.total_milestones = 0
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
qs = Project.objects.filter(total_milestones__isnull=True)
qs.update(total_milestones=0)
class Migrat... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
for project in Project.objects.filter(total_milestones__isnull=True):
project.total_... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
qs = Project.objects.filter(total_milestones__isnull=True)
qs.update(total_milestones=0)
class Migrat... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
for project in Project.objects.filter(total_milestones__isnull=True):
project.total_milestones = 0
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_total_milestones(apps, schema_editor):
Project = apps.get_model("projects", "Project")
for project in Project.objects.filter(total_milestones__isnull=True):
project.total_... |
f869cf9a94749ea210d38178317d196fbdd15fac | resolwe/flow/tests/test_backend.py | resolwe/flow/tests/test_backend.py | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | Fix error if no data path | Fix error if no data path
| Python | apache-2.0 | jberci/resolwe,jberci/resolwe,genialis/resolwe,genialis/resolwe | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | <commit_before># pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(se... | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | # pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(self):
u ... | <commit_before># pylint: disable=missing-docstring
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from resolwe.flow.engine import manager
from resolwe.flow.models import Data, Tool
class ManagerTest(TestCase):
def setUp(se... |
a2920b9bf5386b3f92a8e2cd5f7c4251439b2c42 | newswall/admin.py | newswall/admin.py | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
date_hierarchy='timestamp',
list_display=('... | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_editable=('is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
da... | Make a few fields editable from the changelist | Make a few fields editable from the changelist
| Python | bsd-3-clause | matthiask/django-newswall,registerguard/django-newswall,michaelkuty/django-newswall,HerraLampila/django-newswall,matthiask/django-newswall,HerraLampila/django-newswall,registerguard/django-newswall,michaelkuty/django-newswall | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
date_hierarchy='timestamp',
list_display=('... | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_editable=('is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
da... | <commit_before>from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
date_hierarchy='timestamp',
... | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_editable=('is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
da... | from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
date_hierarchy='timestamp',
list_display=('... | <commit_before>from django.contrib import admin
from newswall.models import Source, Story
admin.site.register(Source,
list_display=('name', 'is_active', 'ordering'),
list_filter=('is_active',),
prepopulated_fields={'slug': ('name',)},
)
admin.site.register(Story,
date_hierarchy='timestamp',
... |
170bfa1aea96c0d1cbe13557ce158effff91466c | pilight.py | pilight.py | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def main ():
spec = ctimerfd.itimerspec ()
spec.it_interval.tv_sec = 0
spec.it_interval.tv_nsec = long (1e9/60)
spec.it_value.tv_sec = 0
... | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def eintr_wrap (fn, *args, **kwargs):
while True:
try:
return fn (*args, **kwargs)
except IOError, e:
... | Add wrapper functions to deal with EINTR and exceptions in dispatched-to-functions | Add wrapper functions to deal with EINTR and exceptions in dispatched-to-functions
| Python | mit | yrro/pilight | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def main ():
spec = ctimerfd.itimerspec ()
spec.it_interval.tv_sec = 0
spec.it_interval.tv_nsec = long (1e9/60)
spec.it_value.tv_sec = 0
... | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def eintr_wrap (fn, *args, **kwargs):
while True:
try:
return fn (*args, **kwargs)
except IOError, e:
... | <commit_before>#!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def main ():
spec = ctimerfd.itimerspec ()
spec.it_interval.tv_sec = 0
spec.it_interval.tv_nsec = long (1e9/60)
spec.it_val... | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def eintr_wrap (fn, *args, **kwargs):
while True:
try:
return fn (*args, **kwargs)
except IOError, e:
... | #!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def main ():
spec = ctimerfd.itimerspec ()
spec.it_interval.tv_sec = 0
spec.it_interval.tv_nsec = long (1e9/60)
spec.it_value.tv_sec = 0
... | <commit_before>#!/usr/bin/python
import ctypes
import errno
import os
import select
import traceback
import cepoll
import ctimerfd
def on_timer ():
pass
def main ():
spec = ctimerfd.itimerspec ()
spec.it_interval.tv_sec = 0
spec.it_interval.tv_nsec = long (1e9/60)
spec.it_val... |
d68910e98eea4836a372e6230cc11044f2e59214 | packet_sniffer/pcapreader.py | packet_sniffer/pcapreader.py | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | Change script to point to AWS | Change script to point to AWS
| Python | mit | cheung31/bigbrother,cheung31/bigbrother,cheung31/bigbrother,cheung31/bigbrother | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | <commit_before>from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
... | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
extra = pkt.not... | <commit_before>from scapy.all import *
import unirest
import json
def callbackFunction(response):
pass
# "http://54.68.246.202:3000/rssi"
def main():
print "Reading pcap file %s"%sys.argv[1]
myreader = PcapReader(sys.argv[1])
packets = []
routerId = sys.argv[2]
for pkt in myreader:
try:
... |
ce052f8e19d46f6db202e7eee054d5b88af01d9b | nanagogo/__init__.py | nanagogo/__init__.py | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError, s
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | Convert direction to upper case | Convert direction to upper case
| Python | mit | kastden/nanagogo | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError, s
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | <commit_before>#!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError, s
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | #!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... | <commit_before>#!/usr/bin/env python3
from nanagogo.api import NanagogoRequest, NanagogoError
def get(path, params={}):
r = NanagogoRequest(path,
method="GET",
params=params)
return r.wrap()
def post(path, params={}, data=None):
r = NanagogoRequest(path,
... |
04cca2c87cc8e56ecd84e1b3125a7a7b8c67b026 | norc_utils/backup.py | norc_utils/backup.py |
import os
from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES):
try:
set_s3... |
import os
from norc.settings import NORC_LOG_DIR, BACKUP_SYSTEM
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
from norc.settings import (AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES)... | Move AWS_ setting imports under the check for AmazonS3 so Norc doesn't break without them. | Move AWS_ setting imports under the check for AmazonS3 so Norc doesn't break without them.
| Python | bsd-3-clause | darrellsilver/norc,darrellsilver/norc |
import os
from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES):
try:
set_s3... |
import os
from norc.settings import NORC_LOG_DIR, BACKUP_SYSTEM
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
from norc.settings import (AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES)... | <commit_before>
import os
from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES):
try:
... |
import os
from norc.settings import NORC_LOG_DIR, BACKUP_SYSTEM
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
from norc.settings import (AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES)... |
import os
from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES):
try:
set_s3... | <commit_before>
import os
from norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)
if BACKUP_SYSTEM == 'AmazonS3':
from norc.norc_utils.aws import set_s3_key
def s3_backup(fp, target):
NUM_TRIES = 3
for i in range(NUM_TRIES):
try:
... |
428fda845c79f70c6e3d64302bbc716da5130625 | src/django_richenum/forms/fields.py | src/django_richenum/forms/fields.py | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | Make run_validators method a no-op | _BaseEnumField: Make run_validators method a no-op
See the comment in this commit-- I can't see value in allowing custom
validators on EnumFields and the implementation in the superclass causes
warnings in RichEnum.__eq__.
Arguably those warnings aren't useful (warning against []/falsy compare).
In that case, we can ... | Python | mit | hearsaycorp/django-richenum,adepue/django-richenum,dhui/django-richenum,asherf/django-richenum,hearsaycorp/django-richenum | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | <commit_before>from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwar... | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwargs:
... | <commit_before>from abc import ABCMeta
from abc import abstractmethod
from django import forms
class _BaseEnumField(forms.TypedChoiceField):
__metaclass__ = ABCMeta
def __init__(self, enum, *args, **kwargs):
self.enum = enum
kwargs.setdefault('empty_value', None)
if 'choices' in kwar... |
0782ab8774f840c7ab2e66ddd168ac3ccfa3fc4f | openprescribing/pipeline/management/commands/clean_up_bq_test_data.py | openprescribing/pipeline/management/commands/clean_up_bq_test_data.py | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | Clean up BQ test data properly | Clean up BQ test data properly
If you delete datasets while iterating over datasets, you eventually get
errors. This fixes that by building a list of all datasets before we
delete any.
| Python | mit | ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | <commit_before>import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
... | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
'openpresc... | <commit_before>import os
from django.core.management import BaseCommand, CommandError
from gcutils.bigquery import Client
class Command(BaseCommand):
help = 'Removes any datasets whose tables have all expired'
def handle(self, *args, **kwargs):
if os.environ['DJANGO_SETTINGS_MODULE'] != \
... |
90dfa38014ba91de2e8c0c75d63788aab3c95f38 | Python/python2_version/klampt/__init__.py | Python/python2_version/klampt/__init__.py | from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D','Appearance','DistanceQuerySettings','Distanc... | from __future__ import print_function,division
from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D... | Allow some compatibility between python2 and updated python 3 files | Allow some compatibility between python2 and updated python 3 files
| Python | bsd-3-clause | krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt | from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D','Appearance','DistanceQuerySettings','Distanc... | from __future__ import print_function,division
from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D... | <commit_before>from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D','Appearance','DistanceQuerySet... | from __future__ import print_function,division
from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D... | from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D','Appearance','DistanceQuerySettings','Distanc... | <commit_before>from robotsim import *
import atexit
atexit.register(destroy)
__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',
'SimRobotController','SimRobotSensor','SimBody','Simulator',
'Geometry3D','Appearance','DistanceQuerySet... |
3a321a93f9779f9e27da8e85e3ffc7460bbbef12 | src/python/yalix/test/utils_test.py | src/python/yalix/test/utils_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | Comment out failing test on Python3 env | Comment out failing test on Python3 env
| Python | mit | rm-hull/yalix | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Test... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log message... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Test... |
94790371e7ec8dc189409e39e193680b9c6b1a08 | raven/contrib/django/apps.py | raven/contrib/django/apps.py | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
| # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
| Add missing __future__ import to pass coding guidelines. | Add missing __future__ import to pass coding guidelines.
| Python | bsd-3-clause | getsentry/raven-python,lepture/raven-python,smarkets/raven-python,Photonomie/raven-python,akalipetis/raven-python,danriti/raven-python,jbarbuto/raven-python,akheron/raven-python,ronaldevers/raven-python,johansteffner/raven-python,smarkets/raven-python,jmagnusson/raven-python,akheron/raven-python,jbarbuto/raven-python,P... | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
Add missing __future__ import to pass coding guidelines. | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
| <commit_before># -*- coding: utf-8 -*-
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
<commit_msg>Add missing __future__ import to pass coding guidelines.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
| # -*- coding: utf-8 -*-
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
Add missing __future__ import to pass coding guidelines.# -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.apps... | <commit_before># -*- coding: utf-8 -*-
from django.apps import AppConfig
class RavenConfig(AppConfig):
name = 'raven.contrib.django'
label = 'raven.contrib.django'
verbose_name = 'Raven'
<commit_msg>Add missing __future__ import to pass coding guidelines.<commit_after># -*- coding: utf-8 -*-
from __future_... |
ba3c46dc19afe79647ea07d80c495fbf7ad47514 | rocketleaguereplayanalysis/util/transcode.py | rocketleaguereplayanalysis/util/transcode.py | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | FIx render output (missing crf value) | FIx render output (missing crf value)
| Python | agpl-3.0 | enzanki-ars/rocket-league-minimap-generator | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | <commit_before>def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguerepla... | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguereplayanalysis.util.... | <commit_before>def render_video(render_type,
out_frame_rate=30, overlay=None, extra_cmd=None):
import os
import subprocess
from rocketleaguereplayanalysis.render.do_render import get_video_prefix
from rocketleaguereplayanalysis.parser.frames import get_frames
from rocketleaguerepla... |
2158763bb6226ba5e5de83527a6ec45a4adcbfa1 | shoop/front/apps/simple_order_notification/templates.py | shoop/front/apps/simple_order_notification/templates.py | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | Fix default template of order received notification | Fix default template of order received notification
Order lines were rendered on a single line. Fix that by adding a line
break after each order line.
| Python | agpl-3.0 | akx/shoop,hrayr-artunyan/shuup,akx/shoop,jorge-marques/shoop,shoopio/shoop,suutari/shoop,suutari-ai/shoop,taedori81/shoop,suutari/shoop,suutari-ai/shoop,shawnadelic/shuup,taedori81/shoop,jorge-marques/shoop,shawnadelic/shuup,shoopio/shoop,hrayr-artunyan/shuup,taedori81/shoop,suutari-ai/shoop,shawnadelic/shuup,hrayr-art... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ orde... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ order.identifier }}... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
MESSAGE_SUBJECT_TEMPLATE = "{{ order.shop }} - Order {{ orde... |
b870028ce8edcb5001f1a4823517d866db0324a8 | pyglab/apirequest.py | pyglab/apirequest.py | import enum
import json
from pyglab.exceptions import RequestError
import requests
@enum.unique
class RequestType(enum.Enum):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestT... | import json
from pyglab.exceptions import RequestError
import requests
class RequestType(object):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestType.PUT: requests.put,
... | Make RequestType a normal class, not an enum. | Make RequestType a normal class, not an enum.
This removes the restriction of needing Python >= 3.4. RequestType is
now a normal class with class variables (fixes #19).
| Python | mit | sloede/pyglab,sloede/pyglab | import enum
import json
from pyglab.exceptions import RequestError
import requests
@enum.unique
class RequestType(enum.Enum):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestT... | import json
from pyglab.exceptions import RequestError
import requests
class RequestType(object):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestType.PUT: requests.put,
... | <commit_before>import enum
import json
from pyglab.exceptions import RequestError
import requests
@enum.unique
class RequestType(enum.Enum):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
... | import json
from pyglab.exceptions import RequestError
import requests
class RequestType(object):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestType.PUT: requests.put,
... | import enum
import json
from pyglab.exceptions import RequestError
import requests
@enum.unique
class RequestType(enum.Enum):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
RequestT... | <commit_before>import enum
import json
from pyglab.exceptions import RequestError
import requests
@enum.unique
class RequestType(enum.Enum):
GET = 1
POST = 2
PUT = 3
DELETE = 4
class ApiRequest:
_request_creators = {
RequestType.GET: requests.get,
RequestType.POST: requests.post,
... |
deed4cf02bf919a06bffa0ac5b5948390740a97e | tests/test_channel_shim.py | tests/test_channel_shim.py | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
if v >= (0, 13, 0) and v < (1, 0, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0, 0):
assert isinstance(channel.Channe... | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
print 'Version info:', gevent.__version__, v
if v >= (0, 13) and v < (1, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0):
... | Fix channel shim test for gevent 1.0.0 | Fix channel shim test for gevent 1.0.0
Gevent 1.0 specifies this as its version, not 1.0.0, breaking the
comparison spuriously if one has version 1.0 installed exactly.
| Python | bsd-3-clause | nagual13/wal-e,equa/wal-e,wal-e/wal-e,DataDog/wal-e,ArtemZ/wal-e,intoximeters/wal-e,heroku/wal-e,ajmarks/wal-e,fdr/wal-e,tenstartups/wal-e,RichardKnop/wal-e,x86Labs/wal-e | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
if v >= (0, 13, 0) and v < (1, 0, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0, 0):
assert isinstance(channel.Channe... | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
print 'Version info:', gevent.__version__, v
if v >= (0, 13) and v < (1, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0):
... | <commit_before>import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
if v >= (0, 13, 0) and v < (1, 0, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0, 0):
assert isinstance... | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
print 'Version info:', gevent.__version__, v
if v >= (0, 13) and v < (1, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0):
... | import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
if v >= (0, 13, 0) and v < (1, 0, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0, 0):
assert isinstance(channel.Channe... | <commit_before>import gevent
from gevent import queue
from wal_e import channel
def test_channel_shim():
v = tuple(int(x) for x in gevent.__version__.split('.'))
if v >= (0, 13, 0) and v < (1, 0, 0):
assert isinstance(channel.Channel(), queue.Queue)
elif v >= (1, 0, 0):
assert isinstance... |
8ecb32004aca75c0b6cb70bd1a00e38f3a65c8c8 | sound/irc/auth/controller.py | sound/irc/auth/controller.py | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def authorize(se... | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url, session
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def aut... | Fix a bug where user-agents could specify their own session ID. | Fix a bug where user-agents could specify their own session ID.
| Python | mit | eve-val/irc,eve-val/irc,eve-val/irc | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def authorize(se... | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url, session
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def aut... | <commit_before># encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
d... | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url, session
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def aut... | # encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
def authorize(se... | <commit_before># encoding: utf-8
from __future__ import unicode_literals
from web.auth import authenticate, deauthenticate
from web.core import config, url
from web.core.http import HTTPFound
from brave.api.client import API
log = __import__('logging').getLogger(__name__)
class AuthenticationMixIn(object):
d... |
1a7c4a027628241f415cc5cc3f7aca09ad9a4027 | scripts/lib/check-database-compatibility.py | scripts/lib/check-database-compatibility.py | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | Fix typo in logging statement. | scripts: Fix typo in logging statement.
| Python | apache-2.0 | rht/zulip,zulip/zulip,andersk/zulip,kou/zulip,zulip/zulip,andersk/zulip,andersk/zulip,rht/zulip,zulip/zulip,kou/zulip,rht/zulip,zulip/zulip,andersk/zulip,andersk/zulip,zulip/zulip,kou/zulip,rht/zulip,kou/zulip,kou/zulip,andersk/zulip,kou/zulip,kou/zulip,rht/zulip,zulip/zulip,rht/zulip,zulip/zulip,andersk/zulip,rht/zuli... | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | <commit_before>#!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_roo... | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | #!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_root, parse_versio... | <commit_before>#!/usr/bin/env python3
import logging
import os
import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, ZULIP_PATH)
from scripts.lib.setup_path import setup_path
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, assert_not_running_as_roo... |
50aa4ddeaad1d45687b8ab7d99a26602896a276b | indico/modules/events/persons/__init__.py | indico/modules/events/persons/__init__.py | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Add logger to events.persons module | Add logger to events.persons module
| Python | mit | mic4ael/indico,OmeGak/indico,mic4ael/indico,ThiefMaster/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,OmeGak/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,indico/indico,mvidalgarcia/indico,DirkHoffmann/indico,pferreir/indico,mic4ael/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,... | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | <commit_before># This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
#... | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | <commit_before># This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
#... |
8befea283830f76dfa41cfd10d7eb916c68f7ef9 | intern/views.py | intern/views.py | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all()
folders = Folder.objects.all()
#print(files[0])
return... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all().order_by("-modified_at")
folders = Folder.objects.all()
#p... | Sort files by last modification | Sort files by last modification
| Python | mit | n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all()
folders = Folder.objects.all()
#print(files[0])
return... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all().order_by("-modified_at")
folders = Folder.objects.all()
#p... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all()
folders = Folder.objects.all()
#print(files... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all().order_by("-modified_at")
folders = Folder.objects.all()
#p... | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all()
folders = Folder.objects.all()
#print(files[0])
return... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from filer.models import File
from filer.models import Folder
@login_required
def documents(request):
files = File.objects.all()
folders = Folder.objects.all()
#print(files... |
a3f611220afa9cc0ba1b2eb8fb8a4d4c220e99dd | kokki/cookbooks/busket/recipes/default.py | kokki/cookbooks/busket/recipes/default.py |
import os
from kokki import *
Package("erlang")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/busket.git busket\n"
"cd busket\n"
"make release\n"
"mv rel/busket {install_... |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... | Install mercurial to install busket | Install mercurial to install busket
| Python | bsd-3-clause | samuel/kokki |
import os
from kokki import *
Package("erlang")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/busket.git busket\n"
"cd busket\n"
"make release\n"
"mv rel/busket {install_... |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... | <commit_before>
import os
from kokki import *
Package("erlang")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/busket.git busket\n"
"cd busket\n"
"make release\n"
"mv rel/b... |
import os
from kokki import *
Package("erlang")
Package("mercurial",
provider = "kokki.providers.package.easy_install.EasyInstallProvider")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/bus... |
import os
from kokki import *
Package("erlang")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/busket.git busket\n"
"cd busket\n"
"make release\n"
"mv rel/busket {install_... | <commit_before>
import os
from kokki import *
Package("erlang")
Script("install-busket",
not_if = lambda:os.path.exists(env.config.busket.path),
cwd = "/usr/local/src",
code = (
"git clone git://github.com/samuel/busket.git busket\n"
"cd busket\n"
"make release\n"
"mv rel/b... |
71b7885bc1e3740adf8c07c23b41835e1e69f8a2 | sqlobject/tests/test_class_hash.py | sqlobject/tests/test_class_hash.py | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | Fix flake8 warning in test case | Fix flake8 warning in test case
| Python | lgpl-2.1 | drnlm/sqlobject,sqlobject/sqlobject,drnlm/sqlobject,sqlobject/sqlobject | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | <commit_before>from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():
setupClass... | <commit_before>from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
# Test hashing a column instance
########################################
class ClassHashTest(SQLObject):
name = StringCol(length=50, alternateID=True, dbName='name_col')
def test_class_hash():... |
725605cd20b29e200f6aaa90f29053bc623b0e51 | thefuck/rules/unknown_command.py | thefuck/rules/unknown_command.py | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown command.*", c... | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) is not None
and re.search(r"Did you mean ([^?]*)?", command.stderr) is not None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown comma... | Fix flake8 errors: E711 comparison to None should be 'if cond is not None:' | Fix flake8 errors: E711 comparison to None should be 'if cond is not None:'
| Python | mit | mlk/thefuck,mlk/thefuck,nvbn/thefuck,Clpsplug/thefuck,SimenB/thefuck,nvbn/thefuck,scorphus/thefuck,Clpsplug/thefuck,SimenB/thefuck,scorphus/thefuck | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown command.*", c... | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) is not None
and re.search(r"Did you mean ([^?]*)?", command.stderr) is not None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown comma... | <commit_before>import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknow... | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) is not None
and re.search(r"Did you mean ([^?]*)?", command.stderr) is not None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown comma... | import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknown command.*", c... | <commit_before>import re
from thefuck.utils import replace_command
def match(command):
return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)
def get_new_command(command):
broken_cmd = re.findall(r"([^:]*): Unknow... |
27065fd302c20937d44b840472d943ce8aa652e7 | plugins/candela/girder_plugin_candela/__init__.py | plugins/candela/girder_plugin_candela/__init__.py | ###############################################################################
# Copyright Kitware 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/lic... | ###############################################################################
# Copyright Kitware 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/lic... | Add a plugin displayName property | Add a plugin displayName property
This allows the web client to display an arbitrary plugin title rather
than to be restricted to valid python/javascript tokens.
| Python | apache-2.0 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela | ###############################################################################
# Copyright Kitware 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/lic... | ###############################################################################
# Copyright Kitware 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/lic... | <commit_before>###############################################################################
# Copyright Kitware 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... | ###############################################################################
# Copyright Kitware 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/lic... | ###############################################################################
# Copyright Kitware 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/lic... | <commit_before>###############################################################################
# Copyright Kitware 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... |
65b7d1f1eafd32d3895e3ec15a559dca608b5c23 | addons/sale_coupon/models/mail_compose_message.py | addons/sale_coupon/models/mail_compose_message.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | Allow helpdesk users to send coupon by email | [IMP] sale_coupon: Allow helpdesk users to send coupon by email
Purpose
=======
Helpdesk users don't have the right to write on a coupon.
When sending a coupon by email, the coupon is marked as 'sent'.
Allow users to send coupons by executing the state change in sudo.
closes odoo/odoo#45091
Taskid: 2179609
Relate... | Python | agpl-3.0 | ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | <commit_before># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coup... | <commit_before># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context... |
96b554c62fb9449760d423f7420ae75d78998269 | nodeconductor/quotas/handlers.py | nodeconductor/quotas/handlers.py |
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
| from django.db.models import signals
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
def quantity_quota_handler_... | Create generic quantity quota handler(saas-217) | Create generic quantity quota handler(saas-217)
| Python | mit | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor |
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
Create generic quantity quota handler(saas-217) | from django.db.models import signals
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
def quantity_quota_handler_... | <commit_before>
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
<commit_msg>Create generic quantity quota handler(sa... | from django.db.models import signals
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
def quantity_quota_handler_... |
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
Create generic quantity quota handler(saas-217)from django.db.model... | <commit_before>
def add_quotas_to_scope(sender, instance, created=False, **kwargs):
if created:
from nodeconductor.quotas import models
for quota_name in sender.QUOTAS_NAMES:
models.Quota.objects.create(name=quota_name, scope=instance)
<commit_msg>Create generic quantity quota handler(sa... |
8be551ad39f3aedff5ea0ceb536378ea0e851864 | src/waldur_auth_openid/management/commands/import_openid_accounts.py | src/waldur_auth_openid/management/commands/import_openid_accounts.py | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | Print out civil_number before and after | Print out civil_number before and after [WAL-2172]
| Python | mit | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | <commit_before>from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with c... | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with country code for... | <commit_before>from __future__ import unicode_literals
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import transaction
from waldur_core.core.utils import DryRunCommand
User = get_user_model()
class Command(DryRunCommand):
help_text = 'Append civil number with c... |
3f22453c43b6111c22796f9375622eb6d978d669 | content/test/gpu/gpu_tests/trace_test_expectations.py | content/test/gpu/gpu_tests/trace_test_expectations.py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | Mark TraceTest.WebGLGreenTriangle as expected failure on Windows. | Mark TraceTest.WebGLGreenTriangle as expected failure on Windows.
BUG=517232
[email protected]
Review URL: https://codereview.chromium.org/1276403003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#342511}
| Python | bsd-3-clause | CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | <commit_before># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(Gpu... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(GpuTestExpectation... | <commit_before># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class TraceTestExpectations(Gpu... |
1359af2cd9c038d050cb1c4619637143ab020a70 | onepercentclub/settings/salesforcesync.py | onepercentclub/settings/salesforcesync.py | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | Set correct email config for salesforce sync. | Set correct email config for salesforce sync.
BB-1530
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | <commit_before>try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fai... | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fail in our other ... | <commit_before>try:
from .secrets import *
except ImportError:
import sys
sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')
from .base import *
#
# We need this specific override because having the salesforce app and bluebottle_salesforce
# enabled causes tests to fai... |
53c4d10ecb7a9592f3cdf311ca2ddc5cb52c413c | gitlabform/gitlabform/test/test_project_settings.py | gitlabform/gitlabform/test/test_project_settings.py | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | Comment out what can't be checked | Comment out what can't be checked
| Python | mit | egnyte/gitlabform,egnyte/gitlabform | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | <commit_before>import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab... | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab(request):
... | <commit_before>import pytest
from gitlabform.gitlabform import GitLabForm
from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME
PROJECT_NAME = 'project_settings_project'
GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME
@pytest.fixture(scope="module")
def gitlab... |
e5fb2f327b5ec51cd908e5915ef5415ff2b9dcc3 | stackviz/views/dstat/api.py | stackviz/views/dstat/api.py | from django.http import HttpResponse
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv = f.readlines()
return _cached... | import os
from django.http import HttpResponse, Http404
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
try:
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv =... | Return a 404 error when no dstat csv can be loaded | Return a 404 error when no dstat csv can be loaded
| Python | apache-2.0 | openstack/stackviz,timothyb89/stackviz-ng,dklyle/stackviz-ng,timothyb89/stackviz-ng,timothyb89/stackviz-ng,timothyb89/stackviz,timothyb89/stackviz,timothyb89/stackviz,dklyle/stackviz-ng,openstack/stackviz,openstack/stackviz | from django.http import HttpResponse
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv = f.readlines()
return _cached... | import os
from django.http import HttpResponse, Http404
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
try:
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv =... | <commit_before>from django.http import HttpResponse
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv = f.readlines()
... | import os
from django.http import HttpResponse, Http404
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
try:
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv =... | from django.http import HttpResponse
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv = f.readlines()
return _cached... | <commit_before>from django.http import HttpResponse
from django.views.generic import View
from stackviz import settings
_cached_csv = None
def _load_csv():
global _cached_csv
if _cached_csv:
return _cached_csv
with open(settings.DSTAT_CSV, 'r') as f:
_cached_csv = f.readlines()
... |
ee9c5c8265b4971a9b593d252711a88f59fe6b75 | test/suite/out/long_lines.py | test/suite/out/long_lines.py | if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + array[0] + ' '
| if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + \
array[0] + ' '
| Update due to correction to E501 usage | Update due to correction to E501 usage
| Python | mit | Vauxoo/autopep8,hhatto/autopep8,SG345/autopep8,hhatto/autopep8,MeteorAdminz/autopep8,vauxoo-dev/autopep8,MeteorAdminz/autopep8,Vauxoo/autopep8,SG345/autopep8,vauxoo-dev/autopep8 | if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + array[0] + ' '
Update due to correction to E501 usage | if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + \
array[0] + ' '
| <commit_before>if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + array[0] + ' '
<commit_msg>Update due ... | if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + \
array[0] + ' '
| if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + array[0] + ' '
Update due to correction to E501 usage... | <commit_before>if True:
if True:
if True:
self.__heap.sort(
) # pylint: builtin sort probably faster than O(n)-time heapify
if True:
foo = '( ' + array[0] + ' '
<commit_msg>Update due ... |
fe0d86df9c4be9d33a461578b71c43865f79c715 | tests/builtins/test_input.py | tests/builtins/test_input.py | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
functions = ["input"]
not_implemented = [
'test_bool',
'test_bytearray',
'test_bytes',
'... | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
# class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
# functions = ["input"]
# not_implemented = [
# 'test_bool',
# 'test_bytearray',
# 'test_bytes... | Disable builtin tests for input() as it hangs | Disable builtin tests for input() as it hangs
| Python | bsd-3-clause | cflee/voc,Felix5721/voc,ASP1234/voc,cflee/voc,glasnt/voc,ASP1234/voc,glasnt/voc,freakboy3742/voc,freakboy3742/voc,gEt-rIgHt-jR/voc,Felix5721/voc,gEt-rIgHt-jR/voc,pombredanne/voc,pombredanne/voc | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
functions = ["input"]
not_implemented = [
'test_bool',
'test_bytearray',
'test_bytes',
'... | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
# class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
# functions = ["input"]
# not_implemented = [
# 'test_bool',
# 'test_bytearray',
# 'test_bytes... | <commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
functions = ["input"]
not_implemented = [
'test_bool',
'test_bytearray',
'test_by... | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
# class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
# functions = ["input"]
# not_implemented = [
# 'test_bool',
# 'test_bytearray',
# 'test_bytes... | from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
functions = ["input"]
not_implemented = [
'test_bool',
'test_bytearray',
'test_bytes',
'... | <commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase
class InputTests(TranspileTestCase):
pass
class BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
functions = ["input"]
not_implemented = [
'test_bool',
'test_bytearray',
'test_by... |
a6788c5fda5760c6ad81a418e91597b4170e6149 | websmash/default_settings.py | websmash/default_settings.py | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | Add some error states for the NCBI download option | settings: Add some error states for the NCBI download option
Signed-off-by: Kai Blin <94ddc6985b47aef772521e302594241f46a8f665@biotech.uni-tuebingen.de>
| Python | agpl-3.0 | antismash/ps-web,antismash/ps-web,antismash/websmash,antismash/ps-web | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | <commit_before>from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&ema... | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&email="%s"&tool="a... | <commit_before>from os import path
############# Configuration #############
DEBUG = True
SECRET_KEY = "development_key"
RESULTS_PATH = path.join(path.dirname(path.dirname(__file__)), 'results')
RESULTS_URL = '/upload'
NCBI_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
NCBI_URL += '?db=nucleotide&ema... |
a72468f6988ba3fc5f815b68a07c990809f80864 | main.py | main.py | #ODB2 datalogger
import obd
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | #ODB2 datalogger
import obd
import signal
import sys
#What to do when we receive a signal
def signal_handler(signal, frame):
connection.close()
sys.exit(0)
#Register our signal handler
signal.signal(signal.SIGINT, signal_handler)
#Find and connect OBD adapter
connection = obd.OBD()
while True:
request... | Handle ctrl+c with signal Fix more typos | Handle ctrl+c with signal
Fix more typos
| Python | mit | ProtaconSolutions/iot-hackday-2015-obd2 | #ODB2 datalogger
import obd
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value)Handle ctrl+c with signal
Fix more typos | #ODB2 datalogger
import obd
import signal
import sys
#What to do when we receive a signal
def signal_handler(signal, frame):
connection.close()
sys.exit(0)
#Register our signal handler
signal.signal(signal.SIGINT, signal_handler)
#Find and connect OBD adapter
connection = obd.OBD()
while True:
request... | <commit_before>#ODB2 datalogger
import obd
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value)<commit_msg>Handle ctrl+c with signal
Fix more typos<commit_after> | #ODB2 datalogger
import obd
import signal
import sys
#What to do when we receive a signal
def signal_handler(signal, frame):
connection.close()
sys.exit(0)
#Register our signal handler
signal.signal(signal.SIGINT, signal_handler)
#Find and connect OBD adapter
connection = obd.OBD()
while True:
request... | #ODB2 datalogger
import obd
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value)Handle ctrl+c with signal
Fix more typos#ODB2 datalogger
import obd
import signal
import sys
#What to do when we receive a signal
def signal_handler(signal,... | <commit_before>#ODB2 datalogger
import obd
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value)<commit_msg>Handle ctrl+c with signal
Fix more typos<commit_after>#ODB2 datalogger
import obd
import signal
import sys
#What to do when we re... |
8d7657ed52a40070136bbbe3da7069dcbe3fc1c3 | altair/vegalite/v2/examples/stem_and_leaf.py | altair/vegalite/v2/examples/stem_and_leaf.py | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating Random Data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting St... | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating random data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting st... | Modify example to calculate leaf position | Modify example to calculate leaf position
| Python | bsd-3-clause | altair-viz/altair,ellisonbg/altair,jakevdp/altair | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating Random Data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting St... | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating random data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting st... | <commit_before>"""
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating Random Data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
... | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating random data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting st... | """
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating Random Data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
# Splitting St... | <commit_before>"""
Steam and Leaf Plot
-------------------
This example shows how to make a steam and leaf plot.
"""
import altair as alt
import pandas as pd
import numpy as np
np.random.seed(42)
# Generating Random Data
original_data = pd.DataFrame({'samples':np.array(np.random.normal(50, 15, 100), dtype=np.int)})
... |
a26fa991e7a01188f09e755da67442a71cee3deb | planet_alignment/config/bunch_parser.py | planet_alignment/config/bunch_parser.py | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | Fix an inconsistency is the bunch parser. | Fix an inconsistency is the bunch parser.
Most of the exception handling is using the keyword 'as'.
One is using the comma. Change the comma style to 'as'.
| Python | mit | paulfanelli/planet_alignment | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | <commit_before>"""
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.i... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.interface import... | <commit_before>"""
.. module:: config_parser
:platform: linux
:synopsis: Module to parse a YAML configuration file using the bunch module.
.. moduleauthor:: Paul Fanelli <[email protected]>
.. modulecreated:: 6/26/15
"""
from bunch import fromYAML
import sys
from yaml.parser import ParserError
from zope.i... |
06df514496612f194a6103167b867debf6657f5e | src/engine/SCons/Platform/darwin.py | src/engine/SCons/Platform/darwin.py | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 Steven Knight
#
# Permi... | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of char... | Fix __COPYRIGHT__ and __REVISION__ in new Darwin module. | Fix __COPYRIGHT__ and __REVISION__ in new Darwin module.
git-svn-id: 7892167f69f80ee5d3024affce49f20c74bcb41d@1037 fdb21ef1-2011-0410-befe-b5e4ea1792b1
| Python | mit | datalogics/scons,azverkan/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons,datalogics-robb/scons,azverkan/scons,azverkan/scons,datalogics-robb/scons,datalogics/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 Steven Knight
#
# Permi... | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of char... | <commit_before>"""engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 Steven K... | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of char... | """engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 Steven Knight
#
# Permi... | <commit_before>"""engine.SCons.Platform.darwin
Platform-specific initialization for Mac OS X systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 Steven K... |
d8f32f7b6d0b1db0f467a61677586daa76bbaa4e | account_fiscal_year/__manifest__.py | account_fiscal_year/__manifest__.py | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | Use AGPL license, as it depends on `date_range` that uses that | [FIX] account_fiscal_year: Use AGPL license, as it depends on `date_range` that uses that
| Python | agpl-3.0 | Vauxoo/account-financial-tools,Vauxoo/account-financial-tools,Vauxoo/account-financial-tools | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | <commit_before># Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status... | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | # Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status": "Beta",
... | <commit_before># Copyright 2016 Camptocamp SA
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Account Fiscal Year",
"summary": "Create a menu for Account Fiscal Year",
"version": "13.0.1.0.0",
"development_status... |
7e5973b5490fd938078ce50723527d0c09f8e11e | rest_framework_friendly_errors/handlers.py | rest_framework_friendly_errors/handlers.py | from rest_framework.views import exception_handler
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
if is_pretty(response):
... | from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not... | Build APIException all exceptions must be handled | Build APIException all exceptions must be handled
| Python | mit | oasiswork/drf-friendly-errors,FutureMind/drf-friendly-errors | from rest_framework.views import exception_handler
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
if is_pretty(response):
... | from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not... | <commit_before>from rest_framework.views import exception_handler
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
if is_pre... | from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not... | from rest_framework.views import exception_handler
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
if is_pretty(response):
... | <commit_before>from rest_framework.views import exception_handler
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
if is_pre... |
4c3fee1ebce086d93424592f7145a378c40fd794 | medical_prescription_disease/models/medical_prescription_order_line.py | medical_prescription_disease/models/medical_prescription_order_line.py | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | Remove required from disease_id in medical_prescription_disease | Remove required from disease_id in medical_prescription_disease
| Python | agpl-3.0 | laslabs/vertical-medical,laslabs/vertical-medical | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | <commit_before># -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string... | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | # -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string='Disease',
... | <commit_before># -*- coding: utf-8 -*-
# © 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class MedicalPrescriptionOrderLine(models.Model):
_inherit = 'medical.prescription.order.line'
disease_id = fields.Many2one(
string... |
f9b2f8cd60af9b37ad80db10c42b36059ca5a10f | tests/unit/core/migrations_tests.py | tests/unit/core/migrations_tests.py | # -*- coding: utf-8 -*-
import os
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def check_for_auth_model(self, filepath):
with open(filepath) as f:
s = f.read()
return 'auth.User' in s or 'auth.user' in s
def test_dont_contain_hardcoded... | # -*- coding: utf-8 -*-
import os
import re
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def setUp(self):
self.root_path = os.path.dirname(oscar.apps.__file__)
self.migration_filenames = []
for path, __, migrations in os.walk(self.root_path):
... | Add unit test for duplicate migration numbers | Add unit test for duplicate migration numbers
Duplicate migration numbers can happen when merging changes from
different branches. This test ensures that we address the issue right
away.
| Python | bsd-3-clause | django-oscar/django-oscar,django-oscar/django-oscar,Bogh/django-oscar,anentropic/django-oscar,pdonadeo/django-oscar,manevant/django-oscar,nickpack/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj.com,faratro/django-oscar,QLGu/django-oscar,eddiep1101/django-oscar,monikasulik/django-oscar,michaelkuty/django-oscar,jmt4/dj... | # -*- coding: utf-8 -*-
import os
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def check_for_auth_model(self, filepath):
with open(filepath) as f:
s = f.read()
return 'auth.User' in s or 'auth.user' in s
def test_dont_contain_hardcoded... | # -*- coding: utf-8 -*-
import os
import re
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def setUp(self):
self.root_path = os.path.dirname(oscar.apps.__file__)
self.migration_filenames = []
for path, __, migrations in os.walk(self.root_path):
... | <commit_before># -*- coding: utf-8 -*-
import os
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def check_for_auth_model(self, filepath):
with open(filepath) as f:
s = f.read()
return 'auth.User' in s or 'auth.user' in s
def test_dont_co... | # -*- coding: utf-8 -*-
import os
import re
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def setUp(self):
self.root_path = os.path.dirname(oscar.apps.__file__)
self.migration_filenames = []
for path, __, migrations in os.walk(self.root_path):
... | # -*- coding: utf-8 -*-
import os
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def check_for_auth_model(self, filepath):
with open(filepath) as f:
s = f.read()
return 'auth.User' in s or 'auth.user' in s
def test_dont_contain_hardcoded... | <commit_before># -*- coding: utf-8 -*-
import os
from django.test import TestCase
import oscar.apps
class TestMigrations(TestCase):
def check_for_auth_model(self, filepath):
with open(filepath) as f:
s = f.read()
return 'auth.User' in s or 'auth.user' in s
def test_dont_co... |
d20f147a9baf0c0eee48fe2b6242020d500018cc | packages/Python/lldbsuite/test/repl/error_return/TestREPLThrowReturn.py | packages/Python/lldbsuite/test/repl/error_return/TestREPLThrowReturn.py | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | Mark this test as xfail | Mark this test as xfail
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | <commit_before># TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://s... | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | # TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRI... | <commit_before># TestREPLThrowReturn.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://s... |
36f4144a01ed56baea9036e4e09a5d90b1c13372 | crits/core/management/commands/mapreduces.py | crits/core/management/commands/mapreduces.py | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | Remove duplicate call to generate_filetypes() | Remove duplicate call to generate_filetypes() | Python | mit | Magicked/crits,lakiw/cripts,Magicked/crits,lakiw/cripts,lakiw/cripts,Magicked/crits,Magicked/crits,lakiw/cripts | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | <commit_before>from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.genera... | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.generate_yara_hits()
... | <commit_before>from django.core.management.base import BaseCommand
import crits.stats.handlers as stats
class Command(BaseCommand):
"""
Script Class.
"""
help = "Runs mapreduces for CRITs."
def handle(self, *args, **options):
"""
Script Execution.
"""
stats.genera... |
027f89292c1d8e334e9e69222d1ec8753020e8bd | candidates/management/commands/candidates_check_for_inconsistent_data.py | candidates/management/commands/candidates_check_for_inconsistent_data.py | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import check_paired_models
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_models()
if errors:
for err... | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import (
check_paired_models, check_membership_elections_consistent)
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_m... | Add check_membership_elections_consistent to the data checking command | Add check_membership_elections_consistent to the data checking command
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import check_paired_models
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_models()
if errors:
for err... | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import (
check_paired_models, check_membership_elections_consistent)
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_m... | <commit_before>from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import check_paired_models
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_models()
if errors:
... | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import (
check_paired_models, check_membership_elections_consistent)
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_m... | from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import check_paired_models
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_models()
if errors:
for err... | <commit_before>from __future__ import print_function, unicode_literals
import sys
from django.core.management.base import BaseCommand
from candidates.models import check_paired_models
class Command(BaseCommand):
def handle(self, *args, **options):
errors = check_paired_models()
if errors:
... |
fa3841fd79c4cbc8545b253a2797cfed2b644284 | red_green_bar2.py | red_green_bar2.py | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
value = int(code)
if value:
col_char = '1'
else:
col_char =... | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
if code == 'y':
col_char = '3'
else:
value = int(code)
... | Allow for yellow color after specifying y | Allow for yellow color after specifying y
| Python | mit | kwadrat/rgb_tdd | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
value = int(code)
if value:
col_char = '1'
else:
col_char =... | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
if code == 'y':
col_char = '3'
else:
value = int(code)
... | <commit_before>#!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
value = int(code)
if value:
col_char = '1'
else:
... | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
if code == 'y':
col_char = '3'
else:
value = int(code)
... | #!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
value = int(code)
if value:
col_char = '1'
else:
col_char =... | <commit_before>#!/usr/bin/env python2
'''
Given:
1. status code: (0 - OK, other value - BAD)
2. terminal window width
shows red/green bar to visualize return code of previous command
'''
import sys
if len(sys.argv) >= 2:
code = sys.argv[1]
value = int(code)
if value:
col_char = '1'
else:
... |
b0efb7db50080dd1e9e96ad8d818e3b0859bbca3 | retry/__init__.py | retry/__init__.py | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), tries=3, delay=... | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
@retry() # detect whatsoever errors and retry 3 times
'''
... | Add a usage in retry | Add a usage in retry
| Python | mit | soasme/retries | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), tries=3, delay=... | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
@retry() # detect whatsoever errors and retry 3 times
'''
... | <commit_before># -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), ... | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
@retry() # detect whatsoever errors and retry 3 times
'''
... | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), tries=3, delay=... | <commit_before># -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), ... |
54b21220db28dc4ce34a360d7754add872f702c7 | systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py | systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | Use json naming standards instead of camelCase | Use json naming standards instead of camelCase
| Python | apache-2.0 | jcshen007/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack,resmo/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,resmo/cloudstack,resmo/cloudstack,DaanHoogla... | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | <commit_before>from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'v... | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'vifMacAddress': ... | <commit_before>from pprint import pprint
#[{u'accountId': 2,
#u'add': True,
#u'broadcastUri': u'vlan://untagged',
#u'firstIP': False,
#u'networkRate': 200,
#u'newNic': False,
#u'nicDevId': 1,
#u'oneToOneNat': False,
#u'publicIp': u'10.0.2.102',
#u'sourceNat': True,
#u'trafficType': u'Public',
#u'v... |
4b52f2c237ff3c73af15846e7ae23436af8ab6c7 | airesources/Python/BasicBot.py | airesources/Python/BasicBot.py | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
turtleFactor = random.randint(1, 20)
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
... | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
if site.owner == playerTag:
dir... | Revert basic bot random turtle factor | Revert basic bot random turtle factor
Former-commit-id: 53ffe42cf718cfedaa3ec329b0688c093513683c
Former-commit-id: 6a282c036f4e11a0aa9e954f72050053059ac557
Former-commit-id: c52f52d401c4a3768c7d590fb02f3d08abd38002 | Python | mit | HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,yangle/HaliteIO,yangle/HaliteIO,lanyudhy/Halite-II,yangle/HaliteIO,yangle/HaliteIO,HaliteChallenge/Halite-II,yangle/HaliteIO,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halit... | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
turtleFactor = random.randint(1, 20)
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
... | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
if site.owner == playerTag:
dir... | <commit_before>from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
turtleFactor = random.randint(1, 20)
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.... | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
if site.owner == playerTag:
dir... | from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
turtleFactor = random.randint(1, 20)
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.contents[y][x]
... | <commit_before>from hlt import *
from networking import *
playerTag, gameMap = getInit()
sendInit("BasicBot"+str(playerTag))
turtleFactor = random.randint(1, 20)
while True:
moves = []
gameMap = getFrame()
for y in range(0, len(gameMap.contents)):
for x in range(0, len(gameMap.contents[y])):
site = gameMap.... |
0bff34400d912806a9d831f5e0436082d359a531 | tomviz/python/tomviz/state/_pipeline.py | tomviz/python/tomviz/state/_pipeline.py | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instance is None:
... | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance is None:
cls._instance = PipelineStateManagerBase.__new__(cls, *args, **kwargs)
return cls._instance
| Fix singleton to work with wrapped manager class | Fix singleton to work with wrapped manager class
Signed-off-by: Chris Harris <[email protected]>
| Python | bsd-3-clause | OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instance is None:
... | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance is None:
cls._instance = PipelineStateManagerBase.__new__(cls, *args, **kwargs)
return cls._instance
| <commit_before>from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instanc... | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance is None:
cls._instance = PipelineStateManagerBase.__new__(cls, *args, **kwargs)
return cls._instance
| from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instance is None:
... | <commit_before>from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instanc... |
5a4401df95d3b8cb72e78edb30669d6fa88e4712 | transaction_downloader/transaction_downloader.py | transaction_downloader/transaction_downloader.py | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | Read credentials based on account. | Read credentials based on account.
| Python | mit | ebridges/plaid2qif,ebridges/plaid2qif,ebridges/plaid2qif | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | <commit_before>"""Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work w... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | """Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work with.
"""
import... | <commit_before>"""Transaction Downloader.
Usage:
transaction-downloader auth --account=<account-name>
transaction-downloader -h | --help
transaction-downloader --version
Options:
-h --help Show this screen.
--version Show version.
--account=<account-name> Account to work w... |
cbdcdf16285823a8e13a68c8e86d6957aa7aa6d8 | kivy/tools/packaging/pyinstaller_hooks/pyi_rth_kivy.py | kivy/tools/packaging/pyinstaller_hooks/pyi_rth_kivy.py | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = '{};{}'.format(
sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins'))
os.environ['GST_RE... | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = os.path.join(sys._MEIPASS, 'gst-plugins')
os.environ['GST_REGISTRY'] = os.path.join(sys._MEIPAS... | Fix GST_PLUGIN_PATH in runtime hook | Fix GST_PLUGIN_PATH in runtime hook
- Only include `gst-plugins`
- Also, semicolon was only correct on Windows
| Python | mit | inclement/kivy,inclement/kivy,kivy/kivy,kivy/kivy,akshayaurora/kivy,akshayaurora/kivy,kivy/kivy,matham/kivy,rnixx/kivy,matham/kivy,inclement/kivy,matham/kivy,matham/kivy,rnixx/kivy,akshayaurora/kivy,rnixx/kivy | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = '{};{}'.format(
sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins'))
os.environ['GST_RE... | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = os.path.join(sys._MEIPASS, 'gst-plugins')
os.environ['GST_REGISTRY'] = os.path.join(sys._MEIPAS... | <commit_before>import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = '{};{}'.format(
sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins'))
os.... | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = os.path.join(sys._MEIPASS, 'gst-plugins')
os.environ['GST_REGISTRY'] = os.path.join(sys._MEIPAS... | import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = '{};{}'.format(
sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins'))
os.environ['GST_RE... | <commit_before>import os
import sys
root = os.path.join(sys._MEIPASS, 'kivy_install')
os.environ['KIVY_DATA_DIR'] = os.path.join(root, 'data')
os.environ['KIVY_MODULES_DIR'] = os.path.join(root, 'modules')
os.environ['GST_PLUGIN_PATH'] = '{};{}'.format(
sys._MEIPASS, os.path.join(sys._MEIPASS, 'gst-plugins'))
os.... |
2a9ac93236838b12b58f2f180265a23658e2a95b | programmingtheorems/python/theorem_of_selection.py | programmingtheorems/python/theorem_of_selection.py | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | Fix typo in selection theorem | Fix typo in selection theorem
Change-Id: Ieff9fe7e5783e0d3b995fb0ddbfc11015ca9197a
| Python | apache-2.0 | elajkat/hugradexam,elajkat/hugradexam | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | <commit_before>#! /usr/bin/env python
# Copyright Lajos Katona
#
# 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
#
# Unl... | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | #! /usr/bin/env python
# Copyright Lajos Katona
#
# 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... | <commit_before>#! /usr/bin/env python
# Copyright Lajos Katona
#
# 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
#
# Unl... |
f22cabf494f13535cdbb489f12e98c7358a29f74 | openstack/tests/functional/telemetry/v2/test_sample.py | openstack/tests/functional/telemetry/v2/test_sample.py | # 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, software
# distributed under t... | # 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, software
# distributed under t... | Fix the telemetry sample test | Fix the telemetry sample test
This test works fine on devstack, but on the test gate not all
the meters have samples, so only iterate over them if there are
samples.
Partial-bug: #1665495
Change-Id: I8f327737a53194aeba08925391f1976f1b506aa0
| Python | apache-2.0 | dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,dtroyer/python-openstacksdk | # 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, software
# distributed under t... | # 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, software
# distributed under t... | <commit_before># 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, software
# dist... | # 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, software
# distributed under t... | # 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, software
# distributed under t... | <commit_before># 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, software
# dist... |
618a1f520f2584ec3cf56b29cf71c9ad6b4240fd | tests/acceptance/assignments/one_second_timeout/correct_solution/sleep.py | tests/acceptance/assignments/one_second_timeout/correct_solution/sleep.py | from time import sleep
sleep(1)
| from time import sleep
# Due to the overhead of Python, sleeping for 1 second will cause testing to
# time out if the timeout is 1 second
sleep(1)
| Add comment to one_second_timeout assignment | Add comment to one_second_timeout assignment
| Python | agpl-3.0 | git-keeper/git-keeper,git-keeper/git-keeper | from time import sleep
sleep(1)
Add comment to one_second_timeout assignment | from time import sleep
# Due to the overhead of Python, sleeping for 1 second will cause testing to
# time out if the timeout is 1 second
sleep(1)
| <commit_before>from time import sleep
sleep(1)
<commit_msg>Add comment to one_second_timeout assignment<commit_after> | from time import sleep
# Due to the overhead of Python, sleeping for 1 second will cause testing to
# time out if the timeout is 1 second
sleep(1)
| from time import sleep
sleep(1)
Add comment to one_second_timeout assignmentfrom time import sleep
# Due to the overhead of Python, sleeping for 1 second will cause testing to
# time out if the timeout is 1 second
sleep(1)
| <commit_before>from time import sleep
sleep(1)
<commit_msg>Add comment to one_second_timeout assignment<commit_after>from time import sleep
# Due to the overhead of Python, sleeping for 1 second will cause testing to
# time out if the timeout is 1 second
sleep(1)
|
1f3e56b79f933a1d450074d1c4485e34c97f2806 | pyqt.py | pyqt.py | #! /usr/bin/python3
import sys
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self.function = ... | #! /usr/bin/python3
import sys
import time
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self... | Update image every 0.5s till button gets pressed again | Update image every 0.5s till button gets pressed again
| Python | mit | philipptrenz/draughtsCV,philipptrenz/Physical-Image-Manipulation-Program,philipptrenz/draughtsCV | #! /usr/bin/python3
import sys
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self.function = ... | #! /usr/bin/python3
import sys
import time
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self... | <commit_before>#! /usr/bin/python3
import sys
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
s... | #! /usr/bin/python3
import sys
import time
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self... | #! /usr/bin/python3
import sys
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
self.function = ... | <commit_before>#! /usr/bin/python3
import sys
from PyQt5.QtWidgets import (QWidget, QHBoxLayout,
QLabel, QApplication, QPushButton)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import QObject
class FreakingQtImageViewer(QWidget):
def __init__(self, function):
super().__init__()
s... |
008f0a2b0a7823e619410c5af70061d093c6f3de | timeseries.py | timeseries.py | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | Allow plotting two types against one another. | Allow plotting two types against one another.
| Python | bsd-3-clause | openxc/openxc-data-tools | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | <commit_before>#!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | #!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... | <commit_before>#!/usr/bin/env python
#Go through an OpenXC trace file and plot a time series graph using
#matplotlib
import json
import sys
import argparse
from pylab import *
def main():
#Set up the command line argument parser
parser = argparse.ArgumentParser()
parser.add_argument("input_file",
... |
7d9ec40e8a48e747880a35279b63439afccc1284 | urls.py | urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
url(r'^informo/api$', 'about_the_api', name="abo... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.generic import TemplateView
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
u... | Allow viewing the 404 page during development. | Allow viewing the 404 page during development.
| Python | agpl-3.0 | Wilfred/simpla-vortaro,Wilfred/simpla-vortaro | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
url(r'^informo/api$', 'about_the_api', name="abo... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.generic import TemplateView
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
u... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
url(r'^informo/api$', 'about_the_... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.generic import TemplateView
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
u... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
url(r'^informo/api$', 'about_the_api', name="abo... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
import os.path
static_files_path = os.path.join(settings.PROJECT_DIR, "static")
urlpatterns = patterns('vortaro.views',
url(r'^informo$', 'about', name="about"),
url(r'^informo/api$', 'about_the_... |
7481c6aad4cd844b0c3fab6f05e4d24aa3c17770 | src/nodeconductor_assembly_waldur/invoices/log.py | src/nodeconductor_assembly_waldur/invoices/log.py | from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_logger.register('invoice', InvoiceLogger)
| from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_groups = {
'customers': even... | Define groups for the invoice events. | Define groups for the invoice events.
- wal-202
| Python | mit | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_logger.register('invoice', InvoiceLogger)
Defin... | from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_groups = {
'customers': even... | <commit_before>from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_logger.register('invoice', Invoi... | from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_groups = {
'customers': even... | from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_logger.register('invoice', InvoiceLogger)
Defin... | <commit_before>from nodeconductor.logging.loggers import EventLogger, event_logger
class InvoiceLogger(EventLogger):
month = int
year = int
customer = 'structure.Customer'
class Meta:
event_types = ('invoice_created', 'invoice_paid', 'invoice_canceled')
event_logger.register('invoice', Invoi... |
6618b12cef2759174148d1c7f69cbb91b8ea4482 | mygpo/podcasts/migrations/0015_auto_20140616_2126.py | mygpo/podcasts/migrations/0015_auto_20140616_2126.py | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0014_auto_20140615_1032'),
]
operations = [
migrations.AlterField(
model_name='slug',
name='sco... | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
def set_scope(apps, schema_editor):
URL = apps.get_model('podcasts', 'URL')
Slug = apps.get_model('podcasts', 'Slug')
URL.objects.filter(scope__isnull=True).update(scope='')
Slug.objects.filter(scope__i... | Fix data migration when making scope non-null | [DB] Fix data migration when making scope non-null
| Python | agpl-3.0 | gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0014_auto_20140615_1032'),
]
operations = [
migrations.AlterField(
model_name='slug',
name='sco... | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
def set_scope(apps, schema_editor):
URL = apps.get_model('podcasts', 'URL')
Slug = apps.get_model('podcasts', 'Slug')
URL.objects.filter(scope__isnull=True).update(scope='')
Slug.objects.filter(scope__i... | <commit_before># encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0014_auto_20140615_1032'),
]
operations = [
migrations.AlterField(
model_name='slug',
... | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
def set_scope(apps, schema_editor):
URL = apps.get_model('podcasts', 'URL')
Slug = apps.get_model('podcasts', 'Slug')
URL.objects.filter(scope__isnull=True).update(scope='')
Slug.objects.filter(scope__i... | # encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0014_auto_20140615_1032'),
]
operations = [
migrations.AlterField(
model_name='slug',
name='sco... | <commit_before># encoding: utf8
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0014_auto_20140615_1032'),
]
operations = [
migrations.AlterField(
model_name='slug',
... |
e5af653b2133b493c7888bb305488e932acb2274 | doc/examples/special/plot_hinton.py | doc/examples/special/plot_hinton.py | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array. Positive
and negative values represented by white and black squares, respectively, and
the size of each square represents the magnitude of each value.
The `special.hinton` function is based off of the... | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array: Positive
and negative values are represented by white and black squares, respectively,
and the size of each square represents the magnitude of each value.
``special.hinton`` is based off of the `Hinto... | Clean up hinton example text. | DOC: Clean up hinton example text.
| Python | bsd-3-clause | tonysyu/mpltools,matteoicardi/mpltools | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array. Positive
and negative values represented by white and black squares, respectively, and
the size of each square represents the magnitude of each value.
The `special.hinton` function is based off of the... | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array: Positive
and negative values are represented by white and black squares, respectively,
and the size of each square represents the magnitude of each value.
``special.hinton`` is based off of the `Hinto... | <commit_before>"""
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array. Positive
and negative values represented by white and black squares, respectively, and
the size of each square represents the magnitude of each value.
The `special.hinton` function is b... | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array: Positive
and negative values are represented by white and black squares, respectively,
and the size of each square represents the magnitude of each value.
``special.hinton`` is based off of the `Hinto... | """
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array. Positive
and negative values represented by white and black squares, respectively, and
the size of each square represents the magnitude of each value.
The `special.hinton` function is based off of the... | <commit_before>"""
==============
Hinton diagram
==============
Hinton diagrams are useful for visualizing the values of a 2D array. Positive
and negative values represented by white and black squares, respectively, and
the size of each square represents the magnitude of each value.
The `special.hinton` function is b... |
d2a0d0d22a8369c99626ca754a337ea8076f7efa | aybu/core/models/migrations/versions/587c89cfa8ea_added_column_weight_.py | aybu/core/models/migrations/versions/587c89cfa8ea_added_column_weight_.py | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | Fix bug in migration script | Fix bug in migration script
| Python | apache-2.0 | asidev/aybu-core | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | <commit_before>"""Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as s... | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | """Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as sa
def upgrade... | <commit_before>"""Added column 'weight' to Banner, Logo and Background.
Revision ID: 587c89cfa8ea
Revises: 2c0bfc379e01
Create Date: 2012-05-11 14:36:15.518757
"""
# downgrade revision identifier, used by Alembic.
revision = '587c89cfa8ea'
down_revision = '2c0bfc379e01'
from alembic import op
import sqlalchemy as s... |
319927dd4548f8d5990bad4be271bfce7f29b10b | subscribe/management/commands/refresh_issuers.py | subscribe/management/commands/refresh_issuers.py | from django.core.management.base import BaseCommand
from django.db.transaction import commit_on_success
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@commit_on_success
... | from django.core.management.base import BaseCommand
from django.db import transaction
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@transaction.atomic
def handle(self,... | Replace deprecated commit_on_success by atomic | Replace deprecated commit_on_success by atomic
| Python | mit | jonge-democraten/dyonisos,jonge-democraten/dyonisos,jonge-democraten/dyonisos | from django.core.management.base import BaseCommand
from django.db.transaction import commit_on_success
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@commit_on_success
... | from django.core.management.base import BaseCommand
from django.db import transaction
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@transaction.atomic
def handle(self,... | <commit_before>from django.core.management.base import BaseCommand
from django.db.transaction import commit_on_success
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@commit... | from django.core.management.base import BaseCommand
from django.db import transaction
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@transaction.atomic
def handle(self,... | from django.core.management.base import BaseCommand
from django.db.transaction import commit_on_success
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@commit_on_success
... | <commit_before>from django.core.management.base import BaseCommand
from django.db.transaction import commit_on_success
from subscribe.models import IdealIssuer
from lib import mollie
# command to update bank list (ideal issuers)
# run as 'python manage.py refresh_issuers'
class Command(BaseCommand):
@commit... |
5e368e1fbf30a3e489be6c754d8b888a31bfde47 | wger/manager/migrations/0011_remove_set_exercises.py | wger/manager/migrations/0011_remove_set_exercises.py | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0010_auto_20210102_1446'),
]
operations = [
migrations.RemoveField(
model_name='set',
name='exercises',
)... | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
def increment_order(apps, schema_editor):
"""
Increment the oder in settings so ensure the order is preserved
Otherwise, and depending on the database, when a set has supersets, the
exercises could be ordered alphabetic... | Increment the oder in settings so ensure the order is preserved | Increment the oder in settings so ensure the order is preserved
Otherwise, and depending on the database, when a set has supersets, the
exercises could be ordered alphabetically.
| Python | agpl-3.0 | wger-project/wger,petervanderdoes/wger,wger-project/wger,wger-project/wger,petervanderdoes/wger,wger-project/wger,petervanderdoes/wger,petervanderdoes/wger | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0010_auto_20210102_1446'),
]
operations = [
migrations.RemoveField(
model_name='set',
name='exercises',
)... | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
def increment_order(apps, schema_editor):
"""
Increment the oder in settings so ensure the order is preserved
Otherwise, and depending on the database, when a set has supersets, the
exercises could be ordered alphabetic... | <commit_before># Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0010_auto_20210102_1446'),
]
operations = [
migrations.RemoveField(
model_name='set',
name='exerci... | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
def increment_order(apps, schema_editor):
"""
Increment the oder in settings so ensure the order is preserved
Otherwise, and depending on the database, when a set has supersets, the
exercises could be ordered alphabetic... | # Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0010_auto_20210102_1446'),
]
operations = [
migrations.RemoveField(
model_name='set',
name='exercises',
)... | <commit_before># Generated by Django 3.1.5 on 2021-02-28 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manager', '0010_auto_20210102_1446'),
]
operations = [
migrations.RemoveField(
model_name='set',
name='exerci... |
29c437e15f7793886c80b71ca6764184caff2597 | readthedocs/oauth/management/commands/load_project_remote_repo_relation.py | readthedocs/oauth/management/commands/load_project_remote_repo_relation.py | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | Check if the remote_repo was updated or not and log error | Check if the remote_repo was updated or not and log error
| Python | mit | rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | <commit_before>import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file conta... | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | <commit_before>import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file conta... |
9696cbc35830b69767320166424e21d717e71d12 | tests/__init__.py | tests/__init__.py | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | Initialize random generator seed for unit testing | Initialize random generator seed for unit testing
| Python | artistic-2.0 | grrrr/nsgt | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | <commit_before># -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna S... | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | # -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Tech... | <commit_before># -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna S... |
dd42c1c1b1cd0cbe55c27cafe9d2db5466782bc4 | server/users-microservice/src/api/users/userModel.py | server/users-microservice/src/api/users/userModel.py | from index import db
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(10), uniq... | from index import db, brcypt
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(1... | Encrypt password before saving user | Encrypt password before saving user
| Python | mit | Madmous/Trello-Clone,Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone | from index import db
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(10), uniq... | from index import db, brcypt
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(1... | <commit_before>from index import db
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.S... | from index import db, brcypt
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(1... | from index import db
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.String(10), uniq... | <commit_before>from index import db
class UserModel(db.Model):
__tablename__ = 'User'
id = db.Column(db.Integer, primary_key=True, nullable=False)
name = db.Column(db.String(80), unique=True, nullable=False)
fullname = db.Column(db.String(80), unique=True, nullable=False)
initials = db.Column(db.S... |
17492956ea8b4ed8b5465f6a057b6e026c2d4a75 | openquake/engine/tests/export/core_test.py | openquake/engine/tests/export/core_test.py |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | Fix a broken export test | Fix a broken export test
Former-commit-id: 4b369edfcb5782a2461742547f5b6af3bab4f759 [formerly e37e964bf9d2819c0234303d31ed2839c317be04]
Former-commit-id: 5b8a20fa99eab2f33c8f293a505a2dbadad36eee | Python | agpl-3.0 | gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | <commit_before>
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ope... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... |
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distr... | <commit_before>
# Copyright (c) 2010-2014, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ope... |
17ab8c01a88bda8dba4aaa5e57c857babfeb9444 | debtcollector/fixtures/disable.py | debtcollector/fixtures/disable.py | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | Stop to use the __future__ module. | Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.
We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.
Imports commo... | Python | apache-2.0 | openstack/debtcollector | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lic... | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lic... |
00479e3d59e7472c77ea2357f25d5579ad5d5b25 | director/director/config/local.py | director/director/config/local.py | from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
| from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
| Use console EMAIL_BACKEND in development | Use console EMAIL_BACKEND in development
| Python | apache-2.0 | stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub | from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
Use console EMAIL_BACKEND in development | from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
| <commit_before>from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
<commit_msg>Use console EMAIL_BACKEND in development<commit_after> | from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
| from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
Use console EMAIL_BACKEND in developmentfrom configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Valu... | <commit_before>from configurations import values
from .common import Common
class Local(Common):
JWT_SECRET = values.Value('not-a-secret')
DEBUG = values.BooleanValue(True)
<commit_msg>Use console EMAIL_BACKEND in development<commit_after>from configurations import values
from .common import Common
class Loc... |
e75e35bd7ffb44b8f5c5a5d674a15c6c366f84ac | django_medusa/management/commands/staticsitegen.py | django_medusa/management/commands/staticsitegen.py | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | Handle cases when MEDUSA_URL_PREFIX isn't set | Handle cases when MEDUSA_URL_PREFIX isn't set
| Python | mit | hyperair/django-medusa | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | <commit_before>from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = T... | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = True
help =... | <commit_before>from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.urlresolvers import set_script_prefix
from django_medusa.renderers import StaticSiteRenderer
from django_medusa.utils import get_static_renderers
class Command(BaseCommand):
can_import_settings = T... |
6160507169c3cdc837b3472bdeb4c604b5c0d5fd | driver27/templatetags/driver27.py | driver27/templatetags/driver27.py | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | Fix 'print_pos' templatetag for 2.7 | Fix 'print_pos' templatetag for 2.7
| Python | mit | SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27 | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | <commit_before># -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="cham... | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | # -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="champion_tag">ϕ... | <commit_before># -*- coding: utf-8 -*-
from django import template
from ..models import Season, Race
from ..common import ordered_position
register = template.Library()
@register.filter
def champion_filter(season_id):
if season_id:
season = Season.objects.get(pk=season_id)
return '<span class="cham... |
5aba92fff0303546be0850f786a25659453674a6 | masters/master.chromium.webkit/master_source_cfg.py | masters/master.chromium.webkit/master_source_cfg.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.changes import svnpoller
from buildbot.scheduler import AnyBranchScheduler
from common import chromium_utils
from master import build_uti... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.scheduler import AnyBranchScheduler
from master import gitiles_poller
def Update(config, _active_master, c):
# Polls config.Master.tru... | Remove blink scheduler from chromium.webkit | Remove blink scheduler from chromium.webkit
For context, please see:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/S-P3N0kdkMM/ohfRyTNyAwAJ
https://groups.google.com/a/chromium.org/d/msg/blink-dev/3APcgCM52JQ/OyqNugnFAAAJ
BUG=431478
Review URL: https://codereview.chromium.org/1351623005
git-svn-id: 239... | Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.changes import svnpoller
from buildbot.scheduler import AnyBranchScheduler
from common import chromium_utils
from master import build_uti... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.scheduler import AnyBranchScheduler
from master import gitiles_poller
def Update(config, _active_master, c):
# Polls config.Master.tru... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.changes import svnpoller
from buildbot.scheduler import AnyBranchScheduler
from common import chromium_utils
from master i... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.scheduler import AnyBranchScheduler
from master import gitiles_poller
def Update(config, _active_master, c):
# Polls config.Master.tru... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.changes import svnpoller
from buildbot.scheduler import AnyBranchScheduler
from common import chromium_utils
from master import build_uti... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from buildbot.changes import svnpoller
from buildbot.scheduler import AnyBranchScheduler
from common import chromium_utils
from master i... |
4c99dc23e1406b5e73c541993c4ffa4f92bc9a8a | src/_version.py | src/_version.py | __all__ = ('version', '__version__')
version = (0, 14, 0)
__version__ = '.'.join(str(x) for x in version)
| __all__ = ('version', '__version__')
version = (0, 14, 999, 1)
__version__ = '.'.join(str(x) for x in version)
| Bump version to 0.14.999.1 (next release on this branch will be 0.15.0) | Bump version to 0.14.999.1 (next release on this branch will be 0.15.0)
20080110143356-53eee-be816768f9cc7e023de858d0d314cbbec894ffa1.gz
| Python | lgpl-2.1 | PabloCastellano/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,PabloCastellano/telepathy-python,max-posedon/telepathy-python,epage/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,detrout/telepathy-python,detrout/telepathy-python,max-posedon/telepathy-python,epage/t... | __all__ = ('version', '__version__')
version = (0, 14, 0)
__version__ = '.'.join(str(x) for x in version)
Bump version to 0.14.999.1 (next release on this branch will be 0.15.0)
20080110143356-53eee-be816768f9cc7e023de858d0d314cbbec894ffa1.gz | __all__ = ('version', '__version__')
version = (0, 14, 999, 1)
__version__ = '.'.join(str(x) for x in version)
| <commit_before>__all__ = ('version', '__version__')
version = (0, 14, 0)
__version__ = '.'.join(str(x) for x in version)
<commit_msg>Bump version to 0.14.999.1 (next release on this branch will be 0.15.0)
20080110143356-53eee-be816768f9cc7e023de858d0d314cbbec894ffa1.gz<commit_after> | __all__ = ('version', '__version__')
version = (0, 14, 999, 1)
__version__ = '.'.join(str(x) for x in version)
| __all__ = ('version', '__version__')
version = (0, 14, 0)
__version__ = '.'.join(str(x) for x in version)
Bump version to 0.14.999.1 (next release on this branch will be 0.15.0)
20080110143356-53eee-be816768f9cc7e023de858d0d314cbbec894ffa1.gz__all__ = ('version', '__version__')
version = (0, 14, 999, 1)
__version__... | <commit_before>__all__ = ('version', '__version__')
version = (0, 14, 0)
__version__ = '.'.join(str(x) for x in version)
<commit_msg>Bump version to 0.14.999.1 (next release on this branch will be 0.15.0)
20080110143356-53eee-be816768f9cc7e023de858d0d314cbbec894ffa1.gz<commit_after>__all__ = ('version', '__version__... |
659614a6b845a95ce7188e86adae4bdc2c5416e7 | examples/benchmark/__init__.py | examples/benchmark/__init__.py | #import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
| import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
| Add back commented out Fibonacci benchmark. | Add back commented out Fibonacci benchmark.
| Python | mit | AlekSi/benchmarking-py | #import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
Add back commented out Fibonacci benchmark. | import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
| <commit_before>#import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
<commit_msg>Add back commented out Fibonacci benchmark.<commit_after> | import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
| #import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
Add back commented out Fibonacci benchmark.import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
| <commit_before>#import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']
<commit_msg>Add back commented out Fibonacci benchmark.<commit_after>import benchmark_fibonacci
import benchmark_twisted_names
__all__ = ['benchmark_fibonacci', 'benchmark_twisted_nam... |
aaaaa3a143c370f387edf42ebd6b22c924845afa | falcom/luhn/check_digit_number.py | falcom/luhn/check_digit_number.py | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def get_check_digit (self):
i... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def generate_from_int (self, n):
... | Make it clear that the user must implement generate_from_int | Make it clear that the user must implement generate_from_int
| Python | bsd-3-clause | mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def get_check_digit (self):
i... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def generate_from_int (self, n):
... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def get_check_digit (s... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def generate_from_int (self, n):
... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def get_check_digit (self):
i... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class CheckDigitNumber:
def __init__ (self, number = None):
self.__set_number(number)
def get_check_digit (s... |
0dcecfbd1e6ce9e35febc9f4ee9bcbfac1fb8f6a | hytra/util/skimage_tifffile_hack.py | hytra/util/skimage_tifffile_hack.py | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it gets a list of... | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
import os.path
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it... | Fix tiffile hack to use os.path | Fix tiffile hack to use os.path
| Python | mit | chaubold/hytra,chaubold/hytra,chaubold/hytra | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it gets a list of... | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
import os.path
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it... | <commit_before>from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it... | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
import os.path
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it... | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it gets a list of... | <commit_before>from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from skimage.external import tifffile
def hack(input_tif):
"""
This method allows to bypass the strange faulty behaviour of
skimage.external.tifffile.imread() when it... |
f48063cfb9674c1e5f1f94e62ff43b239f687abd | examples/plot_tot_histogram.py | examples/plot_tot_histogram.py | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import tables as tb
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | Fix for new km3hdf5 version 4 | Fix for new km3hdf5 version 4
| Python | mit | tamasgal/km3pipe,tamasgal/km3pipe | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import tables as tb
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | <commit_before>"""
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data... | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import tables as tb
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | """
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data/km3net_jul13_9... | <commit_before>"""
==================
ToT histogram.
==================
Create a simple histogram of the PMT signals (ToTs) in all events.
"""
# Author: Tamas Gal <[email protected]>
# License: BSD-3
import pandas as pd
import matplotlib.pyplot as plt
import km3pipe.style
km3pipe.style.use("km3pipe")
filename = "data... |
34125781c38af9aacc33d20117b6c3c6dbb89211 | migrations/versions/070_fix_folder_easfoldersyncstatus_unique_constraints.py | migrations/versions/070_fix_folder_easfoldersyncstatus_unique_constraints.py | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | Rename FK in migration 70 - For some reason, Gunks' db has it named differently than ours. | Rename FK in migration 70 - For some reason, Gunks' db has it named differently than ours.
| Python | agpl-3.0 | gale320/sync-engine,EthanBlackburn/sync-engine,ErinCall/sync-engine,Eagles2F/sync-engine,jobscore/sync-engine,PriviPK/privipk-sync-engine,EthanBlackburn/sync-engine,closeio/nylas,wakermahmud/sync-engine,wakermahmud/sync-engine,EthanBlackburn/sync-engine,wakermahmud/sync-engine,nylas/sync-engine,gale320/sync-engine,Erin... | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | <commit_before>"""Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbo... | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | """Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbox.ignition impo... | <commit_before>"""Fix Folder, EASFolderSyncStatus unique constraints
Revision ID: 2525c5245cc2
Revises: 479b3b84a73e
Create Date: 2014-07-28 18:57:24.476123
"""
# revision identifiers, used by Alembic.
revision = '2525c5245cc2'
down_revision = '479b3b84a73e'
from alembic import op
import sqlalchemy as sa
from inbo... |
8521ff7dcac5b81067e9e601b0901a182c24d050 | processors/fix_changeline_budget_titles.py | processors/fix_changeline_budget_titles.py | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | Fix bug in changeling title fix - it used to remove some lines on the way... | Fix bug in changeling title fix - it used to remove some lines on the way...
| Python | mit | omerbartal/open-budget-data,omerbartal/open-budget-data,OpenBudget/open-budget-data,OpenBudget/open-budget-data | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | <commit_before>import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
... | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
changes_json... | <commit_before>import json
import logging
if __name__ == "__main__":
input = sys.argv[1]
output = sys.argv[2]
processor = fix_changeline_budget_titles().process(input,output,[])
class fix_changeline_budget_titles(object):
def process(self,inputs,output):
out = []
budgets = {}
... |
f0b188f398d82b000fdaa40e0aa776520a962a65 | integration_tests/testpyagglom.py | integration_tests/testpyagglom.py | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | Allow multiple 'golden' results for agglomeration test on Linux | tests: Allow multiple 'golden' results for agglomeration test on Linux
| Python | bsd-3-clause | janelia-flyem/NeuroProof,janelia-flyem/NeuroProof,janelia-flyem/NeuroProof,janelia-flyem/NeuroProof | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | <commit_before>import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.arra... | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.array(h5py.File(pre... | <commit_before>import sys
import platform
import h5py
import numpy
segh5 = sys.argv[1]
predh5 = sys.argv[2]
classifier = sys.argv[3]
threshold = float(sys.argv[4])
from neuroproof import Agglomeration
# open as uint32 and float respectively
seg = numpy.array(h5py.File(segh5)['stack'], numpy.uint32)
pred = numpy.arra... |
bb22c2f673e97ff1f11546d63e990bede4bb2526 | linkfiles/.config/ipython/profile_grace/startup/30-grace.py | linkfiles/.config/ipython/profile_grace/startup/30-grace.py | # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
| # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
def gcn_notice_filenames(graceids):
"""Take a list of GraceIDs and check whether they have LVC GCN-notices. If
so, print those notice filenames for GraceD... | Add gcn_notice_filename function to igrace | Add gcn_notice_filename function to igrace
| Python | mit | stefco/dotfiles,stefco/dotfiles,stefco/dotfiles | # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
Add gcn_notice_filename function to igrace | # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
def gcn_notice_filenames(graceids):
"""Take a list of GraceIDs and check whether they have LVC GCN-notices. If
so, print those notice filenames for GraceD... | <commit_before># (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
<commit_msg>Add gcn_notice_filename function to igrace<commit_after> | # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
def gcn_notice_filenames(graceids):
"""Take a list of GraceIDs and check whether they have LVC GCN-notices. If
so, print those notice filenames for GraceD... | # (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
Add gcn_notice_filename function to igrace# (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
c... | <commit_before># (c) Stefan Countryman 2017
# set up an interactive environment with gracedb rest api access.
import ligo.gracedb.rest
client = ligo.gracedb.rest.GraceDb()
<commit_msg>Add gcn_notice_filename function to igrace<commit_after># (c) Stefan Countryman 2017
# set up an interactive environment with gracedb re... |
c2a1ce0ad4e2f2e9ff5ec72b89eb98967e445ea5 | labsys/utils/custom_fields.py | labsys/utils/custom_fields.py | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.choices = kwargs.pop('choices', self.DEFAULT_CHOICES)
def iter_choices(self):
... | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
TRUE_VALUES = ('True', 'true')
FALSE_VALUES = ('False', 'false')
NONE_VALUES = ('None', 'none', 'null', '')
def __init__(self, **kwargs):
super()... | Improve NullBooleanField with Truthy/Falsy values | :art: Improve NullBooleanField with Truthy/Falsy values
| Python | mit | gems-uff/labsys,gems-uff/labsys,gems-uff/labsys | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.choices = kwargs.pop('choices', self.DEFAULT_CHOICES)
def iter_choices(self):
... | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
TRUE_VALUES = ('True', 'true')
FALSE_VALUES = ('False', 'false')
NONE_VALUES = ('None', 'none', 'null', '')
def __init__(self, **kwargs):
super()... | <commit_before>from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.choices = kwargs.pop('choices', self.DEFAULT_CHOICES)
def iter_choice... | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
TRUE_VALUES = ('True', 'true')
FALSE_VALUES = ('False', 'false')
NONE_VALUES = ('None', 'none', 'null', '')
def __init__(self, **kwargs):
super()... | from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.choices = kwargs.pop('choices', self.DEFAULT_CHOICES)
def iter_choices(self):
... | <commit_before>from wtforms.fields import RadioField
class NullBooleanField(RadioField):
DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.choices = kwargs.pop('choices', self.DEFAULT_CHOICES)
def iter_choice... |
ebcb9a4449bd22aa39a5b05fff91bd46e06086b4 | python/csgo-c4-hue-server.py | python/csgo-c4-hue-server.py | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
f = open('bomb_status', 'w')
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = str(round_data.get('... | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
with open('bomb_status', 'w') as f:
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = s... | Use `with` for writing to file | Use `with` for writing to file | Python | mit | doobix/csgo-c4-hue | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
f = open('bomb_status', 'w')
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = str(round_data.get('... | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
with open('bomb_status', 'w') as f:
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = s... | <commit_before>import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
f = open('bomb_status', 'w')
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = str(r... | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
with open('bomb_status', 'w') as f:
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = s... | import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
f = open('bomb_status', 'w')
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = str(round_data.get('... | <commit_before>import json
import requests
from flask import Flask, session, request, current_app
app = Flask(__name__)
@app.route("/", methods=["POST"])
def main():
f = open('bomb_status', 'w')
json_data = json.loads(request.data)
round_data = json_data.get('round', {})
bomb_status = str(r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.