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
ad78de49c8ed0f8c766d3098ceaa07dd60ddc865
constants.py
constants.py
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNERS = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_O...
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNER = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_OW...
Change name of constant to match code.
Change name of constant to match code. Fix #11.
Python
mit
lifted-studios/AutoCopyright,lifted-studios/AutoCopyright
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNERS = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_O...
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNER = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_OW...
<commit_before># # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNERS = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright mes...
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNER = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_OW...
# # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNERS = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright message' SETTING_O...
<commit_before># # Copyright (c) 2012 by Lifted Studios. All Rights Reserved. # ERROR_MISSING_OWNERS = 'Default copyright owner not set. Please edit the settings file to correct this.' LINE_ENDING_UNIX = 'Unix' LINE_ENDING_WINDOWS = 'Windows' PLUGIN_NAME = 'AutoCopyright' SETTING_COPYRIGHT_MESSAGE = 'copyright mes...
d2ce7b64c14e18ca395a2d1dc03123ae8a5735b7
ab_game.py
ab_game.py
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
Enable min_priority again - seems to be working?
Enable min_priority again - seems to be working?
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
<commit_before>#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(...
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(base_game.curre...
<commit_before>#!/usr/bin/python import board import pente_exceptions from ab_state import * CAPTURE_SCORE_BASE = 120 ** 3 class ABGame(): """ This class acts as a bridge between the AlphaBeta code and my code """ def __init__(self, base_game): s = self.current_state = ABState() s.set_state(...
76600b63940da9322673ce6cd436129a7d65f10d
scripts/ec2/terminate_all.py
scripts/ec2/terminate_all.py
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
Add import statement for os
Add import statement for os
Python
bsd-2-clause
manpen/thrill,manpen/thrill,manpen/thrill,manpen/thrill,manpen/thrill
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
<commit_before>#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the L...
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the LICENSE file. ##...
<commit_before>#!/usr/bin/env python ########################################################################## # scripts/ec2/terminate_all.py # # Part of Project Thrill - http://project-thrill.org # # Copyright (C) 2015 Timo Bingmann <[email protected]> # # All rights reserved. Published under the BSD-2 license in the L...
eaa1eb7050a917320091e45d6deed6f6146373d8
dash_core_components/__init__.py
dash_core_components/__init__.py
import os as _os import dash as _dash import sys as _sys from version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys.m...
import os as _os import dash as _dash import sys as _sys from .version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys....
Extend import statement to support Python 3
Extend import statement to support Python 3
Python
mit
plotly/dash-core-components
import os as _os import dash as _dash import sys as _sys from version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys.m...
import os as _os import dash as _dash import sys as _sys from .version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys....
<commit_before>import os as _os import dash as _dash import sys as _sys from version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_...
import os as _os import dash as _dash import sys as _sys from .version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys....
import os as _os import dash as _dash import sys as _sys from version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_module = _sys.m...
<commit_before>import os as _os import dash as _dash import sys as _sys from version import __version__ _current_path = _os.path.dirname(_os.path.abspath(__file__)) _components = _dash.development.component_loader.load_components( _os.path.join(_current_path, 'metadata.json'), 'dash_core_components' ) _this_...
2d64c01daebd918c3e6196b1eb3ad62f105c56e0
django_google_charts/charts.py
django_google_charts/charts.py
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, bases, attrs) if klass.chart_slug: CHARTS...
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe from django.utils.encoding import python_2_unicode_compatible CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, ...
Make this Python 2.x compatible
Make this Python 2.x compatible
Python
mit
danpalmer/django-google-charts,danpalmer/django-google-charts
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, bases, attrs) if klass.chart_slug: CHARTS...
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe from django.utils.encoding import python_2_unicode_compatible CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, ...
<commit_before>import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, bases, attrs) if klass.chart_slug: ...
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe from django.utils.encoding import python_2_unicode_compatible CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, ...
import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, bases, attrs) if klass.chart_slug: CHARTS...
<commit_before>import six import json from django.core.urlresolvers import reverse from django.utils.html import format_html, mark_safe CHARTS = {} class ChartMeta(type): def __new__(cls, name, bases, attrs): klass = super(ChartMeta, cls).__new__(cls, name, bases, attrs) if klass.chart_slug: ...
947f8d3855ef5a71bbb8726aa73d0694cb8a3416
dm_control/suite/common/__init__.py
dm_control/suite/common/__init__.py
# Copyright 2017 The dm_control Authors. # # 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 i...
# Copyright 2017 The dm_control Authors. # # 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 i...
Prepend assets dict keys with './' to match filenames in XML
Prepend assets dict keys with './' to match filenames in XML PiperOrigin-RevId: 189602660
Python
apache-2.0
deepmind/dm_control
# Copyright 2017 The dm_control Authors. # # 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 i...
# Copyright 2017 The dm_control Authors. # # 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 i...
<commit_before># Copyright 2017 The dm_control Authors. # # 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...
# Copyright 2017 The dm_control Authors. # # 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 i...
# Copyright 2017 The dm_control Authors. # # 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 i...
<commit_before># Copyright 2017 The dm_control Authors. # # 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...
0bcecfdf33f42f85bb9a8e32e79686a41fb5226a
django_validator/exceptions.py
django_validator/exceptions.py
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.ValidationError): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.status_code = statu...
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.APIException): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.code = code se...
Fix Validation import error in older DRF.
Fix Validation import error in older DRF.
Python
mit
romain-li/django-validator,romain-li/django-validator
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.ValidationError): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.status_code = statu...
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.APIException): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.code = code se...
<commit_before>from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.ValidationError): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.stat...
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.APIException): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.code = code se...
from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.ValidationError): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.status_code = statu...
<commit_before>from rest_framework import status import rest_framework.exceptions class ValidationError(rest_framework.exceptions.ValidationError): code = '' def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST): super(ValidationError, self).__init__(detail) self.stat...
3cdca61da41fcd2480edcdfa35c47c5b13070ab5
tests/test_misc.py
tests/test_misc.py
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
Fix charts() test (now there are only 174 charts)
Fix charts() test (now there are only 174 charts)
Python
mit
guoguo12/billboard-charts,guoguo12/billboard-charts
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
<commit_before># -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connec...
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
# -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connection.""" ...
<commit_before># -*- coding: utf-8 -*- import billboard import unittest from nose.tools import raises from requests.exceptions import ConnectionError import six class MiscTest(unittest.TestCase): @raises(ConnectionError) def testTimeout(self): """Checks that using a very small timeout prevents connec...
e484ea554011c032c8152dc5aed65cdceaa1ba01
dm_env/_metadata.py
dm_env/_metadata.py
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
Update semantic version to 1.0
Update semantic version to 1.0 PiperOrigin-RevId: 258839428 Change-Id: Idac6ba6750e5fa2c53de0d9a56554d99cc8dcbb8
Python
apache-2.0
deepmind/dm_env
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
<commit_before># pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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/licen...
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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...
<commit_before># pylint: disable=g-bad-file-header # Copyright 2019 The dm_env Authors. 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/licen...
56c0d2ea610aae35edfef2d242e0c4ca6a236a4d
crypto.py
crypto.py
from Crypto.Cipher import AES import os from file_io import * from settings import * def get_cipher(iv, text): try: key = read_file(KEY_FILE, 'rt').strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_ciphe...
from Crypto.Cipher import AES import os from settings import * def get_cipher(iv, text): try: with open(KEY_FILE, 'rt') as f: key = f.read().strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_...
Replace file_io usage with open
Replace file_io usage with open
Python
unlicense
kvikshaug/pwkeeper
from Crypto.Cipher import AES import os from file_io import * from settings import * def get_cipher(iv, text): try: key = read_file(KEY_FILE, 'rt').strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_ciphe...
from Crypto.Cipher import AES import os from settings import * def get_cipher(iv, text): try: with open(KEY_FILE, 'rt') as f: key = f.read().strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_...
<commit_before>from Crypto.Cipher import AES import os from file_io import * from settings import * def get_cipher(iv, text): try: key = read_file(KEY_FILE, 'rt').strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) ...
from Crypto.Cipher import AES import os from settings import * def get_cipher(iv, text): try: with open(KEY_FILE, 'rt') as f: key = f.read().strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_...
from Crypto.Cipher import AES import os from file_io import * from settings import * def get_cipher(iv, text): try: key = read_file(KEY_FILE, 'rt').strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) c = get_ciphe...
<commit_before>from Crypto.Cipher import AES import os from file_io import * from settings import * def get_cipher(iv, text): try: key = read_file(KEY_FILE, 'rt').strip() except IOError: key = input(text) return AES.new(key, AES.MODE_CBC, iv) def encrypt(bytes): iv = os.urandom(16) ...
f925c2378b731add65b57ebd1a66392166d558b9
pyQuantuccia/setup.py
pyQuantuccia/setup.py
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['src/pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
Correct the name of the file.
Correct the name of the file.
Python
bsd-3-clause
jwg4/pyQuantuccia,jwg4/pyQuantuccia
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] ) Correct the name of the file.
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['src/pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
<commit_before>import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] ) <commit_msg>Correct the name of the file.<commit_after>
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['src/pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] )
import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] ) Correct the name of the file.import setuptools qu_ext = setuptools.Extension( 'quantuccia...
<commit_before>import setuptools qu_ext = setuptools.Extension( 'quantuccia', sources=['pyQuantuccia.cpp'] ) setuptools.setup( name='pyQuantuccia', version='0.1.0', packages=['pyQuantuccia'], ext_modules=[qu_ext] ) <commit_msg>Correct the name of the file.<commit_after>import setuptools qu_ex...
51bb7408f8a479a75200ec1b01a05cb65982d060
config.py
config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True class Develo...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("MYDICTIONARY_SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True ...
Change environment variable names and add placeholders
Change environment variable names and add placeholders
Python
mit
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True class Develo...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("MYDICTIONARY_SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True ...
<commit_before>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("MYDICTIONARY_SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True ...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True class Develo...
<commit_before>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration with values used in all configurations. """ SERVER_NAME = "localhost:5000" SECRET_KEY = os.getenv("SECRET_KEY") SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_TRACK_MODIFICATIONS = True...
a19a5dfacd09ffebe8fdc2f5edcbf1aec6d73751
tests/django_settings.py
tests/django_settings.py
# Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined in .travis...
# Minimum settings that are needed to run django test suite import os import secrets import tempfile SECRET_KEY = secrets.token_hex() if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined...
Use a different django secret key for each test run.
Use a different django secret key for each test run.
Python
bsd-3-clause
smn/django-dirtyfields,romgar/django-dirtyfields
# Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined in .travis...
# Minimum settings that are needed to run django test suite import os import secrets import tempfile SECRET_KEY = secrets.token_hex() if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined...
<commit_before># Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same def...
# Minimum settings that are needed to run django test suite import os import secrets import tempfile SECRET_KEY = secrets.token_hex() if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined...
# Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same defined in .travis...
<commit_before># Minimum settings that are needed to run django test suite import os import tempfile SECRET_KEY = 'WE DONT CARE ABOUT IT' if "postgresql" in os.getenv("TOX_ENV_NAME", ""): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', # Should be the same def...
0f688ac6b05caada0f2b72e5e6bc484c1b45ac04
fmriprep/workflows/bold/__init__.py
fmriprep/workflows/bold/__init__.py
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
Update bold init for imports
Update bold init for imports
Python
bsd-3-clause
poldracklab/fmriprep,oesteban/preprocessing-workflow,poldracklab/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,poldracklab/fmriprep,oesteban/fmriprep,oesteban/preprocessing-workflow,oesteban/fmriprep,poldracklab/fmriprep
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
<commit_before># -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.b...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.base .. automodu...
<commit_before># -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # pylint: disable=unused-import """ Pre-processing fMRI - BOLD signal workflows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automodule:: fmriprep.workflows.bold.b...
7f93f3a8b8fb703588b7f1b5fee9856d0a597636
tests/test_serialize.py
tests/test_serialize.py
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
Add test make sure rtpevent inside rtp parses
Add test make sure rtpevent inside rtp parses
Python
apache-2.0
vodik/aiortp
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
<commit_before>from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): as...
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): assert pack_rtp(p...
<commit_before>from hypothesis import given from hypothesis.strategies import binary from aiortp.packet import rtphdr, pack_rtp, parse_rtp from aiortp.packet import rtpevent, pack_rtpevent, parse_rtpevent @given(binary(min_size=rtphdr.size, max_size=rtphdr.size + 1000)) def test_rtp_decode_inverts_encode(pkt): as...
c371d3663fc1de7d99246d97ec054c7da865e4cf
testshop/test_models.py
testshop/test_models.py
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress, BillingAddress # noqa from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(se...
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(self): super(Addre...
Address model testing coverage: 100%
Address model testing coverage: 100%
Python
bsd-3-clause
jrief/django-shop,khchine5/django-shop,khchine5/django-shop,rfleschenberg/django-shop,rfleschenberg/django-shop,divio/django-shop,khchine5/django-shop,awesto/django-shop,awesto/django-shop,jrief/django-shop,rfleschenberg/django-shop,nimbis/django-shop,nimbis/django-shop,rfleschenberg/django-shop,khchine5/django-shop,aw...
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress, BillingAddress # noqa from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(se...
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(self): super(Addre...
<commit_before># -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress, BillingAddress # noqa from shop.models.defaults.customer import Customer class AddressTest(TestCase): ...
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(self): super(Addre...
# -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress, BillingAddress # noqa from shop.models.defaults.customer import Customer class AddressTest(TestCase): def setUp(se...
<commit_before># -*- coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth import get_user_model from shop.models.defaults.address import ShippingAddress, BillingAddress # noqa from shop.models.defaults.customer import Customer class AddressTest(TestCase): ...
32a093a95bb1b94fba3ea36dc10b6e81086d9a5b
dbaas/dbaas_services/analyzing/tasks/analyze.py
dbaas/dbaas_services/analyzing/tasks/analyze.py
# -*- coding: utf-8 -*- from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService @app.task @only_one(key="analyze_databases_service_...
# -*- coding: utf-8 -*- import logging from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService from dbaas_services.analyzing.exceptio...
Check if service is working
Check if service is working
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
# -*- coding: utf-8 -*- from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService @app.task @only_one(key="analyze_databases_service_...
# -*- coding: utf-8 -*- import logging from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService from dbaas_services.analyzing.exceptio...
<commit_before># -*- coding: utf-8 -*- from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService @app.task @only_one(key="analyze_dat...
# -*- coding: utf-8 -*- import logging from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService from dbaas_services.analyzing.exceptio...
# -*- coding: utf-8 -*- from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService @app.task @only_one(key="analyze_databases_service_...
<commit_before># -*- coding: utf-8 -*- from dbaas.celery import app from account.models import User from logical.models import Database from util.decorators import only_one from simple_audit.models import AuditRequest from dbaas_services.analyzing.integration import AnalyzeService @app.task @only_one(key="analyze_dat...
8fc6ba648347a48065ab2fb26f940dc92919feeb
bands/__init__.py
bands/__init__.py
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
Implement new python-based menu format
Implement new python-based menu format
Python
agpl-3.0
magfest/bands,magfest/bands
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
<commit_before>import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root']...
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root'], 'static')) te...
<commit_before>import shutil from cherrypy.lib.static import serve_file from uber.common import * from panels import * from bands._version import __version__ from bands.config import * from bands.models import * import bands.model_checks import bands.automated_emails static_overrides(join(bands_config['module_root']...
ba649e4bce746f19712f127ac15e77345a5ec837
parkings/api/public/parking_area_statistics.py
parkings/api/public/parking_area_statistics.py
from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import Parking, ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers.SerializerMethodField() def get_...
from django.db.models import Case, Count, When from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers...
Improve parking area statistics performance
Improve parking area statistics performance
Python
mit
tuomas777/parkkihubi
from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import Parking, ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers.SerializerMethodField() def get_...
from django.db.models import Case, Count, When from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers...
<commit_before>from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import Parking, ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers.SerializerMethodField(...
from django.db.models import Case, Count, When from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers...
from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import Parking, ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers.SerializerMethodField() def get_...
<commit_before>from django.utils import timezone from rest_framework import serializers, viewsets from parkings.models import Parking, ParkingArea from ..common import WGS84InBBoxFilter class ParkingAreaStatisticsSerializer(serializers.ModelSerializer): current_parking_count = serializers.SerializerMethodField(...
23df1ed7a02f3c120a0d5075b27cc92f3e1b6429
src/chime_dash/app/components/navbar.py
src/chime_dash/app/components/navbar.py
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
Fix nav at top of window. Use dark theme to distinguish from content.
Fix nav at top of window. Use dark theme to distinguish from content.
Python
mit
CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
<commit_before>"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.bas...
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.base import Compon...
<commit_before>"""Navigation bar view """ from typing import List import dash_html_components as html import dash_bootstrap_components as dbc from dash.development.base_component import ComponentMeta from penn_chime.defaults import Constants from penn_chime.settings import DEFAULTS from chime_dash.app.components.bas...
7ec28d5b8be40b505a20a4670857278ad41f760b
src/puzzle/puzzlepedia/puzzlepedia.py
src/puzzle/puzzlepedia/puzzlepedia.py
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint) interact_with(result) return result def interact_with(puzzle): _init() display.display(puzzl...
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None, threshold=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint, threshold=threshold) interact_with(result) return result def interact_with(puzzl...
Allow "threshold" to be specified during parse(...).
Allow "threshold" to be specified during parse(...).
Python
mit
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint) interact_with(result) return result def interact_with(puzzle): _init() display.display(puzzl...
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None, threshold=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint, threshold=threshold) interact_with(result) return result def interact_with(puzzl...
<commit_before>from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint) interact_with(result) return result def interact_with(puzzle): _init() displa...
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None, threshold=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint, threshold=threshold) interact_with(result) return result def interact_with(puzzl...
from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint) interact_with(result) return result def interact_with(puzzle): _init() display.display(puzzl...
<commit_before>from IPython import display from puzzle.puzzlepedia import prod_config, puzzle, puzzle_widget _INITIALIZED = False def parse(source, hint=None): _init() result = puzzle.Puzzle('first stage', source, hint=hint) interact_with(result) return result def interact_with(puzzle): _init() displa...
2c1cbdfcb28595e945e6069501652f0869733549
bids/reports/report.py
bids/reports/report.py
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. """ def __init__(self, layout): ...
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from __future__ import print_function from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. ...
Add future import for Py2.
Add future import for Py2.
Python
mit
INCF/pybids
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. """ def __init__(self, layout): ...
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from __future__ import print_function from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. ...
<commit_before>"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. """ def __init__(se...
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from __future__ import print_function from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. ...
"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. """ def __init__(self, layout): ...
<commit_before>"""Generate publication-quality data acquisition methods section from BIDS dataset. """ from collections import Counter from bids.reports import utils class BIDSReport(object): """ Generates publication-quality data acquisition methods section from BIDS dataset. """ def __init__(se...
bdacb243867e1d6cef3573fec383e9069e11523e
eche/tests/test_step1_raed_print.py
eche/tests/test_step1_raed_print.py
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
Add list with list test.
Add list with list test.
Python
mit
skk/eche
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
<commit_before>import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark...
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark.parametrize("t...
<commit_before>import pytest from eche.reader import read_str from eche.printer import print_str import math @pytest.mark.parametrize("test_input", [ '1', '-1', '0', str(math.pi), str(math.e) ]) def test_numbers(test_input): assert print_str(read_str(test_input)) == test_input @pytest.mark...
420a786fb9c5bf476e2c444b181161e75ca801f8
glitter_news/admin.py
glitter_news/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
Move is_sticky field into post's advanced options
Move is_sticky field into post's advanced options For #13
Python
bsd-2-clause
blancltd/glitter-news
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Ca...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Category, LatestN...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib import admin from adminsortable.admin import SortableAdmin from glitter import block_admin from glitter.admin import GlitterAdminMixin, GlitterPagePublishedFilter from .models import Ca...
221134b178bc4106bc39c7eb3120395c27473963
json2csv_business.py
json2csv_business.py
import json def main(): # print the header of output csv file print 'business_id,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['busines...
import json def main(): # print the header of output csv file print 'business_id,name,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['bu...
Add business name to csv output
Add business name to csv output
Python
mit
aysent/yelp-photo-explorer
import json def main(): # print the header of output csv file print 'business_id,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['busines...
import json def main(): # print the header of output csv file print 'business_id,name,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['bu...
<commit_before>import json def main(): # print the header of output csv file print 'business_id,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = inpu...
import json def main(): # print the header of output csv file print 'business_id,name,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['bu...
import json def main(): # print the header of output csv file print 'business_id,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = input_json['busines...
<commit_before>import json def main(): # print the header of output csv file print 'business_id,city,latitude,longitude' # for each entry in input json file print one csv row for line in open("data/yelp_academic_dataset_business.json"): input_json = json.loads(line) business_id = inpu...
49d4d3fd5d040efb99bc487b9648e354a39df20d
test/testlib/schema.py
test/testlib/schema.py
import testbase schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for k in kw.keys() ...
import testbase from testlib import testing schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for...
Apply default cascade rules for firebird self-ref ForeignKeys.
Apply default cascade rules for firebird self-ref ForeignKeys. git-svn-id: 655ff90ec95d1eeadb1ee4bb9db742a3c015d499@3959 8cd8332f-0806-0410-a4b6-96f4b9520244
Python
mit
obeattie/sqlalchemy,obeattie/sqlalchemy,obeattie/sqlalchemy
import testbase schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for k in kw.keys() ...
import testbase from testlib import testing schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for...
<commit_before>import testbase schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for k in...
import testbase from testlib import testing schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for...
import testbase schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for k in kw.keys() ...
<commit_before>import testbase schema = None __all__ = 'Table', 'Column', table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" global schema if schema is None: from sqlalchemy import schema test_opts = dict([(k,kw.pop(k)) for k in...
af3a1ed1b1114ab85b16a687e0ba29e787c0722b
bookmarks/bookmarks.py
bookmarks/bookmarks.py
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' ))
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) @app.route('/', methods=['GET']) def front_page(): return 'Hello, World!'
Add route '/' with Hello World
Add route '/' with Hello World
Python
apache-2.0
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) Add route '/' with Hello World
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) @app.route('/', methods=['GET']) def front_page(): return 'Hello, World!'
<commit_before>from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) <commit_msg>Add route '/' with Hello World<commit_after>
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) @app.route('/', methods=['GET']) def front_page(): return 'Hello, World!'
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) Add route '/' with Hello Worldfrom flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( ...
<commit_before>from flask import Flask app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', USERNAME='admin', PASSWORD='default' )) <commit_msg>Add route '/' with Hello World<commit_after>from flask import Flask app = Flask(__name__) app.config.from_...
a74a0c0f2066008586114fd5b0908f67c11c0334
sipa/blueprints/documents.py
sipa/blueprints/documents.py
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort from os.path import isfile, realpath, join bp_documents = Blueprint('documents', __name__) @bp_documents.route('/images/<image>') def show_image(image): print("Trying to show image {}".format(image)) filename = realpath("content/images/{}...
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort, send_from_directory, current_app from os.path import isfile, realpath, join from flask.views import View import os bp_documents = Blueprint('documents', __name__) class StaticFiles(View): def __init__(self, directory): self.directory...
Implement generic static file view
Implement generic static file view Use the send_from_directory helper function from Flask which is used to implement the static endpoint of Flask for our custom files
Python
mit
MarauderXtreme/sipa,agdsn/sipa,lukasjuhrich/sipa,agdsn/sipa,MarauderXtreme/sipa,lukasjuhrich/sipa,agdsn/sipa,agdsn/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,MarauderXtreme/sipa
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort from os.path import isfile, realpath, join bp_documents = Blueprint('documents', __name__) @bp_documents.route('/images/<image>') def show_image(image): print("Trying to show image {}".format(image)) filename = realpath("content/images/{}...
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort, send_from_directory, current_app from os.path import isfile, realpath, join from flask.views import View import os bp_documents = Blueprint('documents', __name__) class StaticFiles(View): def __init__(self, directory): self.directory...
<commit_before># -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort from os.path import isfile, realpath, join bp_documents = Blueprint('documents', __name__) @bp_documents.route('/images/<image>') def show_image(image): print("Trying to show image {}".format(image)) filename = realpath("co...
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort, send_from_directory, current_app from os.path import isfile, realpath, join from flask.views import View import os bp_documents = Blueprint('documents', __name__) class StaticFiles(View): def __init__(self, directory): self.directory...
# -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort from os.path import isfile, realpath, join bp_documents = Blueprint('documents', __name__) @bp_documents.route('/images/<image>') def show_image(image): print("Trying to show image {}".format(image)) filename = realpath("content/images/{}...
<commit_before># -*- coding: utf-8 -*- from flask import Blueprint, send_file, abort from os.path import isfile, realpath, join bp_documents = Blueprint('documents', __name__) @bp_documents.route('/images/<image>') def show_image(image): print("Trying to show image {}".format(image)) filename = realpath("co...
ce13dd0fd049782531e939da9a5238a6f5493b8d
mpld3/test_plots/test_date_ticks.py
mpld3/test_plots/test_date_ticks.py
"""Plot to test custom date axis tick locations and labels""" from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): times = [datetime(2013, 12, i) for i in range(1, 20)] ticks = [times[0], times[1], times[2], times[6], times[-2], times[-1]] labels = [t.strftime("%Y-...
""" Plot to test custom date axis tick locations and labels NOTE (@vladh): We may see different behaviour in mpld3 vs d3 for the y axis, because we never specified exactly how we want the y axis formatted. This is ok. """ from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): ...
Add note to misleading test
Add note to misleading test
Python
bsd-3-clause
jakevdp/mpld3,mpld3/mpld3,jakevdp/mpld3,mpld3/mpld3
"""Plot to test custom date axis tick locations and labels""" from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): times = [datetime(2013, 12, i) for i in range(1, 20)] ticks = [times[0], times[1], times[2], times[6], times[-2], times[-1]] labels = [t.strftime("%Y-...
""" Plot to test custom date axis tick locations and labels NOTE (@vladh): We may see different behaviour in mpld3 vs d3 for the y axis, because we never specified exactly how we want the y axis formatted. This is ok. """ from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): ...
<commit_before>"""Plot to test custom date axis tick locations and labels""" from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): times = [datetime(2013, 12, i) for i in range(1, 20)] ticks = [times[0], times[1], times[2], times[6], times[-2], times[-1]] labels = [...
""" Plot to test custom date axis tick locations and labels NOTE (@vladh): We may see different behaviour in mpld3 vs d3 for the y axis, because we never specified exactly how we want the y axis formatted. This is ok. """ from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): ...
"""Plot to test custom date axis tick locations and labels""" from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): times = [datetime(2013, 12, i) for i in range(1, 20)] ticks = [times[0], times[1], times[2], times[6], times[-2], times[-1]] labels = [t.strftime("%Y-...
<commit_before>"""Plot to test custom date axis tick locations and labels""" from datetime import datetime import matplotlib.pyplot as plt import mpld3 def create_plot(): times = [datetime(2013, 12, i) for i in range(1, 20)] ticks = [times[0], times[1], times[2], times[6], times[-2], times[-1]] labels = [...
c029905a8ffad7fcf7ef70591dd0ad3f72365c09
wagtail_uplift/wagtail_hooks.py
wagtail_uplift/wagtail_hooks.py
from django.conf.urls import url from django.utils.html import format_html from django.contrib.staticfiles.templatetags.staticfiles import static from wagtail.core import hooks from wagtail.admin.menu import MenuItem @hooks.register('insert_global_admin_css') def global_admin_css(): html = '<link rel="stylesheet"...
import django from django.conf.urls import url from django.utils.html import format_html if django.VERSION[0] == "2": from django.contrib.staticfiles.templatetags.staticfiles import static elif django.VERSION[0] == "3": from django.templatetags.static import static from wagtail.core import hooks from wagtail.ad...
Update static import to support Django 3
Update static import to support Django 3
Python
bsd-3-clause
l1f7/wagtail_uplift,l1f7/wagtail_uplift,l1f7/wagtail_uplift
from django.conf.urls import url from django.utils.html import format_html from django.contrib.staticfiles.templatetags.staticfiles import static from wagtail.core import hooks from wagtail.admin.menu import MenuItem @hooks.register('insert_global_admin_css') def global_admin_css(): html = '<link rel="stylesheet"...
import django from django.conf.urls import url from django.utils.html import format_html if django.VERSION[0] == "2": from django.contrib.staticfiles.templatetags.staticfiles import static elif django.VERSION[0] == "3": from django.templatetags.static import static from wagtail.core import hooks from wagtail.ad...
<commit_before>from django.conf.urls import url from django.utils.html import format_html from django.contrib.staticfiles.templatetags.staticfiles import static from wagtail.core import hooks from wagtail.admin.menu import MenuItem @hooks.register('insert_global_admin_css') def global_admin_css(): html = '<link r...
import django from django.conf.urls import url from django.utils.html import format_html if django.VERSION[0] == "2": from django.contrib.staticfiles.templatetags.staticfiles import static elif django.VERSION[0] == "3": from django.templatetags.static import static from wagtail.core import hooks from wagtail.ad...
from django.conf.urls import url from django.utils.html import format_html from django.contrib.staticfiles.templatetags.staticfiles import static from wagtail.core import hooks from wagtail.admin.menu import MenuItem @hooks.register('insert_global_admin_css') def global_admin_css(): html = '<link rel="stylesheet"...
<commit_before>from django.conf.urls import url from django.utils.html import format_html from django.contrib.staticfiles.templatetags.staticfiles import static from wagtail.core import hooks from wagtail.admin.menu import MenuItem @hooks.register('insert_global_admin_css') def global_admin_css(): html = '<link r...
5657dd437af76ecccdb671a1a09a4c6f9874aab0
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
Check if epages6 settings are configured
Check if epages6 settings are configured
Python
mit
ePages-rnd/SublimeLinter-contrib-perl-epages6
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Li...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Linter): """...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jonas Gratz # Copyright (c) 2015 Jonas Gratz # # License: MIT # """This module exports the PerlEpages6 plugin class.""" import sublime from SublimeLinter.lint import Linter, util class PerlEpages6(Li...
46ba4f97d3ad2d673e8f3acb86d8c75905bc319f
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
Move attribute to "selector" in defaults from "syntax", as suggested by SublimeLinter
Move attribute to "selector" in defaults from "syntax", as suggested by SublimeLinter
Python
mit
benedfit/SublimeLinter-contrib-pug-lint,benedfit/SublimeLinter-contrib-jade-lint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinte...
4bf01c350744e8cbf00750ec85d825f22e06dd29
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
Handle new sublime syntax: bash
Handle new sublime syntax: bash
Python
mit
SublimeLinter/SublimeLinter-shellcheck
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [SC2046] -:230:7...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """ This module exports the Shellcheck plugin class. Example output with --format gcc -:230:7: warning: Quote this to prevent word splitting. [...
1fec4c084e4d96d66245aaf90882047857724b90
functional_tests/pages/user_bets.py
functional_tests/pages/user_bets.py
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('div.match') ...
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('tr.match') ...
Fix ft for my bets page
Fix ft for my bets page
Python
mit
asyler/betleague,asyler/betleague,asyler/betleague
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('div.match') ...
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('tr.match') ...
<commit_before>class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector...
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('tr.match') ...
class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector('div.match') ...
<commit_before>class UserBetsPage(object): def __init__(self, test): self.test = test self.url = self.test.live_server_url + '/my_bets' def go(self): self.test.browser.get(self.url) def get_matches(self): return self.test.browser \ .find_elements_by_css_selector...
d8ae3ab5f6baf0ee965548f8df37e1a4b331a8aa
install_all_addons.py
install_all_addons.py
import bpy # install and activate `emboss plane` bpy.ops.wm.addon_install(filepath='emboss_plane.py') bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate` bpy.ops.wm.addon_install(filepath='name_plate.py') bpy.ops.wm.addon_enable(module='name_plate') # save user preferences bpy.ops.wm.s...
import bpy import os # get current directory current_dir = os.getcwd() # install and activate `emboss plane` emboss_plane_filepath = os.path.join(current_dir, 'emboss_plane.py') bpy.ops.wm.addon_install(filepath=emboss_plane_filepath) bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate`...
Update install script with full file paths
Update install script with full file paths This is needed to make the script run on Windows. The `os` package is used to make sure it will run under any OS.
Python
mit
TactileUniverse/3D-Printed-Galaxy-Software
import bpy # install and activate `emboss plane` bpy.ops.wm.addon_install(filepath='emboss_plane.py') bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate` bpy.ops.wm.addon_install(filepath='name_plate.py') bpy.ops.wm.addon_enable(module='name_plate') # save user preferences bpy.ops.wm.s...
import bpy import os # get current directory current_dir = os.getcwd() # install and activate `emboss plane` emboss_plane_filepath = os.path.join(current_dir, 'emboss_plane.py') bpy.ops.wm.addon_install(filepath=emboss_plane_filepath) bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate`...
<commit_before>import bpy # install and activate `emboss plane` bpy.ops.wm.addon_install(filepath='emboss_plane.py') bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate` bpy.ops.wm.addon_install(filepath='name_plate.py') bpy.ops.wm.addon_enable(module='name_plate') # save user preferenc...
import bpy import os # get current directory current_dir = os.getcwd() # install and activate `emboss plane` emboss_plane_filepath = os.path.join(current_dir, 'emboss_plane.py') bpy.ops.wm.addon_install(filepath=emboss_plane_filepath) bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate`...
import bpy # install and activate `emboss plane` bpy.ops.wm.addon_install(filepath='emboss_plane.py') bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate` bpy.ops.wm.addon_install(filepath='name_plate.py') bpy.ops.wm.addon_enable(module='name_plate') # save user preferences bpy.ops.wm.s...
<commit_before>import bpy # install and activate `emboss plane` bpy.ops.wm.addon_install(filepath='emboss_plane.py') bpy.ops.wm.addon_enable(module='emboss_plane') # install and activate `name plate` bpy.ops.wm.addon_install(filepath='name_plate.py') bpy.ops.wm.addon_enable(module='name_plate') # save user preferenc...
d0136d302524ff08e33ebdbab835b499aeeb2c2c
kboard/board/models.py
kboard/board/models.py
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
Fix 'get_absolute_url()' refer to url
Fix 'get_absolute_url()' refer to url
Python
mit
hyesun03/k-board,guswnsxodlf/k-board,hyesun03/k-board,darjeeling/k-board,kboard/kboard,cjh5414/kboard,cjh5414/kboard,guswnsxodlf/k-board,hyesun03/k-board,cjh5414/kboard,guswnsxodlf/k-board,kboard/kboard,kboard/kboard
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
<commit_before>from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) ...
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) slug = models.T...
<commit_before>from django.db import models from django.core.urlresolvers import reverse from django_summernote import models as summer_model from django_summernote import fields as summer_fields class Board(models.Model): def get_absolute_url(self): return reverse('board:post_list', args=[self.id]) ...
4f4ba39bf2d270ef1cb34afe1a5ebe7816d448b7
manage.py
manage.py
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True) actio...
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True, hostn...
Set hostname to '' so the server binds to all interfaces.
Set hostname to '' so the server binds to all interfaces.
Python
mit
kurtraschke/cadors-parse,kurtraschke/cadors-parse
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True) actio...
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True, hostn...
<commit_before>#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloa...
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True, hostn...
#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=True) actio...
<commit_before>#!/usr/bin/env python from werkzeug import script def make_app(): from cadorsfeed.application import CadorsFeed return CadorsFeed() def make_shell(): from cadorsfeed import utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloa...
d4dd0fe826fb187b40e807417092118b40f23517
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Use production settings as default
Use production settings as default
Python
bsd-3-clause
andrijan/csgostats,andrijan/csgostats,andrijan/csgostats,andrijan/csgostats
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Use production settings as default
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Use production settings as default<com...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Use production settings as default#!/usr/bin/env python import os...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Use production settings as default<com...
7668ba1b467e2c48719fc6e3a53932ec1bfb9d18
manage.py
manage.py
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal print 'cdecimal' if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from ...
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from django.core.managemen...
Remove the cdecimal debug print
Remove the cdecimal debug print
Python
bsd-2-clause
cmptrgeekken/evething,madcowfred/evething,cmptrgeekken/evething,Gillingham/evething,Gillingham/evething,Gillingham/evething,cmptrgeekken/evething,madcowfred/evething,madcowfred/evething,madcowfred/evething,Gillingham/evething,cmptrgeekken/evething,cmptrgeekken/evething
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal print 'cdecimal' if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from ...
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from django.core.managemen...
<commit_before>#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal print 'cdecimal' if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settin...
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from django.core.managemen...
#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal print 'cdecimal' if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") from ...
<commit_before>#!/usr/bin/env python import os import sys # try using cdecimal for faster Decimal type try: import cdecimal except ImportError: pass else: sys.modules["decimal"] = cdecimal print 'cdecimal' if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settin...
399430076227f42f5d168c5b2264933c32f4b52a
lib/ansible/release.py
lib/ansible/release.py
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
Update ansible version number to 2.8.0.dev0
Update ansible version number to 2.8.0.dev0
Python
mit
thaim/ansible,thaim/ansible
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
<commit_before># (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
# (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
<commit_before># (c) 2012-2014, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
4a1976c6aa21f519825c527c795e60dffa7f46db
githubsetupircnotifications.py
githubsetupircnotifications.py
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
Print message if signing in failed
Print message if signing in failed
Python
mit
kragniz/github-setup-irc-notifications
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
<commit_before>""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parse...
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.parse_args() ...
<commit_before>""" github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parse...
21b1206da978434e388e43a5258b9c0f09fc0e1e
tumblr/data/cleanup.py
tumblr/data/cleanup.py
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: del lines[x...
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: lines[x] = ...
Add suffixes to all gifs
Add suffixes to all gifs
Python
mit
albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/reaction-pics
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: del lines[x...
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: lines[x] = ...
<commit_before>import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: ...
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: lines[x] = ...
import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: del lines[x...
<commit_before>import os def remove_image_from_csvs(image): for csv in os.listdir("."): if csv[-4:] != ".csv": continue with open(csv, "r") as h: lines = h.readlines() modified = False for x in range(len(lines)): if image in lines[x]: ...
ecd43e2d3679759d2ee389b35752cb8db18c5b22
microdrop/microdrop.py
microdrop/microdrop.py
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
Change dir to allow script to be run from anywhere
Change dir to allow script to be run from anywhere
Python
bsd-3-clause
wheeler-microfluidics/microdrop
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
<commit_before>""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distribu...
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distributed in the hope...
<commit_before>""" Copyright 2011 Ryan Fobel This file is part of Microdrop. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Foundation, either version 3 of the License, or (at your option) any later version. Microdrop is distribu...
78ec7d5336eb65ff845da7ea9f93d34b402f5a0f
ironic/drivers/drac.py
ironic/drivers/drac.py
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
Add the PXE VendorPassthru interface to PXEDracDriver
Add the PXE VendorPassthru interface to PXEDracDriver Without the PXE VendorPassthru interface to expose the "pass_deploy_info" method in the vendor_passthru endpoint of the API the DRAC it can't continue the deployment after the ramdisk is booted. Closes-Bug: #1379705 Change-Id: I21042cbb95a486742abfcb430471d01cd73b...
Python
apache-2.0
NaohiroTamura/ironic,SauloAislan/ironic,openstack/ironic,pshchelo/ironic,naototty/vagrant-lxc-ironic,ramineni/myironic,bacaldwell/ironic,openstack/ironic,rackerlabs/ironic,froyobin/ironic,rdo-management/ironic,pshchelo/ironic,ionutbalutoiu/ironic,Tan0/ironic,hpproliant/ironic,supermari0/ironic,dims/ironic,naototty/vagr...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
<commit_before># # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
<commit_before># # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
fa20d5b6a9b636fec7fc542cf899bf86c00dd8de
bakery/static_urls.py
bakery/static_urls.py
from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns( "bakery.static_views", url(r"^(.*)$", "serve", { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), )
from django.conf import settings from django.conf.urls import url from bakery.static_views import serve urlpatterns = [ url(r"^(.*)$", serve, { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ]
Upgrade to Django 1.10 style url patterns
Upgrade to Django 1.10 style url patterns
Python
mit
datadesk/django-bakery,stvkas/django-bakery,stvkas/django-bakery,datadesk/django-bakery,datadesk/django-bakery,stvkas/django-bakery
from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns( "bakery.static_views", url(r"^(.*)$", "serve", { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ) Upgrade to Django 1.10 style url pattern...
from django.conf import settings from django.conf.urls import url from bakery.static_views import serve urlpatterns = [ url(r"^(.*)$", serve, { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ]
<commit_before>from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns( "bakery.static_views", url(r"^(.*)$", "serve", { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ) <commit_msg>Upgrade to Dj...
from django.conf import settings from django.conf.urls import url from bakery.static_views import serve urlpatterns = [ url(r"^(.*)$", serve, { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ]
from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns( "bakery.static_views", url(r"^(.*)$", "serve", { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ) Upgrade to Django 1.10 style url pattern...
<commit_before>from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns( "bakery.static_views", url(r"^(.*)$", "serve", { "document_root": settings.BUILD_DIR, 'show_indexes': True, 'default': 'index.html' }), ) <commit_msg>Upgrade to Dj...
8d93082178200834a3df1b09d08cd53073eb07fe
coverage_diff.py
coverage_diff.py
import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) conti...
import os import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
Check that coverage file exists
Check that coverage file exists
Python
apache-2.0
caio2k/RIDE,fingeronthebutton/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,caio2k/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,robotframework/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,caio2k/RIDE
import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) conti...
import os import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
<commit_before>import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
import os import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) conti...
<commit_before>import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
3a1005de48a0883853c632b17220f2331bdc7017
primes.py
primes.py
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
Add tests and a bug fix found by tests.
Add tests and a bug fix found by tests. Since small numbers might have a sqrt == 2 add +1 to the range used for testing.
Python
mit
smillet15/project-euler
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
<commit_before>#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xran...
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xrange to generate ...
<commit_before>#!/usr/bin/env python """ Tools for checking and generating prime numbers. """ import math def is_prime(num): """ Test if a number is prime. """ if num < 2: return False # take advantage of the speedup gained by only checking the sqrt sqrt = int(math.sqrt(num)) # use xran...
e4c5ff6901fe7652c7f76f67189058de76406406
casepro/cases/forms.py
casepro/cases/forms.py
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class PartnerUpdateForm(forms.ModelForm): labels = forms.ModelMultipleChoiceField(label=_("Can Access"), ...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class BasePartnerForm(forms.ModelForm): description = forms.CharField(label=_("Description"), max_length=255, required=False,...
Tweak partner form to use textarea for description
Tweak partner form to use textarea for description
Python
bsd-3-clause
praekelt/casepro,xkmato/casepro,rapidpro/casepro,praekelt/casepro,rapidpro/casepro,rapidpro/casepro,praekelt/casepro,xkmato/casepro
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class PartnerUpdateForm(forms.ModelForm): labels = forms.ModelMultipleChoiceField(label=_("Can Access"), ...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class BasePartnerForm(forms.ModelForm): description = forms.CharField(label=_("Description"), max_length=255, required=False,...
<commit_before>from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class PartnerUpdateForm(forms.ModelForm): labels = forms.ModelMultipleChoiceField(label=_("Can Access"), ...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class BasePartnerForm(forms.ModelForm): description = forms.CharField(label=_("Description"), max_length=255, required=False,...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class PartnerUpdateForm(forms.ModelForm): labels = forms.ModelMultipleChoiceField(label=_("Can Access"), ...
<commit_before>from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from casepro.msgs.models import Label from .models import Partner class PartnerUpdateForm(forms.ModelForm): labels = forms.ModelMultipleChoiceField(label=_("Can Access"), ...
122c833f163aa0ac0a38e91c7b49dca63308db2d
sktracker/tracker/solver/solver.py
sktracker/tracker/solver/solver.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
Fix a bug - tests pass
Fix a bug - tests pass
Python
bsd-3-clause
bnoi/scikit-tracker,bnoi/scikit-tracker,bnoi/scikit-tracker
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
<commit_before> # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- trajs : :cla...
<commit_before> # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from ...trajectories import Trajectories __all__ = [] class AbstractSolver(object): """ Parameters ---------- ...
a75c51594e225fbada37f1be23cf2de581da29a4
keeper/tasks/dashboardbuild.py
keeper/tasks/dashboardbuild.py
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
Fix getting product in build_dashboard task
Fix getting product in build_dashboard task
Python
mit
lsst-sqre/ltd-keeper,lsst-sqre/ltd-keeper
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
<commit_before>from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task...
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task __all__ = ["b...
<commit_before>from __future__ import annotations from typing import TYPE_CHECKING from celery.utils.log import get_task_logger from keeper.celery import celery_app from keeper.models import Product from keeper.services.dashboard import build_dashboard as build_dashboard_svc if TYPE_CHECKING: import celery.task...
faf1535fcc6c743345485cd388be8979cad3dec2
aspen/__main__.py
aspen/__main__.py
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
Support PORT envvar from `python -m aspen`
Support PORT envvar from `python -m aspen`
Python
mit
gratipay/aspen.py,gratipay/aspen.py
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
<commit_before>""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_...
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_ROOT=/path/to/w...
<commit_before>""" python -m aspen =============== Aspen ships with a server (wsgiref.simple_server) that is suitable for development and testing. It can be invoked via: python -m aspen though even for development you'll likely want to specify a project root, so a more likely incantation is: ASPEN_PROJECT_...
c1e6b61b6da9f17f11ce41bbcdaad61fadc075db
serenata_toolbox/datasets/remote.py
serenata_toolbox/datasets/remote.py
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
Make Amazon keys non required
Make Amazon keys non required
Python
mit
datasciencebr/serenata-toolbox
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
<commit_before>import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws...
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws_access_key_id'...
<commit_before>import os from functools import partial import boto3 from decouple import config from serenata_toolbox import log from serenata_toolbox.datasets.contextmanager import status_message class RemoteDatasets: def __init__(self): self.client = None self.credentials = { 'aws...
b202e1cc5e6c5aa65c3ed22ad1e78ec505fa36c4
cmsplugin_rst/forms.py
cmsplugin_rst/forms.py
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
Add "fields" attribute to ModelForm.
Add "fields" attribute to ModelForm.
Python
bsd-3-clause
pakal/cmsplugin-rst,ojii/cmsplugin-rst
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
<commit_before>from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ ...
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ 'rows':...
<commit_before>from cmsplugin_rst.models import RstPluginModel from django import forms help_text = '<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">Reference</a>' class RstPluginForm(forms.ModelForm): body = forms.CharField( widget=forms.Textarea(attrs={ ...
ce241802ec85db638adbf4c81d9002ce5b32a1d4
misc/time_scraper.py
misc/time_scraper.py
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
Remove 'TAS' from games blacklist
Remove 'TAS' from games blacklist
Python
mit
bcongdon/sgdq-collector,bcongdon/sgdq-collector,bcongdon/sgdq-collector
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
<commit_before>from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: seco...
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: second_row = row.fi...
<commit_before>from bs4 import BeautifulSoup import requests import json import sys html = requests.get("http://gamesdonequick.com/schedule").text soup = BeautifulSoup(html, 'html.parser') table = soup.find('tbody') first_rows = table.findAll('tr', attrs={'class': None}) games = list() for row in first_rows: seco...
ecd18d561a795b5de8d77c4de71606924791cf01
K2fov/tests/test_plot.py
K2fov/tests/test_plot.py
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
"""Tests K2fov.plot""" # from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
Simplify plot test for now
Simplify plot test for now
Python
mit
mrtommyb/K2fov,KeplerGO/K2fov
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """ Simplify plot test for now
"""Tests K2fov.plot""" # from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
<commit_before>"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """ <commit_msg>Simplify plot t...
"""Tests K2fov.plot""" # from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """ Simplify plot test for now"""Tests K2fov.p...
<commit_before>"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """ <commit_msg>Simplify plot t...
31ec9a0ae45c42c79f0e2edba3f11fc0578f33c4
orchard/errors/e500.py
orchard/errors/e500.py
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. """ traili...
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import datetime import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. ...
Send mail to admins on all internal server errors.
Send mail to admins on all internal server errors.
Python
mit
BMeu/Orchard,BMeu/Orchard
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. """ traili...
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import datetime import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. ...
<commit_before># -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. ...
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import datetime import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. ...
# -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. """ traili...
<commit_before># -*- coding: utf-8 -*- """ This module sets up the view for handling ``500 Internal Server Error`` errors. """ import flask import flask_classful from orchard.errors import blueprint class Error500View(flask_classful.FlaskView): """ View for ``500 Internal Server Error`` errors. ...
aba13a6b443922dd4f4e97b252c073ab23a223c4
awesomeshop/shop/models/category.py
awesomeshop/shop/models/category.py
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
Make categories easier to request
Make categories easier to request
Python
agpl-3.0
tiramiseb/awesomeshop,tiramiseb/awesomeshop,tiramiseb/awesomeshop,tiramiseb/awesomeshop
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
<commit_before># -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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 ...
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
<commit_before># -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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 ...
b456e982e1cbc902fa1aefaf221b058edb6c778f
backend/uclapi/oauth/app_helpers.py
backend/uclapi/oauth/app_helpers.py
from binascii import hexlify import os def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" for idx, char in enumerate(key): if idx % 15 == 0 and idx != len(key)-1: dashes_key += "-" else: dashes_key += char final = "uc...
from binascii import hexlify import os import textwrap def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" '-'.join(textwrap.wrap(key, 15)) final = "uclapi-user" + dashes_key return final def generate_random_verification_code(): key = hexlify(o...
Clean up verification code logic, as per @jermenkoo's feedback
Clean up verification code logic, as per @jermenkoo's feedback
Python
mit
uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi
from binascii import hexlify import os def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" for idx, char in enumerate(key): if idx % 15 == 0 and idx != len(key)-1: dashes_key += "-" else: dashes_key += char final = "uc...
from binascii import hexlify import os import textwrap def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" '-'.join(textwrap.wrap(key, 15)) final = "uclapi-user" + dashes_key return final def generate_random_verification_code(): key = hexlify(o...
<commit_before>from binascii import hexlify import os def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" for idx, char in enumerate(key): if idx % 15 == 0 and idx != len(key)-1: dashes_key += "-" else: dashes_key += char ...
from binascii import hexlify import os import textwrap def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" '-'.join(textwrap.wrap(key, 15)) final = "uclapi-user" + dashes_key return final def generate_random_verification_code(): key = hexlify(o...
from binascii import hexlify import os def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" for idx, char in enumerate(key): if idx % 15 == 0 and idx != len(key)-1: dashes_key += "-" else: dashes_key += char final = "uc...
<commit_before>from binascii import hexlify import os def generate_user_token(): key = hexlify(os.urandom(30)).decode() dashes_key = "" for idx, char in enumerate(key): if idx % 15 == 0 and idx != len(key)-1: dashes_key += "-" else: dashes_key += char ...
dfdb824eb1327a270e1c167e2ed5e161026858ea
antxetamedia/multimedia/handlers.py
antxetamedia/multimedia/handlers.py
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
Break lowdly on unicode errors
Break lowdly on unicode errors
Python
agpl-3.0
GISAElkartea/antxetamedia,GISAElkartea/antxetamedia,GISAElkartea/antxetamedia
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
<commit_before>from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) ...
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) while bucket...
<commit_before>from boto.s3.connection import S3Connection from boto.s3.bucket import Bucket from boto.exception import S3ResponseError, S3CreateError from django.conf import settings def upload(user, passwd, bucket, metadata, key, fd): conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False) ...
6ae9fa16eece7972b9b5f8e90f3b41a7d00fcabe
solutions/python/array-pair-sum.py
solutions/python/array-pair-sum.py
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
Modify styling to a proper one
Modify styling to a proper one
Python
mit
patrickford/code-problems,caoglish/code-problems,Widea/code-problems,diversedition/code-problems,dwatson3/code-problems,diversedition/code-problems,nacho-gil/code-problems,sisirkoppaka/code-problems,ranveer-git/code-problems,AndrewKishino/code-problems,sisirkoppaka/code-problems,tahoeRobbo/code-problems,diversedition/c...
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
<commit_before>"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], ...
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], arr[j]]) re...
<commit_before>"""solution to the array pair sum problem""" def pair_sum_arrays(k, arr): """returns the array of pairs using an iterative method.""" result = [] for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] + arr[j] == k: result.append([arr[i], ...
918df7244162581fb57f301ccf6a4bf4b96ce541
npc/formatters/__init__.py
npc/formatters/__init__.py
from . import markdown, json
""" Character listing formatters These modules encapsulate the logic needed to create a character listing in various formats. Each module has a single `dump` entry point which accepts, at minimum, the characters to list and where to put them. Other args are available in each linter. """ from . import markdown, json
Add docstring to formatters package
Add docstring to formatters package
Python
mit
aurule/npc,aurule/npc
from . import markdown, json Add docstring to formatters package
""" Character listing formatters These modules encapsulate the logic needed to create a character listing in various formats. Each module has a single `dump` entry point which accepts, at minimum, the characters to list and where to put them. Other args are available in each linter. """ from . import markdown, json
<commit_before>from . import markdown, json <commit_msg>Add docstring to formatters package<commit_after>
""" Character listing formatters These modules encapsulate the logic needed to create a character listing in various formats. Each module has a single `dump` entry point which accepts, at minimum, the characters to list and where to put them. Other args are available in each linter. """ from . import markdown, json
from . import markdown, json Add docstring to formatters package""" Character listing formatters These modules encapsulate the logic needed to create a character listing in various formats. Each module has a single `dump` entry point which accepts, at minimum, the characters to list and where to put them. Other args a...
<commit_before>from . import markdown, json <commit_msg>Add docstring to formatters package<commit_after>""" Character listing formatters These modules encapsulate the logic needed to create a character listing in various formats. Each module has a single `dump` entry point which accepts, at minimum, the characters to...
8a9e58d2170e3f06228cbc0257d41f0c969da957
tangled/website/resources.py
tangled/website/resources.py
from tangled.web import Resource, represent from tangled.site.resources.entry import Entry class Docs(Entry): @represent('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for pr...
from tangled.web import Resource, config from tangled.site.resources.entry import Entry class Docs(Entry): @config('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for prefix, ...
Replace @represent w/ @config throughout
Replace @represent w/ @config throughout New name, same functionality.
Python
mit
TangledWeb/tangled.website
from tangled.web import Resource, represent from tangled.site.resources.entry import Entry class Docs(Entry): @represent('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for pr...
from tangled.web import Resource, config from tangled.site.resources.entry import Entry class Docs(Entry): @config('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for prefix, ...
<commit_before>from tangled.web import Resource, represent from tangled.site.resources.entry import Entry class Docs(Entry): @represent('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = []...
from tangled.web import Resource, config from tangled.site.resources.entry import Entry class Docs(Entry): @config('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for prefix, ...
from tangled.web import Resource, represent from tangled.site.resources.entry import Entry class Docs(Entry): @represent('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = [] for pr...
<commit_before>from tangled.web import Resource, represent from tangled.site.resources.entry import Entry class Docs(Entry): @represent('text/html', template_name='tangled.website:templates/docs.mako') def GET(self): static_dirs = self.app.get_all('static_directory', as_dict=True) links = []...
70c9b92b72edb4612bc05d166c6e1c8539c8c076
opps/article/models.py
opps/article/models.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.core.models.image import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.image.models import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
Change namespace image app, use opps image
Change namespace image app, use opps image
Python
mit
williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.core.models.image import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.image.models import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.core.models.image import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, bl...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.image.models import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.core.models.image import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, blank=True, ...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Article from opps.core.models.image import Image from opps.core.models import Source class Post(Article): images = models.ManyToManyField(Image, null=True, bl...
8764739298b3db76cfb7fba9768502304812a938
scores.py
scores.py
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
Fix bug that didn't return the right leaderboard
Fix bug that didn't return the right leaderboard
Python
mit
radekj/poke-battle,skooda/poke-battle
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
<commit_before>from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, ...
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, key=lambda play...
<commit_before>from nameko.rpc import rpc, RpcProxy from nameko.events import event_handler class ScoreService(object): name = 'score_service' player_rpc = RpcProxy('players_service') @rpc def leaderboard(self): players = self.player_rpc.get_players() sorted_players = sorted(players, ...
6dfddd2502ea3ea2682f6caa8824768987d477f3
facilities/tests/test_pracititioner_models.py
facilities/tests/test_pracititioner_models.py
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
Add tests for inspection reports and cover report templates.
Add tests for inspection reports and cover report templates.
Python
mit
urandu/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
<commit_before>from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityServic...
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityService, ServiceO...
<commit_before>from django.test import TestCase from model_mommy import mommy from ..models import ( PracticeType, Speciality, Qualification, PractitionerQualification, PractitionerContact, PractitionerFacility, Practitioner, ServiceCategory, Option, Service, FacilityServic...
acbbc3b8fa9032ced750136aab656ec84c9a4f50
pastamaker/__init__.py
pastamaker/__init__.py
# -*- encoding: utf-8 -*- # # Copyright © 2018 Red Hat, 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 applica...
Allow to load env from a python file
Allow to load env from a python file
Python
apache-2.0
sileht/pastamaker,sileht/pastamaker,sileht/pastamaker
Allow to load env from a python file
# -*- encoding: utf-8 -*- # # Copyright © 2018 Red Hat, 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 applica...
<commit_before><commit_msg>Allow to load env from a python file<commit_after>
# -*- encoding: utf-8 -*- # # Copyright © 2018 Red Hat, 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 applica...
Allow to load env from a python file# -*- encoding: utf-8 -*- # # Copyright © 2018 Red Hat, 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/LICENS...
<commit_before><commit_msg>Allow to load env from a python file<commit_after># -*- encoding: utf-8 -*- # # Copyright © 2018 Red Hat, 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 # # ...
404477f4414b921d127a6744f60cddad6cbdeca1
scrape.py
scrape.py
import discord import asyncio from tqdm import tqdm from sys import argv script, fileName = argv client = discord.Client() @client.event async def on_ready(): print('Connection successful.') print('ID: ' + client.user.id) print('-----') target = open(fileName, 'w') print(fileName, 'h...
import discord import asyncio from tqdm import tqdm #from sys import argv import argparse parser = argparse.ArgumentParser(description='Discord channel scraper') requiredNamed = parser.add_argument_group('Required arguments:') requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Req...
Change to use argparse to parse arguments
Change to use argparse to parse arguments
Python
mit
suclearnub/discordgrapher
import discord import asyncio from tqdm import tqdm from sys import argv script, fileName = argv client = discord.Client() @client.event async def on_ready(): print('Connection successful.') print('ID: ' + client.user.id) print('-----') target = open(fileName, 'w') print(fileName, 'h...
import discord import asyncio from tqdm import tqdm #from sys import argv import argparse parser = argparse.ArgumentParser(description='Discord channel scraper') requiredNamed = parser.add_argument_group('Required arguments:') requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Req...
<commit_before>import discord import asyncio from tqdm import tqdm from sys import argv script, fileName = argv client = discord.Client() @client.event async def on_ready(): print('Connection successful.') print('ID: ' + client.user.id) print('-----') target = open(fileName, 'w') pri...
import discord import asyncio from tqdm import tqdm #from sys import argv import argparse parser = argparse.ArgumentParser(description='Discord channel scraper') requiredNamed = parser.add_argument_group('Required arguments:') requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Req...
import discord import asyncio from tqdm import tqdm from sys import argv script, fileName = argv client = discord.Client() @client.event async def on_ready(): print('Connection successful.') print('ID: ' + client.user.id) print('-----') target = open(fileName, 'w') print(fileName, 'h...
<commit_before>import discord import asyncio from tqdm import tqdm from sys import argv script, fileName = argv client = discord.Client() @client.event async def on_ready(): print('Connection successful.') print('ID: ' + client.user.id) print('-----') target = open(fileName, 'w') pri...
c1dd4cc4f9fcfdac4734270d6130aff4fca4e4b8
oneflow/base/utils.py
oneflow/base/utils.py
# -*- coding: utf-8 -*- from django.template import RequestContext from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # I just wr...
# -*- coding: utf-8 -*- from django.template import RequestContext, Template from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # ...
Enable 2-pass rendering in html mails with db contents (one django for variables, one markdown for auto HTML/txt output).
Enable 2-pass rendering in html mails with db contents (one django for variables, one markdown for auto HTML/txt output).
Python
agpl-3.0
1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow
# -*- coding: utf-8 -*- from django.template import RequestContext from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # I just wr...
# -*- coding: utf-8 -*- from django.template import RequestContext, Template from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # ...
<commit_before># -*- coding: utf-8 -*- from django.template import RequestContext from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! ...
# -*- coding: utf-8 -*- from django.template import RequestContext, Template from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # ...
# -*- coding: utf-8 -*- from django.template import RequestContext from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! # I just wr...
<commit_before># -*- coding: utf-8 -*- from django.template import RequestContext from sparks.django import mail from models import EmailContent def send_email_with_db_content(request, email_template_name, user, **kwargs): def post_send(user, email_template_name): # TODO: implement me for real! ...
1de12c334d79a5dd79ba0b0c053fa0b1287c3ad5
argonauts/templatetags/argonauts.py
argonauts/templatetags/argonauts.py
from __future__ import absolute_import # `setlocale` is not threadsafe import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONA...
from __future__ import absolute_import from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONArgonautEncoder register = template.Library() @register.filter def json(a): """ Outp...
Remove unnecessary setlocale call in templatetags
Remove unnecessary setlocale call in templatetags
Python
bsd-2-clause
fusionbox/django-argonauts
from __future__ import absolute_import # `setlocale` is not threadsafe import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONA...
from __future__ import absolute_import from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONArgonautEncoder register = template.Library() @register.filter def json(a): """ Outp...
<commit_before>from __future__ import absolute_import # `setlocale` is not threadsafe import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serialize...
from __future__ import absolute_import from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONArgonautEncoder register = template.Library() @register.filter def json(a): """ Outp...
from __future__ import absolute_import # `setlocale` is not threadsafe import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serializers import JSONA...
<commit_before>from __future__ import absolute_import # `setlocale` is not threadsafe import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') from json import dumps as json_dumps from django import template from django.conf import settings from django.utils.safestring import mark_safe from argonauts.serialize...
32d9f627e9d592a693e7cc3e778463ebb6dd796d
busstops/management/commands/correct_operator_regions.py
busstops/management/commands/correct_operator_regions.py
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions) if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', o...
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions): if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', ...
Fix rough command for correcting operator regions
Fix rough command for correcting operator regions
Python
mpl-2.0
jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk,stev-0/bustimes.org.uk,stev-0/bustimes.org.uk,stev-0/bustimes.org.uk,stev-0/bustimes.org.uk,jclgoodwin/bustimes.org.uk
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions) if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', o...
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions): if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', ...
<commit_before>from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions) if bool(regions) and operator.region not in regions: if len(regions) == 1: pr...
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions): if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', ...
from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions) if bool(regions) and operator.region not in regions: if len(regions) == 1: print 'moving', o...
<commit_before>from django.core.management.base import BaseCommand from busstops.models import Operator, Region class Command(BaseCommand): @staticmethod def maybe_move_operator(operator, regions) if bool(regions) and operator.region not in regions: if len(regions) == 1: pr...
3498ca5117a35d61a5b539067b7ac743497cf8c7
tests/test_helpers.py
tests/test_helpers.py
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
Make environ context helper test more accurate
Make environ context helper test more accurate
Python
bsd-3-clause
mdgart/sentrylogs
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
<commit_before>""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] asser...
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] assert sys.argv == o...
<commit_before>""" Tests for our tests helpers 8-} """ import os import sys from helpers import ArgvContext, EnvironContext def test_argv_context(): """ Test if ArgvContext sets the right argvs and resets to the old correctly """ old = sys.argv new = ["Alice", "Bob", "Chris", "Daisy"] asser...
6b2ac1d6be094eddc6a940eb1dafa32e483a6b7e
ereuse_devicehub/resources/device/peripheral/settings.py
ereuse_devicehub/resources/device/peripheral/settings.py
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': {'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Terminal', 'HUB', 'S...
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': { 'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Termina...
Add new types of peripherals
Add new types of peripherals
Python
agpl-3.0
eReuse/DeviceHub,eReuse/DeviceHub
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': {'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Terminal', 'HUB', 'S...
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': { 'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Termina...
<commit_before>import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': {'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Termi...
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': { 'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Termina...
import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': {'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Terminal', 'HUB', 'S...
<commit_before>import copy from ereuse_devicehub.resources.device.schema import Device from ereuse_devicehub.resources.device.settings import DeviceSubSettings class Peripheral(Device): type = { 'type': 'string', 'allowed': {'Router', 'Switch', 'Printer', 'Scanner', 'MultifunctionPrinter', 'Termi...
a8112a8ee3723d5ae097998efc7c43bd27cbee95
engineer/processors.py
engineer/processors.py
# coding=utf-8 import logging import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACHE_DIR / settings...
# coding=utf-8 import logging import platform import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACH...
Handle LESS preprocessor errors more gracefully.
Handle LESS preprocessor errors more gracefully.
Python
mit
tylerbutler/engineer,tylerbutler/engineer,tylerbutler/engineer
# coding=utf-8 import logging import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACHE_DIR / settings...
# coding=utf-8 import logging import platform import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACH...
<commit_before># coding=utf-8 import logging import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACHE...
# coding=utf-8 import logging import platform import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACH...
# coding=utf-8 import logging import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACHE_DIR / settings...
<commit_before># coding=utf-8 import logging import subprocess from path import path from engineer.conf import settings __author__ = '[email protected]' logger = logging.getLogger(__name__) # Helper function to preprocess LESS files on demand def preprocess_less(file): input_file = path(settings.OUTPUT_CACHE...
70f4c55d760552829a86b30baa6d6eac3f6dc47f
billy/bin/commands/loaddistricts.py
billy/bin/commands/loaddistricts.py
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
Use division_id in place of bounary_id
Use division_id in place of bounary_id
Python
bsd-3-clause
loandy/billy,openstates/billy,openstates/billy,sunlightlabs/billy,sunlightlabs/billy,openstates/billy,mileswwatkins/billy,sunlightlabs/billy,mileswwatkins/billy,loandy/billy,loandy/billy,mileswwatkins/billy
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
<commit_before>import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): se...
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): self.add_argument...
<commit_before>import os import logging import unicodecsv from billy.core import settings, db from billy.bin.commands import BaseCommand logger = logging.getLogger('billy') class LoadDistricts(BaseCommand): name = 'loaddistricts' help = 'Load in the Open States districts' def add_args(self): se...
7c438b64cf5e3a0accac201b28c1f74e031a4c34
fabfile.py
fabfile.py
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
Make env.path to /var/praekelt/<PROJECT> an absolute path.
Make env.path to /var/praekelt/<PROJECT> an absolute path.
Python
bsd-3-clause
praekelt/go-rts-zambia
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
<commit_before>from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.p...
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.path = os.path.j...
<commit_before>from fabric.api import cd, sudo, env import os expected_vars = [ 'PROJECT', ] for var in expected_vars: if var not in os.environ: raise Exception('Please specify %s environment variable' % ( var,)) PROJECT = os.environ['PROJECT'] USER = os.environ.get('USER', 'jmbo') env.p...
8c870071f95d8f42a0614de9db88d1f72e1c1672
api/users/serializers.py
api/users/serializers.py
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) links = LinksFie...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() given_name = ser.CharField() middle_name = ser.CharField(source='mid...
Add fields to user serializer
Add fields to user serializer
Python
apache-2.0
mattclark/osf.io,adlius/osf.io,KAsante95/osf.io,zamattiac/osf.io,GageGaskins/osf.io,laurenrevere/osf.io,danielneis/osf.io,reinaH/osf.io,reinaH/osf.io,HalcyonChimera/osf.io,billyhunt/osf.io,jmcarp/osf.io,kch8qx/osf.io,ckc6cz/osf.io,barbour-em/osf.io,CenterForOpenScience/osf.io,Nesiehr/osf.io,SSJohns/osf.io,barbour-em/os...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) links = LinksFie...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() given_name = ser.CharField() middle_name = ser.CharField(source='mid...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) l...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() given_name = ser.CharField() middle_name = ser.CharField(source='mid...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) links = LinksFie...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link class UserSerializer(JSONAPISerializer): id = ser.CharField(read_only=True, source='_id') fullname = ser.CharField() date_registered = ser.DateTimeField(read_only=True) l...
25061826bb3316d0fb25cfae0e5d36a0f329f803
bayesian_jobs/handlers/clean_postgres.py
bayesian_jobs/handlers/clean_postgres.py
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
Fix exception when task result is null
Fix exception when task result is null
Python
apache-2.0
fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
<commit_before>from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 whil...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 while True: ...
<commit_before>from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') start = 0 whil...
47bb8e983dad168451d65c0032f5568357a8d359
battlesnake/plugins/imc2/triggers.py
battlesnake/plugins/imc2/triggers.py
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
Adjust IMC2 trigger regex to handle multiple colons correctly.
Adjust IMC2 trigger regex to handle multiple colons correctly.
Python
bsd-3-clause
gtaylor/btmux_battlesnake
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
<commit_before>import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IM...
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IMC2 channel acti...
<commit_before>import re from battlesnake.core.triggers import TriggerTable from battlesnake.core.triggers import Trigger from battlesnake.plugins.imc2 import imc2 from battlesnake.plugins.imc2.channel_map import MUX_TO_IMC2_CHANNEL_MAP class ChannelMessageTrigger(Trigger): """ Tries to identify potential IM...
99e1b98540c9c4105e4b0e1638a7856436cd31ad
beastling/clocks/prior.py
beastling/clocks/prior.py
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): super().__init__(c...
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): try: s...
Fix super call for python2
Fix super call for python2
Python
bsd-2-clause
lmaurits/BEASTling
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): super().__init__(c...
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): try: s...
<commit_before>import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): sup...
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): try: s...
import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): super().__init__(c...
<commit_before>import sys import xml.etree.ElementTree as ET from ..distributions import Distribution from .baseclock import BaseClock from .strict import StrictClock class RatePriorClock (BaseClock): # Class stub for putting priors on clock rates def __init__(self, clock_config, global_config): sup...
f6ddb5b76265d7597568d6169ed877e04c565f4a
games/managers.py
games/managers.py
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True)
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True).order_by('uploaded_at')
Order screenshots by ascending upload time in the front-end
Order screenshots by ascending upload time in the front-end So that it's easy to order them intentionally. :) ... Until we come up with a better ordering solution, with weights or something.
Python
agpl-3.0
lutris/website,Turupawn/website,lutris/website,Turupawn/website,Turupawn/website,lutris/website,Turupawn/website,lutris/website
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True) Order screenshots by ascending upload time in the front-end So that it's easy to order them intentionally. :) ... Until we come up with a better ordering solution...
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True).order_by('uploaded_at')
<commit_before>from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True) <commit_msg>Order screenshots by ascending upload time in the front-end So that it's easy to order them intentionally. :) ... Until we come up with...
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True).order_by('uploaded_at')
from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True) Order screenshots by ascending upload time in the front-end So that it's easy to order them intentionally. :) ... Until we come up with a better ordering solution...
<commit_before>from django.db.models import Manager class ScreenshotManager(Manager): def published(self): return self.get_query_set().filter(published=True) <commit_msg>Order screenshots by ascending upload time in the front-end So that it's easy to order them intentionally. :) ... Until we come up with...
8f3484020ba44d3ddfc721671601b63248c4063e
server.py
server.py
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
Change default port to 8080
Change default port to 8080
Python
mit
jasontbradshaw/multivid,jasontbradshaw/multivid
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
<commit_before>#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(fil...
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(filename): ret...
<commit_before>#!/usr/bin/env python import os import bottle import multivid # where static files are kept STATIC_FILES_ROOT = os.path.abspath("static") @bottle.route("/") def index(): return bottle.static_file("index.html", root=STATIC_FILES_ROOT) @bottle.route('/static/<filename:path>') def serve_static(fil...
f2482b7395a5d22fb0b627fff767a57db45e662b
server.py
server.py
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.py", "r") adjectives = [line.rstrip() for line in adjec...
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.txt", "r") adjectives = [line.rstrip() for line in adje...
Fix adjectives filename in serer.py
Fix adjectives filename in serer.py
Python
mit
ollien/Screenshot-Uploader,ollien/Screenshot-Uploader
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.py", "r") adjectives = [line.rstrip() for line in adjec...
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.txt", "r") adjectives = [line.rstrip() for line in adje...
<commit_before>import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.py", "r") adjectives = [line.rstrip() fo...
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.txt", "r") adjectives = [line.rstrip() for line in adje...
import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.py", "r") adjectives = [line.rstrip() for line in adjec...
<commit_before>import cherrypy import cgi from configReader import ConfigReader import os.path import hashlib from time import time configReader = ConfigReader(name = "serverConfig.txt") keys = configReader.getKeys() location = keys['location'] adjectivesFile = open("adjectives.py", "r") adjectives = [line.rstrip() fo...
ab69aaf5fecf429c99201db4cbcdab47c1afdd46
server.py
server.py
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
Add Functionality for HTTP requests
Add Functionality for HTTP requests
Python
mit
nbeck90/network_tools
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
<commit_before>import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_s...
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_socket.accept() ...
<commit_before>import socket def server(): server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(10) print "listening..." try: while True: conn, addr = server_s...
30008019f47f4077469ad12cb2a3e203fba24527
server.py
server.py
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
Add to log db connection url
Add to log db connection url
Python
apache-2.0
jiss-software/jiss-file-service,jiss-software/jiss-file-service,jiss-software/jiss-file-service
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
<commit_before>import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', ...
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', filename='%s...
<commit_before>import tornado.ioloop import tornado.web import logging import motor from settings import routing from tornado.options import options import os if not os.path.exists(options.log_dir): os.makedirs(options.log_dir) logging.basicConfig( format='%(asctime)s [%(name)s] %(levelname)s: %(message)s', ...
448f1201a36de8ef41dadbb63cbea874dd7d5878
wechatpy/utils.py
wechatpy/utils.py
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
Fix test error on Python 3
Fix test error on Python 3
Python
mit
cloverstd/wechatpy,wechatpy/wechatpy,EaseCloud/wechatpy,mruse/wechatpy,cysnake4713/wechatpy,cysnake4713/wechatpy,zhaoqz/wechatpy,navcat/wechatpy,zaihui/wechatpy,Luckyseal/wechatpy,messense/wechatpy,chenjiancan/wechatpy,chenjiancan/wechatpy,Luckyseal/wechatpy,tdautc19841202/wechatpy,navcat/wechatpy,Dufy/wechatpy,jxtech/...
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
<commit_before>from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(to...
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(token, signature,...
<commit_before>from __future__ import absolute_import, unicode_literals import hashlib import six class ObjectDict(dict): def __getattr__(self, key): if key in self: return self[key] return None def __setattr__(self, key, value): self[key] = value def check_signature(to...
915c59f1e8e1919555d6b3c8de5fbc34cd56e414
tingbot/platform_specific/__init__.py
tingbot/platform_specific/__init__.py
import platform, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): de...
import sys, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): def inn...
Use sys.platform to look at the current platform
Use sys.platform to look at the current platform Avoids a uname system call
Python
bsd-2-clause
furbrain/tingbot-python
import platform, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): de...
import sys, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): def inn...
<commit_before>import platform, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return...
import sys, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): def inn...
import platform, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return_value): de...
<commit_before>import platform, os def is_running_on_tingbot(): """ Return True if running as a tingbot. """ # TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps. return 'TB_RUN_ON_LCD' in os.environ def no_op(*args, **kwargs): pass def no_op_returning(return...
76d9ce8638ad7e5e124a9f647f174c2a3adbc426
src/zeit/cms/generation/evolve14.py
src/zeit/cms/generation/evolve14.py
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, _ in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtility(pr...
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, service in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtil...
Remove services and jobs from ZODB, too.
ZON-3514: Remove services and jobs from ZODB, too.
Python
bsd-3-clause
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, _ in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtility(pr...
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, service in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtil...
<commit_before>from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, _ in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unreg...
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, service in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtil...
from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, _ in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unregisterUtility(pr...
<commit_before>from lovely.remotetask.interfaces import ITaskService import zeit.cms.generation import zeit.cms.generation.install import zope.component def update(root): site_manager = zope.component.getSiteManager() for name, _ in site_manager.getUtilitiesFor(ITaskService): done = site_manager.unreg...
e9cca0d736cd388d4834e81ab6bf38ded6625b3d
pynmea2/types/proprietary/grm.py
pynmea2/types/proprietary/grm.py
# Garmin from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, manufacturer, d...
# Garmin from decimal import Decimal from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def...
Add decimal types to Garmin PGRME fields.
Add decimal types to Garmin PGRME fields.
Python
mit
silentquasar/pynmea2,Knio/pynmea2
# Garmin from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, manufacturer, d...
# Garmin from decimal import Decimal from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def...
<commit_before># Garmin from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, ...
# Garmin from decimal import Decimal from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def...
# Garmin from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, manufacturer, d...
<commit_before># Garmin from ... import nmea class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, ...
1ce0d9898fc31f08bbf5765b3a687eaa8067a465
flaskext/flask_scss.py
flaskext/flask_scss.py
from .scss import Scss
from .scss import Scss from warnings import warn warn(DeprecationWarning('Deprecated import method. ' 'Please use:\n ' 'from flask.ext.scss import Scss'), stacklevel=2)
Raise a DeprecationWarning when using pre-Flask-0.8 import scheme
Raise a DeprecationWarning when using pre-Flask-0.8 import scheme
Python
mit
bcarlin/flask-scss
from .scss import Scss Raise a DeprecationWarning when using pre-Flask-0.8 import scheme
from .scss import Scss from warnings import warn warn(DeprecationWarning('Deprecated import method. ' 'Please use:\n ' 'from flask.ext.scss import Scss'), stacklevel=2)
<commit_before>from .scss import Scss <commit_msg>Raise a DeprecationWarning when using pre-Flask-0.8 import scheme<commit_after>
from .scss import Scss from warnings import warn warn(DeprecationWarning('Deprecated import method. ' 'Please use:\n ' 'from flask.ext.scss import Scss'), stacklevel=2)
from .scss import Scss Raise a DeprecationWarning when using pre-Flask-0.8 import schemefrom .scss import Scss from warnings import warn warn(DeprecationWarning('Deprecated import method. ' 'Please use:\n ' 'from flask.ext.scss import Scss'), stacklevel=2)
<commit_before>from .scss import Scss <commit_msg>Raise a DeprecationWarning when using pre-Flask-0.8 import scheme<commit_after>from .scss import Scss from warnings import warn warn(DeprecationWarning('Deprecated import method. ' 'Please use:\n ' 'from flask.ext.scss i...
40642464aa4d21cb1710f9197bc3456467ed22a8
b2b_demo/views/basket.py
b2b_demo/views/basket.py
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.core.models import Address from shoop.front.views.ba...
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.front.views.basket import DefaultBasketView from sh...
Use MutableAddress instead of Address
Use MutableAddress instead of Address
Python
agpl-3.0
shoopio/shoop-gifter-demo,shoopio/shoop-gifter-demo,shoopio/shoop-gifter-demo
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.core.models import Address from shoop.front.views.ba...
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.front.views.basket import DefaultBasketView from sh...
<commit_before># This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.core.models import Address from shoop...
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.front.views.basket import DefaultBasketView from sh...
# This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.core.models import Address from shoop.front.views.ba...
<commit_before># This file is part of Shoop Gifter Demo. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from shoop.core.models import Address from shoop...
5fc467745ffc637e73cdf4dfb4a37b55c581434a
stanford/bin/send-email.py
stanford/bin/send-email.py
#!/usr/bin/env python from email.mime.text import MIMEText from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): with open('configuration/stanford/bin/email_params.txt', 'rt') as fin: with open('email.txt', 'wt') as fout: for line in fin: ...
#!/usr/bin/env python from email.mime.text import MIMEText import os from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): email_params_file = 'configuration-secure/jenkins/cut-release-branch/email_params.txt' email_params_file = os.environ.get('CONFIGURATION_EMAIL_PAR...
Use the existing version of params from secrets
Use the existing version of params from secrets This way we don't need to add them manually!
Python
agpl-3.0
Stanford-Online/configuration,Stanford-Online/configuration,Stanford-Online/configuration,Stanford-Online/configuration,Stanford-Online/configuration
#!/usr/bin/env python from email.mime.text import MIMEText from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): with open('configuration/stanford/bin/email_params.txt', 'rt') as fin: with open('email.txt', 'wt') as fout: for line in fin: ...
#!/usr/bin/env python from email.mime.text import MIMEText import os from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): email_params_file = 'configuration-secure/jenkins/cut-release-branch/email_params.txt' email_params_file = os.environ.get('CONFIGURATION_EMAIL_PAR...
<commit_before>#!/usr/bin/env python from email.mime.text import MIMEText from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): with open('configuration/stanford/bin/email_params.txt', 'rt') as fin: with open('email.txt', 'wt') as fout: for line in fin:...
#!/usr/bin/env python from email.mime.text import MIMEText import os from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): email_params_file = 'configuration-secure/jenkins/cut-release-branch/email_params.txt' email_params_file = os.environ.get('CONFIGURATION_EMAIL_PAR...
#!/usr/bin/env python from email.mime.text import MIMEText from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): with open('configuration/stanford/bin/email_params.txt', 'rt') as fin: with open('email.txt', 'wt') as fout: for line in fin: ...
<commit_before>#!/usr/bin/env python from email.mime.text import MIMEText from subprocess import call import sys def send(recipient, sender, sender_name, subject, body): with open('configuration/stanford/bin/email_params.txt', 'rt') as fin: with open('email.txt', 'wt') as fout: for line in fin:...
828844ddb6a19ea15c920043f41ba09eb815c597
django_rq/templatetags/django_rq.py
django_rq/templatetags/django_rq.py
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' utc_time = time.replace(tzinfo=timezone.utc) to_zone = timezone.get_default_...
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' if not time: return None utc_time = time.replace(tzinfo=timezo...
Fix issue displaying deferred queue
Fix issue displaying deferred queue
Python
mit
ui/django-rq,ui/django-rq,1024inc/django-rq,1024inc/django-rq
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' utc_time = time.replace(tzinfo=timezone.utc) to_zone = timezone.get_default_...
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' if not time: return None utc_time = time.replace(tzinfo=timezo...
<commit_before>from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' utc_time = time.replace(tzinfo=timezone.utc) to_zone = timezo...
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' if not time: return None utc_time = time.replace(tzinfo=timezo...
from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' utc_time = time.replace(tzinfo=timezone.utc) to_zone = timezone.get_default_...
<commit_before>from django import template from django.utils import timezone register = template.Library() @register.filter def to_localtime(time): ''' A function to convert naive datetime to localtime base on settings ''' utc_time = time.replace(tzinfo=timezone.utc) to_zone = timezo...
bb9fc566677e92d5ad6bf08af62b610c6cdddbff
pipeline/compute_rpp/compute_rpp.py
pipeline/compute_rpp/compute_rpp.py
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
Add some verbose to know if we process things
Add some verbose to know if we process things
Python
mit
clemaitre58/power-profile,clemaitre58/power-profile,glemaitre/power-profile,glemaitre/power-profile
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
<commit_before>import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can cr...
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can create a list of ...
<commit_before>import sys import os import numpy as np from skcycling.utils import load_power_from_fit from skcycling.power_profile import Rpp # The first input argument corresponding to the data path data_path = sys.argv[1] # The second input argument is the storage directory storage_path = sys.argv[2] # We can cr...
5e412494e09d845dcb08529bd9c436f52cdda91b
studygroups/migrations/0034_create_facilitators_group.py
studygroups/migrations/0034_create_facilitators_group.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
Change data migration to work even if facilitator group already exists
Change data migration to work even if facilitator group already exists
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): ...
a5f2df3a540ac99dea73bc7d1d3c29f70fb13c60
tympeg/streamsaver.py
tympeg/streamsaver.py
import subprocess from os import path, mkdir from tympeg.util import renameFile import platform import signal import sys class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (millisec...
import subprocess from os import path, mkdir from tympeg.util import renameFile class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (milliseconds must be integer) self.probes...
Clean up imports after expirements with signals for quitting
Clean up imports after expirements with signals for quitting
Python
mit
taishengy/tympeg
import subprocess from os import path, mkdir from tympeg.util import renameFile import platform import signal import sys class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (millisec...
import subprocess from os import path, mkdir from tympeg.util import renameFile class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (milliseconds must be integer) self.probes...
<commit_before>import subprocess from os import path, mkdir from tympeg.util import renameFile import platform import signal import sys class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default ...
import subprocess from os import path, mkdir from tympeg.util import renameFile class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (milliseconds must be integer) self.probes...
import subprocess from os import path, mkdir from tympeg.util import renameFile import platform import signal import sys class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default value (millisec...
<commit_before>import subprocess from os import path, mkdir from tympeg.util import renameFile import platform import signal import sys class StreamSaver: def __init__(self, input_stream, output_file_path_ts, verbosity=24): self.file_writer = None self.analyzeduration = 5000000 # ffmpeg default ...
74bb8764fbeb65cb4a5b67597f3af4e8c2773794
dataportal/replay/core.py
dataportal/replay/core.py
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
Add helper function to save state
ENH: Add helper function to save state Sanitizes the Atom.__getstate() function for any blacklisted Atom members that are unimportant for state saving or non-JSON-serializable
Python
bsd-3-clause
ericdill/datamuxer,NSLS-II/dataportal,danielballan/datamuxer,NSLS-II/dataportal,ericdill/databroker,ericdill/databroker,ericdill/datamuxer,danielballan/datamuxer,danielballan/dataportal,tacaswell/dataportal,tacaswell/dataportal,NSLS-II/datamuxer,danielballan/dataportal
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
<commit_before>"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writabl...
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writable=True) tog...
<commit_before>"""Module for Enaml widgets that are generally useful""" from enaml.widgets.api import PushButton, Timer from atom.api import Typed, observe, Event from enaml.core.declarative import d_ from enaml.layout.api import (grid, align) class ProgrammaticButton(PushButton): clicked = d_(Event(bool), writabl...
330cdc00e7b0f7cf18d208ea67499f22c82c9ad5
lowfat/tests_models.py
lowfat/tests_models.py
from django.test import TestCase from .models import fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqual(fix_url...
from django.test import TestCase from .models import Claimant, fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqu...
Add test for Claimant slug field
Add test for Claimant slug field
Python
bsd-3-clause
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
from django.test import TestCase from .models import fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqual(fix_url...
from django.test import TestCase from .models import Claimant, fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqu...
<commit_before>from django.test import TestCase from .models import fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.asse...
from django.test import TestCase from .models import Claimant, fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqu...
from django.test import TestCase from .models import fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.assertEqual(fix_url...
<commit_before>from django.test import TestCase from .models import fix_url class FixURLTest(TestCase): def test_none(self): url = None expected_url = None self.assertEqual(fix_url(url), expected_url) def test_blank(self): url = "" expected_url = "" self.asse...
db30c55c9949db63ffdee604f58130d33ce7c922
cumulusci/core/keychain/__init__.py
cumulusci/core/keychain/__init__.py
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
Use __all__ to shut up Flake8
Use __all__ to shut up Flake8
Python
bsd-3-clause
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
<commit_before># IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import...
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
# IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import ( BaseEncr...
<commit_before># IMPORT ORDER MATTERS! # inherit from BaseConfig from cumulusci.core.keychain.BaseProjectKeychain import BaseProjectKeychain from cumulusci.core.keychain.BaseProjectKeychain import DEFAULT_CONNECTED_APP # inherit from BaseProjectKeychain from cumulusci.core.keychain.BaseEncryptedProjectKeychain import...
963164d60bf9295233cf8050c6499a500f7c4ce7
benchmarks/bench_skan.py
benchmarks/bench_skan.py
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
Use benchmark directory to load skeleton
Use benchmark directory to load skeleton
Python
bsd-3-clause
jni/skan
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
<commit_before>import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() ...
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() time.append(t1 ...
<commit_before>import os from contextlib import contextmanager from collections import OrderedDict from time import process_time import numpy as np from skan import csr rundir = os.path.dirname(__file__) @contextmanager def timer(): time = [] t0 = process_time() yield time t1 = process_time() ...
d3073f7d42f670a46018d82b52909618a3cc6619
lib/python2.5/aquilon/server/commands/add_manager_manager.py
lib/python2.5/aquilon/server/commands/add_manager_manager.py
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
Fix to allow dynamic ip parameters to work correctly.
add_manager: Fix to allow dynamic ip parameters to work correctly. Addresses-Issue: Jira/AQUILONAQD-163 When the dynamic ip parameters were added to the commands beyond add_host that took --ip, the required_parameters array for add_manager_manager was not updated. The command thought that the --ip parameter was requi...
Python
apache-2.0
quattor/aquilon,stdweird/aquilon,guillaume-philippon/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,stdweird/aquilon,quattor/aquilon
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
<commit_before>#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker impo...
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker import BrokerComman...
<commit_before>#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Contains a wrapper for `aq add manager --manager`.""" from aquilon.server.broker impo...