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
e2fb7715d10a9a02216fa5668f482952bbb60310
readthedocs/donate/forms.py
readthedocs/donate/forms.py
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
Add receipt_email to payment processing on donations
Add receipt_email to payment processing on donations
Python
mit
SteveViss/readthedocs.org,rtfd/readthedocs.org,KamranMackey/readthedocs.org,safwanrahman/readthedocs.org,wijerasa/readthedocs.org,laplaceliu/readthedocs.org,jerel/readthedocs.org,pombredanne/readthedocs.org,fujita-shintaro/readthedocs.org,VishvajitP/readthedocs.org,CedarLogic/readthedocs.org,atsuyim/readthedocs.org,rav...
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
<commit_before>import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fie...
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fields = ( ...
<commit_before>import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ import stripe from .models import Supporter log = logging.getLogger(__name__) class SupporterForm(forms.ModelForm): class Meta: model = Supporter fie...
b9bd647cfd8def947838cb35c266b3b9ac855201
test_apriori.py
test_apriori.py
import unittest from itertools import chain from apriori import subsets class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(set([]))) self.assertEqual(result, ()) def test_subsets_should_return_non_empty_subsets...
from collections import defaultdict from itertools import chain import unittest from apriori import ( subsets, returnItemsWithMinSupport, ) class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(frozenset([]))) ...
Test returning items with minimum support
Test returning items with minimum support
Python
mit
asaini/Apriori,gst-group/apriori_demo
import unittest from itertools import chain from apriori import subsets class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(set([]))) self.assertEqual(result, ()) def test_subsets_should_return_non_empty_subsets...
from collections import defaultdict from itertools import chain import unittest from apriori import ( subsets, returnItemsWithMinSupport, ) class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(frozenset([]))) ...
<commit_before>import unittest from itertools import chain from apriori import subsets class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(set([]))) self.assertEqual(result, ()) def test_subsets_should_return_no...
from collections import defaultdict from itertools import chain import unittest from apriori import ( subsets, returnItemsWithMinSupport, ) class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(frozenset([]))) ...
import unittest from itertools import chain from apriori import subsets class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(set([]))) self.assertEqual(result, ()) def test_subsets_should_return_non_empty_subsets...
<commit_before>import unittest from itertools import chain from apriori import subsets class AprioriTest(unittest.TestCase): def test_subsets_should_return_empty_subsets_if_input_empty_set(self): result = tuple(subsets(set([]))) self.assertEqual(result, ()) def test_subsets_should_return_no...
c14bdaf3043cb38571073db7162a0899a35778ed
app/utils.py
app/utils.py
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
Fix index_for_role function to use index field in Role class.
Fix index_for_role function to use index field in Role class.
Python
mit
hack4impact/reading-terminal-market,hack4impact/reading-terminal-market,hack4impact/reading-terminal-market
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
<commit_before>from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import...
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import HiddenField ...
<commit_before>from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import...
9cb21f98e1b6670d733940ea74d75a7a01a1b38e
misp_modules/modules/expansion/__init__.py
misp_modules/modules/expansion/__init__.py
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
Add the new module sin the list of modules availables.
fix: Add the new module sin the list of modules availables.
Python
agpl-3.0
VirusTotal/misp-modules,MISP/misp-modules,VirusTotal/misp-modules,VirusTotal/misp-modules,MISP/misp-modules,amuehlem/misp-modules,MISP/misp-modules,amuehlem/misp-modules,amuehlem/misp-modules
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
<commit_before>from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan...
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns'...
<commit_before>from . import _vmray # noqa __all__ = ['vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan...
ba4a8815305e402b4e0d587601565d44524a114e
oslo/__init__.py
oslo/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# 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 # d...
Remove extraneous vim editor configuration comments
Remove extraneous vim editor configuration comments Change-Id: Id8fb52db12695bff4488ea9e74b492a9dabbbccf Partial-Bug: #1229324
Python
apache-2.0
varunarya10/oslo.db,openstack/oslo.db,akash1808/oslo.db,magic0704/oslo.db,JioCloud/oslo.db,openstack/oslo.db
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# 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 # d...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 require...
# 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 # d...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 require...
80bbff34e7bb8d9d3779d46b1bf9e64b62592055
spotify/__init__.py
spotify/__init__.py
from __future__ import unicode_literals import os from cffi import FFI __version__ = '2.0.0a1' header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') header = open(header_file).read() header += '#define SPOTIFY_API_VERSION ...\n' ffi = FFI() ffi.cdef(header) lib = ffi.verify('#include "libspoti...
from __future__ import unicode_literals import os import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#include "libspoti...
Make header file variables private
Make header file variables private
Python
apache-2.0
kotamat/pyspotify,felix1m/pyspotify,kotamat/pyspotify,jodal/pyspotify,felix1m/pyspotify,mopidy/pyspotify,mopidy/pyspotify,jodal/pyspotify,jodal/pyspotify,kotamat/pyspotify,felix1m/pyspotify
from __future__ import unicode_literals import os from cffi import FFI __version__ = '2.0.0a1' header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') header = open(header_file).read() header += '#define SPOTIFY_API_VERSION ...\n' ffi = FFI() ffi.cdef(header) lib = ffi.verify('#include "libspoti...
from __future__ import unicode_literals import os import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#include "libspoti...
<commit_before>from __future__ import unicode_literals import os from cffi import FFI __version__ = '2.0.0a1' header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') header = open(header_file).read() header += '#define SPOTIFY_API_VERSION ...\n' ffi = FFI() ffi.cdef(header) lib = ffi.verify('#in...
from __future__ import unicode_literals import os import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#include "libspoti...
from __future__ import unicode_literals import os from cffi import FFI __version__ = '2.0.0a1' header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') header = open(header_file).read() header += '#define SPOTIFY_API_VERSION ...\n' ffi = FFI() ffi.cdef(header) lib = ffi.verify('#include "libspoti...
<commit_before>from __future__ import unicode_literals import os from cffi import FFI __version__ = '2.0.0a1' header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') header = open(header_file).read() header += '#define SPOTIFY_API_VERSION ...\n' ffi = FFI() ffi.cdef(header) lib = ffi.verify('#in...
b84fe94128c308be3e95be800693eb92ec8c7d25
keyring/py33compat.py
keyring/py33compat.py
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
Remove superfluous check for default
Remove superfluous check for default
Python
mit
jaraco/keyring
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
<commit_before>""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent c...
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent call last): ...
<commit_before>""" Compatibility support for Python 3.3. Remove when Python 3.3 support is no longer required. """ from .py27compat import builtins def max(*args, **kwargs): """ Add support for 'default' kwarg. >>> max([], default='res') 'res' >>> max(default='res') Traceback (most recent c...
3874ca578c52879d9861213e321f6ece9e67f10b
sopel/modules/ping.py
sopel/modules/ping.py
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger.owner: ...
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): greeting = random.choice((...
Stop Sopel from relying rudely to the bot's owner.
Stop Sopel from relying rudely to the bot's owner.
Python
mit
Uname-a/knife_scraper,Uname-a/knife_scraper,Uname-a/knife_scraper
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger.owner: ...
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): greeting = random.choice((...
<commit_before># coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger....
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): greeting = random.choice((...
# coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger.owner: ...
<commit_before># coding=utf8 """ ping.py - Sopel Ping Module Author: Sean B. Palmer, inamidst.com About: http://sopel.chat """ from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger....
c22252cef5225bc71ec9f407efe39f61819bcea5
civictechprojects/sitemaps.py
civictechprojects/sitemaps.py
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
Fix static page sitemap urls
Fix static page sitemap urls
Python
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
<commit_before>from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release la...
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release lastmod = date(ye...
<commit_before>from common.helpers.constants import FrontEndSection from django.contrib.sitemaps import Sitemap from .models import Project from datetime import date class SectionSitemap(Sitemap): protocol = "https" changefreq = "monthly" priority = 0.5 # TODO: Update this date for each release la...
2bc35ef508e2a954dadb999b47df614150ebfaee
ckanext/nhsengland/helpers.py
ckanext/nhsengland/helpers.py
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
Fix format check to ignore case.
Fix format check to ignore case.
Python
agpl-3.0
nhsengland/ckanext-nhsengland,nhsengland/ckanext-nhsengland,nhsengland/ckanext-nhsengland
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
<commit_before> def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dic...
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dict["resources"]:...
<commit_before> def split_resources(pkg_dict): """ Splits the resources in the provided package based on the format field with DOC, DOCX, PDF being returned as documents, all other formats as data """ document_formats = ["DOC", "DOCX", "PDF"] documents, data = [], [] for resource in pkg_dic...
cf663c4961a84260e34ec422a4983d312df9e8c3
calc.py
calc.py
"""calc.py: A simple python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif co...
"""calc.py: A simple Python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif com...
Add support to min command
Add support to min command
Python
bsd-3-clause
anchavesb/pyCalc
"""calc.py: A simple python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif co...
"""calc.py: A simple Python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif com...
<commit_before>"""calc.py: A simple python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(num...
"""calc.py: A simple Python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif com...
"""calc.py: A simple python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(nums)) elif co...
<commit_before>"""calc.py: A simple python calculator.""" import sys def add_all(nums): return sum(nums) def multiply_all(nums): return reduce(lambda a, b: a * b, nums) if __name__ == '__main__': command = sys.argv[1] nums = map(float, sys.argv[2:]) if command == 'add': print(add_all(num...
8e00a63f539413b39aaaad77a230f5fac5a37261
conary/build/capsulerecipe.py
conary/build/capsulerecipe.py
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
Enable building hybrid capsule/non-capsule packages (CNY-3271)
Enable building hybrid capsule/non-capsule packages (CNY-3271)
Python
apache-2.0
sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
<commit_before># # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath...
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
<commit_before># # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath...
c0512873d1f558768c174c64faf419e03b63e24b
pijobs/flashjob.py
pijobs/flashjob.py
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
Add default options for FlashJob.
Add default options for FlashJob.
Python
mit
ollej/piapi,ollej/piapi
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
<commit_before>import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scroll...
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scrollphat.clear() ...
<commit_before>import scrollphat from pijobs.scrollphatjob import ScrollphatJob class FlashJob(ScrollphatJob): def run(self): scrollphat.clear() for i in range(int(self.options['loop'])): scrollphat.set_pixels(lambda x, y: True, True) self.sleep_interval() scroll...
70efd2427caf52a5ba45e05eb33dc47fce2147c6
redwind/tasks.py
redwind/tasks.py
from contextlib import contextmanager from flask import current_app from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imp...
from contextlib import contextmanager from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imported directly, it is a co...
Revert "Added configuration options for Redis"
Revert "Added configuration options for Redis" This reverts commit 80129aac1fb4471e7a519b8f86df2db0b978903a.
Python
bsd-2-clause
Lancey6/redwind,Lancey6/redwind,Lancey6/redwind
from contextlib import contextmanager from flask import current_app from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imp...
from contextlib import contextmanager from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imported directly, it is a co...
<commit_before>from contextlib import contextmanager from flask import current_app from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since ...
from contextlib import contextmanager from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imported directly, it is a co...
from contextlib import contextmanager from flask import current_app from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since this is not imp...
<commit_before>from contextlib import contextmanager from flask import current_app from redis import StrictRedis import rq _queue = None def get_queue(): global _queue if _queue is None: _queue = create_queue() return _queue def create_queue(): """Connect to Redis and create the RQ. Since ...
75d8c39fa65500d2bf618b10d8d74991b03a68f4
lib/rpnpy/__init__.py
lib/rpnpy/__init__.py
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
Add missing rpnpy.range reference for Python 3.
Add missing rpnpy.range reference for Python 3. Signed-off-by: Stephane_Chamberland <1054841519c328088796c1f3c72c14f95c4efe35@science.gc.ca> (cherry picked from commit 23860277c006d9635dedcaaa5e065c7aad199d8c) (cherry picked from commit b613c799afbf95e15f99cee50c2f76516a264f32)
Python
lgpl-2.1
meteokid/python-rpn,meteokid/python-rpn,meteokid/python-rpn,meteokid/python-rpn
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
<commit_before>import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambd...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int range = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.decode(...
import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambda x: str(x.deco...
<commit_before>import sys import ctypes as _ct if sys.version_info < (3,): integer_types = (int, long,) range = xrange else: integer_types = (int,) long = int # xrange = range C_WCHAR2CHAR = lambda x: bytes(str(x).encode('ascii')) C_WCHAR2CHAR.__doc__ = 'Convert str to bytes' C_CHAR2WCHAR = lambd...
f68808dc85b2bb0ea8fb0d7de4669099740cdb61
mesoblog/models.py
mesoblog/models.py
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
Add a primary category which will decide which category is shown as current in the chrome for this article.
Add a primary category which will decide which category is shown as current in the chrome for this article. TODO: Enforce including the primary category as one of the categories for the article, both in UI and server side.
Python
mit
grundleborg/mesosphere
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
<commit_before>from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.M...
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.Model): titl...
<commit_before>from django.db import models # Represents a category which articles can be part of class Category(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name+" ["+str(self.id)+"]" # Article model represents one article in the blog. class Article(models.M...
cfb0bda6096378de428a1460823626f3dc4c9059
spyder_terminal/__init__.py
spyder_terminal/__init__.py
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
Set package version info to 0.3.0.dev0
Set package version info to 0.3.0.dev0
Python
mit
spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
<commit_before># -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ---------------------------------------------------------------------------...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
<commit_before># -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ---------------------------------------------------------------------------...
7a362c4a516a1bf6fa91b9d8c670a5d5613e5aeb
miniraf/combine.py
miniraf/combine.py
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] for f in filenames: ...
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0, overwrite_input=True), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] ...
Allow the median method to overwrite in-memory intermediate
Allow the median method to overwrite in-memory intermediate Signed-off-by: Lizhou Sha <d6acb26e253550574bc1141efa0eb5e6de15daeb@mit.edu>
Python
mit
vulpicastor/miniraf
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] for f in filenames: ...
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0, overwrite_input=True), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] ...
<commit_before>import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] for f ...
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0, overwrite_input=True), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] ...
import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] for f in filenames: ...
<commit_before>import argparse import astropy.io.fits as fits import numpy as np import sys METHOD_MAP = {"median": lambda x: np.median(x, axis=0), "average": lambda x: np.average(x, axis=0), "sum": lambda x: np.sum(x, axis=0)} def stack_fits_data(filenames): fits_files = [] for f ...
f7ade90b6f68a4a8e71a3720ef529c228f2a035a
slackelot/slackelot.py
slackelot/slackelot.py
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext=None, title=None): """ Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{team id}/{bot or channe...
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext='', title='', author_name='', color=None): """Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{...
Add author_name, color, and fallback to payload
Add author_name, color, and fallback to payload
Python
mit
Chris-Graffagnino/slackelot
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext=None, title=None): """ Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{team id}/{bot or channe...
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext='', title='', author_name='', color=None): """Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{...
<commit_before>import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext=None, title=None): """ Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{team id}...
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext='', title='', author_name='', color=None): """Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{...
import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext=None, title=None): """ Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{team id}/{bot or channe...
<commit_before>import time import requests class SlackNotificationError(Exception): pass def send_slack_message(message, webhook_url, pretext=None, title=None): """ Send slack message using webhooks Args: message (string) webhook_url (string), 'https://hooks.slack.com/services/{team id}...
a71f79d3966c7b3f491c2dacce721cd974af52c4
sale_properties_dynamic_fields/__openerp__.py
sale_properties_dynamic_fields/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
Remove active key since is deprecated
Remove active key since is deprecated
Python
agpl-3.0
xpansa/sale-workflow,Antiun/sale-workflow,akretion/sale-workflow,acsone/sale-workflow,brain-tec/sale-workflow,brain-tec/sale-workflow,Eficent/sale-workflow,thomaspaulb/sale-workflow,acsone/sale-workflow,open-synergy/sale-workflow,jabibi/sale-workflow,Endika/sale-workflow,fevxie/sale-workflow,factorlibre/sale-workflow,B...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
3e927164b77a325a68da7c3672a83977a2c408af
source/testclusters.py
source/testclusters.py
# -*- coding: utf-8 -*- import clusters K = 10 blognames,labels,data = clusters.readfile("blogdata1.txt") #coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r]...
# -*- coding: utf-8 -*- import clusters K = 8 blognames,words,data = clusters.readfile("blogdata1.txt") coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r] fo...
Test draw function. Set K to 8.
Test draw function. Set K to 8.
Python
agpl-3.0
JARR-aggregator/JARR,JARR/JARR,JARR-aggregator/JARR,jaesivsm/pyAggr3g470r,jaesivsm/pyAggr3g470r,JARR/JARR,JARR-aggregator/JARR,jaesivsm/JARR,JARR/JARR,cedricbonhomme/pyAggr3g470r,jaesivsm/JARR,jaesivsm/pyAggr3g470r,jaesivsm/JARR,cedricbonhomme/pyAggr3g470r,cedricbonhomme/pyAggr3g470r,JARR-aggregator/JARR,cedricbonhomme...
# -*- coding: utf-8 -*- import clusters K = 10 blognames,labels,data = clusters.readfile("blogdata1.txt") #coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r]...
# -*- coding: utf-8 -*- import clusters K = 8 blognames,words,data = clusters.readfile("blogdata1.txt") coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r] fo...
<commit_before># -*- coding: utf-8 -*- import clusters K = 10 blognames,labels,data = clusters.readfile("blogdata1.txt") #coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".joi...
# -*- coding: utf-8 -*- import clusters K = 8 blognames,words,data = clusters.readfile("blogdata1.txt") coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r] fo...
# -*- coding: utf-8 -*- import clusters K = 10 blognames,labels,data = clusters.readfile("blogdata1.txt") #coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".join([blognames[r]...
<commit_before># -*- coding: utf-8 -*- import clusters K = 10 blognames,labels,data = clusters.readfile("blogdata1.txt") #coords = clusters.scaledown(data) print "Generating clusters..." kclust = clusters.kcluster(data, k=K) print print "Clusters:" for i in range(K): print "Cluster" + str(i) print ", ".joi...
c82f025f6f49e58c2a07f29ae94026cf49991939
modelview/urls.py
modelview/urls.py
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
Simplify regex in url matching
Simplify regex in url matching
Python
agpl-3.0
openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
<commit_before>from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>...
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>[\w\d_]+)s/add/...
<commit_before>from django.conf.urls import url from modelview import views from oeplatform import settings from django.conf.urls.static import static urlpatterns = [ url(r'^(?P<sheettype>[\w\d_]+)s/$', views.listsheets, {}, name='modellist'), url(r'^overview/$', views.overview, {}), url(r'^(?P<sheettype>...
15fd86ff33d4f585578ef4e67614e249b1e94d45
jjvm.py
jjvm.py
#!/usr/bin/python import argparse import os import struct import sys ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ################### ### SUBROUTIN...
#!/usr/bin/python import argparse import os import struct import sys CP_STRUCT_SIZES = { 0xa:3 } ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ####...
Use constants dictionary in lenCpStruct()
Use constants dictionary in lenCpStruct()
Python
apache-2.0
justinccdev/jjvm
#!/usr/bin/python import argparse import os import struct import sys ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ################### ### SUBROUTIN...
#!/usr/bin/python import argparse import os import struct import sys CP_STRUCT_SIZES = { 0xa:3 } ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ####...
<commit_before>#!/usr/bin/python import argparse import os import struct import sys ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ##################...
#!/usr/bin/python import argparse import os import struct import sys CP_STRUCT_SIZES = { 0xa:3 } ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ####...
#!/usr/bin/python import argparse import os import struct import sys ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ################### ### SUBROUTIN...
<commit_before>#!/usr/bin/python import argparse import os import struct import sys ############### ### CLASSES ### ############### class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) self.print_help() sys.exit(2) ##################...
9da75318a5d8cf646442912f46e89ec2e6b13fb3
odie.py
odie.py
#! /usr/bin/env python3 import config # pylint: disable=unused-import from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') app.config.from_obje...
#! /usr/bin/env python3 from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') import config # pylint: disable=unused-import app.config.from_objec...
Allow config access to app object
Allow config access to app object
Python
mit
fsmi/odie-server,fjalir/odie-server,fjalir/odie-server,Kha/odie-server,fsmi/odie-server,Kha/odie-server,fsmi/odie-server,Kha/odie-server,fjalir/odie-server
#! /usr/bin/env python3 import config # pylint: disable=unused-import from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') app.config.from_obje...
#! /usr/bin/env python3 from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') import config # pylint: disable=unused-import app.config.from_objec...
<commit_before>#! /usr/bin/env python3 import config # pylint: disable=unused-import from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') app.c...
#! /usr/bin/env python3 from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') import config # pylint: disable=unused-import app.config.from_objec...
#! /usr/bin/env python3 import config # pylint: disable=unused-import from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') app.config.from_obje...
<commit_before>#! /usr/bin/env python3 import config # pylint: disable=unused-import from functools import partial from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager app = Flask("odie", template_folder='admin/templates', static_folder='admin/static') app.c...
58d5f96464a4706fd88869f7a09c1dffcd9ac684
mywebsite/urls.py
mywebsite/urls.py
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.si...
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from mywebsite import views urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(...
Add namespace for blog and add about url
Add namespace for blog and add about url
Python
mit
TomGijselinck/mywebsite,TomGijselinck/mywebsite
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.si...
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from mywebsite import views urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', i...
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from mywebsite import views urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(...
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.si...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # Examples: # url(r'^$', 'mywebsite.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', i...
7cf58ed386028a616c2083364d3f5c92e0c0ade3
examples/hello_world/hello_world.py
examples/hello_world/hello_world.py
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/foo') def foo(): d = document.Document(data={ ...
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/hello') def foo(): return document.Document(data={ ...
Update to hello world example
Update to hello world example
Python
unlicense
thisissoon/Flask-HAL,thisissoon/Flask-HAL
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/foo') def foo(): d = document.Document(data={ ...
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/hello') def foo(): return document.Document(data={ ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/foo') def foo(): d = document.Docume...
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/hello') def foo(): return document.Document(data={ ...
#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/foo') def foo(): d = document.Document(data={ ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ A Simple Example Flask Application ================================== """ # Third Party Libs from flask import Flask from flask_hal import HAL, document app = Flask(__name__) HAL(app) # Initialise HAL @app.route('/foo') def foo(): d = document.Docume...
774ece47574466f6661de469ef0f43ecf97d66f0
molly/utils/misc.py
molly/utils/misc.py
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
Make create_crontab fall back to default settings search before explicitly searching for DJANGO_SETTINGS_MODULE
Make create_crontab fall back to default settings search before explicitly searching for DJANGO_SETTINGS_MODULE
Python
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
<commit_before>import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_r...
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_req_host, unveri...
<commit_before>import urllib2, sys, os.path, imp class AnyMethodRequest(urllib2.Request): def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=None, method=None): self.method = method and method.upper() or None urllib2.Request.__init__(self, url, data, headers, origin_r...
c1510244999e1e88dd66f62857d855e466cec570
deprecated/__init__.py
deprecated/__init__.py
# -*- coding: utf-8 -*- import functools import inspect import warnings string_types = (type(b''), type(u'')) def deprecated(reason): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. """ if isinst...
# -*- coding: utf-8 -*- import functools import warnings def deprecated(func): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used. """ @functools.wraps(func) def new_func(*args, **kwargs): ...
Replace invalid string format '{}' by '{0}' for Python 2.6 compatibility.
Replace invalid string format '{}' by '{0}' for Python 2.6 compatibility.
Python
mit
vrcmarcos/python-deprecated
# -*- coding: utf-8 -*- import functools import inspect import warnings string_types = (type(b''), type(u'')) def deprecated(reason): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. """ if isinst...
# -*- coding: utf-8 -*- import functools import warnings def deprecated(func): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used. """ @functools.wraps(func) def new_func(*args, **kwargs): ...
<commit_before># -*- coding: utf-8 -*- import functools import inspect import warnings string_types = (type(b''), type(u'')) def deprecated(reason): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. """...
# -*- coding: utf-8 -*- import functools import warnings def deprecated(func): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used. """ @functools.wraps(func) def new_func(*args, **kwargs): ...
# -*- coding: utf-8 -*- import functools import inspect import warnings string_types = (type(b''), type(u'')) def deprecated(reason): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. """ if isinst...
<commit_before># -*- coding: utf-8 -*- import functools import inspect import warnings string_types = (type(b''), type(u'')) def deprecated(reason): """ This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. """...
d4d04b72727b5e3886255a866f984b75fe610406
organizations/admin.py
organizations/admin.py
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] list_display = ['name', 'is_active'] pre...
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner raw_id_fields = ('organization_user',) class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] l...
Use raw ID fields for users, organizations
Use raw ID fields for users, organizations Avoids slowing down admin sites
Python
bsd-2-clause
bennylope/django-organizations,st8st8/django-organizations,DESHRAJ/django-organizations,GauthamGoli/django-organizations,bennylope/django-organizations,GauthamGoli/django-organizations,aptivate/django-organizations,DESHRAJ/django-organizations,aptivate/django-organizations,st8st8/django-organizations,arteria/django-ar-...
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] list_display = ['name', 'is_active'] pre...
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner raw_id_fields = ('organization_user',) class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] l...
<commit_before>from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] list_display = ['name', 'is_a...
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner raw_id_fields = ('organization_user',) class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] l...
from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] list_display = ['name', 'is_active'] pre...
<commit_before>from django.contrib import admin from organizations.models import (Organization, OrganizationUser, OrganizationOwner) class OwnerInline(admin.StackedInline): model = OrganizationOwner class OrganizationAdmin(admin.ModelAdmin): inlines = [OwnerInline] list_display = ['name', 'is_a...
fb865b2ca9905c70d79e15bf41c29899c533eea6
MyCapytain/__init__.py
MyCapytain/__init__.py
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b16"
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b17"
Upgrade and remove some bugs
Upgrade and remove some bugs
Python
mpl-2.0
Capitains/MyCapytain,Capitains/MyCapytain
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b16" Upgrade and remove some bugs
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b17"
<commit_before># -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b16" <commit_msg>Upgrade and remove some bugs<co...
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b17"
# -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b16" Upgrade and remove some bugs# -*- coding: utf-8 -*- """ .....
<commit_before># -*- coding: utf-8 -*- """ .. module:: MyCapytain :platform: Unix, Windows :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python .. moduleauthor:: Thibault Clérice <leponteineptique@gmail.com> """ __version__ = "2.0.0b16" <commit_msg>Upgrade and remove some bugs<co...
7b78ce63a34b3f043fd79eb8f3f1d2049103e46f
flocker/control/__init__.py
flocker/control/__init__.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration, and exposes a public API for modifying and retrieving the desired configuration. ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration and exposes a public API for modifying and retrieving the desired configuration. T...
Address review comment: comma comma comma comma chameleon, it comes and goes etc.
Address review comment: comma comma comma comma chameleon, it comes and goes etc.
Python
apache-2.0
w4ngyi/flocker,adamtheturtle/flocker,mbrukman/flocker,LaynePeng/flocker,jml/flocker,runcom/flocker,agonzalezro/flocker,wallnerryan/flocker-profiles,AndyHuu/flocker,moypray/flocker,mbrukman/flocker,Azulinho/flocker,hackday-profilers/flocker,w4ngyi/flocker,1d4Nf6/flocker,agonzalezro/flocker,runcom/flocker,adamtheturtle/f...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration, and exposes a public API for modifying and retrieving the desired configuration. ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration and exposes a public API for modifying and retrieving the desired configuration. T...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration, and exposes a public API for modifying and retrieving the desired ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration and exposes a public API for modifying and retrieving the desired configuration. T...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration, and exposes a public API for modifying and retrieving the desired configuration. ...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Control service for managing a Flocker cluster. A Flocker cluster is composed of a number of nodes. The control service is in charge of managing the desired configuration, and exposes a public API for modifying and retrieving the desired ...
ff476b33c26a9067e6ac64b2c161d29b0febea33
py/capnptools/examples/tests/test_books.py
py/capnptools/examples/tests/test_books.py
import unittest from examples import books class BooksTest(unittest.TestCase): def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) book.title = 'Moby-Dick; or, The Whale' book.authors = ['Herman Melville'] self.assertEqual( { ...
import unittest import os import tempfile from examples import books class BooksTest(unittest.TestCase): BOOK = { 'title': 'Moby-Dick; or, The Whale', 'authors': ['Herman Melville'], } def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) bo...
Add unit tests for write_to and write_packed_to
Add unit tests for write_to and write_packed_to
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
import unittest from examples import books class BooksTest(unittest.TestCase): def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) book.title = 'Moby-Dick; or, The Whale' book.authors = ['Herman Melville'] self.assertEqual( { ...
import unittest import os import tempfile from examples import books class BooksTest(unittest.TestCase): BOOK = { 'title': 'Moby-Dick; or, The Whale', 'authors': ['Herman Melville'], } def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) bo...
<commit_before>import unittest from examples import books class BooksTest(unittest.TestCase): def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) book.title = 'Moby-Dick; or, The Whale' book.authors = ['Herman Melville'] self.assertEqual( ...
import unittest import os import tempfile from examples import books class BooksTest(unittest.TestCase): BOOK = { 'title': 'Moby-Dick; or, The Whale', 'authors': ['Herman Melville'], } def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) bo...
import unittest from examples import books class BooksTest(unittest.TestCase): def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) book.title = 'Moby-Dick; or, The Whale' book.authors = ['Herman Melville'] self.assertEqual( { ...
<commit_before>import unittest from examples import books class BooksTest(unittest.TestCase): def test_builder(self): book = books.MallocMessageBuilder().init_root(books.Book) book.title = 'Moby-Dick; or, The Whale' book.authors = ['Herman Melville'] self.assertEqual( ...
a5b40d9781caf74179f8c7e1f6fe4de5299b1e59
src/osmviz/__init__.py
src/osmviz/__init__.py
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
Remove Python 2 ImportError, let python_requires handle it
Remove Python 2 ImportError, let python_requires handle it
Python
mit
hugovk/osmviz,hugovk/osmviz
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
<commit_before># osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the righ...
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
# osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
<commit_before># osmviz module # # Copyright (c) 2010 Colin Bick, Robert Damphousse # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the righ...
787494af73a0b0e316547c3ec8536aa9ac21575e
clients.py
clients.py
#!/usr/bin/env python from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) while True: tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) data = raw_input('> ') if not data: break tcpCliSock.send('%s\r\n' % data) data = tcpCliSock.recv...
#!/usr/bin/env python import argparse from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 parser = argparse.ArgumentParser(description='Allow the user to specify a hostname and a port.') parser.add_argument('--hostname', default=HOST, help='Add hostname') parser.add_argument('--port', default=PORT, he...
Allow the user to specify a hostname and port
Allow the user to specify a hostname and port
Python
mit
ccandillo/chapter2
#!/usr/bin/env python from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) while True: tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) data = raw_input('> ') if not data: break tcpCliSock.send('%s\r\n' % data) data = tcpCliSock.recv...
#!/usr/bin/env python import argparse from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 parser = argparse.ArgumentParser(description='Allow the user to specify a hostname and a port.') parser.add_argument('--hostname', default=HOST, help='Add hostname') parser.add_argument('--port', default=PORT, he...
<commit_before>#!/usr/bin/env python from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) while True: tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) data = raw_input('> ') if not data: break tcpCliSock.send('%s\r\n' % data) data = ...
#!/usr/bin/env python import argparse from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 parser = argparse.ArgumentParser(description='Allow the user to specify a hostname and a port.') parser.add_argument('--hostname', default=HOST, help='Add hostname') parser.add_argument('--port', default=PORT, he...
#!/usr/bin/env python from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) while True: tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) data = raw_input('> ') if not data: break tcpCliSock.send('%s\r\n' % data) data = tcpCliSock.recv...
<commit_before>#!/usr/bin/env python from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) while True: tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) data = raw_input('> ') if not data: break tcpCliSock.send('%s\r\n' % data) data = ...
540c0130ccca7d7d7cf51ddbe251652a5c46364e
registrations/admin.py
registrations/admin.py
from django.contrib import admin from .models import Source, Registration class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "validated", "created_at"] ...
from django.contrib import admin from .models import Source, Registration, SubscriptionRequest class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "valida...
Add SubscriptionRequestAdmin - reviewed over shoulder by @gsvr
Add SubscriptionRequestAdmin - reviewed over shoulder by @gsvr
Python
bsd-3-clause
praekelt/hellomama-registration,praekelt/hellomama-registration
from django.contrib import admin from .models import Source, Registration class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "validated", "created_at"] ...
from django.contrib import admin from .models import Source, Registration, SubscriptionRequest class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "valida...
<commit_before>from django.contrib import admin from .models import Source, Registration class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "validated", ...
from django.contrib import admin from .models import Source, Registration, SubscriptionRequest class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "valida...
from django.contrib import admin from .models import Source, Registration class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "validated", "created_at"] ...
<commit_before>from django.contrib import admin from .models import Source, Registration class RegistrationAdmin(admin.ModelAdmin): list_display = [ "id", "stage", "validated", "mother_id", "source", "created_at", "updated_at", "created_by", "updated_by"] list_filter = ["source", "validated", ...
20a8d57f5e3d00898c7362d650b37f7962fdfe7a
tests/test_distributions.py
tests/test_distributions.py
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter() sig = Parameter(positive=True...
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter('x0') sig = Parameter('sig', po...
Add names to Parameters/Variables to surpress DepricationWarnings
Add names to Parameters/Variables to surpress DepricationWarnings
Python
mit
tBuLi/symfit
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter() sig = Parameter(positive=True...
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter('x0') sig = Parameter('sig', po...
<commit_before>from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter() sig = Paramete...
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter('x0') sig = Parameter('sig', po...
from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter() sig = Parameter(positive=True...
<commit_before>from __future__ import division import sympy from symfit import Variable, Parameter from symfit.distributions import Gaussian, Exp def test_gaussian(): """ Make sure that symfit.distributions.Gaussians produces the expected sympy expression. """ x0 = Parameter() sig = Paramete...
22dc2bd827143c4c73b7b122d94a64611960e9a1
wiki/models.py
wiki/models.py
from couchdb.schema import * from couchdb.schema import View from wiki.auth.models import User class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() us...
from couchdb.schema import * from couchdb.schema import View class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() user = DictField() ...
Fix an unreferenced module bug
Fix an unreferenced module bug
Python
mit
theju/django-couch-wiki
from couchdb.schema import * from couchdb.schema import View from wiki.auth.models import User class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() us...
from couchdb.schema import * from couchdb.schema import View class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() user = DictField() ...
<commit_before>from couchdb.schema import * from couchdb.schema import View from wiki.auth.models import User class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = Boolea...
from couchdb.schema import * from couchdb.schema import View class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() user = DictField() ...
from couchdb.schema import * from couchdb.schema import View from wiki.auth.models import User class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = BooleanField() us...
<commit_before>from couchdb.schema import * from couchdb.schema import View from wiki.auth.models import User class Page(Document): created_date = DateTimeField() last_edited_date = DateTimeField() title = TextField() contents = TextField() auth_user_editable = Boolea...
ff6ef6752b4aa0f561f2776d400e3c313963815c
polling/models.py
polling/models.py
from __future__ import unicode_literals from django.db import models # Create your models here.
from __future__ import unicode_literals from django.db import models # Create your models here. PARTY_DEMOCRATIC = 'democratic' PARTY_GREEN = 'green' PARTY_LIBERTARIAN = 'libertarian' PARTY_REPUBLICAN = 'republican' PARTIES = ( (PARTY_DEMOCRATIC, PARTY_DEMOCRATIC.title()), (PARTY_GREEN, PARTY_GREEN.title()...
Add a State model and some enums
Add a State model and some enums
Python
mit
sbuss/voteswap,sbuss/voteswap,sbuss/voteswap,sbuss/voteswap
from __future__ import unicode_literals from django.db import models # Create your models here. Add a State model and some enums
from __future__ import unicode_literals from django.db import models # Create your models here. PARTY_DEMOCRATIC = 'democratic' PARTY_GREEN = 'green' PARTY_LIBERTARIAN = 'libertarian' PARTY_REPUBLICAN = 'republican' PARTIES = ( (PARTY_DEMOCRATIC, PARTY_DEMOCRATIC.title()), (PARTY_GREEN, PARTY_GREEN.title()...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Add a State model and some enums<commit_after>
from __future__ import unicode_literals from django.db import models # Create your models here. PARTY_DEMOCRATIC = 'democratic' PARTY_GREEN = 'green' PARTY_LIBERTARIAN = 'libertarian' PARTY_REPUBLICAN = 'republican' PARTIES = ( (PARTY_DEMOCRATIC, PARTY_DEMOCRATIC.title()), (PARTY_GREEN, PARTY_GREEN.title()...
from __future__ import unicode_literals from django.db import models # Create your models here. Add a State model and some enumsfrom __future__ import unicode_literals from django.db import models # Create your models here. PARTY_DEMOCRATIC = 'democratic' PARTY_GREEN = 'green' PARTY_LIBERTARIAN = 'libertarian' PA...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Add a State model and some enums<commit_after>from __future__ import unicode_literals from django.db import models # Create your models here. PARTY_DEMOCRATIC = 'democratic' PARTY_GREEN = 'gr...
2293cc41ef1fada91c1d71c2f75ebf3e5609bd9e
admin/metrics/views.py
admin/metrics/views.py
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'common_auth.view_metrics' ...
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'osf.view_metrics' raise...
Update permission required to match new permission name
Update permission required to match new permission name
Python
apache-2.0
HalcyonChimera/osf.io,caseyrollins/osf.io,chennan47/osf.io,hmoco/osf.io,crcresearch/osf.io,felliott/osf.io,saradbowman/osf.io,chennan47/osf.io,caseyrollins/osf.io,cslzchen/osf.io,icereval/osf.io,mattclark/osf.io,CenterForOpenScience/osf.io,CenterForOpenScience/osf.io,HalcyonChimera/osf.io,adlius/osf.io,sloria/osf.io,ba...
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'common_auth.view_metrics' ...
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'osf.view_metrics' raise...
<commit_before>from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'common_auth....
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'osf.view_metrics' raise...
from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'common_auth.view_metrics' ...
<commit_before>from django.views.generic import TemplateView from django.contrib.auth.mixins import PermissionRequiredMixin from admin.base.settings import KEEN_CREDENTIALS class MetricsView(PermissionRequiredMixin, TemplateView): template_name = 'metrics/osf_metrics.html' permission_required = 'common_auth....
e9a8d67115295e852e376d17bd159f5b9789bb4d
videos/module/chapters/models.py
videos/module/chapters/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ class Chapter(models.Model): """ Video section. """ video = models.ForeignKey('videos.Video') title = models.CharField(max_length=255) timecode = models.TimeField(help_text='hh:mm:ss') preview = models.Imag...
import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Chapter(models.Model): """Video section""" video = models.ForeignKey('videos.Video') title = models.CharFie...
Refactor for python 3 and shinyness
Refactor for python 3 and shinyness
Python
bsd-2-clause
incuna/incuna-videos,incuna/incuna-videos
from django.db import models from django.utils.translation import ugettext_lazy as _ class Chapter(models.Model): """ Video section. """ video = models.ForeignKey('videos.Video') title = models.CharField(max_length=255) timecode = models.TimeField(help_text='hh:mm:ss') preview = models.Imag...
import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Chapter(models.Model): """Video section""" video = models.ForeignKey('videos.Video') title = models.CharFie...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Chapter(models.Model): """ Video section. """ video = models.ForeignKey('videos.Video') title = models.CharField(max_length=255) timecode = models.TimeField(help_text='hh:mm:ss') previe...
import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Chapter(models.Model): """Video section""" video = models.ForeignKey('videos.Video') title = models.CharFie...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Chapter(models.Model): """ Video section. """ video = models.ForeignKey('videos.Video') title = models.CharField(max_length=255) timecode = models.TimeField(help_text='hh:mm:ss') preview = models.Imag...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Chapter(models.Model): """ Video section. """ video = models.ForeignKey('videos.Video') title = models.CharField(max_length=255) timecode = models.TimeField(help_text='hh:mm:ss') previe...
e00ad93c1a769a920c7f61eeccec582272766b26
badgify/templatetags/badgify_tags.py
badgify/templatetags/badgify_tags.py
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
Add missing select_related to badgify_badges
Add missing select_related to badgify_badges
Python
mit
ulule/django-badgify,ulule/django-badgify
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
<commit_before># -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = g...
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
# -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = get_user_model()...
<commit_before># -*- coding: utf-8 -*- from django import template from ..models import Badge, Award from ..compat import get_user_model register = template.Library() @register.assignment_tag def badgify_badges(**kwargs): """ Returns all badges or only awarded badges for the given user. """ User = g...
ef8c04be4e2a312b977cbc3d84a45c20c7895147
tests/window/window_util.py
tests/window/window_util.py
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
Fix window test border _again_ (more fixed).
Fix window test border _again_ (more fixed). --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%401383
Python
bsd-3-clause
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
<commit_before>#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) g...
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
<commit_before>#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) g...
0c57cbcf31d0f2e413d68fb822a8e43d16670dc1
apnsclient/__init__.py
apnsclient/__init__.py
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
Adjust the module __version__ to match the version advertised in PyPI.
Adjust the module __version__ to match the version advertised in PyPI.
Python
apache-2.0
marcinkaszynski/apnsclient
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
<commit_before># Copyright 2013 Getlogic BV, Sardar Yumatov # # 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 ...
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# Copyright 2013 Getlogic BV, Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
<commit_before># Copyright 2013 Getlogic BV, Sardar Yumatov # # 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 ...
c21eaccbee53f2b915fc35b85bf665e84b81dc8c
app/celery/__init__.py
app/celery/__init__.py
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.config['CELERY_BROKER_URL'], ) app.logger.info('Setting up celery: %s', app.config['CELERY_BROKER_URL']) ...
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): if not app.config['CELERY_BROKER_URL']: app.logger.info('Celery broker URL not set') return super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.co...
Add logging for missing CELERY_BROKER_URL
Add logging for missing CELERY_BROKER_URL
Python
mit
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.config['CELERY_BROKER_URL'], ) app.logger.info('Setting up celery: %s', app.config['CELERY_BROKER_URL']) ...
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): if not app.config['CELERY_BROKER_URL']: app.logger.info('Celery broker URL not set') return super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.co...
<commit_before>from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.config['CELERY_BROKER_URL'], ) app.logger.info('Setting up celery: %s', app.config['CELERY_BROK...
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): if not app.config['CELERY_BROKER_URL']: app.logger.info('Celery broker URL not set') return super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.co...
from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.config['CELERY_BROKER_URL'], ) app.logger.info('Setting up celery: %s', app.config['CELERY_BROKER_URL']) ...
<commit_before>from celery import Celery class NewAcropolisCelery(Celery): def init_app(self, app): super(NewAcropolisCelery, self).__init__( app.import_name, broker=app.config['CELERY_BROKER_URL'], ) app.logger.info('Setting up celery: %s', app.config['CELERY_BROK...
df03a2d9543b392fb9ea9c027b93f4ed736e6788
pyked/_version.py
pyked/_version.py
__version_info__ = (0, 1, 1) __version__ = '.'.join(map(str, __version_info__))
__version_info__ = (0, 1, 1, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info__[-1]
Allow alpha versions in the versioning string
Allow alpha versions in the versioning string
Python
bsd-3-clause
bryanwweber/PyKED,pr-omethe-us/PyKED
__version_info__ = (0, 1, 1) __version__ = '.'.join(map(str, __version_info__)) Allow alpha versions in the versioning string
__version_info__ = (0, 1, 1, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info__[-1]
<commit_before>__version_info__ = (0, 1, 1) __version__ = '.'.join(map(str, __version_info__)) <commit_msg>Allow alpha versions in the versioning string<commit_after>
__version_info__ = (0, 1, 1, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info__[-1]
__version_info__ = (0, 1, 1) __version__ = '.'.join(map(str, __version_info__)) Allow alpha versions in the versioning string__version_info__ = (0, 1, 1, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info__[-1]
<commit_before>__version_info__ = (0, 1, 1) __version__ = '.'.join(map(str, __version_info__)) <commit_msg>Allow alpha versions in the versioning string<commit_after>__version_info__ = (0, 1, 1, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info...
27d8c3e0944056d23f1d25c651f7988f6cbf8353
froide/helper/tasks.py
froide/helper/tasks.py
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
Rewrite delayed_remove task: instance is gone, so cannot retrieve. Fake instance with proper pk and let haystack remove it from index.
Rewrite delayed_remove task: instance is gone, so cannot retrieve. Fake instance with proper pk and let haystack remove it from index.
Python
mit
CodeforHawaii/froide,CodeforHawaii/froide,LilithWittmann/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,okfse/froide,catcosmo/froide,okfse/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,CodeforHawaii/froide,CodeforHawaii/froide,LilithWittmann/froide,fin/froide,catcosmo/froide,catcosmo/froide,LilithWitt...
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
<commit_before>from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance =...
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
<commit_before>from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance =...
ca97a29dded7278b40785fe88b5e8c9ceb542d86
urllib3/util/wait.py
urllib3/util/wait.py
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
Use DefaultSelector as context manager.
Use DefaultSelector as context manager.
Python
mit
sigmavirus24/urllib3,Lukasa/urllib3,Disassem/urllib3,Lukasa/urllib3,Disassem/urllib3,urllib3/urllib3,urllib3/urllib3,sigmavirus24/urllib3
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
<commit_before>from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can...
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be interacted ...
<commit_before>from .selectors import ( HAS_SELECT, DefaultSelector, EVENT_READ, EVENT_WRITE ) def _wait_for_io_events(socks, events, timeout=None): """ Waits for IO events to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can...
785717703baf0c8fd9234058a6c9845a6838a8bf
salt/modules/key.py
salt/modules/key.py
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
Use configurable hash_type for general Key fingerprinting
Use configurable hash_type for general Key fingerprinting
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
<commit_before># -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: ...
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
# -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: bash s...
<commit_before># -*- coding: utf-8 -*- ''' Functions to view the minion's public key information ''' from __future__ import absolute_import # Import python libs import os # Import Salt libs import salt.utils def finger(): ''' Return the minion's public key fingerprint CLI Example: .. code-block:: ...
3ef70e2e4e319414441b69b0f96ca9d52df9929e
runner/update_manifest.py
runner/update_manifest.py
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
Fix the manifest.load call in the test runner.
Fix the manifest.load call in the test runner.
Python
bsd-3-clause
wpt-on-tv-tf/wpt-tools,wpt-on-tv-tf/wpt-tools,vivliostyle/wpt-tools,frewsxcv/wpt-tools,frewsxcv/wpt-tools,UprootStaging/wpt-tools,frewsxcv/wpt-tools,UprootStaging/wpt-tools,wpt-on-tv-tf/wpt-tools,kaixinjxq/wpt-tools,vivliostyle/wpt-tools,UprootStaging/wpt-tools,vivliostyle/wpt-tools,kaixinjxq/wpt-tools,kaixinjxq/wpt-to...
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
<commit_before>import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.jso...
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifes...
<commit_before>import imp import json import os import sys here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) root = localpaths.repo_root import manifest def main(request, response): path = os.path.join(root, "MANIFEST.jso...
373b0210483839b7ac5b4fd8eb0bcfdfe8d63d83
begood_sites/fields.py
begood_sites/fields.py
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) super(MultiSiteField, self).__init__(Site, **defaults) class SingleSiteField(mod...
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) if 'to' in defaults: del defaults['to'] super(MultiSiteField, self).__in...
Fix problem with South migrations.
Fix problem with South migrations.
Python
mit
AGoodId/begood-sites
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) super(MultiSiteField, self).__init__(Site, **defaults) class SingleSiteField(mod...
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) if 'to' in defaults: del defaults['to'] super(MultiSiteField, self).__in...
<commit_before>from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) super(MultiSiteField, self).__init__(Site, **defaults) class Sing...
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) if 'to' in defaults: del defaults['to'] super(MultiSiteField, self).__in...
from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) super(MultiSiteField, self).__init__(Site, **defaults) class SingleSiteField(mod...
<commit_before>from django.db import models from django.contrib.sites.models import Site class MultiSiteField(models.ManyToManyField): def __init__(self, **kwargs): defaults = { 'blank': False, } defaults.update(kwargs) super(MultiSiteField, self).__init__(Site, **defaults) class Sing...
a5deca67d654fa1113db3e224efefc85831146dc
mailviews/tests/__init__.py
mailviews/tests/__init__.py
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'mailviews', 'mailviews.tests', ), DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', 'mailviews', 'mailviews.tests', ), DATABASES={ ...
Add auth and contentypes django apps on tests to prevent RuntimeError on Django 1.9
Add auth and contentypes django apps on tests to prevent RuntimeError on Django 1.9
Python
apache-2.0
disqus/django-mailviews,joshowen/django-mailviews,disqus/django-mailviews,danxshap/django-mailviews,joshowen/django-mailviews,danxshap/django-mailviews
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'mailviews', 'mailviews.tests', ), DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', 'mailviews', 'mailviews.tests', ), DATABASES={ ...
<commit_before>import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'mailviews', 'mailviews.tests', ), DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sq...
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', 'mailviews', 'mailviews.tests', ), DATABASES={ ...
import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'mailviews', 'mailviews.tests', ), DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
<commit_before>import django from django.conf import settings if not settings.configured: settings.configure( DEBUG=True, INSTALLED_APPS=( 'mailviews', 'mailviews.tests', ), DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sq...
022fdeed936c0ad74a2510e568bdc385b4ebb13d
masters/master.chromium/master_android_cfg.py
masters/master.chromium/master_android_cfg.py
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
Fix typo in annotation script location
Fix typo in annotation script location In 2a07fd1866 I erroneously pointed to the wrong location for the annotation script for main waterfall. This fixes that. TBR=nsylvain@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/10917129 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@155426 0039...
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = h...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = h...
5dfd723b37e208c1b81e65cd2df1b7d9226493b3
numpy/_array_api/_sorting_functions.py
numpy/_array_api/_sorting_functions.py
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
Add missing returns to the array API sorting functions
Add missing returns to the array API sorting functions
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
<commit_before>def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: ...
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: res = flip(r...
<commit_before>def argsort(x, /, *, axis=-1, descending=False, stable=True): from .. import argsort from .. import flip # Note: this keyword argument is different, and the default is different. kind = 'stable' if stable else 'quicksort' res = argsort(x, axis=axis, kind=kind) if descending: ...
b2470140f7fb33bee2af34cdc51695406a4073ec
utils/layers_test.py
utils/layers_test.py
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs = np.random.nor...
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import os import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs =...
Resolve Minor Issues with Test Ensure that the tensorflow tests run on the CPU
Resolve Minor Issues with Test Ensure that the tensorflow tests run on the CPU
Python
apache-2.0
googleinterns/audio_synthesis
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs = np.random.nor...
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import os import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs =...
<commit_before># Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs ...
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import os import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs =...
# Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs = np.random.nor...
<commit_before># Lint as: python3 """Tests for spectral.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import layers class LayersTest(tf.test.TestCase): def test_conv_transpose_shape(self): inputs ...
5c4db9dc32eb4918866af5ae7037220b6f651a7d
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 PROJECT = os.environ.get('PROJECT', 'go-rts-zambia') DEPLOY_USER = os.environ.get('DEPLOY_USER', 'jmbo') env.path = os.path.join('/', 'var', 'praekelt', PROJECT) def restart(): sudo('/etc/init.d/nginx restart') sudo('supervisorctl reload') def deploy(): w...
Fix USER in fabric file (the deploy user and ssh user aren't necessarily the same). Set default value for PROJECT (this is the go-rts-zambia repo after all).
Fix USER in fabric file (the deploy user and ssh user aren't necessarily the same). Set default value for PROJECT (this is the go-rts-zambia repo after all).
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 PROJECT = os.environ.get('PROJECT', 'go-rts-zambia') DEPLOY_USER = os.environ.get('DEPLOY_USER', 'jmbo') env.path = os.path.join('/', 'var', 'praekelt', PROJECT) def restart(): sudo('/etc/init.d/nginx restart') sudo('supervisorctl reload') def deploy(): w...
<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 PROJECT = os.environ.get('PROJECT', 'go-rts-zambia') DEPLOY_USER = os.environ.get('DEPLOY_USER', 'jmbo') env.path = os.path.join('/', 'var', 'praekelt', PROJECT) def restart(): sudo('/etc/init.d/nginx restart') sudo('supervisorctl reload') def deploy(): w...
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...
3b99493e606a04a6338d8ee2fc299595d19b2a44
fabfile.py
fabfile.py
from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): # update version id in setup.py, changelog and docs/source/conf.py local("python setup.py sdist --formats=gztar,zip upload")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): """Update version id in setup.py, changelog and docs/source/conf.py.""" local(("python setup.py bdist_e...
Add BzTar and EGG format to Fabric script
Add BzTar and EGG format to Fabric script
Python
bsd-3-clause
janusnic/importd,pombredanne/importd,arpitremarkable/importd,pombredanne/importd,akshar-raaj/importd,hitul007/importd,akshar-raaj/importd,hitul007/importd,janusnic/importd,arpitremarkable/importd
from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): # update version id in setup.py, changelog and docs/source/conf.py local("python setup.py sdist --formats=gztar,zip upload") Add BzTar and EGG format to F...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): """Update version id in setup.py, changelog and docs/source/conf.py.""" local(("python setup.py bdist_e...
<commit_before>from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): # update version id in setup.py, changelog and docs/source/conf.py local("python setup.py sdist --formats=gztar,zip upload") <commit_msg>Ad...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): """Update version id in setup.py, changelog and docs/source/conf.py.""" local(("python setup.py bdist_e...
from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): # update version id in setup.py, changelog and docs/source/conf.py local("python setup.py sdist --formats=gztar,zip upload") Add BzTar and EGG format to F...
<commit_before>from fabric.api import local, cd def docs(): local("./bin/docs") local("./bin/python setup.py upload_sphinx --upload-dir=docs/html") def release(): # update version id in setup.py, changelog and docs/source/conf.py local("python setup.py sdist --formats=gztar,zip upload") <commit_msg>Ad...
19debebae3368be479b8368e96e17458e9a18d23
setup.py
setup.py
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
Add content type of long description
Add content type of long description
Python
mit
wind-python/windpowerlib
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
<commit_before>import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', ...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof...
<commit_before>import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.3', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', ...
22c818fdb813fbd3b7ea48bb0fd3c7324ebdd0ba
setup.py
setup.py
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
Use long_description_content_type': 'text/markdown' in README
Use long_description_content_type': 'text/markdown' in README
Python
mit
sebastianGehrmann/dblp-pub
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
<commit_before>from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and f...
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and formats search r...
<commit_before>from setuptools import setup setup( name='dblp', version='0.1.0', author='Sebastian Gehrmann', author_email='gehrmann@seas.harvard.edu', packages=['dblp'], url='https://github.com/sebastianGehrmann/dblp-pub/tree/master', license='LICENSE.txt', description='Downloads and f...
116d3837aa817dee6e15bdc24f20eac1e56066dd
buildtools/__init__.py
buildtools/__init__.py
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd','ENV','BuildEnv'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log
Add BuildEnv and ENV to __all__
Add BuildEnv and ENV to __all__
Python
mit
N3X15/python-build-tools,N3X15/python-build-tools,N3X15/python-build-tools
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log Add BuildEnv and ENV to __all__
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd','ENV','BuildEnv'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log
<commit_before>__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log <commit_msg>Add BuildEnv and ENV to __all__<commit_after>
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd','ENV','BuildEnv'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log
__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log Add BuildEnv and ENV to __all____all__ = ['Config', 'Chdir', 'cmd', 'log','Propert...
<commit_before>__all__ = ['Config', 'Chdir', 'cmd', 'log','Properties','replace_vars','cmd'] from buildtools.config import Config, Properties, replace_vars from buildtools.os_utils import Chdir, cmd, ENV, BuildEnv from buildtools.bt_logging import log <commit_msg>Add BuildEnv and ENV to __all__<commit_after>__all__ = ...
8a9c6c9df8f29f5ff6f9bb1a6200536f08cf08a9
getlost.py
getlost.py
from os import environ from urllib2 import urlopen from flask import Flask, json, make_response app = Flask(__name__) url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat},{tlng}' @app.route("/rout...
from os import environ from urllib2 import urlopen from flask import Flask, json, jsonify app = Flask(__name__) from hip import get_ranking_array url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat...
Return route, hip rank and total rank
Return route, hip rank and total rank
Python
apache-2.0
kynan/GetLost
from os import environ from urllib2 import urlopen from flask import Flask, json, make_response app = Flask(__name__) url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat},{tlng}' @app.route("/rout...
from os import environ from urllib2 import urlopen from flask import Flask, json, jsonify app = Flask(__name__) from hip import get_ranking_array url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat...
<commit_before>from os import environ from urllib2 import urlopen from flask import Flask, json, make_response app = Flask(__name__) url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat},{tlng}' @a...
from os import environ from urllib2 import urlopen from flask import Flask, json, jsonify app = Flask(__name__) from hip import get_ranking_array url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat...
from os import environ from urllib2 import urlopen from flask import Flask, json, make_response app = Flask(__name__) url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat},{tlng}' @app.route("/rout...
<commit_before>from os import environ from urllib2 import urlopen from flask import Flask, json, make_response app = Flask(__name__) url = 'http://open.mapquestapi.com/directions/v2/route' params = '?key={apikey}&ambiguities=ignore&routeType=pedestrian' rel = url + params + '&from={flat},{flng}&to={tlat},{tlng}' @a...
3617400a7c0915920384d15ff273aa4c8a805d9c
core/byzantinerandomizedconsensus.py
core/byzantinerandomizedconsensus.py
from base.consensus import Consensus class ByzantineRandomizedConsensus(Consensus): """ Implements a Byzantine Fault Tolerant Randomized Consensus Broadcast protocol. """ def propose(self, message): pass def decide(self): pass
Update Byzantine Randomized Consensus protocol class
Update Byzantine Randomized Consensus protocol class
Python
mit
koevskinikola/ByzantineRandomizedConsensus
Update Byzantine Randomized Consensus protocol class
from base.consensus import Consensus class ByzantineRandomizedConsensus(Consensus): """ Implements a Byzantine Fault Tolerant Randomized Consensus Broadcast protocol. """ def propose(self, message): pass def decide(self): pass
<commit_before><commit_msg>Update Byzantine Randomized Consensus protocol class<commit_after>
from base.consensus import Consensus class ByzantineRandomizedConsensus(Consensus): """ Implements a Byzantine Fault Tolerant Randomized Consensus Broadcast protocol. """ def propose(self, message): pass def decide(self): pass
Update Byzantine Randomized Consensus protocol classfrom base.consensus import Consensus class ByzantineRandomizedConsensus(Consensus): """ Implements a Byzantine Fault Tolerant Randomized Consensus Broadcast protocol. """ def propose(self, message): pass def decide(self): pass
<commit_before><commit_msg>Update Byzantine Randomized Consensus protocol class<commit_after>from base.consensus import Consensus class ByzantineRandomizedConsensus(Consensus): """ Implements a Byzantine Fault Tolerant Randomized Consensus Broadcast protocol. """ def propose(self, message): p...
819380c964ca30f9d3e480a61371d502b7976abe
tests/basics/subclass_native_cmp.py
tests/basics/subclass_native_cmp.py
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t)
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) print(t < (1, 2, 3), t < (1, 2, 4)) print((1, 2, 3) <= t, (1, 2, 4) < t)
Add test for tuple compare with class derived from tuple.
tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suite in for such arguments. Other comparison operators like "<" take a different path in the code so need to be tested separately.
Python
mit
adafruit/circuitpython,MrSurly/micropython,tobbad/micropython,tobbad/micropython,bvernoux/micropython,MrSurly/micropython,kerneltask/micropython,tobbad/micropython,pramasoul/micropython,bvernoux/micropython,selste/micropython,kerneltask/micropython,pozetroninc/micropython,henriknelson/micropython,henriknelson/micropyth...
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suite in for such arguments. Ot...
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) print(t < (1, 2, 3), t < (1, 2, 4)) print((1, 2, 3) <= t, (1, 2, 4) < t)
<commit_before># Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) <commit_msg>tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suit...
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) print(t < (1, 2, 3), t < (1, 2, 4)) print((1, 2, 3) <= t, (1, 2, 4) < t)
# Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suite in for such arguments. Ot...
<commit_before># Test calling non-special method inherited from native type class mytuple(tuple): pass t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) <commit_msg>tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suit...
bf84052d391774b13b8333acc06533e4ec9cde9e
MS2/visualize/dna-summary.py
MS2/visualize/dna-summary.py
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * home = os.getenv('HOME') logdir = os.path.join(home,'_dna','logs',sys.argv[1]) for d in sorted(os.listdir(logdir)) : print "====",d,"================" [nm] = os.listdir(os.path.join(logdir,d)) nm ...
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * class EntryFilter : """ Filter for log entries """ def __init__(self, strs) : self.neg = [s[1:] for s in strs if s[0] == '-'] self.pos = [s[1:] for s in strs if s[0] == '+'] ...
Allow some simplt matching on message tags
Allow some simplt matching on message tags
Python
apache-2.0
SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * home = os.getenv('HOME') logdir = os.path.join(home,'_dna','logs',sys.argv[1]) for d in sorted(os.listdir(logdir)) : print "====",d,"================" [nm] = os.listdir(os.path.join(logdir,d)) nm ...
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * class EntryFilter : """ Filter for log entries """ def __init__(self, strs) : self.neg = [s[1:] for s in strs if s[0] == '-'] self.pos = [s[1:] for s in strs if s[0] == '+'] ...
<commit_before>#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * home = os.getenv('HOME') logdir = os.path.join(home,'_dna','logs',sys.argv[1]) for d in sorted(os.listdir(logdir)) : print "====",d,"================" [nm] = os.listdir(os.path.join(log...
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * class EntryFilter : """ Filter for log entries """ def __init__(self, strs) : self.neg = [s[1:] for s in strs if s[0] == '-'] self.pos = [s[1:] for s in strs if s[0] == '+'] ...
#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * home = os.getenv('HOME') logdir = os.path.join(home,'_dna','logs',sys.argv[1]) for d in sorted(os.listdir(logdir)) : print "====",d,"================" [nm] = os.listdir(os.path.join(logdir,d)) nm ...
<commit_before>#!/usr/bin/python """ Print log for given DNA program run """ import os import sys from readevtlog import * home = os.getenv('HOME') logdir = os.path.join(home,'_dna','logs',sys.argv[1]) for d in sorted(os.listdir(logdir)) : print "====",d,"================" [nm] = os.listdir(os.path.join(log...
67f8acd6d0d9580dc346f4ddd6f765c24d687bcc
cached_counts/tests.py
cached_counts/tests.py
from django.test import TestCase from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name': 'South Norfolk', 'count': 10, 'object_id': '65666' ...
import unittest from django.test import TestCase from candidates.tests.test_create_person import mock_create_person from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name':...
Use mock_create_person to test increments work
Use mock_create_person to test increments work
Python
agpl-3.0
neavouli/yournextrepresentative,mysociety/yournextmp-popit,datamade/yournextmp-popit,mysociety/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextmp-popit,openstate/yournextrepresentative,YoQuieroSaber/yournextrepresentative,DemocracyClub/yournextrepresentative,openstate/yournextrepresentative,mysociety...
from django.test import TestCase from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name': 'South Norfolk', 'count': 10, 'object_id': '65666' ...
import unittest from django.test import TestCase from candidates.tests.test_create_person import mock_create_person from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name':...
<commit_before>from django.test import TestCase from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name': 'South Norfolk', 'count': 10, 'object...
import unittest from django.test import TestCase from candidates.tests.test_create_person import mock_create_person from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name':...
from django.test import TestCase from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name': 'South Norfolk', 'count': 10, 'object_id': '65666' ...
<commit_before>from django.test import TestCase from .models import CachedCount class CachedCountTechCase(TestCase): def setUp(self): initial_counts = ( { 'count_type': 'constituency', 'name': 'South Norfolk', 'count': 10, 'object...
cbae962b77b7277f5904279a5418a53e38148f2c
karspexet/show/models.py
karspexet/show/models.py
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
Add Show.ticket_coverage() to get statistics on coverage
Add Show.ticket_coverage() to get statistics on coverage Very left join, much SQL, wow.
Python
mit
Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
<commit_before>from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=m...
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
<commit_before>from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=m...
118eabf049db8804635001b2348fcb81c8a2a4f4
openstack_dashboard/dashboards/admin/routers/ports/tables.py
openstack_dashboard/dashboards/admin/routers/ports/tables.py
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
Fix router details's name empty and change inheritance project table
Fix router details's name empty and change inheritance project table In admin router details page, the name column is empty, change to if no name show id. And change to inheritance from port table of project. Change-Id: I54d4ad95bd04db2432eb47f848917a452c5f54e9 Closes-bug:#1417948
Python
apache-2.0
j4/horizon,yeming233/horizon,henaras/horizon,yeming233/horizon,damien-dg/horizon,tqtran7/horizon,BiznetGIO/horizon,Hodorable/0602,tqtran7/horizon,RudoCris/horizon,dan1/horizon-x509,agileblaze/OpenStackTwoFactorAuthentication,kfox1111/horizon,maestro-hybrid-cloud/horizon,NeCTAR-RC/horizon,redhat-openstack/horizon,Tesora...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
<commit_before># Copyright 2012 NEC Corporation # # 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 appli...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
<commit_before># Copyright 2012 NEC Corporation # # 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 appli...
4c267c78a09128dc80be821654dd60b174d53d41
setuptools/logging.py
setuptools/logging.py
import sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibility with distuti...
import sys import inspect import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibili...
Replace condition to patch distutils.dist.log
Replace condition to patch distutils.dist.log As `distutils.log.Log` was backfilled for compatibility we no longer can use this as a condition.
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
import sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibility with distuti...
import sys import inspect import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibili...
<commit_before>import sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibili...
import sys import inspect import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibili...
import sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibility with distuti...
<commit_before>import sys import logging import distutils.log from . import monkey def _not_warning(record): return record.levelno < logging.WARNING def configure(): """ Configure logging to emit warning and above to stderr and everything else to stdout. This behavior is provided for compatibili...
92e96d8b352f608a0d04521a140bdd3dcbe5ebbc
test/tools/service.py
test/tools/service.py
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.v2.client as nvclient client_args = { } nova = nvclient.Client(auth_url=env['OS_AUTH_URL'], username=env['OS_USERNAME'], api_key=env['OS_PASSWORD'], ...
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.client as nvclient client_args = { } nova = nvclient.Client('2', env['OS_USERNAME'], env['OS_PASSWORD'], env['OS_TENANT_NAME'], env['OS_AUTH_URL']) keystone = ksclient.C...
Fix nova client usage, it should not be initialized this way
Fix nova client usage, it should not be initialized this way
Python
apache-2.0
pellaeon/bsd-cloudinit-installer,pellaeon/bsd-cloudinit-installer
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.v2.client as nvclient client_args = { } nova = nvclient.Client(auth_url=env['OS_AUTH_URL'], username=env['OS_USERNAME'], api_key=env['OS_PASSWORD'], ...
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.client as nvclient client_args = { } nova = nvclient.Client('2', env['OS_USERNAME'], env['OS_PASSWORD'], env['OS_TENANT_NAME'], env['OS_AUTH_URL']) keystone = ksclient.C...
<commit_before>from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.v2.client as nvclient client_args = { } nova = nvclient.Client(auth_url=env['OS_AUTH_URL'], username=env['OS_USERNAME'], api_key=env['OS_PA...
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.client as nvclient client_args = { } nova = nvclient.Client('2', env['OS_USERNAME'], env['OS_PASSWORD'], env['OS_TENANT_NAME'], env['OS_AUTH_URL']) keystone = ksclient.C...
from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.v2.client as nvclient client_args = { } nova = nvclient.Client(auth_url=env['OS_AUTH_URL'], username=env['OS_USERNAME'], api_key=env['OS_PASSWORD'], ...
<commit_before>from os import environ as env from glanceclient import Client as glclient import keystoneclient.v2_0.client as ksclient import novaclient.v2.client as nvclient client_args = { } nova = nvclient.Client(auth_url=env['OS_AUTH_URL'], username=env['OS_USERNAME'], api_key=env['OS_PA...
3d524f00269026bc66dcd2b085c60c0d43242ee5
changes/api/jobstep_deallocate.py
changes/api/jobstep_deallocate.py
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def post(sel...
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Result, Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def ...
Allow deallocation of running jobsteps
Allow deallocation of running jobsteps
Python
apache-2.0
bowlofstew/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def post(sel...
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Result, Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def ...
<commit_before>from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): ...
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Result, Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def ...
from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): def post(sel...
<commit_before>from __future__ import absolute_import, division, unicode_literals from changes.api.base import APIView from changes.constants import Status from changes.config import db from changes.jobs.sync_job_step import sync_job_step from changes.models import JobStep class JobStepDeallocateAPIView(APIView): ...
0409580aed43b6a0556fcc4b8e6e9252d9f082ea
froide/publicbody/management/commands/validate_publicbodies.py
froide/publicbody/management/commands/validate_publicbodies.py
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
Use queryset in validate publicbodies command
Use queryset in validate publicbodies command
Python
mit
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,fin/froide
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
<commit_before>from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...vali...
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...validators import P...
<commit_before>from io import StringIO from contextlib import contextmanager from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation from django.utils.translation import ugettext_lazy as _ from froide.helper.email_sending import send_mail from ...vali...
62f3368eabc54c2cb2a78308fac639e65f55e989
hello.py
hello.py
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
Change indentation from 2 spaces (Google standard) to 4 spaces (PEP-8).
Change indentation from 2 spaces (Google standard) to 4 spaces (PEP-8). Add comments.
Python
apache-2.0
beepscore/google-python-exercises,beepscore/google-python-exercises
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
<commit_before>#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
<commit_before>#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this...
b211306824db0a10a79cdab4153c457813b44bca
linter.py
linter.py
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
Remove deprecated version requirement settings
Remove deprecated version requirement settings Linter plugins can no longer set version requirements. https://github.com/SublimeLinter/SublimeLinter/issues/1087
Python
mit
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
<commit_before># # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
<commit_before># # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(...
fa2d26f6c7652f1c4964ff5df076bf9dcdd3a493
webvtt/exceptions.py
webvtt/exceptions.py
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted"""
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" class InvalidCaptionsError(Exception): """Error raised when passing wrong captions to the segmenter"""
Add exception for invalid captions
Add exception for invalid captions
Python
mit
sampattuzzi/webvtt-py,glut23/webvtt-py
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" Add exception for invalid captions
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" class InvalidCaptionsError(Exception): """Error raised when passing wrong captions to the segmenter"""
<commit_before> class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" <commit_msg>Add exception for invalid captions<commit_after>
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" class InvalidCaptionsError(Exception): """Error raised when passing wrong captions to the segmenter"""
class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" Add exception for invalid captions class MalformedFileError(Exception): """Error raised when the file is not well f...
<commit_before> class MalformedFileError(Exception): """Error raised when the file is not well formatted""" class MalformedCaptionError(Exception): """Error raised when a caption is not well formatted""" <commit_msg>Add exception for invalid captions<commit_after> class MalformedFileError(Exception): ""...
d5c296197c7f5b422f44e58f8e58ead5fdc5c2ad
reports/models.py
reports/models.py
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(_("Date"), defa...
from datetime import datetime from django.db import models class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(default=datetime.now) copies = models.ManyToManyField('protocols.Top...
Add new initial migration for reports
Add new initial migration for reports
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(_("Date"), defa...
from datetime import datetime from django.db import models class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(default=datetime.now) copies = models.ManyToManyField('protocols.Top...
<commit_before>from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(...
from datetime import datetime from django.db import models class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(default=datetime.now) copies = models.ManyToManyField('protocols.Top...
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(_("Date"), defa...
<commit_before>from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class Report(models.Model): addressed_to = models.TextField() reported_from = models.ForeignKey('members.User') content = models.TextField() created_at = models.DateField(...
a542cfe1462869c2b64b2202d7316a0af1e3a613
core/modules/can_access.py
core/modules/can_access.py
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: answer = "PL" return answer
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: print("ERROR: Page is inaccessible, return U and move to next case.") answer = "U" return answer
Change handling for inaccessible pages
Change handling for inaccessible pages
Python
bsd-2-clause
mjkim610/phishing-detection,jaeyung1001/phishing_site_detection
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: answer = "PL" return answerChange handling for inaccessible pages
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: print("ERROR: Page is inaccessible, return U and move to next case.") answer = "U" return answer
<commit_before>import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: answer = "PL" return answer<commit_msg>Change handling for inaccessible pages<commit_after>
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: print("ERROR: Page is inaccessible, return U and move to next case.") answer = "U" return answer
import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: answer = "PL" return answerChange handling for inaccessible pagesimport requests def can_access(url): try: current_page = ...
<commit_before>import requests def can_access(url): try: current_page = (requests.get(url).text, 'lxml') answer = "SL" except requests.exceptions.ConnectionError: answer = "PL" return answer<commit_msg>Change handling for inaccessible pages<commit_after>import requests def can_acce...
bb14d53e8db76686a3a93a814b1258933083dc0b
resin/__init__.py
resin/__init__.py
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
Add getting started section to the docs.
Add getting started section to the docs.
Python
apache-2.0
resin-io/resin-sdk-python,resin-io/resin-sdk-python
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
<commit_before>""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``...
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``` https://githu...
<commit_before>""" Welcome to the Resin Python SDK documentation. This document aims to describe all the functions supported by the SDK, as well as showing examples of their expected usage. Install the Resin SDK: From Pip: ``` pip install resin-sdk ``` From Source (In case, you want to test a development branch): ``...
e2ffc3d09157a0bfba4a0bcaca98691d99d04d77
Scripted/CIP_/CIP/ui/__init__.py
Scripted/CIP_/CIP/ui/__init__.py
from .CIP_EditorWidget import CIP_EditorWidget from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget import A...
# from .CIP_EditorWidget import CIP_EditorWidget # from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget impo...
Make CIP compatible with Slicer 5
ENH: Make CIP compatible with Slicer 5 - remove CIP UI Editor includes to enable CIP loading in Slicer preview
Python
bsd-3-clause
acil-bwh/SlicerCIP,acil-bwh/SlicerCIP,acil-bwh/SlicerCIP,acil-bwh/SlicerCIP
from .CIP_EditorWidget import CIP_EditorWidget from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget import A...
# from .CIP_EditorWidget import CIP_EditorWidget # from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget impo...
<commit_before>from .CIP_EditorWidget import CIP_EditorWidget from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdate...
# from .CIP_EditorWidget import CIP_EditorWidget # from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget impo...
from .CIP_EditorWidget import CIP_EditorWidget from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdateWidget import A...
<commit_before>from .CIP_EditorWidget import CIP_EditorWidget from .CIP_EditBox import * from .CaseReportsWidget import * from .PreProcessingWidget import * from .MIPViewerWidget import * from .CollapsibleMultilineText import * from .PdfReporter import * #from ACIL_GetImage.CaseNavigatorWidget import * #from AutoUpdate...
5c116f4559520083d65848b3bde8bb95621a1633
moksha/hub/amqp/__init__.py
moksha/hub/amqp/__init__.py
""" Here is where we configure which AMQP hub implementation we are going to use. """ from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub #from pyamqplib import AMQPLibHub #AMQPHub = AMQPLibHub
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
Handle working without the qpid module
Handle working without the qpid module
Python
apache-2.0
mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,lmacken/moksha,ralphbean/moksha,ralphbean/moksha,lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha
""" Here is where we configure which AMQP hub implementation we are going to use. """ from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub #from pyamqplib import AMQPLibHub #AMQPHub = AMQPLibHub Handle working without the qpid module
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
<commit_before>""" Here is where we configure which AMQP hub implementation we are going to use. """ from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub #from pyamqplib import AMQPLibHub #AMQPHub = AMQPLibHub <commit_msg>Handle working without the qpid module<commit_after>
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
""" Here is where we configure which AMQP hub implementation we are going to use. """ from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub #from pyamqplib import AMQPLibHub #AMQPHub = AMQPLibHub Handle working without the qpid module""" Here is where we configure which AMQP hub implementation we are going to use. ""...
<commit_before>""" Here is where we configure which AMQP hub implementation we are going to use. """ from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub #from pyamqplib import AMQPLibHub #AMQPHub = AMQPLibHub <commit_msg>Handle working without the qpid module<commit_after>""" Here is where we configure which AMQP h...
eff9c3865f06eb0fe2100b48274c88db63c2cf4c
websocket_server/__init__.py
websocket_server/__init__.py
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
Embed constants into toplevel module
Embed constants into toplevel module
Python
mit
CylonicRaider/websocket-server,CylonicRaider/websocket-server
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
<commit_before># websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSoc...
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
# websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSockets and other ...
<commit_before># websocket_server -- WebSocket server library # https://github.com/CylonicRaider/websocket-server """ websocket_server -- WebSocket server library This is a little stand-alone library for WebSocket servers. It integrates neatly with the standard library, providing easily set-up servers for both WebSoc...
1bfc91af9d3ef59e39e6b4693457e00e2877f321
rtrss/database.py
rtrss/database.py
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLAL...
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLA...
Remove obsolete imports, add logging
Remove obsolete imports, add logging
Python
apache-2.0
notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLAL...
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLA...
<commit_before>import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engi...
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLA...
import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engine(config.SQLAL...
<commit_before>import logging from contextlib import contextmanager from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError from rtrss import OperationInterruptedException from rtrss import config _logger = logging.getLogger(__name__) engine = create_engi...
83db8d5eb376304b1482b3f46f0b6a800571f50c
non_iterable_example/_5_context.py
non_iterable_example/_5_context.py
if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) def print_numbers(numbers): for n in numbers: print(n)
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers)
Make function exist when called.
Make function exist when called.
Python
unlicense
markshannon/buggy_code
if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) def print_numbers(numbers): for n in numbers: print(n) Make function exist when called.
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers)
<commit_before> if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) def print_numbers(numbers): for n in numbers: print(n) <commit_msg>Make function exist when called.<commit_after>
def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers)
if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) def print_numbers(numbers): for n in numbers: print(n) Make function exist when called. def print_numbers(numbers): for n in numbers: print(n) if random: numbers = 1 print_nu...
<commit_before> if random: numbers = 1 print_numbers(numbers) else: numbers = 1, 2, 3 print_numbers(numbers) def print_numbers(numbers): for n in numbers: print(n) <commit_msg>Make function exist when called.<commit_after> def print_numbers(numbers): for n in numbers: print(n)...
f3617d42b5ac9234f2c245dedbba87cf39c816dc
tests/test_accounts.py
tests/test_accounts.py
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/r...
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/...
Update file for pep8 compliance
Update file for pep8 compliance
Python
mit
Stackdriver/twilio-python,cinemapub/bright-response,tysonholub/twilio-python,Mobii/twilio-python,supermanheng21/twilio-python,cinemapub/bright-response,bcorwin/twilio-python,johannakate/twilio-python,clearcare/twilio-python,Stackdriver/twilio-python,YeelerG/twilio-python,Rosy-S/twilio-python,twilio/twilio-python
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/r...
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/...
<commit_before>import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_moc...
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/...
import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_mock_json("tests/r...
<commit_before>import unittest from mock import Mock, patch from tools import create_mock_json from twilio.rest.resources import Account class AccountTest(unittest.TestCase): @patch("twilio.rest.resources.base.make_twilio_request") def test_usage_records_subresource(self, request): resp = create_moc...
17e80f746fd634f84f3050b8ef613537a62c1f73
reddit.py
reddit.py
#!/usr/bin/env python import sys,requests REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] STATEFILE="/home/ircbot/state/reddit-%s-%s-storyids"%(CHANNEL,REDDIT) seen = set(open(STATEFILE).read().split("\n")) data = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)).json() new=[] writer=open("/...
#!/usr/bin/env python import sys,requests,json REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] # Test mode: if len(sys.argv) == 5: print "running in test mode" data = json.loads(open(sys.argv[4]).read()) writer=sys.stdout else: req = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)) ...
Add a test mode, handle 429 errors, stop corrupting state file
Add a test mode, handle 429 errors, stop corrupting state file
Python
unlicense
iibot-irc/irc-reddit,iibot-irc/irc-reddit
#!/usr/bin/env python import sys,requests REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] STATEFILE="/home/ircbot/state/reddit-%s-%s-storyids"%(CHANNEL,REDDIT) seen = set(open(STATEFILE).read().split("\n")) data = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)).json() new=[] writer=open("/...
#!/usr/bin/env python import sys,requests,json REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] # Test mode: if len(sys.argv) == 5: print "running in test mode" data = json.loads(open(sys.argv[4]).read()) writer=sys.stdout else: req = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)) ...
<commit_before>#!/usr/bin/env python import sys,requests REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] STATEFILE="/home/ircbot/state/reddit-%s-%s-storyids"%(CHANNEL,REDDIT) seen = set(open(STATEFILE).read().split("\n")) data = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)).json() new=[]...
#!/usr/bin/env python import sys,requests,json REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] # Test mode: if len(sys.argv) == 5: print "running in test mode" data = json.loads(open(sys.argv[4]).read()) writer=sys.stdout else: req = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)) ...
#!/usr/bin/env python import sys,requests REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] STATEFILE="/home/ircbot/state/reddit-%s-%s-storyids"%(CHANNEL,REDDIT) seen = set(open(STATEFILE).read().split("\n")) data = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)).json() new=[] writer=open("/...
<commit_before>#!/usr/bin/env python import sys,requests REDDIT=sys.argv[1] CHANNEL=sys.argv[2] FEED=sys.argv[3] STATEFILE="/home/ircbot/state/reddit-%s-%s-storyids"%(CHANNEL,REDDIT) seen = set(open(STATEFILE).read().split("\n")) data = requests.get("http://www.reddit.com/r/%s/%s.json" %(REDDIT,FEED)).json() new=[]...
189f62b93382a1db0f2780678bbd4ad9c7769623
util.py
util.py
import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%%-0%ds" % (i,)) return " ".join(t) def column_report(title, fields, c...
# As a hack, disable SSL warnings. import urllib3 urllib3.disable_warnings() import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%...
Disable SSL warnings by default.
Disable SSL warnings by default.
Python
mit
lightcrest/kahu-api-demo
import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%%-0%ds" % (i,)) return " ".join(t) def column_report(title, fields, c...
# As a hack, disable SSL warnings. import urllib3 urllib3.disable_warnings() import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%...
<commit_before>import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%%-0%ds" % (i,)) return " ".join(t) def column_report(t...
# As a hack, disable SSL warnings. import urllib3 urllib3.disable_warnings() import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%...
import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%%-0%ds" % (i,)) return " ".join(t) def column_report(title, fields, c...
<commit_before>import sys def format_cols(cols): widths = [0] * len(cols[0]) for i in cols: for idx, val in enumerate(i): widths[idx] = max(len(val), widths[idx]) f = "" t = [] for i in widths: t.append("%%-0%ds" % (i,)) return " ".join(t) def column_report(t...
9195060fa66b2a068bca4680716a0d5b7be9b13d
wake.py
wake.py
import couchdb from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug...
from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug=True)
Clean up imports and whitespace.
Clean up imports and whitespace.
Python
bsd-3-clause
chromakode/wake
import couchdb from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug...
from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug=True)
<commit_before>import couchdb from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': ...
from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug=True)
import couchdb from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': app.run(debug...
<commit_before>import couchdb from been.couch import CouchStore from flask import Flask, render_template app = Flask(__name__) app.jinja_env.trim_blocks = True store = CouchStore() store.load() @app.route('/') def wake(): return render_template('stream.html', events=store.events()) if __name__ == '__main__': ...
8161ec1fc511ba948451ce121c863ca878ef482d
tests/test_pool.py
tests/test_pool.py
import random import unittest from aioes.pool import RandomSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2, 3]) self.a...
import random import unittest from aioes.pool import RandomSelector, RoundRobinSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2...
Add test for round-robin selector
Add test for round-robin selector
Python
apache-2.0
aio-libs/aioes
import random import unittest from aioes.pool import RandomSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2, 3]) self.a...
import random import unittest from aioes.pool import RandomSelector, RoundRobinSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2...
<commit_before>import random import unittest from aioes.pool import RandomSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2, 3])...
import random import unittest from aioes.pool import RandomSelector, RoundRobinSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2...
import random import unittest from aioes.pool import RandomSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2, 3]) self.a...
<commit_before>import random import unittest from aioes.pool import RandomSelector class TestRandomSelector(unittest.TestCase): def setUp(self): random.seed(123456) def tearDown(self): random.seed(None) def test_select(self): s = RandomSelector() r = s.select([1, 2, 3])...
2190d5a08a49fb4d9980a744a8cf6e6b26651aaf
addons/event_sale/__openerp__.py
addons/event_sale/__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
Remove crm as dependency of event_sale
Remove crm as dependency of event_sale There is no need for CRM to have event management. Introduced at 64d63ffaa6f5f2e72084ea6aedc6f2c2b7130ca6 for probably no reason...
Python
agpl-3.0
sysadminmatmoz/OCB,microcom/odoo,Elico-Corp/odoo_OCB,laslabs/odoo,storm-computers/odoo,stephen144/odoo,bplancher/odoo,laslabs/odoo,sysadminmatmoz/OCB,stephen144/odoo,hip-odoo/odoo,microcom/odoo,ygol/odoo,optima-ict/odoo,storm-computers/odoo,storm-computers/odoo,ygol/odoo,bplancher/odoo,bplancher/odoo,stephen144/odoo,yg...
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
<commit_before># -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect y...
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
# -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect your registratio...
<commit_before># -*- coding: utf-8 -*- { 'name': 'Events Sales', 'version': '1.1', 'category': 'Tools', 'website': 'https://www.odoo.com/page/events', 'description': """ Creating registration with sale orders. ======================================= This module allows you to automate and connect y...
7fe3eae251f3b0b4d433cf2d14f619306159ae43
manage.py
manage.py
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("FLASK_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": manager.run...
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": mana...
Change environment variable for app configuration
Change environment variable for app configuration
Python
mit
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("FLASK_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": manager.run...
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": mana...
<commit_before>import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("FLASK_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": ...
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": mana...
import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("FLASK_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": manager.run...
<commit_before>import os from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import create_app, db app = create_app(os.getenv("FLASK_CONFIG") or "default") migrate = Migrate(app, db) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == "__main__": ...
9f8a8321fbed1008f0eec608ba7bce9b08897e40
manage.py
manage.py
import os import unittest from flask.ext.script import Manager from server import app from server.models import db manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() db.create_all() @manager.command def test(): tests_path ...
import os import unittest from flask.ext.script import Manager from server import app from server.models import db from server.models import Lecturer, Course, Lecture, Comment manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() ...
Add command to mock some db data
Add command to mock some db data
Python
mit
MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS
import os import unittest from flask.ext.script import Manager from server import app from server.models import db manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() db.create_all() @manager.command def test(): tests_path ...
import os import unittest from flask.ext.script import Manager from server import app from server.models import db from server.models import Lecturer, Course, Lecture, Comment manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() ...
<commit_before>import os import unittest from flask.ext.script import Manager from server import app from server.models import db manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() db.create_all() @manager.command def test(): ...
import os import unittest from flask.ext.script import Manager from server import app from server.models import db from server.models import Lecturer, Course, Lecture, Comment manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() ...
import os import unittest from flask.ext.script import Manager from server import app from server.models import db manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() db.create_all() @manager.command def test(): tests_path ...
<commit_before>import os import unittest from flask.ext.script import Manager from server import app from server.models import db manager = Manager(app) @manager.command def init_db(): """ Initialize database: drop and create all columns """ db.drop_all() db.create_all() @manager.command def test(): ...
abcd2bd21a9033353e04514edd78a2a0a06292de
manage.py
manage.py
from flask.ext.script import Manager, Shell from app import create_app, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) def _context(): """ Expose shell session access to the app and db modules....
from flask.ext.script import Manager, Shell, prompt, prompt_pass from app import create_app, models, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) manager = Manager(app) @manager.command def init_db(...
Add commands for database and user creation
Add commands for database and user creation
Python
mit
jawrainey/atc,jawrainey/atc
from flask.ext.script import Manager, Shell from app import create_app, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) def _context(): """ Expose shell session access to the app and db modules....
from flask.ext.script import Manager, Shell, prompt, prompt_pass from app import create_app, models, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) manager = Manager(app) @manager.command def init_db(...
<commit_before>from flask.ext.script import Manager, Shell from app import create_app, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) def _context(): """ Expose shell session access to the app ...
from flask.ext.script import Manager, Shell, prompt, prompt_pass from app import create_app, models, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) manager = Manager(app) @manager.command def init_db(...
from flask.ext.script import Manager, Shell from app import create_app, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) def _context(): """ Expose shell session access to the app and db modules....
<commit_before>from flask.ext.script import Manager, Shell from app import create_app, db from settings import DevConfig, ProdConfig import os if os.environ.get("ENV") == 'prod': app = create_app(ProdConfig) else: app = create_app(DevConfig) def _context(): """ Expose shell session access to the app ...
43002f30c23f0a5d739a096ec8e9c445a9502f97
manage.py
manage.py
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from waitress import serve # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev') app = create_ap...
#!/usr/bin/env python import os from app import app, assets from flask.ext.script import Manager, Server from flask.ext.assets import ManageAssets from flask.ext.script.commands import ShowUrls, Clean # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev')...
Add assets command and misc clean-up
Add assets command and misc clean-up
Python
mit
doomspork/seancallan.com,doomspork/seancallan.com,doomspork/seancallan.com
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from waitress import serve # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev') app = create_ap...
#!/usr/bin/env python import os from app import app, assets from flask.ext.script import Manager, Server from flask.ext.assets import ManageAssets from flask.ext.script.commands import ShowUrls, Clean # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev')...
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from waitress import serve # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev') ...
#!/usr/bin/env python import os from app import app, assets from flask.ext.script import Manager, Server from flask.ext.assets import ManageAssets from flask.ext.script.commands import ShowUrls, Clean # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev')...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from waitress import serve # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev') app = create_ap...
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from waitress import serve # default to dev config because no one should use this in # production anyway env = os.environ.get('APP_ENV', 'dev') ...
084a923d928996022936e5c942e69876dc409b5e
edx_data_research/cli/commands.py
edx_data_research/cli/commands.py
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
Define proxy function for course specific tracking logs
Define proxy function for course specific tracking logs
Python
mit
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
<commit_before>""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic(args) geta...
<commit_before>""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research import parsing from edx_data_research import reporting def cmd_report_basic(args): """ Run basic analytics """ edx_obj = reporting.Basic...
db960486f223e04fe08a8f2b9619aa887dcafeda
yuno.py
yuno.py
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) config.update('YUNO_HOME',...
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) config.u...
Resolve symlinks when detecting YUNO_HOME.
Resolve symlinks when detecting YUNO_HOME.
Python
mit
bulatb/yuno,bulatb/yuno
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) config.update('YUNO_HOME',...
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) config.u...
<commit_before>#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) config.upda...
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) config.u...
#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) config.update('YUNO_HOME',...
<commit_before>#!/usr/bin/env python3 import os import re import sys from yuno.core import cli, config from yuno.core.util import working_dir def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) config.upda...
0adc28fffafbce685dc74009891ced9333b76eb9
minify.py
minify.py
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join from htmlmin.minify import html_minify as min from pelican import signals logger = getLogger(__name__) def minify_html(pelican): """Minify all HTML files. :param pelican: The Peli...
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join import sys from htmlmin.minify import html_minify as min from pelican import signals # we need save unicode strings to files if sys.version_info[0] < 3: import codecs _open_func_bak ...
Save unicode strings to file
Save unicode strings to file Fix for #1 'ascii' codec can't encode character...
Python
unlicense
rdegges/pelican-minify
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join from htmlmin.minify import html_minify as min from pelican import signals logger = getLogger(__name__) def minify_html(pelican): """Minify all HTML files. :param pelican: The Peli...
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join import sys from htmlmin.minify import html_minify as min from pelican import signals # we need save unicode strings to files if sys.version_info[0] < 3: import codecs _open_func_bak ...
<commit_before>"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join from htmlmin.minify import html_minify as min from pelican import signals logger = getLogger(__name__) def minify_html(pelican): """Minify all HTML files. :param pe...
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join import sys from htmlmin.minify import html_minify as min from pelican import signals # we need save unicode strings to files if sys.version_info[0] < 3: import codecs _open_func_bak ...
"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join from htmlmin.minify import html_minify as min from pelican import signals logger = getLogger(__name__) def minify_html(pelican): """Minify all HTML files. :param pelican: The Peli...
<commit_before>"""A Pelican plugin which minifies HTML pages.""" from logging import getLogger from os import walk from os.path import join from htmlmin.minify import html_minify as min from pelican import signals logger = getLogger(__name__) def minify_html(pelican): """Minify all HTML files. :param pe...
395d35eafba14b52a301cb2cf0e7345ae7e0430c
src/argparser.py
src/argparser.py
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs['parents'] = [...
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): kwargs.setdefault('parents', []) super().__init__(**kwargs) ...
FIx wrong key name and simplify the assignment
FIx wrong key name and simplify the assignment
Python
mit
claudio-unipv/pvcheck,claudio-unipv/pvcheck
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs['parents'] = [...
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): kwargs.setdefault('parents', []) super().__init__(**kwargs) ...
<commit_before>"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs...
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): kwargs.setdefault('parents', []) super().__init__(**kwargs) ...
"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs['parents'] = [...
<commit_before>"""ArgumentParser with Italian translation.""" import argparse import sys def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') class ArgParser(argparse.ArgumentParser): def __init__(self, **kwargs): if kwargs.get('parent', None) is None: kwargs...
12096f2961f72e250e16b168c053e89277e442a5
test.py
test.py
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.call.CALL_FUNCTION(names[0], consts[1]), pyte.tokens.RETURN_VALUE...
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.ops.CALL_FUNCTION(names[0], consts[1]), pyte.ops.END_FUNCTION(con...
Add instruction for returning a value
Add instruction for returning a value
Python
mit
SunDwarf/Pyte
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.call.CALL_FUNCTION(names[0], consts[1]), pyte.tokens.RETURN_VALUE...
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.ops.CALL_FUNCTION(names[0], consts[1]), pyte.ops.END_FUNCTION(con...
<commit_before>import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.call.CALL_FUNCTION(names[0], consts[1]), pyte.toke...
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.ops.CALL_FUNCTION(names[0], consts[1]), pyte.ops.END_FUNCTION(con...
import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.call.CALL_FUNCTION(names[0], consts[1]), pyte.tokens.RETURN_VALUE...
<commit_before>import dis import time import pyte # Create a new consts value. consts = pyte.create_consts(None, "Hello, world!") # New varnames values varnames = pyte.create_varnames() # Create names (for globals) names = pyte.create_names("print") bc = [pyte.call.CALL_FUNCTION(names[0], consts[1]), pyte.toke...
0bd1865730106d2573acb04d95b23290e935f4c4
util.py
util.py
from math import sin, cos, asin, sqrt def hav(lona, lonb, lata, latb): # ported from latlontools # assume latitude and longitudes are in radians diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * sin(diff_lon/2)**2 c = 2 * asin(sqrt(a)) r = 6371 # radius of earth in...
from math import sin, cos, asin, sqrt def hav(lonlata, lonlatb): # ported from latlontools # assume latitude and longitudes are in radians lona = lonlata[0] lata = lonlata[1] lonb = lonlatb[0] latb = lonlatb[1] diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * ...
Change call signature of hav to 2 pairs
Change call signature of hav to 2 pairs
Python
bsd-3-clause
LemonPi/Pathtreker,LemonPi/Pathtreker,LemonPi/Pathtreker
from math import sin, cos, asin, sqrt def hav(lona, lonb, lata, latb): # ported from latlontools # assume latitude and longitudes are in radians diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * sin(diff_lon/2)**2 c = 2 * asin(sqrt(a)) r = 6371 # radius of earth in...
from math import sin, cos, asin, sqrt def hav(lonlata, lonlatb): # ported from latlontools # assume latitude and longitudes are in radians lona = lonlata[0] lata = lonlata[1] lonb = lonlatb[0] latb = lonlatb[1] diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * ...
<commit_before>from math import sin, cos, asin, sqrt def hav(lona, lonb, lata, latb): # ported from latlontools # assume latitude and longitudes are in radians diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * sin(diff_lon/2)**2 c = 2 * asin(sqrt(a)) r = 6371 # rad...
from math import sin, cos, asin, sqrt def hav(lonlata, lonlatb): # ported from latlontools # assume latitude and longitudes are in radians lona = lonlata[0] lata = lonlata[1] lonb = lonlatb[0] latb = lonlatb[1] diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * ...
from math import sin, cos, asin, sqrt def hav(lona, lonb, lata, latb): # ported from latlontools # assume latitude and longitudes are in radians diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * sin(diff_lon/2)**2 c = 2 * asin(sqrt(a)) r = 6371 # radius of earth in...
<commit_before>from math import sin, cos, asin, sqrt def hav(lona, lonb, lata, latb): # ported from latlontools # assume latitude and longitudes are in radians diff_lat = lata - latb diff_lon = lona - lonb a = sin(diff_lat/2)**2 + cos(lona) * cos(latb) * sin(diff_lon/2)**2 c = 2 * asin(sqrt(a)) r = 6371 # rad...
de7219dd9d40f316dc0dd6f6c2cad68e66898762
tests/test_live.py
tests/test_live.py
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("CI") == "true", reason="No tests against real servers ...
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("AIOSMTPLIB_LIVE_TESTS") != "true", reason="No tests ag...
Disable live tests by default
Disable live tests by default
Python
mit
cole/aiosmtplib
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("CI") == "true", reason="No tests against real servers ...
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("AIOSMTPLIB_LIVE_TESTS") != "true", reason="No tests ag...
<commit_before>""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("CI") == "true", reason="No tests agains...
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("AIOSMTPLIB_LIVE_TESTS") != "true", reason="No tests ag...
""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("CI") == "true", reason="No tests against real servers ...
<commit_before>""" Tests run against live mail providers. These aren't generally run as part of the test suite. """ import os import pytest from aiosmtplib import SMTP, SMTPAuthenticationError, SMTPStatus pytestmark = [ pytest.mark.skipif( os.environ.get("CI") == "true", reason="No tests agains...
94475ea2ed73e57870e8947a5b3ed474a70447e4
src/sentry/signals.py
src/sentry/signals.py
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
Add missing args to event_received
Add missing args to event_received
Python
bsd-3-clause
jean/sentry,mitsuhiko/sentry,ifduyue/sentry,zenefits/sentry,JamesMura/sentry,mvaled/sentry,beeftornado/sentry,fotinakis/sentry,JamesMura/sentry,jean/sentry,mitsuhiko/sentry,gencer/sentry,jean/sentry,zenefits/sentry,BuildingLink/sentry,JackDanger/sentry,looker/sentry,looker/sentry,zenefits/sentry,beeftornado/sentry,mval...
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
<commit_before>from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwarg...
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>>...
<commit_before>from __future__ import absolute_import from functools import wraps from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwarg...
8ce70e6b1af50f59102ccc33086a47fb36037fec
py2js.py
py2js.py
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
Fix a typo "fro" -> "for"
Fix a typo "fro" -> "for"
Python
mit
buchuki/pyjaco,buchuki/pyjaco,qsnake/py2js,chrivers/pyjaco,qsnake/py2js,buchuki/pyjaco,chrivers/pyjaco,chrivers/pyjaco
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
<commit_before>#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="in...
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="include_builtins"...
<commit_before>#! /usr/bin/env python from optparse import OptionParser from compiler import convert_py2js def main(): parser = OptionParser(usage="%prog [options] filename", description="Python to JavaScript compiler.") parser.add_option("--include-builtins", action="store_true", dest="in...