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
f2c34f7e0e7f50ca6669632d6fd89feb26c98609
tools/daily.py
tools/daily.py
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
Delete emails before deleting users
Delete emails before deleting users --HG-- branch : production
Python
bsd-3-clause
pydotorg/pypi,pydotorg/pypi,pydotorg/pypi,pydotorg/pypi
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
<commit_before>#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.en...
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.environ.get("PYPI...
<commit_before>#!/usr/bin/python import sys import os prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, prefix) # Workaround current bug in docutils: # http://permalink.gmane.org/gmane.text.docutils.devel/6324 import docutils.utils import config import store CONFIG_FILE = os.en...
a6eeda7ed6037285627ca6e468a7ef8ab467034f
data/build_dictionary.py
data/build_dictionary.py
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
Revert "eos and UNK will be overwritten if they occur in the corpus, should always be 0 and 1"
Revert "eos and UNK will be overwritten if they occur in the corpus, should always be 0 and 1" Actually fine if there are weird values, as Nematus does not really use them. This reverts commit 09eb3594fb395d43dd3f6c2a4dec85af683cbb30.
Python
bsd-3-clause
rsennrich/nematus,shuoyangd/nematus,EdinburghNLP/nematus,Proyag/nematus,shuoyangd/nematus,EdinburghNLP/nematus,EdinburghNLP/nematus,Proyag/nematus,rsennrich/nematus,yang1fan2/nematus,Proyag/nematus,Proyag/nematus,yang1fan2/nematus,yang1fan2/nematus,cshanbo/nematus,rsennrich/nematus,rsennrich/nematus,shuoyangd/nematus,P...
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
<commit_before>#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: ...
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: words_in ...
<commit_before>#!/usr/bin/python import numpy import json import sys import fileinput from collections import OrderedDict def main(): for filename in sys.argv[1:]: print 'Processing', filename word_freqs = OrderedDict() with open(filename, 'r') as f: for line in f: ...
670b896f0ef8a4feda9cbb0181364f277dc50299
miner_plotter/models.py
miner_plotter/models.py
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
Fix bug to only store the 30 most recent points
Fix bug to only store the 30 most recent points
Python
mit
juannyG/miner-plotter,juannyG/miner-plotter,juannyG/miner-plotter
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
<commit_before>import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwar...
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwargs): if...
<commit_before>import pymodm import slugify class DevicePlot(pymodm.MongoModel): device_name = pymodm.fields.CharField() slug = pymodm.fields.CharField() plot_title = pymodm.fields.CharField() x_label = pymodm.fields.CharField() y_label = pymodm.fields.CharField() def save(self, *args, **kwar...
d15b996dc4a741390507a96d6facf113f8da0869
test/test_play.py
test/test_play.py
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, Mock from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper)...
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, ANY from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper):...
Verify that the generated playlist contains the path to the item
Verify that the generated playlist contains the path to the item
Python
mit
lengtche/beets,SusannaMaria/beets,jcoady9/beets,xsteadfastx/beets,diego-plan9/beets,shamangeorge/beets,jackwilsdon/beets,jcoady9/beets,LordSputnik/beets,sampsyo/beets,LordSputnik/beets,lengtche/beets,madmouser1/beets,mosesfistos1/beetbox,mried/beets,LordSputnik/beets,jcoady9/beets,SusannaMaria/beets,ibmibmibm/beets,swt...
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, Mock from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper)...
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, ANY from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper):...
<commit_before># -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, Mock from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCa...
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, ANY from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper):...
# -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, Mock from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCase, TestHelper)...
<commit_before># -*- coding: utf-8 -*- """Tests for the play plugin""" from __future__ import (division, absolute_import, print_function, unicode_literals) from mock import patch, Mock from test._common import unittest from test.helper import TestHelper class PlayPluginTest(unittest.TestCa...
6b36639cc7ff17f4d74aa0239311867b3937da87
py/longest-increasing-path-in-a-matrix.py
py/longest-increasing-path-in-a-matrix.py
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
from collections import Counter class Solution(object): def dfs(self, dp, matrix, x, y, w, h): v = matrix[x][y] if dp[x, y] == 0: dp[x, y] = 1 + max( 0 if x == 0 or matrix[x - 1][y] <= v else self.dfs(dp, matrix, x - 1, y, w, h), 0 if y == 0 or matrix[x][y...
Add py solution for 329. Longest Increasing Path in a Matrix
Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 2: Top down search
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
from collections import Counter class Solution(object): def dfs(self, dp, matrix, x, y, w, h): v = matrix[x][y] if dp[x, y] == 0: dp[x, y] = 1 + max( 0 if x == 0 or matrix[x - 1][y] <= v else self.dfs(dp, matrix, x - 1, y, w, h), 0 if y == 0 or matrix[x][y...
<commit_before>from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighb...
from collections import Counter class Solution(object): def dfs(self, dp, matrix, x, y, w, h): v = matrix[x][y] if dp[x, y] == 0: dp[x, y] = 1 + max( 0 if x == 0 or matrix[x - 1][y] <= v else self.dfs(dp, matrix, x - 1, y, w, h), 0 if y == 0 or matrix[x][y...
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
<commit_before>from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighb...
4e68ee7d361bc34e77002cbdcfe077e89fcb3bd8
gala/__init__.py
gala/__init__.py
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
Add __version__ attribute to gala package
Add __version__ attribute to gala package
Python
bsd-3-clause
jni/gala,janelia-flyem/gala
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
<commit_before>""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __aut...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
<commit_before>""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __aut...
d3670f4c8a07cc9e29c417a0f0ffa6499a3f53e2
session_csrf/templatetags/session_csrf.py
session_csrf/templatetags/session_csrf.py
from copy import copy from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @register.simple_tag(takes_context=True) def per_view_csrf(context, view_name): """Register per view csrf token. Not pure!""" _context = copy(conte...
from contextlib import contextmanager from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @contextmanager def save_token(context): is_exists = 'csrf_token' in context token = context.get('csrf_token') yield if is_...
Fix error with per-view and not per-view csrf on one page
Fix error with per-view and not per-view csrf on one page
Python
bsd-3-clause
nvbn/django-session-csrf,nvbn/django-session-csrf
from copy import copy from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @register.simple_tag(takes_context=True) def per_view_csrf(context, view_name): """Register per view csrf token. Not pure!""" _context = copy(conte...
from contextlib import contextmanager from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @contextmanager def save_token(context): is_exists = 'csrf_token' in context token = context.get('csrf_token') yield if is_...
<commit_before>from copy import copy from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @register.simple_tag(takes_context=True) def per_view_csrf(context, view_name): """Register per view csrf token. Not pure!""" _conte...
from contextlib import contextmanager from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @contextmanager def save_token(context): is_exists = 'csrf_token' in context token = context.get('csrf_token') yield if is_...
from copy import copy from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @register.simple_tag(takes_context=True) def per_view_csrf(context, view_name): """Register per view csrf token. Not pure!""" _context = copy(conte...
<commit_before>from copy import copy from django.template.defaulttags import CsrfTokenNode from django import template from ..models import Token register = template.Library() @register.simple_tag(takes_context=True) def per_view_csrf(context, view_name): """Register per view csrf token. Not pure!""" _conte...
1933715436a7f7828255bf3e002728f2bb80ed0d
bin/profile_queries.py
bin/profile_queries.py
#!/usr/bin/env sh import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correct pa...
#!/usr/bin/env python import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correc...
Add sheebang to queries profiling script
Add sheebang to queries profiling script
Python
lgpl-2.1
sudheesh001/loklak_server,arashahmadi/sensemi_ai,daminisatya/loklak_server,kavithaenair/apps.loklak.org,smokingwheels/loklak_server_frontend_hdd,shivenmian/loklak_server,daminisatya/loklak_server,loklak/loklak_server,kavithaenair/apps.loklak.org,smokingwheels/loklak_server_frontend_hdd,YagoGG/loklak_server,smsunarto/lo...
#!/usr/bin/env sh import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correct pa...
#!/usr/bin/env python import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correc...
<commit_before>#!/usr/bin/env sh import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory...
#!/usr/bin/env python import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correc...
#!/usr/bin/env sh import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory set correct pa...
<commit_before>#!/usr/bin/env sh import os import time import json try: import requests except ImportError: print('Profiling script requires requests package. \n' 'You can install it by running "pip install requests"') exit() API_BASE_URL = 'http://localhost:9000/api/' # If user in bin directory...
07b7a666bc1c538580b5e7f528e528e4cc4bc25d
testing/client.py
testing/client.py
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = gevent.sleep
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = lambda: gevent.sleep(0)
Fix gevent.sleep not having a parameter.
Fix gevent.sleep not having a parameter.
Python
unlicense
squirly/eece411-kvclient
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = gevent.sleep Fix gevent.sleep not having a parameter.
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = lambda: gevent.sleep(0)
<commit_before>import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = gevent.sleep <commit_msg>Fix gevent.sleep not having a parameter.<commit_after>
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = lambda: gevent.sleep(0)
import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = gevent.sleep Fix gevent.sleep not having a parameter.import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = lambda: gevent.sleep(0)
<commit_before>import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = gevent.sleep <commit_msg>Fix gevent.sleep not having a parameter.<commit_after>import gevent from kvclient import KeyValueClient class TestClient(KeyValueClient): yield_loop = lambda: gevent.sleep...
b5593bbfb8fda3bbdb9c5408f17078949ab91481
tests/conftest.py
tests/conftest.py
# -*- coding: utf-8 -*- def pytest_funcarg__api_factory(request): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory()
# -*- coding: utf-8 -*- import pytest @pytest.fixture def api_factory(): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory()
Fix old-style `pytest_funcarg__`, instead @pytest.fixture.
Fix old-style `pytest_funcarg__`, instead @pytest.fixture.
Python
mit
kk6/python-annict
# -*- coding: utf-8 -*- def pytest_funcarg__api_factory(request): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory() Fix old-style `pytest_funcarg__`, instead @pytest.fixture.
# -*- coding: utf-8 -*- import pytest @pytest.fixture def api_factory(): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory()
<commit_before># -*- coding: utf-8 -*- def pytest_funcarg__api_factory(request): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory() <commit_msg>Fix old-style `pytest_funcarg__`, instead @pytest.fixture.<comm...
# -*- coding: utf-8 -*- import pytest @pytest.fixture def api_factory(): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory()
# -*- coding: utf-8 -*- def pytest_funcarg__api_factory(request): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory() Fix old-style `pytest_funcarg__`, instead @pytest.fixture.# -*- coding: utf-8 -*- import p...
<commit_before># -*- coding: utf-8 -*- def pytest_funcarg__api_factory(request): class APIFactory: def create(self, token='dummy_token'): from annict.api import API return API(token) return APIFactory() <commit_msg>Fix old-style `pytest_funcarg__`, instead @pytest.fixture.<comm...
36740bf92999dae7258e1aeb6e8d82b43e1773f5
tests/conftest.py
tests/conftest.py
from flask import Flask import pytest app = Flask('__config_test') @pytest.fixture() def client(): return app, app.test_client()
from flask import Flask import pytest from flask_extras import FlaskExtras app = Flask('__config_test') app.secret_key = '123' app.debug = True FlaskExtras(app) @pytest.fixture() def client(): return app, app.test_client()
Add config and plugin wrapper for app test fixture.
Add config and plugin wrapper for app test fixture.
Python
mit
christabor/flask_extras,christabor/flask_extras,christabor/jinja2_template_pack,christabor/jinja2_template_pack
from flask import Flask import pytest app = Flask('__config_test') @pytest.fixture() def client(): return app, app.test_client() Add config and plugin wrapper for app test fixture.
from flask import Flask import pytest from flask_extras import FlaskExtras app = Flask('__config_test') app.secret_key = '123' app.debug = True FlaskExtras(app) @pytest.fixture() def client(): return app, app.test_client()
<commit_before>from flask import Flask import pytest app = Flask('__config_test') @pytest.fixture() def client(): return app, app.test_client() <commit_msg>Add config and plugin wrapper for app test fixture.<commit_after>
from flask import Flask import pytest from flask_extras import FlaskExtras app = Flask('__config_test') app.secret_key = '123' app.debug = True FlaskExtras(app) @pytest.fixture() def client(): return app, app.test_client()
from flask import Flask import pytest app = Flask('__config_test') @pytest.fixture() def client(): return app, app.test_client() Add config and plugin wrapper for app test fixture.from flask import Flask import pytest from flask_extras import FlaskExtras app = Flask('__config_test') app.secret_key = '123' app...
<commit_before>from flask import Flask import pytest app = Flask('__config_test') @pytest.fixture() def client(): return app, app.test_client() <commit_msg>Add config and plugin wrapper for app test fixture.<commit_after>from flask import Flask import pytest from flask_extras import FlaskExtras app = Flask('_...
ad4c1014184f8a7c4b72a4620262bf5fda3264d2
sympy/physics/gaussopt.py
sympy/physics/gaussopt.py
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
Add issue number(7659) in the deprecation warning
Add issue number(7659) in the deprecation warning
Python
bsd-3-clause
rahuldan/sympy,debugger22/sympy,pbrady/sympy,farhaanbukhsh/sympy,kevalds51/sympy,yashsharan/sympy,toolforger/sympy,Sumith1896/sympy,Vishluck/sympy,kaushik94/sympy,asm666/sympy,pandeyadarsh/sympy,rahuldan/sympy,madan96/sympy,sampadsaha5/sympy,sunny94/temp,skirpichev/omg,Curious72/sympy,sahmed95/sympy,jbbskinny/sympy,Mri...
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
<commit_before>from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss...
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss_beams from sy...
<commit_before>from sympy.physics.optics.gaussopt import RayTransferMatrix, FreeSpace,\ FlatRefraction, CurvedRefraction, FlatMirror, CurvedMirror, ThinLens,\ GeometricRay, BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,\ geometric_conj_af, geometric_conj_bf, gaussian_conj, conjugate_gauss...
745b0b2d83cdbd28fcb4f565b77b31ef6f888350
openmc/capi/__init__.py
openmc/capi/__init__.py
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
Remove try/except block around CDLL
Remove try/except block around CDLL
Python
mit
walshjon/openmc,johnnyliu27/openmc,liangjg/openmc,shikhar413/openmc,amandalund/openmc,liangjg/openmc,liangjg/openmc,shikhar413/openmc,wbinventor/openmc,liangjg/openmc,mit-crpg/openmc,amandalund/openmc,smharper/openmc,walshjon/openmc,smharper/openmc,johnnyliu27/openmc,smharper/openmc,shikhar413/openmc,wbinventor/openmc,...
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
<commit_before>""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-bl...
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-block:: python ...
<commit_before>""" This module provides bindings to C functions defined by OpenMC shared library. When the :mod:`openmc` package is imported, the OpenMC shared library is automatically loaded. Calls to the OpenMC library can then be via functions or objects in the :mod:`openmc.capi` subpackage, for example: .. code-bl...
3f0a3cd5540680be07e25afe282ed7df7381e802
tests/testVpns.py
tests/testVpns.py
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_count(): """Test VPN count.""" assert len(vpns) > 0, 'Vpn list is empty.' def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def tes...
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def test_vpn_json(): """Ensure vpn json conversion seems to be working.""" for l in list(vpns.dat...
Remove check for existance of VPNs. Not having them may be correct
Remove check for existance of VPNs. Not having them may be correct
Python
mit
FulcrumIT/skytap,mapledyne/skytap
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_count(): """Test VPN count.""" assert len(vpns) > 0, 'Vpn list is empty.' def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def tes...
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def test_vpn_json(): """Ensure vpn json conversion seems to be working.""" for l in list(vpns.dat...
<commit_before>import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_count(): """Test VPN count.""" assert len(vpns) > 0, 'Vpn list is empty.' def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id...
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def test_vpn_json(): """Ensure vpn json conversion seems to be working.""" for l in list(vpns.dat...
import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_count(): """Test VPN count.""" assert len(vpns) > 0, 'Vpn list is empty.' def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id) > 0 def tes...
<commit_before>import json import os import sys sys.path.append('..') from skytap.Vpns import Vpns # noqa vpns = Vpns() def test_vpn_count(): """Test VPN count.""" assert len(vpns) > 0, 'Vpn list is empty.' def test_vpn_id(): """Ensure each VPN has an ID.""" for v in vpns: assert len(v.id...
b9c6d875bcddca73deaff35e14a56e373e5dcf46
alerta/app/shell.py
alerta/app/shell.py
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( '-P', ...
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)', formatter_class=argparse.ArgumentDefaul...
Use argparse helper to add default values
Use argparse helper to add default values
Python
apache-2.0
guardian/alerta,skob/alerta,skob/alerta,guardian/alerta,guardian/alerta,guardian/alerta,skob/alerta,skob/alerta
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( '-P', ...
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)', formatter_class=argparse.ArgumentDefaul...
<commit_before> import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( ...
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)', formatter_class=argparse.ArgumentDefaul...
import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( '-P', ...
<commit_before> import argparse from alerta.app import app from alerta.app import db from alerta.version import __version__ LOG = app.logger def main(): parser = argparse.ArgumentParser( prog='alertad', description='Alerta server (for development purposes only)' ) parser.add_argument( ...
9c84e5d4c1ef0670b3b6622fb7946486f78ff7fe
capstone/util/c4uci.py
capstone/util/c4uci.py
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
Remove trailing line break from C4 UCI instance
Remove trailing line break from C4 UCI instance
Python
mit
davidrobles/mlnd-capstone-code
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
<commit_before>from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a t...
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a tuple with an in...
<commit_before>from __future__ import division, print_function, unicode_literals from capstone.game import Connect4 as C4 def load_instance(instance): ''' Loads a position from the UCI Connect 4 database: https://archive.ics.uci.edu/ml/machine-learning-databases/connect-4/connect-4.names Returns a t...
3489cc9f6ab593cd3664f2086577a6fde5e4ab94
dimod/compatibility23.py
dimod/compatibility23.py
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
Move namedtuple definition outside of argspec function
Move namedtuple definition outside of argspec function
Python
apache-2.0
oneklc/dimod,oneklc/dimod
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
<commit_before>import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): ...
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): return d.it...
<commit_before>import sys import itertools import inspect from collections import namedtuple _PY2 = sys.version_info.major == 2 if _PY2: range_ = xrange zip_ = itertools.izip def iteritems(d): return d.iteritems() def itervalues(d): return d.itervalues() def iterkeys(d): ...
3c319e21ea026651ee568d3c2a74786d33257a93
paystackapi/paystack.py
paystackapi/paystack.py
"""Entry point defined here.""" from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.product import Product from paystackapi.ref...
"""Entry point defined here.""" from paystackapi.charge import Charge from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.produ...
Add charge to Paystack class
Add charge to Paystack class
Python
mit
andela-sjames/paystack-python
"""Entry point defined here.""" from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.product import Product from paystackapi.ref...
"""Entry point defined here.""" from paystackapi.charge import Charge from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.produ...
<commit_before>"""Entry point defined here.""" from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.product import Product from ...
"""Entry point defined here.""" from paystackapi.charge import Charge from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.produ...
"""Entry point defined here.""" from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.product import Product from paystackapi.ref...
<commit_before>"""Entry point defined here.""" from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from paystackapi.plan import Plan from paystackapi.product import Product from ...
19857719f3a68d14c1221bb04193a69379a8bf89
examples/g/modulegen.py
examples/g/modulegen.py
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
Add wrapping of std::ofstream to the example
Add wrapping of std::ofstream to the example
Python
lgpl-2.1
cawka/pybindgen,caramucho/pybindgen,cawka/pybindgen,cawka/pybindgen,caramucho/pybindgen,cawka/pybindgen,caramucho/pybindgen,caramucho/pybindgen
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
<commit_before>#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function(...
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function('GDoB', None, [...
<commit_before>#! /usr/bin/env python import sys import pybindgen from pybindgen import ReturnValue, Parameter, Module, Function, FileCodeSink def my_module_gen(out_file): mod = Module('g') mod.add_include('"g.h"') mod.add_function('GDoA', None, []) G = mod.add_cpp_namespace("G") G.add_function(...
d5819e689ee5284b5c6aae28d20a6ef88051b4ef
vscode_manual/install_extensions.py
vscode_manual/install_extensions.py
#!/usr/bin/env python # Install VSCode Extensions from file. from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each of the extensions in the given file. """ with open(filename) as extension_file: for extension in extensio...
#!/usr/bin/env python # Install VSCode Extensions from file. # # Instead of writing this, could have just written: # cat extensions.txt | xargs -L 1 code --install-extension from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each ...
Add snarky comment in VSCode Extension Installer.
Add snarky comment in VSCode Extension Installer.
Python
mit
kashev/dotfiles,kashev/dotfiles
#!/usr/bin/env python # Install VSCode Extensions from file. from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each of the extensions in the given file. """ with open(filename) as extension_file: for extension in extensio...
#!/usr/bin/env python # Install VSCode Extensions from file. # # Instead of writing this, could have just written: # cat extensions.txt | xargs -L 1 code --install-extension from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each ...
<commit_before>#!/usr/bin/env python # Install VSCode Extensions from file. from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each of the extensions in the given file. """ with open(filename) as extension_file: for extens...
#!/usr/bin/env python # Install VSCode Extensions from file. # # Instead of writing this, could have just written: # cat extensions.txt | xargs -L 1 code --install-extension from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each ...
#!/usr/bin/env python # Install VSCode Extensions from file. from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each of the extensions in the given file. """ with open(filename) as extension_file: for extension in extensio...
<commit_before>#!/usr/bin/env python # Install VSCode Extensions from file. from __future__ import print_function import subprocess EXTENSIONS_FILE = "extensions.txt" def extensions(filename): """ Yield each of the extensions in the given file. """ with open(filename) as extension_file: for extens...
92b90cbdd41905d69863b7cd329d8280a3662db8
chrome/common/extensions/docs/server2/url_constants.py
chrome/common/extensions/docs/server2/url_constants.py
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
Use codereview.chromium.org instead of chromiumcodereview.appspot.com in extensions doc script.
Use codereview.chromium.org instead of chromiumcodereview.appspot.com in extensions doc script. BUG=273810 [email protected], kalman Review URL: https://codereview.chromium.org/24980005 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@225762 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
anirudhSK/chromium,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,anirudhSK/chromium,M4sse/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,fuj...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = 'https://github...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. GITHUB_URL = 'https://api.github.com/repos/GoogleChrome/chrome-app-samples' NEW_GITHUB_URL = 'https://api.github.com/repos' GITHUB_BASE = ...
5012ff1dfbcd8e7d0d9b0691f45c7b3efd811a08
adventure/__init__.py
adventure/__init__.py
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
Remove outdated parameter from docstring
Remove outdated parameter from docstring
Python
apache-2.0
devinmcgloin/advent,devinmcgloin/advent
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
<commit_before>"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prom...
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prompt into an Adve...
<commit_before>"""The Adventure game.""" def load_advent_dat(data): import os from .data import parse datapath = os.path.join(os.path.dirname(__file__), 'advent.dat') with open(datapath, 'r', encoding='ascii') as datafile: parse(data, datafile) def play(seed=None): """Turn the Python prom...
d1d668139be98283dc9582c32fadf7de2b30914d
src/identfilter.py
src/identfilter.py
import sys import re NUMBER_REGEX = re.compile(r'([0-9])([a-z])') def to_camel_case(text): # We only care about Graphene types if not text.startswith('graphene_') and not text.endswith('_t'): return text res = [] for token in text[:-2].split('_'): uc_token = token.title() # We need ...
# Copyright 2014 Emmanuele Bassi # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distri...
Add licensing to the introspection filter
Add licensing to the introspection filter It's a small utility script, but it's better to have a license for it anyway.
Python
mit
ebassi/graphene,ebassi/graphene
import sys import re NUMBER_REGEX = re.compile(r'([0-9])([a-z])') def to_camel_case(text): # We only care about Graphene types if not text.startswith('graphene_') and not text.endswith('_t'): return text res = [] for token in text[:-2].split('_'): uc_token = token.title() # We need ...
# Copyright 2014 Emmanuele Bassi # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distri...
<commit_before>import sys import re NUMBER_REGEX = re.compile(r'([0-9])([a-z])') def to_camel_case(text): # We only care about Graphene types if not text.startswith('graphene_') and not text.endswith('_t'): return text res = [] for token in text[:-2].split('_'): uc_token = token.title...
# Copyright 2014 Emmanuele Bassi # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distri...
import sys import re NUMBER_REGEX = re.compile(r'([0-9])([a-z])') def to_camel_case(text): # We only care about Graphene types if not text.startswith('graphene_') and not text.endswith('_t'): return text res = [] for token in text[:-2].split('_'): uc_token = token.title() # We need ...
<commit_before>import sys import re NUMBER_REGEX = re.compile(r'([0-9])([a-z])') def to_camel_case(text): # We only care about Graphene types if not text.startswith('graphene_') and not text.endswith('_t'): return text res = [] for token in text[:-2].split('_'): uc_token = token.title...
1a48f85e04f9192ccf9ba675ff8ddd5719752950
infrastructure/control/simple/src/start-opensim.py
infrastructure/control/simple/src/start-opensim.py
#!/usr/bin/python import os.path import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if not os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming OpenSim has been started al...
#!/usr/bin/python import os.path import re import subprocess import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope...
Add screen -list check, fix initial pid check
Add screen -list check, fix initial pid check
Python
bsd-3-clause
justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools
#!/usr/bin/python import os.path import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if not os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming OpenSim has been started al...
#!/usr/bin/python import os.path import re import subprocess import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope...
<commit_before>#!/usr/bin/python import os.path import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if not os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming OpenSim has ...
#!/usr/bin/python import os.path import re import subprocess import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming Ope...
#!/usr/bin/python import os.path import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if not os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming OpenSim has been started al...
<commit_before>#!/usr/bin/python import os.path import sys ### CONFIGURE THESE PATHS ### binaryPath = "/home/opensim/opensim/opensim-current/bin" pidPath = "/tmp/OpenSim.pid" ### END OF CONFIG ### if not os.path.exists(pidPath): print >> sys.stderr, "ERROR: OpenSim PID file %s still present. Assuming OpenSim has ...
bd5a6b1983851d8d696390b19fae862775ee0084
apps/i4p_base/urls.py
apps/i4p_base/urls.py
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', #url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide...
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider...
Revert "Remove explicit link to homepage view in i3p_base"
Revert "Remove explicit link to homepage view in i3p_base" This reverts commit 3d4327f6d9d71c6b396b0655de81373210417aba.
Python
agpl-3.0
ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople,ImaginationForPeople/imaginationforpeople
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', #url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide...
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider...
<commit_before>#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', #url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-home...
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slider...
#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', #url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-homepage-ajax-slide...
<commit_before>#-- encoding: utf-8 -- from django.conf.urls.defaults import patterns, url from haystack.views import search_view_factory import views import ajax urlpatterns = patterns('', #url(r'^$', views.homepage, name='i4p-index'), url(r'^homepage/ajax/slider/bestof/$', ajax.slider_bestof, name='i4p-home...
ffe9bba2e4045236a3f3731e39876b6220f8f9a1
jarviscli/plugins/joke_of_day.py
jarviscli/plugins/joke_of_day.py
from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use ...
from plugin import plugin, require import requests from colorama import Fore @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use """ def __call__(self, jarvis, s): ...
Update joke of day: Fix for moved SpinnerThread
Update joke of day: Fix for moved SpinnerThread
Python
mit
sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis
from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use ...
from plugin import plugin, require import requests from colorama import Fore @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use """ def __call__(self, jarvis, s): ...
<commit_before>from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke d...
from plugin import plugin, require import requests from colorama import Fore @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use """ def __call__(self, jarvis, s): ...
from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke daily' to use ...
<commit_before>from plugin import plugin, require import requests from colorama import Fore from plugins.animations import SpinnerThread @require(network=True) @plugin('joke daily') class joke_of_day: """ Provides you with a joke of day to help you laugh amidst the daily boring schedule Enter 'joke d...
b0e558b70613871097361ee3c1f016aa60e4c2f1
processors/yui.py
processors/yui.py
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
Update YUI error handling logic
Update YUI error handling logic
Python
bsd-2-clause
potatolondon/assetpipe
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
<commit_before> from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " ...
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " "and ...
<commit_before> from collections import OrderedDict import os import StringIO from django.conf import settings from django.utils.encoding import smart_str from ..base import Processor ERROR_STRING = ("Failed to execute Java VM or yuicompressor. " "Please make sure that you have installed Java " ...
34186d908af01aa05d255e91aba085d1ca4f1837
wger/manager/migrations/0011_remove_set_exercises.py
wger/manager/migrations/0011_remove_set_exercises.py
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('manager', '0010_auto_20210102_1446'), ] operations = [ migrations.RemoveField( model_name='set', name='exercises', )...
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations def increment_order(apps, schema_editor): """ Increment the oder in settings so ensure the order is preserved Otherwise, and depending on the database, when a set has supersets, the exercises could be ordered alphabetic...
Increment the oder in settings so ensure the order is preserved
Increment the oder in settings so ensure the order is preserved Otherwise, and depending on the database, when a set has supersets, the exercises could be ordered alphabetically.
Python
agpl-3.0
wger-project/wger,petervanderdoes/wger,petervanderdoes/wger,petervanderdoes/wger,petervanderdoes/wger,wger-project/wger,wger-project/wger,wger-project/wger
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('manager', '0010_auto_20210102_1446'), ] operations = [ migrations.RemoveField( model_name='set', name='exercises', )...
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations def increment_order(apps, schema_editor): """ Increment the oder in settings so ensure the order is preserved Otherwise, and depending on the database, when a set has supersets, the exercises could be ordered alphabetic...
<commit_before># Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('manager', '0010_auto_20210102_1446'), ] operations = [ migrations.RemoveField( model_name='set', name='exerci...
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations def increment_order(apps, schema_editor): """ Increment the oder in settings so ensure the order is preserved Otherwise, and depending on the database, when a set has supersets, the exercises could be ordered alphabetic...
# Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('manager', '0010_auto_20210102_1446'), ] operations = [ migrations.RemoveField( model_name='set', name='exercises', )...
<commit_before># Generated by Django 3.1.5 on 2021-02-28 14:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('manager', '0010_auto_20210102_1446'), ] operations = [ migrations.RemoveField( model_name='set', name='exerci...
420b9a4e2b52de7234734b9c457e0711bb0f1a70
utils/lit/lit/__init__.py
utils/lit/lit/__init__.py
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = []
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] from .main import main
Fix issue which cases lit installed with setup.py to not resolve main
Fix issue which cases lit installed with setup.py to not resolve main git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@283818 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llv...
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] Fix issue which cases lit installed with setup.py to not resolve main git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d241...
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] from .main import main
<commit_before>"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] <commit_msg>Fix issue which cases lit installed with setup.py to not resolve main git-svn-id: 0ff597fd157e...
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] from .main import main
"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] Fix issue which cases lit installed with setup.py to not resolve main git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d241...
<commit_before>"""'lit' Testing Tool""" __author__ = 'Daniel Dunbar' __email__ = '[email protected]' __versioninfo__ = (0, 6, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = [] <commit_msg>Fix issue which cases lit installed with setup.py to not resolve main git-svn-id: 0ff597fd157e...
f604de4794c87c155cdda758a43aa7261662dcff
examples/pystray_icon.py
examples/pystray_icon.py
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys if sys.platform == 'darwin': raise NotImplementedError('This example does not work on macOS.') from threading import Thread from queue import Queue """ This example demonstrates running pywebview alongside with pystray ...
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys import multiprocessing if sys.platform == 'darwin': ctx = multiprocessing.get_context('spawn') Process = ctx.Process Queue = ctx.Queue else: Process = multiprocessing.Process Queue = multiprocessing.Queue """...
Improve example, start pystray in main thread and webview in new process
Improve example, start pystray in main thread and webview in new process
Python
bsd-3-clause
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys if sys.platform == 'darwin': raise NotImplementedError('This example does not work on macOS.') from threading import Thread from queue import Queue """ This example demonstrates running pywebview alongside with pystray ...
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys import multiprocessing if sys.platform == 'darwin': ctx = multiprocessing.get_context('spawn') Process = ctx.Process Queue = ctx.Queue else: Process = multiprocessing.Process Queue = multiprocessing.Queue """...
<commit_before>from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys if sys.platform == 'darwin': raise NotImplementedError('This example does not work on macOS.') from threading import Thread from queue import Queue """ This example demonstrates running pywebview alongsid...
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys import multiprocessing if sys.platform == 'darwin': ctx = multiprocessing.get_context('spawn') Process = ctx.Process Queue = ctx.Queue else: Process = multiprocessing.Process Queue = multiprocessing.Queue """...
from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys if sys.platform == 'darwin': raise NotImplementedError('This example does not work on macOS.') from threading import Thread from queue import Queue """ This example demonstrates running pywebview alongside with pystray ...
<commit_before>from PIL import Image from pystray import Icon, Menu, MenuItem import webview import sys if sys.platform == 'darwin': raise NotImplementedError('This example does not work on macOS.') from threading import Thread from queue import Queue """ This example demonstrates running pywebview alongsid...
7ef053749f4bfbcf7c2007a57d16139cfea09588
jsonapi_requests/configuration.py
jsonapi_requests/configuration.py
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
Append slash to API root if needed.
Append slash to API root if needed.
Python
bsd-3-clause
socialwifi/jsonapi-requests
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
<commit_before>from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return ...
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return Configuration( ...
<commit_before>from collections import namedtuple Configuration = namedtuple( 'Configuration', ['API_ROOT', 'AUTH', 'VALIDATE_SSL', 'TIMEOUT', 'APPEND_SLASH'] ) class Factory: def __init__(self, config_dict): self._config_dict = config_dict def create(self) -> Configuration: return ...
e3bf9032e704989aee2044f90a053064e9fd9253
preserved_game.py
preserved_game.py
from persistent_dict import * class PreservedGame(): def game_name(self): return "Freddo" # TODO class AllPreservedGames(): def __init__(self, filename): self.games = PersistentDict(filename, 'c', format='pickle') def add_game(self, pg): self.games[pg.game_name()] = pg sel...
from persistent_dict import * class PreservedGame(): def __init__(self, game): self.rules = game.rules # .clone? self.player = [None, game.player[1].key(), game.player[2].key()] self.move_history = game.move_history[:] def game_name(self): return "Freddo" # TODO class AllPr...
Store the player keys in the preserved games
Store the player keys in the preserved games
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
from persistent_dict import * class PreservedGame(): def game_name(self): return "Freddo" # TODO class AllPreservedGames(): def __init__(self, filename): self.games = PersistentDict(filename, 'c', format='pickle') def add_game(self, pg): self.games[pg.game_name()] = pg sel...
from persistent_dict import * class PreservedGame(): def __init__(self, game): self.rules = game.rules # .clone? self.player = [None, game.player[1].key(), game.player[2].key()] self.move_history = game.move_history[:] def game_name(self): return "Freddo" # TODO class AllPr...
<commit_before>from persistent_dict import * class PreservedGame(): def game_name(self): return "Freddo" # TODO class AllPreservedGames(): def __init__(self, filename): self.games = PersistentDict(filename, 'c', format='pickle') def add_game(self, pg): self.games[pg.game_name()] =...
from persistent_dict import * class PreservedGame(): def __init__(self, game): self.rules = game.rules # .clone? self.player = [None, game.player[1].key(), game.player[2].key()] self.move_history = game.move_history[:] def game_name(self): return "Freddo" # TODO class AllPr...
from persistent_dict import * class PreservedGame(): def game_name(self): return "Freddo" # TODO class AllPreservedGames(): def __init__(self, filename): self.games = PersistentDict(filename, 'c', format='pickle') def add_game(self, pg): self.games[pg.game_name()] = pg sel...
<commit_before>from persistent_dict import * class PreservedGame(): def game_name(self): return "Freddo" # TODO class AllPreservedGames(): def __init__(self, filename): self.games = PersistentDict(filename, 'c', format='pickle') def add_game(self, pg): self.games[pg.game_name()] =...
4dd13a8b031a57f6290fb43dc6daa5082041658a
dashboard/consumers.py
dashboard/consumers.py
from channels import Group from channels.auth import channel_session_user, channel_session_user_from_http @channel_session_user_from_http def ws_connect(message): Group('btc-price').add(message.reply_channel) message.reply_channel.send({ 'accept': True }) @channel_session_user def ws_disconnec...
import json from channels import Group from channels.auth import channel_session_user @channel_session_user def ws_connect(message): Group('btc-price').add(message.reply_channel) message.channel_session['coin-group'] = 'btc-price' message.reply_channel.send({ 'accept': True }) @channel_se...
Add ws_receive consumer with channel_session_user decorator
Add ws_receive consumer with channel_session_user decorator
Python
mit
alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor
from channels import Group from channels.auth import channel_session_user, channel_session_user_from_http @channel_session_user_from_http def ws_connect(message): Group('btc-price').add(message.reply_channel) message.reply_channel.send({ 'accept': True }) @channel_session_user def ws_disconnec...
import json from channels import Group from channels.auth import channel_session_user @channel_session_user def ws_connect(message): Group('btc-price').add(message.reply_channel) message.channel_session['coin-group'] = 'btc-price' message.reply_channel.send({ 'accept': True }) @channel_se...
<commit_before>from channels import Group from channels.auth import channel_session_user, channel_session_user_from_http @channel_session_user_from_http def ws_connect(message): Group('btc-price').add(message.reply_channel) message.reply_channel.send({ 'accept': True }) @channel_session_user d...
import json from channels import Group from channels.auth import channel_session_user @channel_session_user def ws_connect(message): Group('btc-price').add(message.reply_channel) message.channel_session['coin-group'] = 'btc-price' message.reply_channel.send({ 'accept': True }) @channel_se...
from channels import Group from channels.auth import channel_session_user, channel_session_user_from_http @channel_session_user_from_http def ws_connect(message): Group('btc-price').add(message.reply_channel) message.reply_channel.send({ 'accept': True }) @channel_session_user def ws_disconnec...
<commit_before>from channels import Group from channels.auth import channel_session_user, channel_session_user_from_http @channel_session_user_from_http def ws_connect(message): Group('btc-price').add(message.reply_channel) message.reply_channel.send({ 'accept': True }) @channel_session_user d...
495a33c0dbb2bd9174b15ea934b8282ca3b78929
pytask/profile/utils.py
pytask/profile/utils.py
from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = user.notification_sent_to.filte...
from django import shortcuts from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = us...
Use django shortcut for raising 404s.
Use django shortcut for raising 404s.
Python
agpl-3.0
madhusudancs/pytask,madhusudancs/pytask,madhusudancs/pytask
from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = user.notification_sent_to.filte...
from django import shortcuts from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = us...
<commit_before>from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = user.notificatio...
from django import shortcuts from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = us...
from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = user.notification_sent_to.filte...
<commit_before>from django.http import Http404 from django.contrib.auth.models import User from pytask.profile.models import Notification def get_notification(nid, user): """ if notification exists, and belongs to the current user, return it. else return None. """ user_notifications = user.notificatio...
3c145a47a20a55787b8ce8a4f00ff3449306ccbc
blazar/cmd/manager.py
blazar/cmd/manager.py
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Enable mutable config in blazar
Enable mutable config in blazar New releases of oslo.config support a 'mutable' parameter in Opts. oslo.service provides an option [1] which allows services to tell it they want mutate_config_files to be called by passing a parameter. This commit is to use the same approach. This allows Blazar to benefit from [2], wh...
Python
apache-2.0
stackforge/blazar,stackforge/blazar,openstack/blazar,ChameleonCloud/blazar,ChameleonCloud/blazar,openstack/blazar
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
e812791b42c16a809e9913d682562804f5335be6
pytx/pytx/__init__.py
pytx/pytx/__init__.py
# import vocabulary # from init import init # from malware import Malware # from threat_exchange_member import ThreatExchangeMember # from threat_indicator import ThreatIndicator
from init import init from malware import Malware from threat_exchange_member import ThreatExchangeMember from threat_indicator import ThreatIndicator __all__ = ['init', 'Malware', 'ThreatExchangeMember', 'ThreatIndicator']
Add an `__all__` array to expose the public objects of the pytx module
Add an `__all__` array to expose the public objects of the pytx module
Python
bsd-3-clause
theCatWisel/ThreatExchange,theCatWisel/ThreatExchange,mgoffin/ThreatExchange,theCatWisel/ThreatExchange,RyPeck/ThreatExchange,mgoffin/ThreatExchange,tiegz/ThreatExchange,mgoffin/ThreatExchange,tiegz/ThreatExchange,tiegz/ThreatExchange,wxsBSD/ThreatExchange,RyPeck/ThreatExchange,RyPeck/ThreatExchange,theCatWisel/ThreatE...
# import vocabulary # from init import init # from malware import Malware # from threat_exchange_member import ThreatExchangeMember # from threat_indicator import ThreatIndicator Add an `__all__` array to expose the public objects of the pytx module
from init import init from malware import Malware from threat_exchange_member import ThreatExchangeMember from threat_indicator import ThreatIndicator __all__ = ['init', 'Malware', 'ThreatExchangeMember', 'ThreatIndicator']
<commit_before># import vocabulary # from init import init # from malware import Malware # from threat_exchange_member import ThreatExchangeMember # from threat_indicator import ThreatIndicator <commit_msg>Add an `__all__` array to expose the public objects of the pytx module<commit_after>
from init import init from malware import Malware from threat_exchange_member import ThreatExchangeMember from threat_indicator import ThreatIndicator __all__ = ['init', 'Malware', 'ThreatExchangeMember', 'ThreatIndicator']
# import vocabulary # from init import init # from malware import Malware # from threat_exchange_member import ThreatExchangeMember # from threat_indicator import ThreatIndicator Add an `__all__` array to expose the public objects of the pytx modulefrom init import init from malware import Malware from threat_exchange_...
<commit_before># import vocabulary # from init import init # from malware import Malware # from threat_exchange_member import ThreatExchangeMember # from threat_indicator import ThreatIndicator <commit_msg>Add an `__all__` array to expose the public objects of the pytx module<commit_after>from init import init from mal...
5208abd072d747c0da9dbd599ee50ea63c61842e
migrations/0010_create_alerts.py
migrations/0010_create_alerts.py
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None)
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None)
Make lines indented by four spaces instead of three
Make lines indented by four spaces instead of three
Python
bsd-2-clause
44px/redash,imsally/redash,chriszs/redash,useabode/redash,vishesh92/redash,M32Media/redash,rockwotj/redash,jmvasquez/redashtest,jmvasquez/redashtest,imsally/redash,EverlyWell/redash,amino-data/redash,denisov-vlad/redash,EverlyWell/redash,getredash/redash,getredash/redash,M32Media/redash,amino-data/redash,M32Media/redas...
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None) Make lines indented by four spaces instead of three
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None)
<commit_before>from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None) <commit_msg>Make lines indented by four spaces instead of three<commit_after>
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None)
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None) Make lines indented by four spaces instead of threefrom redash.models import db, Alert, AlertSubscription if ...
<commit_before>from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None) <commit_msg>Make lines indented by four spaces instead of three<commit_after>from redash.models...
6848b3ad8709a16a520ba1db1aa6eb94c201728f
tests/ExperimentTest.py
tests/ExperimentTest.py
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
Add test checking that unimplemented attribute raises error
Add test checking that unimplemented attribute raises error
Python
mit
gsarma/PyOpenWorm,openworm/PyOpenWorm,openworm/PyOpenWorm,gsarma/PyOpenWorm
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
<commit_before>import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob imp...
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob import glob from ...
<commit_before>import sys sys.path.insert(0,".") import unittest import neuroml import neuroml.writers as writers import PyOpenWorm from PyOpenWorm import * import networkx import rdflib import rdflib as R import pint as Q import os import subprocess as SP import subprocess import tempfile import doctest from glob imp...
122f38717170766473df4dffd79632f90b3d41ad
axes/apps.py
axes/apps.py
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
Adjust init verbose and enabled mode handling
Adjust init verbose and enabled mode handling Reduce complexity and leave the enabled mode to be used with the toggleable decorator that disables functionality when AXES_ENABLED is set to False for testing etc. This conforms with the previous behaviour and logic flow.
Python
mit
jazzband/django-axes
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
<commit_before>from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version...
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version information. ...
<commit_before>from logging import getLogger from pkg_resources import get_distribution from django import apps log = getLogger(__name__) class AppConfig(apps.AppConfig): name = "axes" initialized = False @classmethod def initialize(cls): """ Initialize Axes logging and show version...
3d281a3524a4cd1bf9e2f60767ec8d89d3b589e2
tools/wcloud/wcloud/deploymentsettings.py
tools/wcloud/wcloud/deploymentsettings.py
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
Add logic, visir and submarine to wcloud
Add logic, visir and submarine to wcloud
Python
bsd-2-clause
morelab/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,zstars/weblabdeusto,...
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
<commit_before>from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --...
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --admin-user=admi...
<commit_before>from weblab.admin.script import Creation APACHE_CONF_NAME = 'apache.conf' MIN_PORT = 10000 DEFAULT_DEPLOYMENT_SETTINGS = { Creation.COORD_ENGINE: 'redis', Creation.COORD_REDIS_DB: 0, Creation.COORD_REDIS_PORT: 6379, Creation.DB_ENGINE: 'mysql', Creation.ADMIN_USER: 'CHANGE_ME', # --...
e02d1ffc989b81cadaf6539685388b421444a4a4
bioc/__init__.py
bioc/__init__.py
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCLoc...
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from .bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from .iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCL...
Fix Python 3 packaging issue
Fix Python 3 packaging issue
Python
bsd-3-clause
yfpeng/pengyifan-pybioc,yfpeng/bioc
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCLoc...
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from .bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from .iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCL...
<commit_before>__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocu...
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from .bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from .iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCL...
__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocument', 'BioCLoc...
<commit_before>__author__ = 'Yifan Peng' __version__ = '1.0.0-SNAPSHOT' from bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \ BioCRelation, BioCLocation, BioCNode, parse, merge, validate from iterparse import iterparse __all__ = ['BioCAnnotation', 'BioCCollection', 'BioCDocu...
6dc73aa3f4acd40ffbf6057c8765e2c693495657
bookmarkd/cli.py
bookmarkd/cli.py
""" Author: Ryan Brown <[email protected]> License: AGPL3 """ import click @click.group() def cli(): pass @cli.command() def version(): click.echo("You are using ofcourse version {}".format(__version__)) click.echo("Get more information at " "https://github.com/ryansb/ofCourse") @cli.comman...
# -*- coding: utf8 -*- """ Copyright 2014 Ryan Brown <[email protected]> This file is part of bookmarkd. bookmarkd 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 ...
Make convert command work with files or stdin/out
Make convert command work with files or stdin/out
Python
agpl-3.0
ryansb/bookmarkd
""" Author: Ryan Brown <[email protected]> License: AGPL3 """ import click @click.group() def cli(): pass @cli.command() def version(): click.echo("You are using ofcourse version {}".format(__version__)) click.echo("Get more information at " "https://github.com/ryansb/ofCourse") @cli.comman...
# -*- coding: utf8 -*- """ Copyright 2014 Ryan Brown <[email protected]> This file is part of bookmarkd. bookmarkd 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 ...
<commit_before>""" Author: Ryan Brown <[email protected]> License: AGPL3 """ import click @click.group() def cli(): pass @cli.command() def version(): click.echo("You are using ofcourse version {}".format(__version__)) click.echo("Get more information at " "https://github.com/ryansb/ofCourse"...
# -*- coding: utf8 -*- """ Copyright 2014 Ryan Brown <[email protected]> This file is part of bookmarkd. bookmarkd 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 ...
""" Author: Ryan Brown <[email protected]> License: AGPL3 """ import click @click.group() def cli(): pass @cli.command() def version(): click.echo("You are using ofcourse version {}".format(__version__)) click.echo("Get more information at " "https://github.com/ryansb/ofCourse") @cli.comman...
<commit_before>""" Author: Ryan Brown <[email protected]> License: AGPL3 """ import click @click.group() def cli(): pass @cli.command() def version(): click.echo("You are using ofcourse version {}".format(__version__)) click.echo("Get more information at " "https://github.com/ryansb/ofCourse"...
f269b7b5c7b0bb0973f504db1c3605c9ff3ac6da
tutorials/2017/thursday/graphColouring.py
tutorials/2017/thursday/graphColouring.py
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
Add function to extract solution from valuation
Add function to extract solution from valuation
Python
mit
jaanos/LVR-2016,jaanos/LVR-2016
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
<commit_before>from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: ...
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: for j in rang...
<commit_before>from boolean import * def graphColouring2SAT(G, k): conj = [] for i in range(len(G)): conj.append(Or(*((i, j) for j in range(k)))) for j in range(k): for jj in range(j+1, k): conj.append(Or(Not((i, j)), Not((i, jj)))) for ii in G[i]: ...
b18c0f6b732b5adc42f123d83886d260c8278ad5
tests/test_slackelot.py
tests/test_slackelot.py
import pytest import mock from slackelot.slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'status_code': 200})) as mock_response: webh...
import pytest try: from unittest import mock except ImportError: import mock from slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'s...
Refactor imports to be less verbose
Refactor imports to be less verbose
Python
mit
Chris-Graffagnino/slackelot
import pytest import mock from slackelot.slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'status_code': 200})) as mock_response: webh...
import pytest try: from unittest import mock except ImportError: import mock from slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'s...
<commit_before>import pytest import mock from slackelot.slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'status_code': 200})) as mock_respons...
import pytest try: from unittest import mock except ImportError: import mock from slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'s...
import pytest import mock from slackelot.slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'status_code': 200})) as mock_response: webh...
<commit_before>import pytest import mock from slackelot.slackelot import SlackNotificationError, send_message def test_send_message_success(): """Returns True if response.status_code == 200""" with mock.patch('slackelot.slackelot.requests.post', return_value=mock.Mock(**{'status_code': 200})) as mock_respons...
5d1bc24d585c6a51367d322cfaf52a84be05a132
myuw_mobile/urls.py
myuw_mobile/urls.py
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
Use a separate set of urlpatterns for each file in views.
Use a separate set of urlpatterns for each file in views.
Python
apache-2.0
fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw,fanglinfang/myuw,uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
<commit_before>from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'suppor...
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'support'), url(r'...
<commit_before>from django.conf.urls import patterns, include, url from myuw_mobile.views.page import index, myuw_login from myuw_mobile.views.api import StudClasScheCurQuar, TextbookCurQuar, InstructorContact urlpatterns = patterns('myuw_mobile.views.page', url(r'login', 'myuw_login'), url(r'support', 'suppor...
6f540821e891f49e0f2059757b58d2aa0efdf267
src/panda_test.py
src/panda_test.py
from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run()
from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direct.task import Task from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import Sequence from panda3d.core import Point3 class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) s...
Add the rest of Panda3D test program.
Add the rest of Panda3D test program.
Python
mit
CheeseLord/warts,CheeseLord/warts
from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run() Add the rest of Panda3D test program.
from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direct.task import Task from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import Sequence from panda3d.core import Point3 class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) s...
<commit_before>from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run() <commit_msg>Add the rest of Panda3D test program.<commit_after>
from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direct.task import Task from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import Sequence from panda3d.core import Point3 class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) s...
from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run() Add the rest of Panda3D test program.from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direct.task import Task from direct.actor.Acto...
<commit_before>from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run() <commit_msg>Add the rest of Panda3D test program.<commit_after>from math import pi, sin, cos from direct.showbase.ShowBase import ShowBase from direc...
bb27d997c728542dd3ec883ba44a3fefb126c42e
scraperwiki/__init__.py
scraperwiki/__init__.py
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql class Error(Exception): """A...
Add exceptions scraperwiki.CPUTimeExceededError and scraperwiki.Error. This bring the library closer to the classic API, which provided both these exceptions.
Add exceptions scraperwiki.CPUTimeExceededError and scraperwiki.Error. This bring the library closer to the classic API, which provided both these exceptions.
Python
bsd-2-clause
hudsonkeithl/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,hudsonkeithl/scraperwiki-python
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sqlAdd exceptions scraperwiki.CPUTime...
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql class Error(Exception): """A...
<commit_before>#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql<commit_msg>Add exc...
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql class Error(Exception): """A...
#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sqlAdd exceptions scraperwiki.CPUTime...
<commit_before>#!/usr/bin/env python2 # Thomas Levine, ScraperWiki Limited ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql<commit_msg>Add exc...
2092467a123c380edfadb52aa42ac9f063524f90
scripts/release_conf.py
scripts/release_conf.py
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ["MIXPANEL_TOKEN"]) with open("src/conf.lua"...
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") if "MIXPANEL_TOKEN" in os.environ: conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ[...
Build releases even without MIXPANEL_TOKEN
Build releases even without MIXPANEL_TOKEN
Python
mit
hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ["MIXPANEL_TOKEN"]) with open("src/conf.lua"...
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") if "MIXPANEL_TOKEN" in os.environ: conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ[...
<commit_before>import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ["MIXPANEL_TOKEN"]) with open...
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") if "MIXPANEL_TOKEN" in os.environ: conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ[...
import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ["MIXPANEL_TOKEN"]) with open("src/conf.lua"...
<commit_before>import os with open("src/conf.lua.bak") as f: conf = f.read() conf = conf.replace("t.release = false", "t.release = true") conf = conf.replace("ac1c2db50f1332444fd0cafffd7a5543", os.environ["MIXPANEL_TOKEN"]) with open...
1d18cb035e959df3aae2ca867d466fca3c091471
test/mac/gyptest-rebuild.py
test/mac/gyptest-rebuild.py
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
Use test.touch() instead of os.utime() in a test.
Use test.touch() instead of os.utime() in a test. No intended functionality change. TBR=evan Review URL: https://chromiumcodereview.appspot.com/9234034
Python
bsd-3-clause
old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': test = TestGy...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are rebuilt correctly. """ import TestGyp import os import sys if sys.platform == 'darwin': ...
cef38ccaca08b75f271d16a4a007cb5c5f4a93b2
chunsabot/modules/images.py
chunsabot/modules/images.py
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
Use subprocess.call rather than run
Use subprocess.call rather than run
Python
mit
susemeee/Chunsabot-framework
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
<commit_before>import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
<commit_before>import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size...
ff6ee622204500101ad5721dccea69a1c62de65f
smbackend/urls.py
smbackend/urls.py
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
Add name to api-token-auth url endpoint.
Add name to api-token-auth url endpoint.
Python
agpl-3.0
City-of-Helsinki/smbackend,City-of-Helsinki/smbackend
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
<commit_before>from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo...
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo.api import all...
<commit_before>from django.conf.urls import patterns, include, url from services.api import all_views as services_views from services.api import AccessibilityRuleView from observations.api import views as observations_views from rest_framework import routers from observations.views import obtain_auth_token from munigeo...
7c6238e51640794b2812eaf6ca22d3c15dfb90fb
troposphere/finspace.py
troposphere/finspace.py
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 39.1.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 49.0.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
Update FinSpace per 2021-11-18 changes
Update FinSpace per 2021-11-18 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 39.1.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 49.0.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
<commit_before># Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 39.1.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = ...
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 49.0.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
# Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 39.1.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = { "Appl...
<commit_before># Copyright (c) 2012-2021, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 39.1.0 from . import AWSObject, AWSProperty class FederationParameters(AWSProperty): props = ...
17266889388c6ae45ac5235a8e22900bf169eba3
typhon/__init__.py
typhon/__init__.py
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
Revert "Import spareice per default."
Revert "Import spareice per default." This reverts commit d54042d41b981b3479adb140f2534f76c967fa1c.
Python
mit
atmtools/typhon,atmtools/typhon
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
<commit_before># -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy ...
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy from . import...
<commit_before># -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import atmosphere from . import config from . import constants from . import files from . import geodesy ...
1cb052fc829f286ecc6f7ea5b230e2b5f37d2062
core/apps.py
core/apps.py
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
Fix the comparison to work more robustly.
Fix the comparison to work more robustly.
Python
mit
OpenCanada/website,OpenCanada/website,OpenCanada/website,OpenCanada/website
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
<commit_before>from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
<commit_before>from django.apps import AppConfig from django.db.models.signals import post_delete, post_save from wagtail.wagtailsearch.backends import get_search_backends from wagtail.wagtailsearch.index import get_indexed_models from wagtail.wagtailsearch.signal_handlers import (get_indexed_instance, ...
b72af894539ca50d08fa1fa78a5c394fa246323d
cfgov/transition_utilities/test_middleware.py
cfgov/transition_utilities/test_middleware.py
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class CartMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(self): ...
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class RewriteNemoURLSMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(s...
Fix a harmless (but silly) cut-and-paste artifact
Fix a harmless (but silly) cut-and-paste artifact
Python
cc0-1.0
kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class CartMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(self): ...
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class RewriteNemoURLSMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(s...
<commit_before>from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class CartMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transfo...
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class RewriteNemoURLSMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(s...
from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class CartMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transform(self): ...
<commit_before>from django.test import TestCase from mock import Mock from .middleware import RewriteNemoURLsMiddleware class CartMiddlewareTest(TestCase): def setUp(self): self.middleware = RewriteNemoURLsMiddleware() self.request = Mock() self.response = Mock() def test_text_transfo...
d4d76ae28ae8aa028c5a06f7499a20644b45b986
examples/on_startup.py
examples/on_startup.py
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
Update example to demonstrate desired use case
Update example to demonstrate desired use case
Python
mit
MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug,MuhammadAlkarouri/hug,timothycrosley/hug,timothycrosley/hug
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
<commit_before>"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" ...
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" data.append("E...
<commit_before>"""Provides an example of attaching an action on hug server startup""" import hug data = [] @hug.startup() def add_data(api): """Adds initial data to the api on startup""" data.append("It's working") @hug.startup() def add_more_data(api): """Adds initial data to the api on startup""" ...
1a96377332df63a0dd6bc62d6856ff8aa0d0a018
redgreen.py
redgreen.py
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def black_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def ready_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
Rename black_screen to ready_screen and make executable
Rename black_screen to ready_screen and make executable
Python
mit
andybalaam/redgreen
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def black_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def ready_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
<commit_before>#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def black_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == ...
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def ready_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def black_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == pygame.QUIT: ...
<commit_before>#!/usr/bin/env python import pygame screen_size = 640, 480 def start(): pygame.init() screen = pygame.display.set_mode( screen_size ) def black_screen(): pass def wait(): pass def shape(): pass def end(): while True: evt = pygame.event.wait() if evt.type == ...
0defb820e6405a792e63347fa2414953b5449bbe
src/bots/inputs/malwaredomains/feed.py
src/bots/inputs/malwaredomains/feed.py
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
Comment added to create generic decode method
Comment added to create generic decode method Former-commit-id: 256c0f9cfd1ca0c5982ac9ab001c5ced84a02c32
Python
agpl-3.0
robcza/intelmq,robcza/intelmq,robcza/intelmq,aaronkaplan/intelmq,robcza/intelmq,certtools/intelmq,sch3m4/intelmq,sch3m4/intelmq,pkug/intelmq,certtools/intelmq,pkug/intelmq,aaronkaplan/intelmq,certtools/intelmq,pkug/intelmq,aaronkaplan/intelmq,sch3m4/intelmq,pkug/intelmq,sch3m4/intelmq
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
<commit_before>#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, ch...
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, chunk_size = 1638...
<commit_before>#!/usr/bin/python import sys from lib.bot import * from lib.utils import * from lib.event import * from lib.cache import * import time class MalwareDomainsBot(Bot): def process(self): url = "http://www.malwaredomainlist.com/updatescsv.php" report = fetch_url(url, timeout = 60.0, ch...
27f4499dc11628b2520de65c5f8db6b397d19b69
src/bulksms/settings.py
src/bulksms/settings.py
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
Add url to check for incoming sms's.
Add url to check for incoming sms's.
Python
mit
tsotetsi/django-bulksms
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
<commit_before># BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/...
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
# BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/1/1.0'.format(B...
<commit_before># BULKSMS Configuration. # BULKSMS base url. BULKSMS_BASE_API_URL = 'https://bulksms.2way.co.za' # Credentials required to use bulksms.com API. BULKSMS_AUTH_USERNAME = '' BULKSMS_AUTH_PASSWORD = '' # URL for sending single and batch sms. BULKSMS_API_URL = { 'batch': '/{}eapi/submission/send_batch/...
b92e7c281f18dc0a3c9c65a995e132c89d9f82f1
areaScraper.py
areaScraper.py
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnD...
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnDiv...
Fix city scraper, doesn't throw type error
Fix city scraper, doesn't throw type error City scraper now prints out html for every city and territory in the us without throwing any error.
Python
mit
MuSystemsAnalysis/craigslist_area_search,MuSystemsAnalysis/craigslist_area_search
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnD...
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnDiv...
<commit_before># Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for s...
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnDiv...
# Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnD...
<commit_before># Craigslist City Scraper # By Marshall Ehlinger # For sp2015 Systems Analysis and Design from bs4 import BeautifulSoup import requests import re soup = BeautifulSoup(requests.get("http://www.craigslist.org/about/sites").text, "html.parser") for columnDiv in soup.h1.next_sibling.next_sibling: for s...
ac1b0b59482027cf79755519cb39ba2eed01a29e
avatar/urls.py
avatar/urls.py
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\+\w]+)/(?P<size>[\d]+)/$', 'render_prim...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\w\d\.\-_]{3,30})/(?P<size>[\d]+)/$', 'r...
Support for username with extra chars.
Support for username with extra chars.
Python
bsd-3-clause
alexlovelltroy/django-avatar
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\+\w]+)/(?P<size>[\d]+)/$', 'render_prim...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\w\d\.\-_]{3,30})/(?P<size>[\d]+)/$', 'r...
<commit_before>from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\+\w]+)/(?P<size>[\d]+)/$...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\w\d\.\-_]{3,30})/(?P<size>[\d]+)/$', 'r...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\+\w]+)/(?P<size>[\d]+)/$', 'render_prim...
<commit_before>from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P<user>[\+\w]+)/(?P<size>[\d]+)/$...
97f1d671966917d29d20c0afb554aaed69c4f9af
wysihtml5/tests/__init__.py
wysihtml5/tests/__init__.py
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
Convert INSTALLED_APPS to list before concat
Convert INSTALLED_APPS to list before concat
Python
bsd-2-clause
danirus/django-wysihtml5,danirus/django-wysihtml5,danirus/django-wysihtml5
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
<commit_before>#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTI...
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTINGS_MODULE", Fa...
<commit_before>#-*- coding: utf-8 -*- import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, os.getcwd()) os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" def run_tests(): if not os.environ.get("DJANGO_SETTI...
ab328b71e5ef72211e8ffe8833759854d4342582
runtests.py
runtests.py
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="disposa...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, INSTALLED_APPS=[ ...
Remove reference to non-existant file.
Remove reference to non-existant file.
Python
bsd-3-clause
aaronbassett/DisposableEmailChecker
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="disposa...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, INSTALLED_APPS=[ ...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_U...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, INSTALLED_APPS=[ ...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="disposa...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_U...
91db70d1fc266e3e3925e84fcaf83410e0504e37
Lib/tkinter/test/test_tkinter/test_font.py
Lib/tkinter/test/test_tkinter/test_font.py
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
Fix test_tk under OS X with Tk 8.4. Patch by Ned Deily. This should fix some buildbot failures.
Fix test_tk under OS X with Tk 8.4. Patch by Ned Deily. This should fix some buildbot failures.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
<commit_before>import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw...
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def tes...
<commit_before>import unittest import tkinter from tkinter import font from test.support import requires, run_unittest import tkinter.test.support as support requires('gui') class FontTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw...
e01e5cca84c3eeb04d20b3a91bbb44d688418bf3
pypaas/sshkey.py
pypaas/sshkey.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
Allow multiple SSH keys per file
Allow multiple SSH keys per file
Python
mit
fintura/pyPaaS,fintura/pyPaaS
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) for name i...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys from . import util class SSHKey(object): @staticmethod def rebuild_authorized_keys(): lines = [] ssh_dir = os.path.expanduser('~/.ssh') util.mkdir_p(os.path.join(ssh_dir, 'authorized_keys.d')) ...
f37d26541d6baf3da47a8f373a8c7a65177067db
push/modules/push_notification.py
push/modules/push_notification.py
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
Send flag when success push notifications
Send flag when success push notifications
Python
apache-2.0
nnsnodnb/django-mbaas,nnsnodnb/django-mbaas,nnsnodnb/django-mbaas
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
<commit_before># coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: ...
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
# coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: pem_file_n...
<commit_before># coding=utf-8 import time, os, json from apns import APNs, Frame, Payload from push.models import DevelopFileModel, ProductFileModel from django.conf import settings PEM_FILE_DIR = settings.BASE_DIR + '/push/files/' def execute(device_token_lists, notification): if notification.is_production: ...
bf2366bf1caae7671fad09199da3c5d6aff1b790
redash/authentication/org_resolving.py
redash/authentication/org_resolving.py
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
Make sure organization is fetched only once
Make sure organization is fetched only once
Python
bsd-2-clause
moritz9/redash,stefanseifert/redash,moritz9/redash,imsally/redash,EverlyWell/redash,crowdworks/redash,crowdworks/redash,hudl/redash,stefanseifert/redash,alexanderlz/redash,rockwotj/redash,chriszs/redash,vishesh92/redash,stefanseifert/redash,imsally/redash,hudl/redash,hudl/redash,vishesh92/redash,getredash/redash,useabo...
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
<commit_before>""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy ...
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy from redash.mod...
<commit_before>""" This module implements different strategies to resolve the current Organization we are using. By default we use the simple single_org strategy, which assumes you have a single Organization in your installation. """ import logging from flask import request, g from werkzeug.local import LocalProxy ...
73660b238067279287f764d001549bf5e940b607
tests/test_api.py
tests/test_api.py
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) if os.pa...
Add unit test for newly initialized db
Add unit test for newly initialized db
Python
mpl-2.0
jmlong1027/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,MITRECND/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) if os.pa...
<commit_before>import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'ut...
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) if os.pa...
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
<commit_before>import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'ut...
bb5c0711880f43dd8c726a9749152246eecccc84
waterfall_wall/models.py
waterfall_wall/models.py
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
Use feed as the foreign key of image
Use feed as the foreign key of image
Python
mit
carlcarl/rcard,carlcarl/rcard
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
<commit_before># This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the tab...
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free ...
<commit_before># This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the tab...
3aa327ad470d772c0c487a11e8dce7e256e9f14d
alembic/versions/1c398722878_git_branch.py
alembic/versions/1c398722878_git_branch.py
"""git_branch Revision ID: 1c398722878 Revises: f8d315a31e Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = 'f8d315a31e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### command...
"""git_branch Revision ID: 1c398722878 Revises: 224302e491d Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = '224302e491d' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### comma...
Fix migration for squashed init
Fix migration for squashed init
Python
isc
RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI
"""git_branch Revision ID: 1c398722878 Revises: f8d315a31e Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = 'f8d315a31e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### command...
"""git_branch Revision ID: 1c398722878 Revises: 224302e491d Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = '224302e491d' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### comma...
<commit_before>"""git_branch Revision ID: 1c398722878 Revises: f8d315a31e Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = 'f8d315a31e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ...
"""git_branch Revision ID: 1c398722878 Revises: 224302e491d Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = '224302e491d' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### comma...
"""git_branch Revision ID: 1c398722878 Revises: f8d315a31e Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = 'f8d315a31e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### command...
<commit_before>"""git_branch Revision ID: 1c398722878 Revises: f8d315a31e Create Date: 2015-10-18 00:38:22.737519 """ # revision identifiers, used by Alembic. revision = '1c398722878' down_revision = 'f8d315a31e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ...
dd0ceaaadbdb401e2423fbc3b7c395a117a2ef79
Command_Line_Interface/__init__.py
Command_Line_Interface/__init__.py
__author__ = "Jarrod N. Bakker" __status__ = "development"
# Copyright 2015 Jarrod N. Bakker # # 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 writ...
Revert "Added to allow local imports."
Revert "Added to allow local imports." This reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d.
Python
apache-2.0
bakkerjarr/ACLSwitch,bakkerjarr/ACLSwitch
__author__ = "Jarrod N. Bakker" __status__ = "development" Revert "Added to allow local imports." This reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d.
# Copyright 2015 Jarrod N. Bakker # # 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 writ...
<commit_before>__author__ = "Jarrod N. Bakker" __status__ = "development" <commit_msg>Revert "Added to allow local imports." This reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d.<commit_after>
# Copyright 2015 Jarrod N. Bakker # # 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 writ...
__author__ = "Jarrod N. Bakker" __status__ = "development" Revert "Added to allow local imports." This reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d.# Copyright 2015 Jarrod N. Bakker # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
<commit_before>__author__ = "Jarrod N. Bakker" __status__ = "development" <commit_msg>Revert "Added to allow local imports." This reverts commit b1f8344f1525b97a73619fbd84ec26c72829eb7d.<commit_after># Copyright 2015 Jarrod N. Bakker # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use...
13b76c32d387e6074719818bc72847afece0080a
prompter.py
prompter.py
def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here response = "" while response == "": response =...
import science_utils def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here is_acceptable = False while not...
Add verfication loop to prompt_for_answer
Add verfication loop to prompt_for_answer
Python
mit
dpeters19/webassign2
def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here response = "" while response == "": response =...
import science_utils def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here is_acceptable = False while not...
<commit_before>def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here response = "" while response == "": ...
import science_utils def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here is_acceptable = False while not...
def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here response = "" while response == "": response =...
<commit_before>def prompt_for_answer(question=""): """ Prompts the user for an answer Args: question (String): The question to be displayed to the user Returns: String: The user's answer """ # TODO Change to verify answer here response = "" while response == "": ...
9b968e8cf4c5fd8e4bd120255b8eb3c7bc4e6943
mygpoauth/authorization/admin.py
mygpoauth/authorization/admin.py
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): pass
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): def scope_list(self, app): return ', '.join(app.scopes) list_display = ['user', 'application', 'scope_list'] list_select_related = ['user', 'application'] ...
Improve Admin for Authorization objects
Improve Admin for Authorization objects
Python
agpl-3.0
gpodder/mygpo-auth,gpodder/mygpo-auth
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): pass Improve Admin for Authorization objects
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): def scope_list(self, app): return ', '.join(app.scopes) list_display = ['user', 'application', 'scope_list'] list_select_related = ['user', 'application'] ...
<commit_before>from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): pass <commit_msg>Improve Admin for Authorization objects<commit_after>
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): def scope_list(self, app): return ', '.join(app.scopes) list_display = ['user', 'application', 'scope_list'] list_select_related = ['user', 'application'] ...
from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): pass Improve Admin for Authorization objectsfrom django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.M...
<commit_before>from django.contrib import admin from .models import Authorization @admin.register(Authorization) class ApplicationAdmin(admin.ModelAdmin): pass <commit_msg>Improve Admin for Authorization objects<commit_after>from django.contrib import admin from .models import Authorization @admin.register(Auth...
b178b2622aff7da7e7d4b6730f5d1c98680b1266
txircd/modbase.py
txircd/modbase.py
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
Remove unused functions from the Mode base object
Remove unused functions from the Mode base object
Python
bsd-3-clause
Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
<commit_before># The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class M...
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
# The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class Module(object): ...
<commit_before># The purpose of this file is to provide base classes with the needed functions # already defined; this allows us to guarantee that any exceptions raised # during function calls are a problem with the module and not just that the # particular function isn't defined. from txircd.utils import now class M...
f6b76e77d4b3a3dae3420296811891585700f220
nodewatcher/web/sanitize-dump.py
nodewatcher/web/sanitize-dump.py
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
Set user password for all sanitized users to '123'.
Set user password for all sanitized users to '123'.
Python
agpl-3.0
galaxor/Nodewatcher,galaxor/Nodewatcher,galaxor/Nodewatcher,galaxor/Nodewatcher
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
<commit_before>#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file outpu...
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file output-file" % sys.a...
<commit_before>#!/usr/bin/python # Setup import paths, since we are using Django models import sys, os sys.path.append('/var/www/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'wlanlj.settings_production' # Imports from django.core import serializers if len(sys.argv) != 4: print "Usage: %s format input-file outpu...
7b413a262a4400aa8dee45596a19930329490e6d
alembic/versions/2c48009040da_bug_958558_migration_for_update_product_.py
alembic/versions/2c48009040da_bug_958558_migration_for_update_product_.py
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
Add update_tcbs.sql to the mix
Add update_tcbs.sql to the mix
Python
mpl-2.0
yglazko/socorro,Tayamarn/socorro,mozilla/socorro,KaiRo-at/socorro,bsmedberg/socorro,twobraids/socorro,mozilla/socorro,mozilla/socorro,rhelmer/socorro,rhelmer/socorro,cliqz/socorro,lonnen/socorro,cliqz/socorro,m8ttyB/socorro,cliqz/socorro,yglazko/socorro,bsmedberg/socorro,spthaolt/socorro,Tchanders/socorro,AdrianGaudebe...
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
<commit_before>"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import...
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import citexttype, js...
<commit_before>"""bug 958558 migration for update_product_version() and friends Revision ID: 2c48009040da Revises: 48e9a4366530 Create Date: 2014-01-13 12:54:13.988864 """ # revision identifiers, used by Alembic. revision = '2c48009040da' down_revision = '4cacd567770f' from alembic import op from socorro.lib import...
2a3dece4337f8c8fb1531769413bb514252a0f56
benchbuild/environments/adapters/podman.py
benchbuild/environments/adapters/podman.py
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
Add missing lower() in create_container()
Add missing lower() in create_container()
Python
mit
PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
<commit_before>import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspat...
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspath(str(CFG['cont...
<commit_before>import logging import os from plumbum.commands.base import BaseCommand from benchbuild.settings import CFG from benchbuild.utils.cmd import podman LOG = logging.getLogger(__name__) PODMAN_DEFAULT_OPTS = [ '--root', os.path.abspath(str(CFG['container']['root'])), '--runroot', os.path.abspat...
8a83c67c76d2a96fc9a70f2057787efcd9250e0e
versebot/regex.py
versebot/regex.py
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
Add optional parentheses for translation
Add optional parentheses for translation
Python
mit
Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
<commit_before>""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<...
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<book>[\d\w\s]+)...
<commit_before>""" VerseBot for reddit By Matthieu Grieger regex.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ import re def find_verses(message_body): """ Uses regex to search comment body for verse quotations. Returns a list of matches if found, None otherwise. """ regex = (r"(?<=\[)(?P<...
211665a4163801b68d90cbefd5d896f28f374f6f
settings.py
settings.py
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = ""
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "YOUR_DEVICE_TOKEN"
Add a placeholder to device token
Add a placeholder to device token
Python
mit
cloud4rpi/cloud4rpi
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "" Add a placeholder to device token
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "YOUR_DEVICE_TOKEN"
<commit_before># Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "" <commit_msg>Add a placeholder to device token<commit_after>
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "YOUR_DEVICE_TOKEN"
# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "" Add a placeholder to device token# Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "YOUR_DEVICE_TOKEN"
<commit_before># Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "" <commit_msg>Add a placeholder to device token<commit_after># Put your device token here. To get a device token, register at http://stage.cloud4rpi.io DeviceToken = "YOUR_DEVICE_TOKEN"
7440f8d3b6b4f2b1022d445fda943e981e6ab890
flask_resty/spec/plugin.py
flask_resty/spec/plugin.py
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
Fix compatibility with newer apispec
Fix compatibility with newer apispec
Python
mit
taion/flask-jsonapiview,4Catalyzer/flask-jsonapiview,4Catalyzer/flask-resty
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
<commit_before>from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ ...
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ resource =...
<commit_before>from collections import defaultdict from flask import current_app from .operation import Operation from .utils import flask_path_to_swagger, get_state rules = {} def schema_path_helper(spec, path, view, **kwargs): """Path helper that uses resty views :param view: an `ApiView` object """ ...
9787fb3a78d681aff25c6cbaac2c1ba842c4c7db
manila_ui/api/network.py
manila_ui/api/network.py
# Copyright (c) 2015 Mirantis, 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 requir...
# Copyright (c) 2015 Mirantis, 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 requir...
Fix compatibility with latest horizon
Fix compatibility with latest horizon Class "NetworkClient" from "openstack_dashboards.api.network" module was removed from horizon repo. So, remove its usage and use neutron directly. Change-Id: Idcf51553f64fae2254c224d4c6ef4fbb94e6f279 Closes-Bug: #1691466
Python
apache-2.0
openstack/manila-ui,openstack/manila-ui,openstack/manila-ui
# Copyright (c) 2015 Mirantis, 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 requir...
# Copyright (c) 2015 Mirantis, 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 requir...
<commit_before># Copyright (c) 2015 Mirantis, 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 # # ...
# Copyright (c) 2015 Mirantis, 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 requir...
# Copyright (c) 2015 Mirantis, 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 requir...
<commit_before># Copyright (c) 2015 Mirantis, 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 # # ...
8a6725554451e8df61c60184d41f618a8cd5c7aa
tests/appservice_integrations_tests.py
tests/appservice_integrations_tests.py
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
Test extra args are used
Test extra args are used
Python
mit
arteria-project/arteria-core
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
<commit_before>import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test",...
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test", ...
<commit_before>import os from arteria.web.app import AppService from unittest import TestCase class AppServiceTest(TestCase): this_file_path = os.path.dirname(os.path.realpath(__file__)) def test_can_load_configuration(self): app_svc = AppService.create( product_name="arteria-test",...
a9307e1ac7778f6073d275a4822bc5f1df9c45fb
termedit.py
termedit.py
#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
#!/usr/bin/env python3 import os import sys import neovim files = [os.path.abspath(arg) for arg in sys.argv[1:]] if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
Fix not opening paths with spaces.
Fix not opening paths with spaces.
Python
apache-2.0
rliang/termedit.nvim
#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
#!/usr/bin/env python3 import os import sys import neovim files = [os.path.abspath(arg) for arg in sys.argv[1:]] if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
<commit_before>#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buf...
#!/usr/bin/env python3 import os import sys import neovim files = [os.path.abspath(arg) for arg in sys.argv[1:]] if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
<commit_before>#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buf...
c7b7e62cb2585f6109d70b27564617b0be4c8c33
tests/test_daterange.py
tests/test_daterange.py
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join(os.path.dirname(__file__), '../LICENSE.txt') self.pattern = 'Copyright (c) 2012 - %s SendGrid, Inc.' % (t...
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join( os.path.dirname(__file__), '../LICENSE.txt') ...
Update code for PEP8 compliance
Update code for PEP8 compliance
Python
mit
sendgrid/python-http-client,sendgrid/python-http-client
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join(os.path.dirname(__file__), '../LICENSE.txt') self.pattern = 'Copyright (c) 2012 - %s SendGrid, Inc.' % (t...
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join( os.path.dirname(__file__), '../LICENSE.txt') ...
<commit_before>import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join(os.path.dirname(__file__), '../LICENSE.txt') self.pattern = 'Copyright (c) 2012 - %s SendG...
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join( os.path.dirname(__file__), '../LICENSE.txt') ...
import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join(os.path.dirname(__file__), '../LICENSE.txt') self.pattern = 'Copyright (c) 2012 - %s SendGrid, Inc.' % (t...
<commit_before>import os import time try: import unittest2 as unittest except ImportError: import unittest class DateRangeTest(unittest.TestCase): def setUp(self): self.openlicensefile = os.path.join(os.path.dirname(__file__), '../LICENSE.txt') self.pattern = 'Copyright (c) 2012 - %s SendG...
029e31b9f28e2d9882f7453b538eb2c9299ca185
programs/buck_logging.py
programs/buck_logging.py
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. logger = logging.getLogger() level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, ...
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, 'ERROR': logging.ERROR, ...
Make buck wrapper logs human-readable.
Make buck wrapper logs human-readable. Summary: Simplify logging setup and make its format human-readable Test Plan: $ BUCK_WRAPPER_LOG_LEVEL=DEBUG buck run buck -- --version buck version 64999e5d3b446c062da5c3cc282a2e78ce133c92 2017-12-05 14:08:08,073 [DEBUG][buck.py:80] [Errno 2] No such file or directory perv...
Python
apache-2.0
kageiit/buck,facebook/buck,rmaz/buck,clonetwin26/buck,JoelMarcey/buck,clonetwin26/buck,shs96c/buck,clonetwin26/buck,Addepar/buck,romanoid/buck,SeleniumHQ/buck,clonetwin26/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,romanoid/buck,Addepar/buck,JoelMarcey/buck,zpao/buck,shs96c/buck,JoelMarcey/buck,rmaz/buck,SeleniumHQ/buck...
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. logger = logging.getLogger() level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, ...
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, 'ERROR': logging.ERROR, ...
<commit_before>#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. logger = logging.getLogger() level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': loggi...
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, 'ERROR': logging.ERROR, ...
#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. logger = logging.getLogger() level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': logging.CRITICAL, ...
<commit_before>#!/usr/bin/env python from __future__ import print_function import logging import os def setup_logging(): # Set log level of the messages to show. logger = logging.getLogger() level_name = os.environ.get('BUCK_WRAPPER_LOG_LEVEL', 'INFO') level_name_to_level = { 'CRITICAL': loggi...
f01921e6e2fbac76dc41e354b84f970b1591193d
nsone/rest/monitoring.py
nsone/rest/monitoring.py
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
Add support for monitor deletion
Add support for monitor deletion
Python
mit
nsone/nsone-python,ns1/nsone-python
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
<commit_before># # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): retur...
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
# # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): return self._make_re...
<commit_before># # Copyright (c) 2014 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Monitors(resource.BaseResource): ROOT = 'monitoring/jobs' PASSTHRU_FIELDS = ['name', 'config'] def list(self, callback=None, errback=None): retur...
5cbee0f9fb7ba360e00fbcf94c2c2a7a331dd1b6
bayesian_jobs/handlers/sync_to_graph.py
bayesian_jobs/handlers/sync_to_graph.py
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
Handle errors in sync job
Handle errors in sync job
Python
apache-2.0
fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
<commit_before>import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True:...
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True: re...
<commit_before>import datetime from cucoslib.models import Analysis, Package, Version, Ecosystem from cucoslib.workers import GraphImporterTask from .base import BaseHandler class SyncToGraph(BaseHandler): """ Sync all finished analyses to Graph DB """ def execute(self): start = 0 while True:...
bc70f78ef90f1758581dd7f3a8f8b5b2801375a6
buildserver/config.buildserver.py
buildserver/config.buildserver.py
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", } build_tools = "22.0.1" ant = "ant" mvn3 = "mvn" gradle = "gradle"
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", }
Remove default config settings from the BS
Remove default config settings from the BS
Python
agpl-3.0
fdroidtravis/fdroidserver,fdroidtravis/fdroidserver,f-droid/fdroid-server,fdroidtravis/fdroidserver,f-droid/fdroidserver,matlink/fdroidserver,f-droid/fdroid-server,f-droid/fdroidserver,fdroidtravis/fdroidserver,f-droid/fdroid-server,f-droid/fdroidserver,f-droid/fdroid-server,f-droid/fdroidserver,matlink/fdroidserver,f-...
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", } build_tools = "22.0.1" ant = "ant" mvn3 = "mvn" gradle = "gradle" Remove default config settings from the BS
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", }
<commit_before>sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", } build_tools = "22.0.1" ant = "ant" mvn3 = "mvn" gradle = "gradle" <commit_msg>Remove default config settings from the BS<commit_after>
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", }
sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", } build_tools = "22.0.1" ant = "ant" mvn3 = "mvn" gradle = "gradle" Remove default config settings from the BSsdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/h...
<commit_before>sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", } build_tools = "22.0.1" ant = "ant" mvn3 = "mvn" gradle = "gradle" <commit_msg>Remove default config settings from the BS<commit_after>sdk_path = "/home/vagrant/...
6ef5a1a91e78c877a099b8c55df2f3f4d84686bb
bluesky/tests/test_vertical_integration.py
bluesky/tests/test_vertical_integration.py
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.mds.insert) uid, = RE(stepscan(det, motor), group='f...
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.insert) uid, = RE(stepscan(det, motor), group='foo',...
Update to new databroker API.
TST: Update to new databroker API.
Python
bsd-3-clause
ericdill/bluesky,ericdill/bluesky
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.mds.insert) uid, = RE(stepscan(det, motor), group='f...
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.insert) uid, = RE(stepscan(det, motor), group='foo',...
<commit_before>from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.mds.insert) uid, = RE(stepscan(det, m...
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.insert) uid, = RE(stepscan(det, motor), group='foo',...
from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.mds.insert) uid, = RE(stepscan(det, motor), group='f...
<commit_before>from collections import defaultdict from bluesky.examples import stepscan, det, motor from bluesky.callbacks.broker import post_run, verify_files_saved from functools import partial def test_scan_and_get_data(fresh_RE, db): RE = fresh_RE RE.subscribe(db.mds.insert) uid, = RE(stepscan(det, m...
b68576d307474eaf6bd8a8853bee767c391d28b9
conjure/connection.py
conjure/connection.py
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
Remove authenticate call to fix issues with pymongo 3.7
Remove authenticate call to fix issues with pymongo 3.7
Python
mit
GGOutfitters/conjure
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
<commit_before>from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['n...
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['nodelist'] ...
<commit_before>from .exceptions import ConnectionError from pymongo import MongoClient from pymongo.uri_parser import parse_uri _connections = {} try: import gevent except ImportError: gevent = None def _get_connection(uri): global _connections parsed_uri = parse_uri(uri) hosts = parsed_uri['n...
0ae6b19f69976d2bcff4a0206ec97c6f9198eaa1
whip/web.py
whip/web.py
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
Fix time-based lookups in REST API
Fix time-based lookups in REST API Don't encode the datetime argument to bytes; the underlying function expects a string argument.
Python
bsd-3-clause
wbolster/whip
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
<commit_before>""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db ...
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db # pylint: disab...
<commit_before>""" Whip's REST API """ # pylint: disable=missing-docstring import socket from flask import Flask, abort, make_response, request from .db import Database app = Flask(__name__) app.config.from_envvar('WHIP_SETTINGS', silent=True) db = None @app.before_first_request def _open_db(): global db ...
fb8fbdedd28eddf55a4846c4af5f0137cad9adfb
seleniumbase/config/proxy_list.py
seleniumbase/config/proxy_list.py
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
Remove an example proxy server definition
Remove an example proxy server definition
Python
mit
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/seleniumspot
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
<commit_before>""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PR...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PROXY_LIST below ...
<commit_before>""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" Example proxies in PR...
881a133d30ab750368343d964f6b7110373cd9c5
bazaar/goods/views.py
bazaar/goods/views.py
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product paginate_by = 20 class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product
Add pagination to product list view
Add pagination to product list view
Python
bsd-2-clause
meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR,evonove/django-bazaar,meghabhoj/NEWBAZAAR,evonove/django-bazaar,evonove/django-bazaar
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product Add pagination to product list view
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product paginate_by = 20 class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product
<commit_before>from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product <commit_msg>Add pagination to produc...
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product paginate_by = 20 class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product
from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product Add pagination to product list viewfrom django.view...
<commit_before>from django.views import generic from ..mixins import BazaarPrefixMixin from .models import Product class ProductListView(BazaarPrefixMixin, generic.ListView): model = Product class ProductCreateView(BazaarPrefixMixin, generic.CreateView): model = Product <commit_msg>Add pagination to produc...
c6ab73a718d7f8c948ba79071993cd7a8f484ab5
rm/userprofiles/views.py
rm/userprofiles/views.py
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser form_class = Pro...
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.http import LoginRequiredMixin from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(LoginRequiredMixin...
Make our account pages require a logged in user.
Make our account pages require a logged in user. closes #221
Python
agpl-3.0
openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser form_class = Pro...
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.http import LoginRequiredMixin from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(LoginRequiredMixin...
<commit_before>""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser f...
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.http import LoginRequiredMixin from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(LoginRequiredMixin...
""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser form_class = Pro...
<commit_before>""" Views that allow us to edit user profile data """ from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser f...
d02e021a68333c52adff38cc869bf217deebfc5c
run.py
run.py
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # set screen width/height and caption screen = pygame.display.set_mode(SCREEN_DIM, pygame.RESIZABLE) pygame.display.set_caption('So...
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # We only use pygame for drawing, and mixer will hog cpu otherwise # https://github.com/pygame/pygame/issues/331 pygame.mixer.quit...
Fix pygame mixer init hogging cpu
Fix pygame mixer init hogging cpu
Python
mit
kenanbit/loopsichord
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # set screen width/height and caption screen = pygame.display.set_mode(SCREEN_DIM, pygame.RESIZABLE) pygame.display.set_caption('So...
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # We only use pygame for drawing, and mixer will hog cpu otherwise # https://github.com/pygame/pygame/issues/331 pygame.mixer.quit...
<commit_before>#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # set screen width/height and caption screen = pygame.display.set_mode(SCREEN_DIM, pygame.RESIZABLE) pygame.display....
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # We only use pygame for drawing, and mixer will hog cpu otherwise # https://github.com/pygame/pygame/issues/331 pygame.mixer.quit...
#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # set screen width/height and caption screen = pygame.display.set_mode(SCREEN_DIM, pygame.RESIZABLE) pygame.display.set_caption('So...
<commit_before>#!/usr/bin/env python3 import pygame from constants import * from music_maker import * from tkinter import Tk def main(): # initialize game engine pygame.init() # set screen width/height and caption screen = pygame.display.set_mode(SCREEN_DIM, pygame.RESIZABLE) pygame.display....
0c60995d56f57a379438036c2775460268caa03b
settings.py
settings.py
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUAGE_CODE = 'en' ...
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres://localhost:5434/psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LAN...
Use last version of PostgreSQL on CI
Use last version of PostgreSQL on CI
Python
mit
SectorLabs/django-postgres-extra
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUAGE_CODE = 'en' ...
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres://localhost:5434/psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LAN...
<commit_before>import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUA...
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres://localhost:5434/psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LAN...
import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUAGE_CODE = 'en' ...
<commit_before>import dj_database_url DEBUG = True TEMPLATE_DEBUG = True SECRET_KEY = 'this is my secret key' # NOQA TEST_RUNNER = 'django.test.runner.DiscoverRunner' DATABASES = { 'default': dj_database_url.config(default='postgres:///psqlextra') } DATABASES['default']['ENGINE'] = 'psqlextra.backend' LANGUA...
844a165267e50d92b59c7c8fea97edcb1c8acf79
judge/views/status.py
judge/views/status.py
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
Order judge list by load
Order judge list by load
Python
agpl-3.0
Phoenix1369/site,Phoenix1369/site,DMOJ/site,Minkov/site,DMOJ/site,Phoenix1369/site,monouno/site,monouno/site,DMOJ/site,Minkov/site,monouno/site,Minkov/site,Minkov/site,monouno/site,Phoenix1369/site,DMOJ/site,monouno/site
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', ...
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', }, context_in...
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext from judge.models import Judge __all__ = ['status', 'status_table'] def status(request): return render_to_response('judge_status.jade', { 'judges': Judge.objects.all(), 'title': 'Status', ...
3fbb013e8446af0be5013abec86c5503b9343d8e
kaf2html.py
kaf2html.py
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' \ ...
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' ...
Change script to accept non-number versions of sent and para attributes
Change script to accept non-number versions of sent and para attributes The script relied on numeric sent and para attributes. The code was changed to also accept non-numeric sent and para attributes. In some cases, the sent and para attributes returned by tools are not numeric.
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' \ ...
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' ...
<commit_before>"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/ht...
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' ...
"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/html; ' \ ...
<commit_before>"""Script to generate an HTML page from a KAF file that shows the text contents including line numbers. """ from bs4 import BeautifulSoup with open('data/minnenijd.kaf') as f: xml_doc = BeautifulSoup(f) output_html = ['<html><head>', '<meta http-equiv="Content-Type" content="text/ht...
220f0199c97494e7b8a8ec913cf5251206f15550
project/scripts/dates.py
project/scripts/dates.py
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timedelta import pytz def get_start_times(date): """ date: an epoch integer representing the date...
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timezone, timedelta import pytz def get_start_times(date): """ date: an epoch integer representin...
Fix date to epoch converter to timestamp at exactly midnight
Fix date to epoch converter to timestamp at exactly midnight
Python
apache-2.0
googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timedelta import pytz def get_start_times(date): """ date: an epoch integer representing the date...
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timezone, timedelta import pytz def get_start_times(date): """ date: an epoch integer representin...
<commit_before># For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timedelta import pytz def get_start_times(date): """ date: an epoch integer repres...
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timezone, timedelta import pytz def get_start_times(date): """ date: an epoch integer representin...
# For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timedelta import pytz def get_start_times(date): """ date: an epoch integer representing the date...
<commit_before># For now I am assuming the investment date will be returned from the db # as a string yyyy-mm-dd, representing the day the trend was purchased in UTC time #!/usr/bin/env python3 from datetime import datetime, timedelta import pytz def get_start_times(date): """ date: an epoch integer repres...
fae7cd0a40d338f82404522a282b71a1cb4d84b1
runtests.py
runtests.py
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', INSTALLED_APPS=( 'django.contrib.contenttyp...
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', STATIC_URL='/static/', INSTALLED_APPS=( ...
Fix STATIC_URL (for Django 1.5 admin tests)
Fix STATIC_URL (for Django 1.5 admin tests)
Python
bsd-3-clause
luzfcb/django-simple-history,luzfcb/django-simple-history,pombredanne/django-simple-history,emergence/django-simple-history,treyhunner/django-simple-history,pombredanne/django-simple-history,treyhunner/django-simple-history,emergence/django-simple-history
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', INSTALLED_APPS=( 'django.contrib.contenttyp...
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', STATIC_URL='/static/', INSTALLED_APPS=( ...
<commit_before>#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', INSTALLED_APPS=( 'django.con...
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', STATIC_URL='/static/', INSTALLED_APPS=( ...
#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', INSTALLED_APPS=( 'django.contrib.contenttyp...
<commit_before>#!/usr/bin/env python import sys from os.path import abspath, dirname from django.conf import settings sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( ROOT_URLCONF='simple_history.tests.urls', INSTALLED_APPS=( 'django.con...