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
bc31bb2ddbf5b7f2e5d375a8b0d6e01f631d0aef
txircd/modules/extra/snotice_links.py
txircd/modules/extra/snotice_links.py
from twisted.plugin import IPlugin from txircd.modbase import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serverquit", ...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serv...
Fix module data import on links server notice
Fix module data import on links server notice
Python
bsd-3-clause
Heufneutje/txircd
from twisted.plugin import IPlugin from txircd.modbase import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serverquit", ...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serv...
<commit_before>from twisted.plugin import IPlugin from txircd.modbase import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serv...
from twisted.plugin import IPlugin from txircd.modbase import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ("serverquit", ...
<commit_before>from twisted.plugin import IPlugin from txircd.modbase import IModuleData, ModuleData from zope.interface import implements class SnoLinks(ModuleData): implements(IPlugin, IModuleData) name = "ServerNoticeLinks" def actions(self): return [ ("serverconnect", 1, self.announceConnect), ...
076a11626b2e5567f216a0593e46b30df3588545
paystackapi/trecipient.py
paystackapi/trecipient.py
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
Update list for transfer recipient
Update list for transfer recipient
Python
mit
andela-sjames/paystack-python
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
<commit_before>"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. ...
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. Args: ...
<commit_before>"""Script used to define the paystack Transfer Recipient class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Transfer Recipient.""" @classmethod def create(cls, **kwargs): """ Method defined to create transfer recipient. ...
96f933bcfef90ba984e43947b46f9557e760e838
project/category/views.py
project/category/views.py
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,)
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) @category_blueprint.route('/categories') def index(): categories = Category.query.all() return...
Create simple categories page view
Create simple categories page view
Python
mit
dylanshine/streamschool,dylanshine/streamschool
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) Create simple categories page view
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) @category_blueprint.route('/categories') def index(): categories = Category.query.all() return...
<commit_before>from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) <commit_msg>Create simple categories page view<commit_after>
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) @category_blueprint.route('/categories') def index(): categories = Category.query.all() return...
from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) Create simple categories page viewfrom flask import render_template, Blueprint, url_for, \ redirect,...
<commit_before>from flask import render_template, Blueprint, url_for, \ redirect, flash, request from project.models import Category, Webinar from .helpers import slugify category_blueprint = Blueprint('category', __name__,) <commit_msg>Create simple categories page view<commit_after>from flask import render_temp...
a736355efe592d4a6418740f791f3526db2fc67a
protocols/no_reconnect.py
protocols/no_reconnect.py
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
Call connect instead of reconnect.
Call connect instead of reconnect.
Python
apache-2.0
Floobits/plugin-common-python
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
<commit_before>try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.com...
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.common.protocols i...
<commit_before>try: from .. import api, shared as G from ... import editor from ..exc_fmt import str_e from ..protocols import floo_proto except (ImportError, ValueError): from floo import editor from floo.common import api, shared as G from floo.common.exc_fmt import str_e from floo.com...
7aa74665e69aa7117ebae24e7aa12baa07d2119a
tests/test__compat.py
tests/test__compat.py
# -*- coding: utf-8 -*-
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
Include some tests for _asarray
Include some tests for _asarray Make sure that it correctly converts everything to a Dask Array. Try using a Python list, NumPy array, and Dask Array. Also make sure the final array has the same contents as the original. Borrowed from `dask-ndmeasure`.
Python
bsd-3-clause
jakirkham/dask-distance
# -*- coding: utf-8 -*- Include some tests for _asarray Make sure that it correctly converts everything to a Dask Array. Try using a Python list, NumPy array, and Dask Array. Also make sure the final array has the same contents as the original. Borrowed from `dask-ndmeasure`.
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
<commit_before># -*- coding: utf-8 -*- <commit_msg>Include some tests for _asarray Make sure that it correctly converts everything to a Dask Array. Try using a Python list, NumPy array, and Dask Array. Also make sure the final array has the same contents as the original. Borrowed from `dask-ndmeasure`.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import numpy as np import dask import dask.array as da import dask.array.utils as dau import dask_distance._compat @pytest.mark.parametrize("x", [ list(range(5)), np.random.randint(10, size=(15, 16)), da.random.randint(10, size=(15, 16), chu...
# -*- coding: utf-8 -*- Include some tests for _asarray Make sure that it correctly converts everything to a Dask Array. Try using a Python list, NumPy array, and Dask Array. Also make sure the final array has the same contents as the original. Borrowed from `dask-ndmeasure`.#!/usr/bin/env python # -*- coding: utf-8 -...
<commit_before># -*- coding: utf-8 -*- <commit_msg>Include some tests for _asarray Make sure that it correctly converts everything to a Dask Array. Try using a Python list, NumPy array, and Dask Array. Also make sure the final array has the same contents as the original. Borrowed from `dask-ndmeasure`.<commit_after>#!...
44fe60f561abd98df1a1a39f3fbf96c06267c3ec
tests/test_wheeler.py
tests/test_wheeler.py
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
Fix test covering pip 1.5.2 error handling.
Fix test covering pip 1.5.2 error handling.
Python
bsd-3-clause
tylerdave/devpi-builder
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
<commit_before># coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.w...
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
# coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.whl$') ...
<commit_before># coding=utf-8 import os.path as path import unittest from devpi_builder import wheeler class WheelTest(unittest.TestCase): def test_build(self): with wheeler.Builder() as builder: wheel_file = builder('progressbar', '2.2') self.assertRegexpMatches(wheel_file, '\.w...
8646f5af48dc011799a5c7ab9d89b7e6a09ed95b
editor/views.py
editor/views.py
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
Return exception when we have an issue reading an image file
Return exception when we have an issue reading an image file
Python
agpl-3.0
bendk/thesquirrel,bendk/thesquirrel,bendk/thesquirrel,bendk/thesquirrel
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
<commit_before># thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 #...
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
# thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 la...
<commit_before># thesquirrel.org # # Copyright (C) 2015 Flying Squirrel Community Space # # thesquirrel.org 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 #...
9cd72406d63d1ce3a6cd75a65131c8bde3df95ba
push_plugin.py
push_plugin.py
import requests class PushClient: def __init__(self, app): self.app = app def handle_new_or_edit(self, post): data = { 'hub.mode' : 'publish', 'hub.url' : 'http://kylewm.com/all.atom' } response = requests.post('https://pubsubhubbub.appspot.com/', data) if res...
import requests class PushClient: def __init__(self, app): self.app = app def publish(self, url): data = { 'hub.mode' : 'publish', 'hub.url' : url } response = requests.post('https://pubsubhubbub.appspot.com/', data) if response.status_code == 204: self.app.logger.i...
Send the all.atom feed and the articles/notes feeds to PuSH
Send the all.atom feed and the articles/notes feeds to PuSH
Python
bsd-2-clause
thedod/redwind,Lancey6/redwind,thedod/redwind,Lancey6/redwind,Lancey6/redwind
import requests class PushClient: def __init__(self, app): self.app = app def handle_new_or_edit(self, post): data = { 'hub.mode' : 'publish', 'hub.url' : 'http://kylewm.com/all.atom' } response = requests.post('https://pubsubhubbub.appspot.com/', data) if res...
import requests class PushClient: def __init__(self, app): self.app = app def publish(self, url): data = { 'hub.mode' : 'publish', 'hub.url' : url } response = requests.post('https://pubsubhubbub.appspot.com/', data) if response.status_code == 204: self.app.logger.i...
<commit_before>import requests class PushClient: def __init__(self, app): self.app = app def handle_new_or_edit(self, post): data = { 'hub.mode' : 'publish', 'hub.url' : 'http://kylewm.com/all.atom' } response = requests.post('https://pubsubhubbub.appspot.com/', data)...
import requests class PushClient: def __init__(self, app): self.app = app def publish(self, url): data = { 'hub.mode' : 'publish', 'hub.url' : url } response = requests.post('https://pubsubhubbub.appspot.com/', data) if response.status_code == 204: self.app.logger.i...
import requests class PushClient: def __init__(self, app): self.app = app def handle_new_or_edit(self, post): data = { 'hub.mode' : 'publish', 'hub.url' : 'http://kylewm.com/all.atom' } response = requests.post('https://pubsubhubbub.appspot.com/', data) if res...
<commit_before>import requests class PushClient: def __init__(self, app): self.app = app def handle_new_or_edit(self, post): data = { 'hub.mode' : 'publish', 'hub.url' : 'http://kylewm.com/all.atom' } response = requests.post('https://pubsubhubbub.appspot.com/', data)...
a06dc82df053ea47f8a39b46d938f52679b2cff5
grow/preprocessors/blogger_test.py
grow/preprocessors/blogger_test.py
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
Use different blog for test data.
Use different blog for test data.
Python
mit
grow/pygrow,denmojo/pygrow,denmojo/pygrow,denmojo/pygrow,grow/grow,grow/pygrow,grow/grow,grow/grow,grow/grow,grow/pygrow,denmojo/pygrow
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
<commit_before>from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = ...
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = { '...
<commit_before>from . import google_drive from grow.pods import pods from grow.pods import storage from grow.testing import testing import cStringIO import csv import json import unittest import yaml class BloggerTestCase(testing.TestCase): def test_run(self): pod = testing.create_pod() fields = ...
783766b4f4d65dfb4b41e6386edd8ea2df32d727
tests/test_creation.py
tests/test_creation.py
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
Add integration test for extrusion
Add integration test for extrusion
Python
mit
mikedh/trimesh,mikedh/trimesh,mikedh/trimesh,dajusc/trimesh,mikedh/trimesh,dajusc/trimesh
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
<commit_before>import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(le...
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(len(mesh.split(on...
<commit_before>import generic as g class CreationTest(g.unittest.TestCase): def test_soup(self): count = 100 mesh = g.trimesh.creation.random_soup(face_count=count) self.assertTrue(len(mesh.faces) == count) self.assertTrue(len(mesh.face_adjacency) == 0) self.assertTrue(le...
f7a201f61382593baa6e8ebadfedea68563f1fef
examples/repeat.py
examples/repeat.py
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
Allow to specify role name on commandline
examples: Allow to specify role name on commandline
Python
mit
msgflo/msgflo-python
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
<commit_before>#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participa...
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participant.__init__(sel...
<commit_before>#!/usr/bin/env python import sys, os, json, logging sys.path.append(os.path.abspath(".")) import gevent import msgflo class Repeat(msgflo.Participant): def __init__(self, role): d = { 'component': 'PythonRepeat', 'label': 'Repeat input data without change', } msgflo.Participa...
97c26c367c2c4597842356e677064a012ea19cb6
events/forms.py
events/forms.py
from django import forms from events.models import Event, City class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event exclude = ('submission_time', 'updated_time', 'decision_time', 'moderat...
# -*- encoding:utf-8 -*- from django import forms from events.models import Event, City from django.forms.util import ErrorList from datetime import datetime class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event ...
Validate entered dates in Event form
Validate entered dates in Event form
Python
agpl-3.0
vcorreze/agendaEteAccoord,mlhamel/agendadulibre,vcorreze/agendaEteAccoord,mlhamel/agendadulibre,mlhamel/agendadulibre,vcorreze/agendaEteAccoord
from django import forms from events.models import Event, City class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event exclude = ('submission_time', 'updated_time', 'decision_time', 'moderat...
# -*- encoding:utf-8 -*- from django import forms from events.models import Event, City from django.forms.util import ErrorList from datetime import datetime class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event ...
<commit_before>from django import forms from events.models import Event, City class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event exclude = ('submission_time', 'updated_time', 'decision_time', ...
# -*- encoding:utf-8 -*- from django import forms from events.models import Event, City from django.forms.util import ErrorList from datetime import datetime class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event ...
from django import forms from events.models import Event, City class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event exclude = ('submission_time', 'updated_time', 'decision_time', 'moderat...
<commit_before>from django import forms from events.models import Event, City class EventForm(forms.ModelForm): city = forms.ModelChoiceField(City.objects.all(), empty_label=None, label="Ville") class Meta: model = Event exclude = ('submission_time', 'updated_time', 'decision_time', ...
c39a64c5dc83d55632ffc19a96196aef07474114
pylab/accounts/tests/test_settings.py
pylab/accounts/tests/test_settings.py
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_settings(self): resp = self.app.ge...
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_user_settings(self): resp = self.a...
Split user settings test into two tests
Split user settings test into two tests
Python
agpl-3.0
python-dirbtuves/website,python-dirbtuves/website,python-dirbtuves/website
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_settings(self): resp = self.app.ge...
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_user_settings(self): resp = self.a...
<commit_before>import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_settings(self): res...
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_user_settings(self): resp = self.a...
import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_settings(self): resp = self.app.ge...
<commit_before>import django_webtest import django.contrib.auth.models as auth_models import pylab.accounts.models as accounts_models class SettingsTests(django_webtest.WebTest): def setUp(self): super().setUp() auth_models.User.objects.create_user('u1') def test_settings(self): res...
090bcbf8bbc32a2a8da5f0ab2be097e5a6716c3d
src/adhocracy_frontend/adhocracy_frontend/tests/integration/test_jasmine.py
src/adhocracy_frontend/adhocracy_frontend/tests/integration/test_jasmine.py
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
Mark integration tests as xfail
Mark integration tests as xfail
Python
agpl-3.0
fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocr...
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
<commit_before>"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from ...
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from pytest import m...
<commit_before>"""This is structurally equivalent to ../unit/test_jasmine.py. The difference is that it runs igtest.html instead of test.html. also, it is located next to acceptance tests, because it has to be allowed to import components other than adhocracy, like adhocracy_core. """ from pytest import fixture from ...
d9a266ccd3c4873478f0524afa6a3068858bbea6
django_seo_js/middleware/useragent.py
django_seo_js/middleware/useragent.py
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
Fix issue where ENABLED is not defined
Fix issue where ENABLED is not defined
Python
mit
skoczen/django-seo-js
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
<commit_before>import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): s...
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): super(UserAgentM...
<commit_before>import re from django_seo_js import settings from django_seo_js.backends import SelectedBackend from django_seo_js.helpers import request_should_be_ignored import logging logger = logging.getLogger(__name__) class UserAgentMiddleware(SelectedBackend): def __init__(self, *args, **kwargs): s...
d76398b40844e969439d495d4ea3604e5b2011b4
mock-recipe-server/test_mock_server.py
mock-recipe-server/test_mock_server.py
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
Handle error testcases in mock-server tests.
Handle error testcases in mock-server tests.
Python
mpl-2.0
Osmose/normandy,Osmose/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy,Osmose/normandy,Osmose/normandy,mozilla/normandy
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
<commit_before>""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdi...
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdir() if path.is_...
<commit_before>""" Tests for the mock-server itself. """ from utils import APIPath def test_testcase_difference(root_path): """Ensure that different testcases output different data.""" recipes = set() testcase_paths = ( APIPath(path, 'http://example.com') for path in root_path.path.iterdi...
1293fccb88c129772ca9e8d11e6017740dcd609f
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
Update dsub version to 0.3.3.dev0
Update dsub version to 0.3.3.dev0 PiperOrigin-RevId: 253060658
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google 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.0 # # Unless required by appl...
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
# Copyright 2017 Google 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.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google 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.0 # # Unless required by appl...
9ea4164f739b06752719ad4e68f5af85b18f9f1c
tests/scripts/constants.py
tests/scripts/constants.py
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
Include agents as a default test family
Include agents as a default test family
Python
apache-2.0
mF2C/COMPSs,mF2C/COMPSs,mF2C/COMPSs,mF2C/COMPSs,mF2C/COMPSs,mF2C/COMPSs
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = Fals...
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = False DEFAULT_FAMIL...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- # For better print formatting from __future__ import print_function # Imports import os ############################################ # CONSTANTS ############################################ DEFAULT_SKIP = True DEFAULT_NUM_RETRIES = 3 DEFAULT_FAIL_FAST = Fals...
cc96c599cb7e83034f13f8277399dea59a6226ec
mooc_aggregator_restful_api/udacity.py
mooc_aggregator_restful_api/udacity.py
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
Add docstring to instance methods
Add docstring to instance methods
Python
mit
ueg1990/mooc_aggregator_restful_api
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
<commit_before>''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attrib...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attributes and method...
<commit_before>''' This module retrieves the course catalog and overviews of the Udacity API Link to Documentation: https://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf ''' import json import requests class UdacityAPI(object): ''' This class defines attrib...
4696efdee643bb3d86995fea4c35f7947535111d
foundation/offices/tests/factories.py
foundation/offices/tests/factories.py
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
Fix EmailFactory by missing created_by
Fix EmailFactory by missing created_by
Python
bsd-3-clause
ad-m/foundation-manager,ad-m/foundation-manager,pilnujemy/pytamy,pilnujemy/pytamy,ad-m/foundation-manager,ad-m/foundation-manager,pilnujemy/pytamy,pilnujemy/pytamy
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
<commit_before>from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFac...
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFactory('foundatio...
<commit_before>from __future__ import absolute_import from .. import models import factory class OfficeFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'office-/{0}/'.format(n)) jst = factory.SubFactory('foundation.teryt.tests.factories.JSTFactory') created_by = factory.SubFac...
1639200e5700b1170a9d2312a32c7991ed5198b4
tests/basics/boundmeth1.py
tests/basics/boundmeth1.py
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
Add test for assignment of attribute to bound method.
tests/basics: Add test for assignment of attribute to bound method.
Python
mit
ryannathans/micropython,bvernoux/micropython,HenrikSolver/micropython,dmazzella/micropython,lowRISC/micropython,toolmacher/micropython,ryannathans/micropython,cwyark/micropython,deshipu/micropython,mhoffma/micropython,HenrikSolver/micropython,Peetz0r/micropython-esp32,Timmenem/micropython,MrSurly/micropython,tralamazza...
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
<commit_before># tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound met...
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
# tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound method with no ext...
<commit_before># tests basics of bound methods # uPy and CPython differ when printing a bound method, so just print the type print(type(repr([].append))) class A: def f(self): return 0 def g(self, a): return a def h(self, a, b, c, d, e, f): return a + b + c + d + e + f # bound met...
0224877de121cb7cb850ef51a75c1c3f8c1cb105
kala.py
kala.py
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
Sort needs to be an array of arrays in the query string but a list of tuples in python.
Bugfix: Sort needs to be an array of arrays in the query string but a list of tuples in python.
Python
mit
damoxc/kala,cheng93/kala,cloudbuy/kala
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
<commit_before>#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle...
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle.request.query....
<commit_before>#!/usr/bin/python import json import bottle from bottle_mongo import MongoPlugin app = bottle.Bottle() app.config.load_config('settings.ini') app.install(MongoPlugin( uri=app.config['mongodb.uri'], db=app.config['mongodb.db'], json_mongo=True)) def _get_json(name): result = bottle...
366da021d86466c8aa8389f6cfe80386172c3b8f
data_structures/tree/tree_node.py
data_structures/tree/tree_node.py
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
Add set_children function in TreeNode
Add set_children function in TreeNode
Python
mit
hongta/practice-python,hongta/practice-python
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
<commit_before> class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + ...
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + str(self.payloa...
<commit_before> class TreeNode(object): def __init__(self, key=None, payload=None): self.key = key self.payload = payload self.left = None self.right = None self.parent = None def __str__(self): s = str(self.key) if self.payload: s += ": " + ...
89dff1818183fa6c3e7f9c6f5a802842e4e3e797
demo/texture.py
demo/texture.py
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
Use new TextureStimulus parameter definitions.
Use new TextureStimulus parameter definitions. git-svn-id: 033d166fe8e629f6cbcd3c0e2b9ad0cffc79b88b@238 3a63a0ee-37fe-0310-a504-e92b6e0a3ba7
Python
lgpl-2.1
visionegg/visionegg,visionegg/visionegg,visionegg/visionegg,visionegg/visionegg,visionegg/visionegg
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
<commit_before>#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating te...
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating texture."%filenam...
<commit_before>#!/usr/bin/env python from VisionEgg.Core import * from VisionEgg.Textures import * from VisionEgg.AppHelper import * filename = "orig.bmp" if len(sys.argv) > 1: filename = sys.argv[1] try: texture = TextureFromFile(filename) except: print "Could not open image file '%s', generating te...
91f250485b86339b13f5a073e5879292525f9015
nbparameterise/code_drivers/python3.py
nbparameterise/code_drivers/python3.py
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_fillable_node(node, path): if isinstance(node, (ast.Num, ast.Str, ast.List)): return elif isinstance(node, ast.NameConstant) and (node.value in (True, False)): ...
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_list(node): def bool_check(node): return isinstance(node, ast.NameConstant) and (node.value in (True, False)) return all([(isinstance(n, (ast.Num, ast.Str)) ...
Add lists as valid parameters
Add lists as valid parameters
Python
mit
takluyver/nbparameterise
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_fillable_node(node, path): if isinstance(node, (ast.Num, ast.Str, ast.List)): return elif isinstance(node, ast.NameConstant) and (node.value in (True, False)): ...
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_list(node): def bool_check(node): return isinstance(node, ast.NameConstant) and (node.value in (True, False)) return all([(isinstance(n, (ast.Num, ast.Str)) ...
<commit_before>import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_fillable_node(node, path): if isinstance(node, (ast.Num, ast.Str, ast.List)): return elif isinstance(node, ast.NameConstant) and (node.value in (Tr...
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_list(node): def bool_check(node): return isinstance(node, ast.NameConstant) and (node.value in (True, False)) return all([(isinstance(n, (ast.Num, ast.Str)) ...
import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_fillable_node(node, path): if isinstance(node, (ast.Num, ast.Str, ast.List)): return elif isinstance(node, ast.NameConstant) and (node.value in (True, False)): ...
<commit_before>import ast import astcheck import astsearch from ..code import Parameter __all__ = ['extract_definitions', 'build_definitions'] def check_fillable_node(node, path): if isinstance(node, (ast.Num, ast.Str, ast.List)): return elif isinstance(node, ast.NameConstant) and (node.value in (Tr...
c6a65af70acfed68036914b983856e1cbe26a235
session2/translate_all.py
session2/translate_all.py
import argparse, logging, codecs from translation_model import TranslationModel def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser.add_argument('out', help='translated sentences') args ...
import argparse, logging, codecs from translation_model import TranslationModel from nltk.translate.bleu_score import sentence_bleu as bleu def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser...
Add option to check among 20 translations
Add option to check among 20 translations
Python
bsd-3-clause
vineetm/dl4mt-material,vineetm/dl4mt-material,vineetm/dl4mt-material,vineetm/dl4mt-material,vineetm/dl4mt-material
import argparse, logging, codecs from translation_model import TranslationModel def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser.add_argument('out', help='translated sentences') args ...
import argparse, logging, codecs from translation_model import TranslationModel from nltk.translate.bleu_score import sentence_bleu as bleu def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser...
<commit_before>import argparse, logging, codecs from translation_model import TranslationModel def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser.add_argument('out', help='translated senten...
import argparse, logging, codecs from translation_model import TranslationModel from nltk.translate.bleu_score import sentence_bleu as bleu def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser...
import argparse, logging, codecs from translation_model import TranslationModel def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser.add_argument('out', help='translated sentences') args ...
<commit_before>import argparse, logging, codecs from translation_model import TranslationModel def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('model', help='trained model') parser.add_argument('input', help='input sentences') parser.add_argument('out', help='translated senten...
4fd0225ad318d05379d95c2184c4a78ed7fadcd8
recipe-server/normandy/recipes/migrations/0045_update_action_hashes.py
recipe-server/normandy/recipes/migrations/0045_update_action_hashes.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import b64encode, urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = a...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = action.imple...
Fix lint checks in migration recipes/0045.
Fix lint checks in migration recipes/0045.
Python
mpl-2.0
mozilla/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import b64encode, urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = a...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = action.imple...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import b64encode, urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = action.imple...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import b64encode, urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): data = a...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib from base64 import b64encode, urlsafe_b64encode from django.db import migrations def make_hashes_urlsafe_sri(apps, schema_editor): Action = apps.get_model('recipes', 'Action') for action in Action.objects.all(): ...
2febb2e53a7f0b1a0a6952e4ea31c077f45b89f8
hooks/post_gen_project.py
hooks/post_gen_project.py
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.mkdir('{{cookie...
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(project_dir, '.git/hooks/prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.symlink(src, dst)
Remove creation of hooks directory
Remove creation of hooks directory
Python
mit
Empiria/matador-cookiecutter
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.mkdir('{{cookie...
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(project_dir, '.git/hooks/prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.symlink(src, dst)
<commit_before>import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os....
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(project_dir, '.git/hooks/prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.symlink(src, dst)
import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os.mkdir('{{cookie...
<commit_before>import os import subprocess project_dir = '{{cookiecutter.repo_name}}' hooks_dir = os.path.join(project_dir, '.git/hooks') src = os.path.join(project_dir, 'src/utils/prepare-commit-msg.py') dst = os.path.join(hooks_dir, 'prepare-commit-msg') process = subprocess.call(['git', 'init', project_dir]) os....
e075bd4b2ebbbfaf794a5f120605bb52238d5890
heufybot/modules/commands/commands.py
heufybot/modules/commands/commands.py
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
Fix a typo in the Commands module help text
Fix a typo in the Commands module help text
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
<commit_before>from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): ...
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): return ["comm...
<commit_before>from twisted.plugin import IPlugin from heufybot.moduleinterface import IBotModule from heufybot.modules.commandinterface import BotCommand from zope.interface import implements class CommandsCommand(BotCommand): implements(IPlugin, IBotModule) name = "Commands" def triggers(self): ...
df2d43e8ae84af605b845b3cbbb9c318f300e4e9
server.py
server.py
#!/usr/bin/python3 import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' def call_spass(name, master): p = subprocess.Popen([ SPASS, 'get', name], stdin=subprocess.PIPE, ...
#!/usr/bin/python3 import logging import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' @app.before_first_request def setup(): app.logger.addHandler(logging.StreamHandler()) app.logger.setLevel(logging.INFO) d...
Add logging for requested password and result
Add logging for requested password and result
Python
mit
iburinoc/spass-server,iburinoc/spass-server
#!/usr/bin/python3 import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' def call_spass(name, master): p = subprocess.Popen([ SPASS, 'get', name], stdin=subprocess.PIPE, ...
#!/usr/bin/python3 import logging import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' @app.before_first_request def setup(): app.logger.addHandler(logging.StreamHandler()) app.logger.setLevel(logging.INFO) d...
<commit_before>#!/usr/bin/python3 import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' def call_spass(name, master): p = subprocess.Popen([ SPASS, 'get', name], stdin=su...
#!/usr/bin/python3 import logging import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' @app.before_first_request def setup(): app.logger.addHandler(logging.StreamHandler()) app.logger.setLevel(logging.INFO) d...
#!/usr/bin/python3 import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' def call_spass(name, master): p = subprocess.Popen([ SPASS, 'get', name], stdin=subprocess.PIPE, ...
<commit_before>#!/usr/bin/python3 import subprocess import sys from flask import Flask, request app = Flask(__name__) SPASS=sys.argv[1] if len(sys.argv) > 1 else '/usr/local/bin/spass' def call_spass(name, master): p = subprocess.Popen([ SPASS, 'get', name], stdin=su...
467b9c6b32ea48aac1786148be53f3da59182592
lyli.py
lyli.py
#!flask/bin/python from app import app app.run(port=3004, debug=False)
#!flask/bin/python import logging from os import fork import werkzeug.serving from app import app pid = fork() if pid > 0: print('PID: %d' % pid) exit(0) elif pid < 0: print('Could not fork: %d' % pid) exit(1) # we are behind a proxy. log the ip of the end-user, not the proxy. # this will also work ...
Add fork and log real ip
Add fork and log real ip
Python
artistic-2.0
felixbade/lyli,felixbade/lyli,felixbade/lyli
#!flask/bin/python from app import app app.run(port=3004, debug=False) Add fork and log real ip
#!flask/bin/python import logging from os import fork import werkzeug.serving from app import app pid = fork() if pid > 0: print('PID: %d' % pid) exit(0) elif pid < 0: print('Could not fork: %d' % pid) exit(1) # we are behind a proxy. log the ip of the end-user, not the proxy. # this will also work ...
<commit_before>#!flask/bin/python from app import app app.run(port=3004, debug=False) <commit_msg>Add fork and log real ip<commit_after>
#!flask/bin/python import logging from os import fork import werkzeug.serving from app import app pid = fork() if pid > 0: print('PID: %d' % pid) exit(0) elif pid < 0: print('Could not fork: %d' % pid) exit(1) # we are behind a proxy. log the ip of the end-user, not the proxy. # this will also work ...
#!flask/bin/python from app import app app.run(port=3004, debug=False) Add fork and log real ip#!flask/bin/python import logging from os import fork import werkzeug.serving from app import app pid = fork() if pid > 0: print('PID: %d' % pid) exit(0) elif pid < 0: print('Could not fork: %d' % pid) exit...
<commit_before>#!flask/bin/python from app import app app.run(port=3004, debug=False) <commit_msg>Add fork and log real ip<commit_after>#!flask/bin/python import logging from os import fork import werkzeug.serving from app import app pid = fork() if pid > 0: print('PID: %d' % pid) exit(0) elif pid < 0: p...
d59aef4c883b9343ac1aa396ee39a0308b1207db
src/config.py
src/config.py
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
Set auto message time to correct time
Set auto message time to correct time
Python
mit
caiopo/quibe-bot
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
<commit_before>from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] A...
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] APP_NAME = envir...
<commit_before>from os import environ # the token you get from botfather BOT_TOKEN = environ['BOT_TOKEN'] # the chat_id of the maintainer, used to alert about possible errors. # leave empty to disable this feature. # note that leaving empty also disables the /sendto command MAINTAINER_ID = environ['MAINTAINER_ID'] A...
75b82feac8ebc12450a44c5927579e30c604f973
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
8: Create documentation of DataSource Settings Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
b47bbb9a995fd7be2e7a49513094ad9eb065aa46
main.py
main.py
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
Update app to add an error message if user does not exist or shadowbanned
Update app to add an error message if user does not exist or shadowbanned
Python
mit
avinassh/kekday,avinassh/kekday
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
<commit_before>import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddi...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
<commit_before>import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddi...
69f19c4678b548f452f92ec29db0a3800c3c633d
cgi-bin/github_hook.py
cgi-bin/github_hook.py
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signature.split('=') if sha_name...
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys import cgitb; cgitb.enable() def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signat...
Fix bug of error cwd when pulling.
Fix bug of error cwd when pulling.
Python
mit
zhchbin/Yagra,zhchbin/Yagra,zhchbin/Yagra
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signature.split('=') if sha_name...
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys import cgitb; cgitb.enable() def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signat...
<commit_before>#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signature.split('=') ...
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys import cgitb; cgitb.enable() def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signat...
#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signature.split('=') if sha_name...
<commit_before>#!/usr/bin/python from hashlib import sha1 import hmac import json import os import subprocess import sys def verify_signature(payload_body): x_hub_signature = os.getenv("HTTP_X_HUB_SIGNATURE") if not x_hub_signature: return False sha_name, signature = x_hub_signature.split('=') ...
0bdd2df16823f129b39549a0e41adf1b29470d88
challenges/__init__.py
challenges/__init__.py
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
Fix bug in loading of c* modules
Fix bug in loading of c* modules
Python
mit
GunshipPenguin/billionaire_challenge,GunshipPenguin/billionaire_challenge
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
<commit_before>from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that module...
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that modules are in c1-c* ...
<commit_before>from os.path import dirname, basename, isfile import glob import sys modules = glob.glob(dirname(__file__)+"/c*[0-9].py") sys.path.append(dirname(__file__)) # Load all of the modules containing the challenge classes modules = [basename(path)[:-3] for path in modules] modules.sort() # Ensure that module...
5ed364189b630d862ad9b9381e91f0e0e7268015
flask_mongorest/exceptions.py
flask_mongorest/exceptions.py
class MongoRestException(Exception): def __init__(self, message): self._message = message def _get_message(self): return self._message def _set_message(self, message): self._message = message message = property(_get_message, _set_message) class OperatorNotAllowed(MongoRestEx...
class MongoRestException(Exception): pass class OperatorNotAllowed(MongoRestException): def __init__(self, operator_name): self.op_name = operator_name def __unicode__(self): return u'"'+self.op_name+'" is not a valid operator name.' class InvalidFilter(MongoRestException): pass cla...
Reduce MongoRestException to pass for py3 compat
Reduce MongoRestException to pass for py3 compat
Python
bsd-3-clause
elasticsales/flask-mongorest,elasticsales/flask-mongorest
class MongoRestException(Exception): def __init__(self, message): self._message = message def _get_message(self): return self._message def _set_message(self, message): self._message = message message = property(_get_message, _set_message) class OperatorNotAllowed(MongoRestEx...
class MongoRestException(Exception): pass class OperatorNotAllowed(MongoRestException): def __init__(self, operator_name): self.op_name = operator_name def __unicode__(self): return u'"'+self.op_name+'" is not a valid operator name.' class InvalidFilter(MongoRestException): pass cla...
<commit_before> class MongoRestException(Exception): def __init__(self, message): self._message = message def _get_message(self): return self._message def _set_message(self, message): self._message = message message = property(_get_message, _set_message) class OperatorNotAllo...
class MongoRestException(Exception): pass class OperatorNotAllowed(MongoRestException): def __init__(self, operator_name): self.op_name = operator_name def __unicode__(self): return u'"'+self.op_name+'" is not a valid operator name.' class InvalidFilter(MongoRestException): pass cla...
class MongoRestException(Exception): def __init__(self, message): self._message = message def _get_message(self): return self._message def _set_message(self, message): self._message = message message = property(_get_message, _set_message) class OperatorNotAllowed(MongoRestEx...
<commit_before> class MongoRestException(Exception): def __init__(self, message): self._message = message def _get_message(self): return self._message def _set_message(self, message): self._message = message message = property(_get_message, _set_message) class OperatorNotAllo...
482721b13f40e4c763c9ff861897c18c3ca9179a
fluentcms_googlemaps/views.py
fluentcms_googlemaps/views.py
from __future__ import unicode_literals import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker class MarkerDetailView(BaseDetailView): """ Simple view for fetching mark...
from __future__ import unicode_literals import sys import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker if sys.version_info[0] >= 3: long = int class MarkerDetailView(Ba...
Fix Python 3 issue with long()
Fix Python 3 issue with long()
Python
apache-2.0
edoburu/fluentcms-googlemaps,edoburu/fluentcms-googlemaps,edoburu/fluentcms-googlemaps
from __future__ import unicode_literals import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker class MarkerDetailView(BaseDetailView): """ Simple view for fetching mark...
from __future__ import unicode_literals import sys import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker if sys.version_info[0] >= 3: long = int class MarkerDetailView(Ba...
<commit_before>from __future__ import unicode_literals import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker class MarkerDetailView(BaseDetailView): """ Simple view fo...
from __future__ import unicode_literals import sys import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker if sys.version_info[0] >= 3: long = int class MarkerDetailView(Ba...
from __future__ import unicode_literals import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker class MarkerDetailView(BaseDetailView): """ Simple view for fetching mark...
<commit_before>from __future__ import unicode_literals import json from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.views.generic.detail import BaseDetailView from .models import Marker class MarkerDetailView(BaseDetailView): """ Simple view fo...
06aba23adbb281ff64a82059a07ffde95c361e6d
tests/app/test_cloudfoundry_config.py
tests/app/test_cloudfoundry_config.py
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def postgres_config(): return [ { 'credentials': { 'uri': 'postgres uri' } } ] @pytest.fixture def c...
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def cloudfoundry_config(): return { 'postgres': [{ 'credentials': { 'uri': 'postgres uri' } }], 'u...
Remove redundant postgres CloudFoundry fixture
Remove redundant postgres CloudFoundry fixture
Python
mit
alphagov/notifications-api,alphagov/notifications-api
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def postgres_config(): return [ { 'credentials': { 'uri': 'postgres uri' } } ] @pytest.fixture def c...
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def cloudfoundry_config(): return { 'postgres': [{ 'credentials': { 'uri': 'postgres uri' } }], 'u...
<commit_before>import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def postgres_config(): return [ { 'credentials': { 'uri': 'postgres uri' } } ] @pytes...
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def cloudfoundry_config(): return { 'postgres': [{ 'credentials': { 'uri': 'postgres uri' } }], 'u...
import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def postgres_config(): return [ { 'credentials': { 'uri': 'postgres uri' } } ] @pytest.fixture def c...
<commit_before>import json import os import pytest from app.cloudfoundry_config import ( extract_cloudfoundry_config, set_config_env_vars, ) @pytest.fixture def postgres_config(): return [ { 'credentials': { 'uri': 'postgres uri' } } ] @pytes...
e14ceda6370b506b80f65d45abd36c9f728e5699
pitchfork/manage_globals/forms.py
pitchfork/manage_globals/forms.py
# Copyright 2014 Dave Kludt # # 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, s...
# Copyright 2014 Dave Kludt # # 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, s...
Rework imports so not having to specify every type of field. Alter field definitions to reflect change
Rework imports so not having to specify every type of field. Alter field definitions to reflect change
Python
apache-2.0
rackerlabs/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork
# Copyright 2014 Dave Kludt # # 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, s...
# Copyright 2014 Dave Kludt # # 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, s...
<commit_before># Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# Copyright 2014 Dave Kludt # # 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, s...
# Copyright 2014 Dave Kludt # # 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, s...
<commit_before># Copyright 2014 Dave Kludt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
4b9e76c1db2f6ab8ddcd7a8eb0cc60c71af32a09
panoptes_client/workflow.py
panoptes_client/workflow.py
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
Change subjects -> subject_ids when retiring subjects
Change subjects -> subject_ids when retiring subjects
Python
apache-2.0
zooniverse/panoptes-python-client
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
<commit_before>from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subje...
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subjects) not in (li...
<commit_before>from panoptes_client.panoptes import PanoptesObject, LinkResolver from panoptes_client.subject import Subject class Workflow(PanoptesObject): _api_slug = 'workflows' _link_slug = 'workflows' _edit_attributes = [] def retire_subjects(self, subjects, reason='other'): if type(subje...
233ce96d96caff3070f24d9d3dff3ed85be81fee
halaqat/settings/shaha.py
halaqat/settings/shaha.py
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
Fix The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting
Fix The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting
Python
mit
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
<commit_before>from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT =...
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT = os.path.dirnam...
<commit_before>from .base_settings import * import dj_database_url import os ALLOWED_HOSTS = ['0.0.0.0'] db_from_env = dj_database_url.config(conn_max_age=500) DATABASES['default'].update(db_from_env) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ PROJECT_ROOT =...
d99dd477d8b0849815bd5255d1eaedb2879294bb
general_itests/environment.py
general_itests/environment.py
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
Remove behave_pytest from general_itests too
Remove behave_pytest from general_itests too
Python
apache-2.0
somic/paasta,somic/paasta,Yelp/paasta,Yelp/paasta
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
<commit_before># Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
<commit_before># Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
fcc913c1f714fb823e4405a2af821d7a63b68591
integration_tests/emulator/beacon_parser/imtq_state_telemetry_parser.py
integration_tests/emulator/beacon_parser/imtq_state_telemetry_parser.py
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
Fix imtq state telemetry parser.
[telemetry][imtq] Fix imtq state telemetry parser.
Python
agpl-3.0
PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
<commit_before>from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, ...
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, "Status") ...
<commit_before>from parser import Parser class ImtqStateTelemetryParser(Parser): def __init__(self, tree_control): Parser.__init__(self, tree_control, 'Imtq State') def get_bit_count(self): return 8 + 2 + 2 + 1 + 32 def parse(self, address, bits): self.append_byte(address, bits, ...
db0253a228b3253e23bb5190fba9930a2f313d66
basictracer/context.py
basictracer/context.py
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
Remove superfluous check for None baggage
Remove superfluous check for None baggage
Python
apache-2.0
opentracing/basictracer-python
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
<commit_before>from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_i...
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_id=None, ...
<commit_before>from __future__ import absolute_import import opentracing class SpanContext(opentracing.SpanContext): """SpanContext satisfies the opentracing.SpanContext contract. trace_id and span_id are uint64's, so their range is [0, 2^64). """ def __init__( self, trace_i...
5c91e99ab733020e123e7cac9f6b2a39713bcee0
src/c3nav/api/__init__.py
src/c3nav/api/__init__.py
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
Revert "disabling json indenter for testing"
Revert "disabling json indenter for testing" This reverts commit e12882c1ee11fbfb3d1f131e4d9ed2d1348907df.
Python
apache-2.0
c3nav/c3nav,c3nav/c3nav,c3nav/c3nav,c3nav/c3nav
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
<commit_before>from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(ac...
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(accepted_media_ty...
<commit_before>from functools import wraps from rest_framework.renderers import JSONRenderer from c3nav.mapdata.utils import json_encoder_reindent orig_render = JSONRenderer.render @wraps(JSONRenderer.render) def nicer_renderer(self, data, accepted_media_type=None, renderer_context=None): if self.get_indent(ac...
efd1c945cafda82e48077e75e3231cac95d6e077
evesrp/util/fields.py
evesrp/util/fields.py
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): self.src = src self.alt...
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields from wtforms.utils import unset_value class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): ...
Update customs ImageField to work with IE
Update customs ImageField to work with IE As opposed to Chrome, IE (and maybe other browsers) just returns the coordinates of where the click occurred.
Python
bsd-2-clause
paxswill/evesrp,paxswill/evesrp,paxswill/evesrp
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): self.src = src self.alt...
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields from wtforms.utils import unset_value class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): ...
<commit_before>from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): self.src = src ...
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields from wtforms.utils import unset_value class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): ...
from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): self.src = src self.alt...
<commit_before>from __future__ import absolute_import import wtforms import wtforms.widgets import wtforms.fields class ImageInput(wtforms.widgets.Input): """WTForms widget for image inputs (<input type="image">) """ input_type = u'image' def __init__(self, src='', alt=''): self.src = src ...
e92339046fb47fc2275f432dfe3d998f702e40b2
pycalphad/tests/test_tdb.py
pycalphad/tests/test_tdb.py
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database from sympy import SympifyError @nose.tools.raises(SympifyError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAME...
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database @nose.tools.raises(ValueError, TypeError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAMETER G(L12_FCC,AL,CR,NI...
Fix unit test for py26
Fix unit test for py26
Python
mit
tkphd/pycalphad,tkphd/pycalphad,tkphd/pycalphad
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database from sympy import SympifyError @nose.tools.raises(SympifyError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAME...
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database @nose.tools.raises(ValueError, TypeError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAMETER G(L12_FCC,AL,CR,NI...
<commit_before>""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database from sympy import SympifyError @nose.tools.raises(SympifyError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """...
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database @nose.tools.raises(ValueError, TypeError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAMETER G(L12_FCC,AL,CR,NI...
""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database from sympy import SympifyError @nose.tools.raises(SympifyError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """ PARAME...
<commit_before>""" This module tests the functionality of the TDB file parser. """ import nose.tools from pycalphad import Database from sympy import SympifyError @nose.tools.raises(SympifyError) def test_tdb_popen_exploit(): "Prevent execution of arbitrary code using Popen." tdb_exploit_string = \ """...
ace1afc8491821c16311042d8115d31df119165d
build_chrome_webapp.py
build_chrome_webapp.py
try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() html = template.render(og_tag='', url='', ON_PRODUCTION=True, ON_DEV=...
from zipfile import ZipFile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() zipfile = ZipFile("webapp.zip", "w") def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() htm...
Write output to a zip file
Write output to a zip file
Python
mit
youtify/youtify,youtify/youtify,youtify/youtify
try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() html = template.render(og_tag='', url='', ON_PRODUCTION=True, ON_DEV=...
from zipfile import ZipFile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() zipfile = ZipFile("webapp.zip", "w") def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() htm...
<commit_before>try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() html = template.render(og_tag='', url='', ON_PRODUCTIO...
from zipfile import ZipFile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() zipfile = ZipFile("webapp.zip", "w") def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() htm...
try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() html = template.render(og_tag='', url='', ON_PRODUCTION=True, ON_DEV=...
<commit_before>try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() def render_main_template(): f = open('./html/index.html') template = Template(f.read().decode('utf-8')) f.close() html = template.render(og_tag='', url='', ON_PRODUCTIO...
fe19fa7ac7f98525980e5b074bb17015531b2b58
buzzwordbingo/views.py
buzzwordbingo/views.py
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): def get(self, request): return [{'name': 'Buzzwords', 'url': reverse('buzzword-root')}, {'name': 'Win Conditions', 'url': reverse('win-condition-root')}, {'...
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): """The buzzword bingo REST API provides an interface to a collection of boards, which contain the buzzwords on the board and a list of win conditions, which are Python code which determine...
Add a description to the main view using Markdown.
Add a description to the main view using Markdown.
Python
bsd-3-clause
seanfisk/buzzword-bingo-server,seanfisk/buzzword-bingo-server
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): def get(self, request): return [{'name': 'Buzzwords', 'url': reverse('buzzword-root')}, {'name': 'Win Conditions', 'url': reverse('win-condition-root')}, {'...
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): """The buzzword bingo REST API provides an interface to a collection of boards, which contain the buzzwords on the board and a list of win conditions, which are Python code which determine...
<commit_before>from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): def get(self, request): return [{'name': 'Buzzwords', 'url': reverse('buzzword-root')}, {'name': 'Win Conditions', 'url': reverse('win-condition-root')}, ...
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): """The buzzword bingo REST API provides an interface to a collection of boards, which contain the buzzwords on the board and a list of win conditions, which are Python code which determine...
from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): def get(self, request): return [{'name': 'Buzzwords', 'url': reverse('buzzword-root')}, {'name': 'Win Conditions', 'url': reverse('win-condition-root')}, {'...
<commit_before>from django.core.urlresolvers import reverse from djangorestframework.views import View class BuzzwordBingoView(View): def get(self, request): return [{'name': 'Buzzwords', 'url': reverse('buzzword-root')}, {'name': 'Win Conditions', 'url': reverse('win-condition-root')}, ...
8d925147bf459021ca9735faec375608963d0269
gatekeeper/nodered.py
gatekeeper/nodered.py
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
Use with handler to safely close the server socket and connection
Use with handler to safely close the server socket and connection
Python
mit
git-commit/iot-gatekeeper,git-commit/iot-gatekeeper
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
<commit_before>import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self....
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self.intercom = inte...
<commit_before>import threading import socket NODE_RED_SERVER_PORT = 4445 NODE_RED_CLIENT_PORT = 4444 class NodeRedDoorbellServerThread(threading.Thread): """ Get doorbell triggers from NodeRed. """ def __init__(self, intercom): super(NodeRedDoorbellServerThread, self).__init__() self....
2f4debb95af4f61b0c4b8ac6d8d30394c8551dbc
main.py
main.py
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
Change time_amount type,now handle float values
Change time_amount type,now handle float values
Python
mit
sancayouth/SrtModPy
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
<commit_before>import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_a...
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_amount', metavar...
<commit_before>import os.path from srtmod.srtmod import SrtMod import argparse def main(): parser = argparse.ArgumentParser(prog='SrtModPy', description='Just adjusts the timing of subtitle files') parser.add_argument('file_name', help='the subtitle to be modified') parser.add_argument('time_a...
eec72133d9245a4857c9a8954e235948a5fd9938
pokedex.py
pokedex.py
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
Remove unused method for getting Pokémon names
Remove unused method for getting Pokémon names
Python
bsd-2-clause
peterhajas/LivingDex,peterhajas/LivingDex,peterhajas/LivingDex,peterhajas/LivingDex
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
<commit_before>import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range...
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range (1, self.numbe...
<commit_before>import json class NationalDex: def __init__(self, pathToNationalDex): dexfile = open(pathToNationalDex, 'r') self.dexdata = json.load(dexfile) self.numberOfPokemon = len(self.dexdata.keys()) self.pokemonNames = [] self.pokemonSlugs = [] for i in range...
8f8b313a1b5118b6528e5152252128e075de0401
tests/test_terrain.py
tests/test_terrain.py
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): pass
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): self.ter1 = Terrain(1, 1) self.ter2 = Terrain(2, 4) self.ter3 = Terrain(1, 1) def test_getitem(self): self.assertEqual(self.ter1[0, 0], 0) self.assertEqual(self.ter2...
Add tests for indexing, equality and addition for Terrain
Add tests for indexing, equality and addition for Terrain
Python
mit
jackromo/RandTerrainPy
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): pass Add tests for indexing, equality and addition for Terrain
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): self.ter1 = Terrain(1, 1) self.ter2 = Terrain(2, 4) self.ter3 = Terrain(1, 1) def test_getitem(self): self.assertEqual(self.ter1[0, 0], 0) self.assertEqual(self.ter2...
<commit_before>import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): pass <commit_msg>Add tests for indexing, equality and addition for Terrain<commit_after>
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): self.ter1 = Terrain(1, 1) self.ter2 = Terrain(2, 4) self.ter3 = Terrain(1, 1) def test_getitem(self): self.assertEqual(self.ter1[0, 0], 0) self.assertEqual(self.ter2...
import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): pass Add tests for indexing, equality and addition for Terrainimport unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): self.ter1 = Terrain(1,...
<commit_before>import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def setUp(self): pass <commit_msg>Add tests for indexing, equality and addition for Terrain<commit_after>import unittest from randterrainpy import * class TerrainTesterPy(unittest.TestCase): def se...
d3428351e005897f45bec1f4db61d776d2d9a962
tests/test_migrate.py
tests/test_migrate.py
from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_upgrade(tmpdir): db_file = tmpdir.join('db.json') db_file.write(v1_0) # Run upgrade migrate(str(db_file)) db = T...
import pytest from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_open_old(tmpdir): # Make sure that opening an old database results in an exception and not # in data loss ...
Test that opening an old database fails
Test that opening an old database fails
Python
mit
cagnosolutions/tinydb,Callwoola/tinydb,ivankravets/tinydb,raquel-ucl/tinydb,msiemens/tinydb
from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_upgrade(tmpdir): db_file = tmpdir.join('db.json') db_file.write(v1_0) # Run upgrade migrate(str(db_file)) db = T...
import pytest from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_open_old(tmpdir): # Make sure that opening an old database results in an exception and not # in data loss ...
<commit_before>from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_upgrade(tmpdir): db_file = tmpdir.join('db.json') db_file.write(v1_0) # Run upgrade migrate(str(db_fi...
import pytest from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_open_old(tmpdir): # Make sure that opening an old database results in an exception and not # in data loss ...
from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_upgrade(tmpdir): db_file = tmpdir.join('db.json') db_file.write(v1_0) # Run upgrade migrate(str(db_file)) db = T...
<commit_before>from tinydb import TinyDB, where from tinydb.migrate import migrate v1_0 = """ { "_default": [{"key": "value", "_id": 1}], "table": [{"key": "value", "_id": 2}] } """ def test_upgrade(tmpdir): db_file = tmpdir.join('db.json') db_file.write(v1_0) # Run upgrade migrate(str(db_fi...
2509badb90a23c7c8b85c146f960bcc7bb8d57aa
postgresql/protocol/version.py
postgresql/protocol/version.py
## # .protocol.version ## 'PQ version class' from struct import Struct version_struct = Struct('!HH') class Version(tuple): """Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) def __new__(subtype, major_minor :...
## # .protocol.version ## """ PQ version class used by startup messages. """ from struct import Struct version_struct = Struct('!HH') class Version(tuple): """ Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) ...
Remove string annotation (likely incomprehensible to mypy) and minor doc-string formatting.
Remove string annotation (likely incomprehensible to mypy) and minor doc-string formatting.
Python
bsd-3-clause
python-postgres/fe,python-postgres/fe
## # .protocol.version ## 'PQ version class' from struct import Struct version_struct = Struct('!HH') class Version(tuple): """Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) def __new__(subtype, major_minor :...
## # .protocol.version ## """ PQ version class used by startup messages. """ from struct import Struct version_struct = Struct('!HH') class Version(tuple): """ Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) ...
<commit_before>## # .protocol.version ## 'PQ version class' from struct import Struct version_struct = Struct('!HH') class Version(tuple): """Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) def __new__(subtype...
## # .protocol.version ## """ PQ version class used by startup messages. """ from struct import Struct version_struct = Struct('!HH') class Version(tuple): """ Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) ...
## # .protocol.version ## 'PQ version class' from struct import Struct version_struct = Struct('!HH') class Version(tuple): """Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) def __new__(subtype, major_minor :...
<commit_before>## # .protocol.version ## 'PQ version class' from struct import Struct version_struct = Struct('!HH') class Version(tuple): """Version((major, minor)) -> Version Version serializer and parser. """ major = property(fget = lambda s: s[0]) minor = property(fget = lambda s: s[1]) def __new__(subtype...
61af785becd452facb92292260149b5e2b20a489
sheldon/__init__.py
sheldon/__init__.py
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
Add sheldon hooks to init file
Add sheldon hooks to init file
Python
mit
lises/sheldon
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
<commit_before># -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for mor...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
# -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for more # comfortable...
<commit_before># -*- coding: utf-8 -*- """ @author: Seva Zhidkov @contact: [email protected] @license: The MIT license Copyright (C) 2015 """ __author__ = 'Seva Zhidkov' __version__ = '0.1' __email__ = '[email protected]' # Bot file contains bot's main class - Sheldon # Utils folder contains scripts for mor...
94142e31d4189fbcf152eeb6b9ad89d684f1a6d0
autoload/splicelib/util/io.py
autoload/splicelib/util/io.py
import sys def error(m): sys.stderr.write(str(m) + '\n')
import sys import vim def error(m): sys.stderr.write(str(m) + '\n') def echomsg(m): vim.command('echomsg "%s"' % m)
Add a utility for echoing in the IO utils.
Add a utility for echoing in the IO utils.
Python
mit
sjl/splice.vim,sjl/splice.vim
import sys def error(m): sys.stderr.write(str(m) + '\n') Add a utility for echoing in the IO utils.
import sys import vim def error(m): sys.stderr.write(str(m) + '\n') def echomsg(m): vim.command('echomsg "%s"' % m)
<commit_before>import sys def error(m): sys.stderr.write(str(m) + '\n') <commit_msg>Add a utility for echoing in the IO utils.<commit_after>
import sys import vim def error(m): sys.stderr.write(str(m) + '\n') def echomsg(m): vim.command('echomsg "%s"' % m)
import sys def error(m): sys.stderr.write(str(m) + '\n') Add a utility for echoing in the IO utils.import sys import vim def error(m): sys.stderr.write(str(m) + '\n') def echomsg(m): vim.command('echomsg "%s"' % m)
<commit_before>import sys def error(m): sys.stderr.write(str(m) + '\n') <commit_msg>Add a utility for echoing in the IO utils.<commit_after>import sys import vim def error(m): sys.stderr.write(str(m) + '\n') def echomsg(m): vim.command('echomsg "%s"' % m)
8f3249904ede8e6ac4fd1398f3d059335a65c8c6
galpy/df.py
galpy/df.py
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Classes # shudf= diskdf.shudf dehnendf= diskdf.dehnendf DFcorrection= diskdf.DFcorrec...
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Functions # impulse_deltav_plummer= streamgapdf.impulse_deltav_plummer impulse_deltav_...
Add impulse functions to top level
Add impulse functions to top level
Python
bsd-3-clause
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Classes # shudf= diskdf.shudf dehnendf= diskdf.dehnendf DFcorrection= diskdf.DFcorrec...
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Functions # impulse_deltav_plummer= streamgapdf.impulse_deltav_plummer impulse_deltav_...
<commit_before>from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Classes # shudf= diskdf.shudf dehnendf= diskdf.dehnendf DFcorrection= ...
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Functions # impulse_deltav_plummer= streamgapdf.impulse_deltav_plummer impulse_deltav_...
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Classes # shudf= diskdf.shudf dehnendf= diskdf.dehnendf DFcorrection= diskdf.DFcorrec...
<commit_before>from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Classes # shudf= diskdf.shudf dehnendf= diskdf.dehnendf DFcorrection= ...
ae2c248cf1d3a2641b05a33d42077a2cace2e786
tests/scoring_engine/engine/test_execute_command.py
tests/scoring_engine/engine/test_execute_command.py
from scoring_engine.engine.execute_command import execute_command from scoring_engine.engine.job import Job class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = execute_command.run(job) assert task['errored_out'] is False ...
import mock from billiard.exceptions import SoftTimeLimitExceeded from scoring_engine.engine.job import Job from scoring_engine.engine.execute_command import execute_command class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = exec...
Add test for soft time limit reached
Add test for soft time limit reached
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
from scoring_engine.engine.execute_command import execute_command from scoring_engine.engine.job import Job class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = execute_command.run(job) assert task['errored_out'] is False ...
import mock from billiard.exceptions import SoftTimeLimitExceeded from scoring_engine.engine.job import Job from scoring_engine.engine.execute_command import execute_command class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = exec...
<commit_before>from scoring_engine.engine.execute_command import execute_command from scoring_engine.engine.job import Job class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = execute_command.run(job) assert task['errored_out...
import mock from billiard.exceptions import SoftTimeLimitExceeded from scoring_engine.engine.job import Job from scoring_engine.engine.execute_command import execute_command class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = exec...
from scoring_engine.engine.execute_command import execute_command from scoring_engine.engine.job import Job class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = execute_command.run(job) assert task['errored_out'] is False ...
<commit_before>from scoring_engine.engine.execute_command import execute_command from scoring_engine.engine.job import Job class TestWorker(object): def test_basic_run(self): job = Job(environment_id="12345", command="echo 'HELLO'") task = execute_command.run(job) assert task['errored_out...
88d49172417ef7c99fa59313a10808c2b1a38b86
api/views.py
api/views.py
# -*- coding: utf-8 -*- from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processors.event import count_appr...
# -*- coding: utf-8 -*- from hashlib import sha1 from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processo...
Include the query string in the API cache key
Include the query string in the API cache key Otherwise, these two URLs would return the same data: /api/event/list/?format=json&past=yes /api/event/list/?format=json
Python
mit
codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events
# -*- coding: utf-8 -*- from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processors.event import count_appr...
# -*- coding: utf-8 -*- from hashlib import sha1 from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processo...
<commit_before># -*- coding: utf-8 -*- from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processors.event im...
# -*- coding: utf-8 -*- from hashlib import sha1 from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processo...
# -*- coding: utf-8 -*- from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processors.event import count_appr...
<commit_before># -*- coding: utf-8 -*- from rest_framework import generics from rest_framework_extensions.cache.decorators import cache_response from api.serializers import EventListSerializers from api.processors import get_approved_events from api.serializers import ScoreboardSerializer from web.processors.event im...
3ced7839a9afbd96d23617f60804d5d580ceb9e6
sets/1/challenges/s1c5.py
sets/1/challenges/s1c5.py
import itertools def MultipleCharacterXOR(input, key): out = "" for i, j in itertools.izip_longest(range(len(input)), range(len(key))): vi = i vj = j if vi is None: vi = vj % len(input) elif vj is None: vj = vi % len(key) input_c = input[vi] key_c = key[vj] out += chr(ord(in...
import itertools def MultipleCharacterXOR(input, key): out = "" j = 0 while j < max(len(input), len(key)): i = j % len(input) k = j % len(key) j += 1 input_c = input[i] key_c = key[k] out += chr(ord(input_c) ^ ord(key_c)) return out.encode("hex") if __name__ == "__main__": input = ""...
Make the solution easier to read
Make the solution easier to read
Python
mit
aawc/cryptopals
import itertools def MultipleCharacterXOR(input, key): out = "" for i, j in itertools.izip_longest(range(len(input)), range(len(key))): vi = i vj = j if vi is None: vi = vj % len(input) elif vj is None: vj = vi % len(key) input_c = input[vi] key_c = key[vj] out += chr(ord(in...
import itertools def MultipleCharacterXOR(input, key): out = "" j = 0 while j < max(len(input), len(key)): i = j % len(input) k = j % len(key) j += 1 input_c = input[i] key_c = key[k] out += chr(ord(input_c) ^ ord(key_c)) return out.encode("hex") if __name__ == "__main__": input = ""...
<commit_before>import itertools def MultipleCharacterXOR(input, key): out = "" for i, j in itertools.izip_longest(range(len(input)), range(len(key))): vi = i vj = j if vi is None: vi = vj % len(input) elif vj is None: vj = vi % len(key) input_c = input[vi] key_c = key[vj] ou...
import itertools def MultipleCharacterXOR(input, key): out = "" j = 0 while j < max(len(input), len(key)): i = j % len(input) k = j % len(key) j += 1 input_c = input[i] key_c = key[k] out += chr(ord(input_c) ^ ord(key_c)) return out.encode("hex") if __name__ == "__main__": input = ""...
import itertools def MultipleCharacterXOR(input, key): out = "" for i, j in itertools.izip_longest(range(len(input)), range(len(key))): vi = i vj = j if vi is None: vi = vj % len(input) elif vj is None: vj = vi % len(key) input_c = input[vi] key_c = key[vj] out += chr(ord(in...
<commit_before>import itertools def MultipleCharacterXOR(input, key): out = "" for i, j in itertools.izip_longest(range(len(input)), range(len(key))): vi = i vj = j if vi is None: vi = vj % len(input) elif vj is None: vj = vi % len(key) input_c = input[vi] key_c = key[vj] ou...
44be93c5efb334297fc1bb10eaafec197018b241
python/render/render_tracks.py
python/render/render_tracks.py
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
Update formatting on track labels
Update formatting on track labels
Python
mit
Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
<commit_before>__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] ...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
<commit_before>__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] ...
9ce90b52bff35d5d0ad87d2402a5e8a946938cf7
sideloader/forms.py
sideloader/forms.py
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
Improve the project form a bit
Improve the project form a bit
Python
mit
praekelt/sideloader,praekelt/sideloader,praekelt/sideloader,praekelt/sideloader
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
<commit_before>from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('subm...
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('submit', 'Submit'))...
<commit_before>from django.contrib.auth.models import User from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit import models class BaseModelForm(forms.ModelForm): helper = FormHelper() helper.form_class = 'form-horizontal' helper.add_input(Submit('subm...
5d2bf1bd3baecd912b0af94bed7b9edcbbd05f40
src/oscar/apps/dashboard/tables.py
src/oscar/apps/dashboard/tables.py
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # in...
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # i...
Use new style class to allow for dynamic table class creation
Use new style class to allow for dynamic table class creation
Python
bsd-3-clause
machtfit/django-oscar,machtfit/django-oscar,machtfit/django-oscar
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # in...
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # i...
<commit_before>from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cann...
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # i...
from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cannot # in...
<commit_before>from django.utils.translation import ungettext_lazy from django_tables2_reports.tables import TableReport class DashboardTable(TableReport): caption = ungettext_lazy('%d Row', '%d Rows') def get_caption_display(self): # Allow overriding the caption with an arbitrary string that we cann...
cf6d82d9db90572d9a7350cb9d98f3619b86668f
examples/plot_quadtree_hanging.py
examples/plot_quadtree_hanging.py
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
Switch order (again) of legend for example
Switch order (again) of legend for example
Python
mit
simpeg/discretize,simpeg/discretize,simpeg/discretize
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
<commit_before>""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3)...
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3). """ import d...
<commit_before>""" QuadTree: Hanging Nodes ======================= You can give the refine method a function, which is evaluated on every cell of the TreeMesh. Occasionally it is useful to initially refine to a constant level (e.g. 3 in this 32x32 mesh). This means the function is first evaluated on an 8x8 mesh (2^3)...
f62e0539028b5a327e3c178090ee9316958e65cc
pylons/__init__.py
pylons/__init__.py
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_resource...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.configuration import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_r...
Fix an import error. pylons.config doesn't exist anymore, use pylons.configuration
Fix an import error. pylons.config doesn't exist anymore, use pylons.configuration --HG-- branch : trunk
Python
bsd-3-clause
Pylons/pylons,moreati/pylons,Pylons/pylons,moreati/pylons,Pylons/pylons,moreati/pylons
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_resource...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.configuration import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_r...
<commit_before>"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: fr...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.configuration import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_r...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: from pkg_resource...
<commit_before>"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config __all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response', 'session', 'tmpl_context', 'url'] def __figure_version(): try: fr...
44572394e4543071025c86ac107d4dfe1fc48b47
python/__init__.py
python/__init__.py
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.pkg import get_version __version__ = get_version()
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.core import get_version __version__ = get_version()
Fix a bad import (get_version)
Fix a bad import (get_version)
Python
apache-2.0
Agicia/lpod-python,lpod/lpod-docs,lpod/lpod-docs,Agicia/lpod-python
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.pkg import get_version __version__ = get_version() Fix a bad import (get_version)
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.core import get_version __version__ = get_version()
<commit_before># -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.pkg import get_version __version__ = get_version() <commit_msg>Fix a bad import (get_version)<commit_after>
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.core import get_version __version__ = get_version()
# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.pkg import get_version __version__ = get_version() Fix a bad import (get_version)# -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.core impo...
<commit_before># -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend # Import from itools from itools.pkg import get_version __version__ = get_version() <commit_msg>Fix a bad import (get_version)<commit_after># -*- coding: UTF-8 -*- # Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend #...
2a086200b7644c3b3b869359c23366e7a3f36141
show_usbcamera.py
show_usbcamera.py
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # import sys from PySide import QtGui import VisionToolkit as vtk # # Main application # if __name__ == '__main__' : application = QtGui.QApplication( sys.argv ) widget = vtk.UsbCameraWidget() ...
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # #import sys import cv2 #from PySide import QtGui import VisionToolkit as vt # # Image callback function # def Callback( image ) : # Display the stereo image cv2.imshow( 'Camera', image ) cv2.waitKe...
Add OpenCV viewer for debug.
Add OpenCV viewer for debug.
Python
mit
microy/StereoVision,microy/StereoVision,microy/VisionToolkit,microy/VisionToolkit,microy/PyStereoVisionToolkit,microy/PyStereoVisionToolkit
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # import sys from PySide import QtGui import VisionToolkit as vtk # # Main application # if __name__ == '__main__' : application = QtGui.QApplication( sys.argv ) widget = vtk.UsbCameraWidget() ...
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # #import sys import cv2 #from PySide import QtGui import VisionToolkit as vt # # Image callback function # def Callback( image ) : # Display the stereo image cv2.imshow( 'Camera', image ) cv2.waitKe...
<commit_before>#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # import sys from PySide import QtGui import VisionToolkit as vtk # # Main application # if __name__ == '__main__' : application = QtGui.QApplication( sys.argv ) widget = vtk.Usb...
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # #import sys import cv2 #from PySide import QtGui import VisionToolkit as vt # # Image callback function # def Callback( image ) : # Display the stereo image cv2.imshow( 'Camera', image ) cv2.waitKe...
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # import sys from PySide import QtGui import VisionToolkit as vtk # # Main application # if __name__ == '__main__' : application = QtGui.QApplication( sys.argv ) widget = vtk.UsbCameraWidget() ...
<commit_before>#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # # External dependencies # import sys from PySide import QtGui import VisionToolkit as vtk # # Main application # if __name__ == '__main__' : application = QtGui.QApplication( sys.argv ) widget = vtk.Usb...
7ad3346759f53f57f233319e63361a0ed792535f
incrowd/notify/utils.py
incrowd/notify/utils.py
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
Fix pinging in chat throwing errors
Fix pinging in chat throwing errors
Python
apache-2.0
pcsforeducation/incrowd,pcsforeducation/incrowd,incrowdio/incrowd,incrowdio/incrowd,incrowdio/incrowd,pcsforeducation/incrowd,pcsforeducation/incrowd,incrowdio/incrowd
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
<commit_before>import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create not...
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create notification ...
<commit_before>import logging from notify.models import Notification logger = logging.getLogger(__name__) def ping_filter(message, users, sending_user, notify_text, notify_type, notify_url=None): for user in users: if username_in_message(message, user.username): # Create not...
469c1dc9de1c986beda853b13909bdc5d3ff2b92
stagecraft/urls.py
stagecraft/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
Make redirect view pass the GET query string to the new location
Make redirect view pass the GET query string to the new location
Python
mit
alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( ...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( '', url(r'...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView from stagecraft.apps.datasets import views as datasets_views from stagecraft.libs.status import views as status_views admin.autodiscover() urlpatterns = patterns( ...
018abd1a80bf0045d1f2d2c04d1caaa4db9433b8
froide/helper/search/paginator.py
froide/helper/search/paginator.py
from django.core.paginator import Paginator class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object for the given 1...
from django.core.paginator import Paginator, InvalidPage class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object fo...
Raise invalid page on paging error
Raise invalid page on paging error
Python
mit
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide
from django.core.paginator import Paginator class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object for the given 1...
from django.core.paginator import Paginator, InvalidPage class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object fo...
<commit_before>from django.core.paginator import Paginator class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object ...
from django.core.paginator import Paginator, InvalidPage class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object fo...
from django.core.paginator import Paginator class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object for the given 1...
<commit_before>from django.core.paginator import Paginator class ElasticsearchPaginator(Paginator): """ Paginator that prevents two queries to ES (for count and objects) as ES gives count with objects """ MAX_ES_OFFSET = 10000 def page(self, number): """ Returns a Page object ...
5794d0ff86f90a1f1f2ad7ca52cb6f1d34cb5b24
ktbs_bench/benchable_store.py
ktbs_bench/benchable_store.py
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore(Graph): def __init__(self, connect_args, create_func=None, create_args=[], *args, **kwargs): super(BenchableStore, self).__init__(*args, **kwargs) self.connect_args = connect_args self.create_fun...
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore: """Allows to use a store/graph for benchmarks. Contains a rdflib.Graph with setup and teardown. """ def __init__(self, store, graph_id, store_config, store_create=False): self.graph = Graph(store=...
Make Graph an attribute rather than an inheritance
Make Graph an attribute rather than an inheritance
Python
mit
ktbs/ktbs-bench,ktbs/ktbs-bench
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore(Graph): def __init__(self, connect_args, create_func=None, create_args=[], *args, **kwargs): super(BenchableStore, self).__init__(*args, **kwargs) self.connect_args = connect_args self.create_fun...
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore: """Allows to use a store/graph for benchmarks. Contains a rdflib.Graph with setup and teardown. """ def __init__(self, store, graph_id, store_config, store_create=False): self.graph = Graph(store=...
<commit_before>from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore(Graph): def __init__(self, connect_args, create_func=None, create_args=[], *args, **kwargs): super(BenchableStore, self).__init__(*args, **kwargs) self.connect_args = connect_args ...
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore: """Allows to use a store/graph for benchmarks. Contains a rdflib.Graph with setup and teardown. """ def __init__(self, store, graph_id, store_config, store_create=False): self.graph = Graph(store=...
from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore(Graph): def __init__(self, connect_args, create_func=None, create_args=[], *args, **kwargs): super(BenchableStore, self).__init__(*args, **kwargs) self.connect_args = connect_args self.create_fun...
<commit_before>from rdflib import Graph from ktbs_bench.bnsparqlstore import SPARQLStore class BenchableStore(Graph): def __init__(self, connect_args, create_func=None, create_args=[], *args, **kwargs): super(BenchableStore, self).__init__(*args, **kwargs) self.connect_args = connect_args ...
2ca26d1d4d6ce578bf217741e9e8a32d3145c3df
tests/test_render.py
tests/test_render.py
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
Use the Titanic example data set
Use the Titanic example data set
Python
apache-2.0
great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
<commit_before>import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render(...
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render( re...
<commit_before>import unittest import json import great_expectations as ge from great_expectations import render class TestPageRenderers(unittest.TestCase): def test_import(self): from great_expectations import render def test_prescriptive_expectation_renderer(self): results = render.render(...
a0b813a08b0ea7fd52a9a87fa41e309ce21bdb64
alg_valid_parentheses.py
alg_valid_parentheses.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
Revise elif to if due to continue
Revise elif to if due to continue
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses....
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses. stack = []...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function def valid_parentheses(s): """Balance parentheses in a string.""" open_close_d = { '(': ')', '[': ']', '{': '}' } # Use stack to collect open parentheses....
56d7349a52f3a7928d3d67c89a086b54b2a3701d
elmo/moon_tracker/models.py
elmo/moon_tracker/models.py
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
Add all standard ore types with ID.
Add all standard ore types with ID.
Python
mit
StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
<commit_before>from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ...
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ) moon ...
<commit_before>from django.db import models from django.conf import settings from django.forms import Select from eve_sde.models import Moon # Create your models here. class ScanResult(models.Model): owner = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='scans', db_index=True ...
03ee406800fb59ff3e7565397107fa9aad0d54d0
website/notifications/listeners.py
website/notifications/listeners.py
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
Revert "Remove incorrect check for institution_id"
Revert "Remove incorrect check for institution_id" This reverts commit 617df13670573b858b6c23249f4287786807d8b6.
Python
apache-2.0
hmoco/osf.io,cslzchen/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,cslzchen/osf.io,Nesiehr/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,chrisseto/osf.io,chennan47/osf.io,crcresearch/osf.io,Nesiehr/osf.io,felliott/osf.io,Johnetordoff/osf.io,acshi/osf.io,baylee-d/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,aaxe...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
<commit_before>import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import us...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import user_confirmed l...
<commit_before>import logging from website.notifications.exceptions import InvalidSubscriptionError from website.notifications.utils import subscribe_user_to_notifications, subscribe_user_to_global_notifications from website.project.signals import contributor_added, project_created from framework.auth.signals import us...
3318165728145a97a1b9b87ac212945d087c1e14
manifests/bin/db-add.py
manifests/bin/db-add.py
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") connection = pymysql.connect(...
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") con...
Set flag to log process id in syslog
Set flag to log process id in syslog
Python
apache-2.0
boundary/tsi-lab,boundary/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") connection = pymysql.connect(...
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") con...
<commit_before>#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") connection = p...
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") con...
#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") connection = pymysql.connect(...
<commit_before>#!/usr/bin/env python import pymysql import os import syslog host = os.environ['DB_HOST'] user = os.environ['DB_USER'] password = os.environ['DB_PASSWORD'] db = os.environ['DB_DATABASE'] syslog.openlog(facility=syslog.LOG_USER) syslog.syslog("Inserting new business data into database.") connection = p...
6f90c6543224155be1234de199c8b3c9775b72f3
zephyr/projects/brya/brya/BUILD.py
zephyr/projects/brya/brya/BUILD.py
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", "cbi_...
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. brya = register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", ...
Add "ghost" variant of brya
zephyr: Add "ghost" variant of brya Right now using brya hardware to develop ghost EC. Initially it can be a simple rename of brya. Later we will change the charger chip, which will require a couple of DTS customizations. Eventually, this project will need to move to not be a brya variant at some point. BUG=b:2227...
Python
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", "cbi_...
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. brya = register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", ...
<commit_before># Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts"...
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. brya = register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", ...
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts", "cbi_...
<commit_before># Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="brya", zephyr_board="brya", dts_overlays=[ "battery.dts", "bb_retimer.dts"...
c0a7554c7c8160d6a7b4023441c3cbe5e2f46ee5
tests/test_replwrap.py
tests/test_replwrap.py
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
Fix another unicode literal for Python 3.2
Fix another unicode literal for Python 3.2
Python
isc
dongguangming/pexpect,blink1073/pexpect,crdoconnor/pexpect,nodish/pexpect,Wakeupbuddy/pexpect,Depado/pexpect,crdoconnor/pexpect,quatanium/pexpect,crdoconnor/pexpect,nodish/pexpect,quatanium/pexpect,bangi123/pexpect,quatanium/pexpect,bangi123/pexpect,bangi123/pexpect,blink1073/pexpect,nodish/pexpect,Depado/pexpect,Wakeu...
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
<commit_before>import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): ...
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): py = replwrap...
<commit_before>import sys import unittest import pexpect from pexpect import replwrap class REPLWrapTestCase(unittest.TestCase): def test_python(self): py = replwrap.python(sys.executable) res = py.run_command("5+6") self.assertEqual(res.strip(), "11") def test_multiline(self): ...
ff435c335115262b38d66b912fe4e17b2861b45a
26-lazy-rivers/tf-26.py
26-lazy-rivers/tf-26.py
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
Make the last function also a generator, so that the explanation flows better
Make the last function also a generator, so that the explanation flows better
Python
mit
folpindo/exercises-in-programming-style,crista/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,panesofglass/exercises-in-programming-style,panesofglass/exercises-in-programming-style,wolfhesse/exercises-in-programming-style,jw0201/exercises-in-programming-style,kranthikumar/exercises-in-p...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
<commit_before>#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
<commit_before>#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c...
73aa38a5d481a26278dd29364f16839cad0f22cf
manager/projects/ui/views/files.py
manager/projects/ui/views/files.py
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
Update view for change in viewset
refactor(Files): Update view for change in viewset
Python
apache-2.0
stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
<commit_before>from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a l...
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a list of project ...
<commit_before>from django.contrib.auth.decorators import login_required from django.http import HttpRequest, HttpResponse from django.shortcuts import render from projects.api.views.files import ProjectsFilesViewSet @login_required def list(request: HttpRequest, *args, **kwargs) -> HttpResponse: """ Get a l...
ff460f9a3c7df3322271eeb5de3bead72fe121bc
bmi_tester/tests_pytest/test_grid_uniform_rectilinear.py
bmi_tester/tests_pytest/test_grid_uniform_rectilinear.py
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
Remove test for get_grid_shape for scalar grids.
Remove test for get_grid_shape for scalar grids.
Python
mit
csdms/bmi-tester
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
<commit_before>import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn ...
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn = new_bmi.get_g...
<commit_before>import warnings import numpy as np def test_get_grid_shape(new_bmi, gid): """Test the grid shape.""" gtype = new_bmi.get_grid_type(gid) if gtype == 'uniform_rectilinear': ndim = new_bmi.get_grid_rank(gid) shape = np.empty(ndim, dtype=np.int32) try: rtn ...
a19eac7104268865bd66bac520ffd41eacc30920
lifetimes/datasets/__init__.py
lifetimes/datasets/__init__.py
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
Add a doc string to make using this dataset easier
Add a doc string to make using this dataset easier
Python
mit
aprotopopov/lifetimes,CamDavidsonPilon/lifetimes,luke14free/lifetimes,statwonk/lifetimes
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
<commit_before># -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets ...
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
# -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets Parameters...
<commit_before># -*- coding: utf-8 -*- # modified from https://github.com/CamDavidsonPilon/lifelines/ import pandas as pd from pkg_resources import resource_filename __all__ = [ 'load_cdnow', 'load_transaction_data', ] def load_dataset(filename, **kwargs): ''' Load a dataset from lifetimes.datasets ...
4622125a0f73a77ae0327deb886ac9d4b1c50791
events/views.py
events/views.py
from django.shortcuts import render_to_response from django.template import RequestContext import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() return render_to_response( 'events/index....
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import resolve import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() curr...
Add current_app to context for django-cms v3 support
Add current_app to context for django-cms v3 support
Python
bsd-3-clause
theherk/django-theherk-events
from django.shortcuts import render_to_response from django.template import RequestContext import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() return render_to_response( 'events/index....
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import resolve import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() curr...
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() return render_to_response( ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import resolve import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() curr...
from django.shortcuts import render_to_response from django.template import RequestContext import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() return render_to_response( 'events/index....
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() return render_to_response( ...
57b35933e3accc3013b2ba417ad78340c10ed807
lighty/wsgi/commands.py
lighty/wsgi/commands.py
from wsgiref.simple_server import make_server from . import WSGIApplication def run_server(settings): application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever()
def run_server(settings): '''Run application using wsgiref test server ''' from wsgiref.simple_server import make_server from . import WSGIApplication application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever...
Add base tornado server support
Add base tornado server support
Python
bsd-3-clause
GrAndSE/lighty
from wsgiref.simple_server import make_server from . import WSGIApplication def run_server(settings): application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever() Add base tornado server support
def run_server(settings): '''Run application using wsgiref test server ''' from wsgiref.simple_server import make_server from . import WSGIApplication application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever...
<commit_before>from wsgiref.simple_server import make_server from . import WSGIApplication def run_server(settings): application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever() <commit_msg>Add base tornado server support<com...
def run_server(settings): '''Run application using wsgiref test server ''' from wsgiref.simple_server import make_server from . import WSGIApplication application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever...
from wsgiref.simple_server import make_server from . import WSGIApplication def run_server(settings): application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever() Add base tornado server support def run_server(settings): ...
<commit_before>from wsgiref.simple_server import make_server from . import WSGIApplication def run_server(settings): application = WSGIApplication(settings) httpd = make_server('', 8000, application) print("Serving on port 8000...") httpd.serve_forever() <commit_msg>Add base tornado server support<com...
17b9640949874c4bd547ae09607d5424ea1d2d12
partner_communication_switzerland/migrations/12.0.1.1.3/post-migration.py
partner_communication_switzerland/migrations/12.0.1.1.3/post-migration.py
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
Remove commit after successful migration
Remove commit after successful migration
Python
agpl-3.0
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
<commit_before>import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" ...
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" select c...
<commit_before>import logging from openupgradelib import openupgrade _logger = logging.getLogger(__name__) @openupgrade.migrate(use_env=True) def migrate(env, installed_version): if not installed_version: return # Generate all missing biennials since bug introduced by CS-428 env.cr.execute(""" ...
964ab07575b3f08560356a0f2a0b7950febbb4c7
myapp/tests_settings.py
myapp/tests_settings.py
DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
DEBUG = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
Disable DEBUG on test settings
Disable DEBUG on test settings
Python
bsd-3-clause
ikcam/django-skeleton,ikcam/django-skeleton,ikcam/django-skeleton,ikcam/django-skeleton
DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' Disable DEBUG on test settings
DEBUG = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
<commit_before>DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' <commit_msg>Disable DEBUG on test settings<commit_after>
DEBUG = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' Disable DEBUG on test settingsDEBUG = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':mem...
<commit_before>DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' <commit_msg>Disable DEBUG on test settings<commit_after>DEBUG = False DATABASES = { 'default': { 'ENGINE': 'djang...
b345f3667baaa6fa80bfa8eac6c498af2c3037be
tests/log_tests.py
tests/log_tests.py
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
Fix test broken in previous patch.
Fix test broken in previous patch.
Python
apache-2.0
wglass/lighthouse
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
<commit_before>try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_lo...
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_logging, CLIHandl...
<commit_before>try: import unittest2 as unittest except ImportError: import unittest from mock import patch from lighthouse import log class LogTests(unittest.TestCase): @patch("lighthouse.log.CLIHandler") @patch("lighthouse.log.logging") def test_setup_adds_handler_to_root_logger(self, mock_lo...
0356392b2933aa7c02f89bdf588a4ec0482db4a8
tests/main_test.py
tests/main_test.py
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key'] == 88 asse...
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key, hamming_distance def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key...
Add a test for hamming_distance()
Add a test for hamming_distance()
Python
bsd-2-clause
cpach/cryptopals-python3
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key'] == 88 asse...
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key, hamming_distance def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key...
<commit_before>#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key'] ...
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key, hamming_distance def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key...
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key'] == 88 asse...
<commit_before>#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert result['key'] ...
bca6a06f6035e7a10c9726ef40e7aed4b4b7ee34
tests/test_init.py
tests/test_init.py
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
Fix test to reflect new API changes
test: Fix test to reflect new API changes
Python
mit
pirate/bookmark-archiver,pirate/bookmark-archiver,pirate/bookmark-archiver
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
<commit_before># archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process...
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
# archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process): os.chdir...
<commit_before># archivebox init # archivebox add import os import subprocess from pathlib import Path import json from .fixtures import * def test_init(tmp_path, process): assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8") def test_update(tmp_path, process...
d0d4491828942d22a50ee80110f38c54a1b5c301
services/disqus.py
services/disqus.py
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
Rewrite Disqus to use the new scope selection system
Rewrite Disqus to use the new scope selection system
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
c530ea901c374fef97390260e66492f37fc90a3f
setman/__init__.py
setman/__init__.py
from setman.lazy import LazySettings __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta') settings = LazySettings() def get_version(version=None): """ Return setman version number in human readable form. You could call this function without args and in this case value from ``setman.VERS...
try: from setman.lazy import LazySettings except ImportError: # Do not care about "Settings cannot be imported, because environment # variable DJANGO_SETTINGS_MODULE is undefined." errors LazySettings = type('LazySettings', (object, ), {}) __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta...
Fix installing ``django-setman`` via PIP.
Fix installing ``django-setman`` via PIP.
Python
bsd-3-clause
playpauseandstop/setman,owais/django-setman,owais/django-setman
from setman.lazy import LazySettings __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta') settings = LazySettings() def get_version(version=None): """ Return setman version number in human readable form. You could call this function without args and in this case value from ``setman.VERS...
try: from setman.lazy import LazySettings except ImportError: # Do not care about "Settings cannot be imported, because environment # variable DJANGO_SETTINGS_MODULE is undefined." errors LazySettings = type('LazySettings', (object, ), {}) __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta...
<commit_before>from setman.lazy import LazySettings __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta') settings = LazySettings() def get_version(version=None): """ Return setman version number in human readable form. You could call this function without args and in this case value from ...
try: from setman.lazy import LazySettings except ImportError: # Do not care about "Settings cannot be imported, because environment # variable DJANGO_SETTINGS_MODULE is undefined." errors LazySettings = type('LazySettings', (object, ), {}) __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta...
from setman.lazy import LazySettings __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta') settings = LazySettings() def get_version(version=None): """ Return setman version number in human readable form. You could call this function without args and in this case value from ``setman.VERS...
<commit_before>from setman.lazy import LazySettings __all__ = ('get_version', 'settings') VERSION = (0, 1, 'beta') settings = LazySettings() def get_version(version=None): """ Return setman version number in human readable form. You could call this function without args and in this case value from ...
0fd947625a0420970c7ed95114f73215d90de532
nimbus/apps/api/urls.py
nimbus/apps/api/urls.py
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
Change url for media list api
Change url for media list api
Python
mit
ethanal/Nimbus,ethanal/Nimbus,ethanal/Nimbus,ethanal/Nimbus
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
<commit_before>from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$',...
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$', 'rest_framewor...
<commit_before>from django.conf.urls import url, include from nimbus.apps import debug_urls from . import views urlpatterns = debug_urls() urlpatterns += [ url(r"^$", views.api_root, name="api_root"), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api-token-auth$',...
61ca58480a16c1300906932151a986b2f8fd3c79
nuts/src/application/TestController.py
nuts/src/application/TestController.py
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations): self.test_suite ...
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations=25): self.test_sui...
Set default-value in the testcontroller
Set default-value in the testcontroller
Python
mit
HSRNetwork/Nuts
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations): self.test_suite ...
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations=25): self.test_sui...
<commit_before>from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations): s...
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations=25): self.test_sui...
from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations): self.test_suite ...
<commit_before>from src.data.TestSuite import TestSuite from src.service.FileHandler import FileHandler from src.service.Runner import Runner from src.service.Evaluator import Evaluator from src.service.salt_api_wrapper import SaltApi class TestController: def __init__(self, test_file, max_iterations): s...
35d84021736f5509dc37f12ca92a05693cff5d47
twython/helpers.py
twython/helpers.py
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
Include ints in params too
Include ints in params too Oops ;P
Python
mit
vivek8943/twython,ping/twython,akarambir/twython,Fueled/twython,fibears/twython,Hasimir/twython,Devyani-Divs/twython,Oire/twython,joebos/twython,ryanmcgrath/twython
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
<commit_before>from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' ...
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' else: ...
<commit_before>from .compat import basestring def _transparent_params(_params): params = {} files = {} for k, v in _params.items(): if hasattr(v, 'read') and callable(v.read): files[k] = v elif isinstance(v, bool): if v: params[k] = 'true' ...
778df70d5e755d0681636cb401bbf33f17f247bc
uniqueids/admin.py
uniqueids/admin.py
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
Use Iterator to iterate through records
Use Iterator to iterate through records
Python
bsd-3-clause
praekelt/hellomama-registration,praekelt/hellomama-registration
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
<commit_before>from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "...
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "write_to"] ...
<commit_before>from django.contrib import admin from .models import Record from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", "created_at", "updated_at"] list_filter = ["write_to", "created_at"] search_fields = ["identity", "...
978e09882f4fb19a8d31a9b91b0258751f745c21
mods/FleetAutoTarget/AutoTarget.py
mods/FleetAutoTarget/AutoTarget.py
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br.name, br.charID, br.it...
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): ret = fn(self) try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br...
Adjust the order to reduce latency
Adjust the order to reduce latency
Python
mit
EVEModX/Mods
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br.name, br.charID, br.it...
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): ret = fn(self) try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br...
<commit_before>import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br.name, b...
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): ret = fn(self) try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br...
import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br.name, br.charID, br.it...
<commit_before>import logmodule from eve.client.script.ui.shared.fleet.fleetbroadcast import FleetBroadcastView def PatchFn(fn): def wrapper(self): try: br = sm.GetService('fleet').GetBroadcastHistory()[0] logmodule.general.Log("GetBroadcastListEntry invoked: %s %d %d" % (br.name, b...
1c814acdb58e30ccfaa6ea80aa8cb3080d90b2e2
project_fish/whats_fresh/tests/test_preparation_model.py
project_fish/whats_fresh/tests/test_preparation_model.py
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
Change unicode test string to ascii
Change unicode test string to ascii
Python
apache-2.0
iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
<commit_before>from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(s...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(self): s...
<commit_before>from django.test import TestCase from django.conf import settings from phonenumber_field.modelfields import PhoneNumberField from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class PreparationsTestCase(TestCase): def setUp(s...
d2e41e3c03e71919aeeaa72766f6c4037424d3c1
tests/factories.py
tests/factories.py
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): self.raw_password = 'default_pass...
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): # By using this method password c...
Add comment about User factory post_generation
Add comment about User factory post_generation
Python
bsd-2-clause
incuna/incuna-test-utils,incuna/incuna-test-utils
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): self.raw_password = 'default_pass...
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): # By using this method password c...
<commit_before>from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): self.raw_password ...
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): # By using this method password c...
from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): self.raw_password = 'default_pass...
<commit_before>from django.contrib.auth.models import User import factory class UserFactory(factory.DjangoModelFactory): username = factory.Sequence('User {}'.format) class Meta: model = User @factory.post_generation def password(self, create, extracted, **kwargs): self.raw_password ...