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
79770a0e0f31f1292f8b5ab103509e7835570f20
src/collectors/SmartCollector/SmartCollector.py
src/collectors/SmartCollector/SmartCollector.py
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
Use ID instead of attribute if attribute name is 'Unknown_Attribute'.
Use ID instead of attribute if attribute name is 'Unknown_Attribute'.
Python
mit
zoidbergwill/Diamond,CYBERBUGJR/Diamond,TinLe/Diamond,tellapart/Diamond,Netuitive/Diamond,socialwareinc/Diamond,hvnsweeting/Diamond,joel-airspring/Diamond,joel-airspring/Diamond,hamelg/Diamond,signalfx/Diamond,stuartbfox/Diamond,disqus/Diamond,python-diamond/Diamond,rtoma/Diamond,mfriedenhagen/Diamond,socialwareinc/Dia...
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
<commit_before>import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ retu...
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ return { ...
<commit_before>import diamond.collector import subprocess import re import os class SmartCollector(diamond.collector.Collector): """ Collect data from S.M.A.R.T.'s attribute reporting. """ def get_default_config(self): """ Returns default configuration options. """ retu...
c642acd29a013c25fab420961109a0a1ebe3c195
open511/views.py
open511/views.py
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view()
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): allow_jsonp = True def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view()
Allow JSONP requests to the roadevents API
Allow JSONP requests to the roadevents API
Python
mit
Open511/open511-server,Open511/open511-server,Open511/open511-server
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view() Allow JSONP requests to the r...
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): allow_jsonp = True def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view()
<commit_before>from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view() <commit_msg>Al...
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): allow_jsonp = True def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view()
from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view() Allow JSONP requests to the r...
<commit_before>from open511.models import RoadEvent from open511.utils.views import JSONView class RoadEventListView(JSONView): def get(self, request): return [ rdev.to_json_structure() for rdev in RoadEvent.objects.all() ] list_roadevents = RoadEventListView.as_view() <commit_msg>Al...
09c1941ecf6ab6bc61dff67ed0e33badee5048d4
ipy_user_conf.py
ipy_user_conf.py
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
Add model auto-imports to IPython profile.
Add model auto-imports to IPython profile.
Python
bsd-2-clause
shinglyu/moztrap,mccarrmb/moztrap,mccarrmb/moztrap,bobsilverberg/moztrap,shinglyu/moztrap,mozilla/moztrap,mozilla/moztrap,bobsilverberg/moztrap,mccarrmb/moztrap,mozilla/moztrap,shinglyu/moztrap,mozilla/moztrap,shinglyu/moztrap,mccarrmb/moztrap,mozilla/moztrap,bobsilverberg/moztrap,mccarrmb/moztrap,shinglyu/moztrap,bobs...
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
<commit_before># Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, e...
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
<commit_before># Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, e...
c6a62a538411ef571ccec364b0ee0fe07379836f
unsquasher.py
unsquasher.py
#!/usr/bin/env python import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and ...
#!/usr/bin/env python # Very very very quick demo of how to recover the compressed payloads again. # TODO - at least take the same command line arguments as mosq-squasher # See LICENSE.txt import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on...
Update docs and license for python
Update docs and license for python
Python
mit
remakeelectric/mosq-squasher,remakeelectric/mosq-squasher
#!/usr/bin/env python import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and ...
#!/usr/bin/env python # Very very very quick demo of how to recover the compressed payloads again. # TODO - at least take the same command line arguments as mosq-squasher # See LICENSE.txt import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on...
<commit_before>#!/usr/bin/env python import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the con...
#!/usr/bin/env python # Very very very quick demo of how to recover the compressed payloads again. # TODO - at least take the same command line arguments as mosq-squasher # See LICENSE.txt import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on...
#!/usr/bin/env python import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and ...
<commit_before>#!/usr/bin/env python import zlib import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the con...
a15e3b80383ba6ca79a19a566beeb9290d1ad017
conference_scheduler/tests/test_scheduler.py
conference_scheduler/tests/test_scheduler.py
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
Add working test for only one event per room per slot
Add working test for only one event per room per slot
Python
mit
PyconUK/ConferenceScheduler
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
<commit_before>from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms...
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms, slots) #...
<commit_before>from collections import Counter from conference_scheduler import scheduler def test_is_valid_schedule(people): # Test empty schedule schedule = tuple() assert not scheduler.is_valid_schedule(schedule) def test_schedule(events, rooms, slots): schedule = scheduler.schedule(events, rooms...
9b80275d589aef1cca81f29de0eff6eca18e8565
pywt/setup.py
pywt/setup.py
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
Fix format string for Python-2.6
BLD: Fix format string for Python-2.6
Python
mit
aaren/pywt,ThomasA/pywt,rgommers/pywt,ThomasA/pywt,michelp/pywt,grlee77/pywt,rgommers/pywt,kwohlfahrt/pywt,rgommers/pywt,aaren/pywt,michelp/pywt,rgommers/pywt,kwohlfahrt/pywt,ThomasA/pywt,kwohlfahrt/pywt,michelp/pywt,eriol/pywt,PyWavelets/pywt,aaren/pywt,grlee77/pywt,PyWavelets/pywt,eriol/pywt,eriol/pywt
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
<commit_before>#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_d...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_dir('tests') ...
<commit_before>#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import numpy as np config = Configuration('pywt', parent_package, top_path) config.add_data_d...
6b2a287ccd6c0c399488d8c3e3f487b0a4ca6c04
yarn_api_client/__init__.py
yarn_api_client/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.3.5' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
# -*- coding: utf-8 -*- __version__ = '0.3.6.dev' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
Prepare for next development iteration
Prepare for next development iteration
Python
bsd-3-clause
toidi/hadoop-yarn-api-python-client
# -*- coding: utf-8 -*- __version__ = '0.3.5' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager Prepare for ne...
# -*- coding: utf-8 -*- __version__ = '0.3.6.dev' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
<commit_before># -*- coding: utf-8 -*- __version__ = '0.3.5' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager...
# -*- coding: utf-8 -*- __version__ = '0.3.6.dev' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
# -*- coding: utf-8 -*- __version__ = '0.3.5' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager Prepare for ne...
<commit_before># -*- coding: utf-8 -*- __version__ = '0.3.5' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager...
ebe7b76a441311afb2369b1e24640a790a5b4c77
setuptools_extversion/__init__.py
setuptools_extversion/__init__.py
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import pkg_resources import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ i...
Add support for using a function
Add support for using a function `extversion` can be a a dict with a `function` key -- e.g.: setup( ... setup_requires='setuptools_extversion', extversion={'function': 'my_package.version:get_package_version'}, )
Python
mit
msabramo/python_setuptools_extversion
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import pkg_resources import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ i...
<commit_before>""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import pkg_resources import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ i...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
<commit_before>""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr...
2f0819fa6bea3e6f034516358563086d5ab9aa67
dasem/app/__init__.py
dasem/app/__init__.py
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..semantic import Semantic app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_semantic = Semantic() from . impo...
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..wikipedia import ExplicitSemanticAnalysis app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_wikipedia_esa = E...
Change to use ESA class in other module
Change to use ESA class in other module
Python
apache-2.0
fnielsen/dasem,fnielsen/dasem
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..semantic import Semantic app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_semantic = Semantic() from . impo...
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..wikipedia import ExplicitSemanticAnalysis app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_wikipedia_esa = E...
<commit_before>"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..semantic import Semantic app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_semantic = Semantic...
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..wikipedia import ExplicitSemanticAnalysis app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_wikipedia_esa = E...
"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..semantic import Semantic app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_semantic = Semantic() from . impo...
<commit_before>"""Dasem app.""" from __future__ import absolute_import, division, print_function from flask import Flask from flask_bootstrap import Bootstrap from ..dannet import Dannet from ..semantic import Semantic app = Flask(__name__) Bootstrap(app) app.dasem_dannet = Dannet() app.dasem_semantic = Semantic...
7763133ec4c3d51d37b5205a1740e574f20963ae
numpy/doc/pyrex/setup.py
numpy/doc/pyrex/setup.py
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
Use get_include instead of get_numpy_include.
Use get_include instead of get_numpy_include.
Python
bsd-3-clause
brandon-rhodes/numpy,skwbc/numpy,kiwifb/numpy,astrofrog/numpy,Eric89GXL/numpy,stuarteberg/numpy,dwillmer/numpy,mortada/numpy,rherault-insa/numpy,Srisai85/numpy,astrofrog/numpy,matthew-brett/numpy,rmcgibbo/numpy,numpy/numpy-refactor,SiccarPoint/numpy,pelson/numpy,b-carter/numpy,grlee77/numpy,jankoslavic/numpy,gfyoung/nu...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
<commit_before>#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable b...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable by people who do...
<commit_before>#!/usr/bin/env python """Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_and_NumPy http://www.scipy.org/Cookbook/ArrayStruct_and_Pyrex """ from distutils.core import setup from distutils.extension import Extension # Make this usable b...
6272798c06da66bb3c9b8d2c9ea45c3bceb9a550
diss/tests/test_fs.py
diss/tests/test_fs.py
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
Add test getattr for FUSE
Add test getattr for FUSE
Python
agpl-3.0
hoh/Billabong,hoh/Billabong
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
<commit_before> import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/h...
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/hello.txt') == I...
<commit_before> import os import pytest from fuse import FUSE, FuseOSError from diss.fs import id_from_path, DissFilesystem from .testdata import ID @pytest.fixture def fs(): return DissFilesystem() def test_id_from_path(): assert id_from_path('/blobs/SOMEID') == 'SOMEID' assert id_from_path('/files/h...
471fc55cd7dc968a9891b571aad5bf745a52fd01
ckanext/stadtzhtheme/tests/test_validation.py
ckanext/stadtzhtheme/tests/test_validation.py
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): factories.Sysadmin(apikey="my-test-key") app = self._get_...
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): """Test that an invalid resource url is caught by our validator. ...
Add extra test for resource url validator
Add extra test for resource url validator
Python
agpl-3.0
opendatazurich/ckanext-stadtzh-theme,opendatazurich/ckanext-stadtzh-theme,opendatazurich/ckanext-stadtzh-theme
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): factories.Sysadmin(apikey="my-test-key") app = self._get_...
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): """Test that an invalid resource url is caught by our validator. ...
<commit_before>import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): factories.Sysadmin(apikey="my-test-key") a...
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): """Test that an invalid resource url is caught by our validator. ...
import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): factories.Sysadmin(apikey="my-test-key") app = self._get_...
<commit_before>import nose from ckanapi import TestAppCKAN, ValidationError from ckan.tests import helpers, factories eq_ = nose.tools.eq_ assert_true = nose.tools.assert_true class TestValidation(helpers.FunctionalTestBase): def test_invalid_url(self): factories.Sysadmin(apikey="my-test-key") a...
bea8123561c24391a6db368773a56a04a1a98fb2
dataprep/dataframe.py
dataprep/dataframe.py
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") tokens = lines.map(lambda l: l.split("\t")) data = tokens.map(lambda t: Row(year=int(t[0]), month=int(t[1]), day=int(t[2]), hour=int(t[3]), page=t[4], hits=int(t[5]))) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDat...
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") def parse_line(line): tokens = line.split('\t') return Row(page=tokens[4], hits=int(tokens[5])) data = lines.map(parse_line) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDataFrame(data) wtDataFrame.registerTem...
Use parse_line function like in later sections
Use parse_line function like in later sections
Python
apache-2.0
aba1476/ds-for-wall-street,thekovinc/ds-for-wall-street,cdalzell/ds-for-wall-street,nishantyp/ds-for-wall-street
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") tokens = lines.map(lambda l: l.split("\t")) data = tokens.map(lambda t: Row(year=int(t[0]), month=int(t[1]), day=int(t[2]), hour=int(t[3]), page=t[4], hits=int(t[5]))) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDat...
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") def parse_line(line): tokens = line.split('\t') return Row(page=tokens[4], hits=int(tokens[5])) data = lines.map(parse_line) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDataFrame(data) wtDataFrame.registerTem...
<commit_before>from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") tokens = lines.map(lambda l: l.split("\t")) data = tokens.map(lambda t: Row(year=int(t[0]), month=int(t[1]), day=int(t[2]), hour=int(t[3]), page=t[4], hits=int(t[5]))) sqlContext = SQLContext(sc) wtDataFrame = sqlCo...
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") def parse_line(line): tokens = line.split('\t') return Row(page=tokens[4], hits=int(tokens[5])) data = lines.map(parse_line) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDataFrame(data) wtDataFrame.registerTem...
from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") tokens = lines.map(lambda l: l.split("\t")) data = tokens.map(lambda t: Row(year=int(t[0]), month=int(t[1]), day=int(t[2]), hour=int(t[3]), page=t[4], hits=int(t[5]))) sqlContext = SQLContext(sc) wtDataFrame = sqlContext.createDat...
<commit_before>from pyspark.sql import SQLContext, Row lines = sc.textFile("/user/admin/Wikipedia/*") tokens = lines.map(lambda l: l.split("\t")) data = tokens.map(lambda t: Row(year=int(t[0]), month=int(t[1]), day=int(t[2]), hour=int(t[3]), page=t[4], hits=int(t[5]))) sqlContext = SQLContext(sc) wtDataFrame = sqlCo...
bb8f1d915785fbcbbd8ccd99436a63a449d26e88
patterns.py
patterns.py
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
Add js error position SUBSTITUTE
Add js error position SUBSTITUTE
Python
mit
abcdw/direlog,abcdw/direlog
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
<commit_before># -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9...
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
# -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9A-F-]{36}', ...
<commit_before># -*- coding: utf-8 -*- import re pre_patterns = [ ( r'(\d{16}-[-\w]*\b)', r'REQUEST_ID_SUBSTITUTE', ), ( # r'([\dA-F]){8}-[\dA-F]{4}-4[\dA-F]{3}-[89AB][\dA-F]{3}-[\dA-F]{12}', r'([0-9A-F]){8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}', # r'[0-9...
f63c37597a51f738bbd478afaf2d21b10741dc91
kid_readout/utils/easync.py
kid_readout/utils/easync.py
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
Add easy access to close and sync methods of nc files
Add easy access to close and sync methods of nc files
Python
bsd-2-clause
ColumbiaCMB/kid_readout,ColumbiaCMB/kid_readout
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
<commit_before>""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): ...
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): self._filen...
<commit_before>""" easync.py - easier access to netCDF4 files """ import netCDF4 class EasyGroup(object): def __repr__(self): return "EasyNC: %s %s" % (self._filename,self.group.path) def __str__(self): return self.__repr__() def __init__(self,group,filename): ...
5d519c31b17a60441d522ab2a5c17c944c376afd
py/brick-wall.py
py/brick-wall.py
import heapq class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ n_row = len(wall) heap = [(wall[i][0], i, 0) for i in xrange(n_row)] heapq.heapify(heap) max_noncross = 0 while True: ...
from collections import Counter class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ c = Counter() wall_width = sum(wall[0]) max_non_cut = 0 for row in wall: subsum = 0 for n in ro...
Add py solution for 554. Brick Wall
Add py solution for 554. Brick Wall 554. Brick Wall: https://leetcode.com/problems/brick-wall/ Approach2: O(n_brick): Count # of every length can formed by any row
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
import heapq class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ n_row = len(wall) heap = [(wall[i][0], i, 0) for i in xrange(n_row)] heapq.heapify(heap) max_noncross = 0 while True: ...
from collections import Counter class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ c = Counter() wall_width = sum(wall[0]) max_non_cut = 0 for row in wall: subsum = 0 for n in ro...
<commit_before>import heapq class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ n_row = len(wall) heap = [(wall[i][0], i, 0) for i in xrange(n_row)] heapq.heapify(heap) max_noncross = 0 while Tru...
from collections import Counter class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ c = Counter() wall_width = sum(wall[0]) max_non_cut = 0 for row in wall: subsum = 0 for n in ro...
import heapq class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ n_row = len(wall) heap = [(wall[i][0], i, 0) for i in xrange(n_row)] heapq.heapify(heap) max_noncross = 0 while True: ...
<commit_before>import heapq class Solution(object): def leastBricks(self, wall): """ :type wall: List[List[int]] :rtype: int """ n_row = len(wall) heap = [(wall[i][0], i, 0) for i in xrange(n_row)] heapq.heapify(heap) max_noncross = 0 while Tru...
e366abe34f3cf2ac98572d8d3a4bab19343610c7
lambda_uploader/__init__.py
lambda_uploader/__init__.py
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
Bump release version in source
Bump release version in source
Python
apache-2.0
rackerlabs/lambda-uploader
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
<commit_before># Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
<commit_before># Copyright 2015-2016 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
a708645581542822985be2e8778b60f0008d75a6
Lib/whichdb.py
Lib/whichdb.py
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer.
Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
<commit_before>"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module nam...
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module name (e.g. "dbm" o...
<commit_before>"""Guess which db package to use to open a db file.""" import struct def whichdb(filename): """Guess which db package to use to open a db file. Return values: - None if the database file can't be read; - empty string if the file can be read but can't be recognized - the module nam...
92100c6ea45d4c39afb1134011ad0044cbcab6bd
example/taskworker/tasks.py
example/taskworker/tasks.py
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
Fix flake8 errors for build.
Fix flake8 errors for build.
Python
bsd-2-clause
Nextdoor/ndkale,Nextdoor/ndkale
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
<commit_before>from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None ...
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None max_retries =...
<commit_before>from __future__ import absolute_import from __future__ import print_function import logging from kale import task logger = logging.getLogger(__name__) class FibonacciTask(task.Task): # How many times should taskworker retry if it fails. # If this task shouldn't be retried, set it to None ...
b8cc70280941653dd84982994ca145a6ff56eda9
reindex.py
reindex.py
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
Use default host when not specified
Use default host when not specified
Python
mit
nobita-isc/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,nobita-isc/annotator-store,openannotation/annotator-store,happybelly/annotator-store,ningyifan/annotator-store
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
<commit_before>import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=des...
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=description) a...
<commit_before>import sys import argparse from elasticsearch import Elasticsearch from annotator.reindexer import Reindexer description = """ Reindex an elasticsearch index. WARNING: Documents that are created while reindexing may be lost! """ def main(argv): argparser = argparse.ArgumentParser(description=des...
3ec325afca110e866a5b60e4e92a38738aee4906
graphene_django_extras/directives/__init__.py
graphene_django_extras/directives/__init__.py
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDirective, # ...
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import DateGraphQLDirective from .list import ShuffleGraphQLDirective, SampleGraphQLDirective from .numbers import FloorGraphQLDirective, CeilGraphQLDirective from .string import ( DefaultGraphQLDirect...
Make minor improvements for CI.
Make minor improvements for CI.
Python
mit
eamigo86/graphene-django-extras
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDirective, # ...
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import DateGraphQLDirective from .list import ShuffleGraphQLDirective, SampleGraphQLDirective from .numbers import FloorGraphQLDirective, CeilGraphQLDirective from .string import ( DefaultGraphQLDirect...
<commit_before># -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDi...
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import DateGraphQLDirective from .list import ShuffleGraphQLDirective, SampleGraphQLDirective from .numbers import FloorGraphQLDirective, CeilGraphQLDirective from .string import ( DefaultGraphQLDirect...
# -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDirective, # ...
<commit_before># -*- coding: utf-8 -*- from graphql.type.directives import specified_directives as default_directives from .date import * from .list import * from .numbers import * from .string import * all_directives = ( # date DateGraphQLDirective, # list ShuffleGraphQLDirective, SampleGraphQLDi...
3b6abde6b7deb662ef2c5b09f99b4a71baa62e4b
stock_planning/models/stock_move.py
stock_planning/models/stock_move.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
Fix condition cond.append(('date', '>=', from_date))
[FIX] stock_planning: Fix condition cond.append(('date', '>=', from_date))
Python
agpl-3.0
agaldona/odoomrp-utils,odoomrp/odoomrp-utils,Endika/odoomrp-utils,ddico/odoomrp-utils,oihane/odoomrp-utils,Eficent/odoomrp-utils,esthermm/odoomrp-utils,diagramsoftware/odoomrp-utils,Antiun/odoomrp-utils,Daniel-CA/odoomrp-utils
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove(models.Model):...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models class StockMove...
097cccec41d4455c73d586ef4506075f8c7c1004
amon/apps/notifications/opsgenie/sender.py
amon/apps/notifications/opsgenie/sender.py
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v1/json/alert" # Message is limited to 130 chars data = { 'apiKey': auth.get('api_key')...
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v2/alerts" headers = { 'Authorization': 'GenieKey '+ auth.get('api_key'), 'Content-Type': 'applic...
Switch to OpsGenie API V2
Switch to OpsGenie API V2
Python
agpl-3.0
amonapp/amon,amonapp/amon,martinrusev/amonone,martinrusev/amonone,amonapp/amon,amonapp/amon,martinrusev/amonone,amonapp/amon,martinrusev/amonone
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v1/json/alert" # Message is limited to 130 chars data = { 'apiKey': auth.get('api_key')...
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v2/alerts" headers = { 'Authorization': 'GenieKey '+ auth.get('api_key'), 'Content-Type': 'applic...
<commit_before>import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v1/json/alert" # Message is limited to 130 chars data = { 'apiKey': auth...
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v2/alerts" headers = { 'Authorization': 'GenieKey '+ auth.get('api_key'), 'Content-Type': 'applic...
import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v1/json/alert" # Message is limited to 130 chars data = { 'apiKey': auth.get('api_key')...
<commit_before>import requests import json from amon.apps.notifications.models import notifications_model def send_opsgenie_notification(message=None, auth=None): sent = False url = "https://api.opsgenie.com/v1/json/alert" # Message is limited to 130 chars data = { 'apiKey': auth...
dc009d03369828cc5147f11a4b385c6959be6286
doitlive/termutils.py
doitlive/termutils.py
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
Fix simple typo: occured -> occurred
Fix simple typo: occured -> occurred
Python
mit
sloria/doitlive,sloria/doitlive
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
<commit_before># -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows sys...
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
# -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows systems. Usag...
<commit_before># -*- coding: utf-8 -*- import os import sys from contextlib import contextmanager from click._compat import isatty WIN = sys.platform.startswith("win") env = os.environ @contextmanager def raw_mode(): """ Enables terminal raw mode during the context. Note: Currently noop for Windows sys...
d45620531af6e68b5aad50e6e1ce6f172c79d5fa
l10n_ro_partner_create_by_vat/__manifest__.py
l10n_ro_partner_create_by_vat/__manifest__.py
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0.1.0....
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base_vat"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0....
Improve code in l10n_ro_vat_on_payment and l10n_ro_stock.
Improve code in l10n_ro_vat_on_payment and l10n_ro_stock.
Python
agpl-3.0
OCA/l10n-romania,OCA/l10n-romania
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0.1.0....
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base_vat"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0....
<commit_before># License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "versi...
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base_vat"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0....
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "version": "13.0.1.0....
<commit_before># License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Partner Create by VAT", "category": "Localization", "summary": "Romania - Partner Create by VAT", "depends": ["base"], "data": ["views/res_partner_view.xml"], "license": "AGPL-3", "versi...
dfaa49b31e8abd10456761110d0cadc1b7c7640d
zaqar/transport/wsgi/app.py
zaqar/transport/wsgi/app.py
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Make the log work when deploy Zaqar with uwsgi
Make the log work when deploy Zaqar with uwsgi The zaqar-wsgi runs under uwsgi by devstack can't print any WARNING, DEBUG, ERROR or INFO log now. This path add the log initialization for uwsgi boot. Change-Id: Ifcd6be908442275d2acbde2562e593b2ca87b277 Cloese-bug: #1645492
Python
apache-2.0
openstack/zaqar,openstack/zaqar,openstack/zaqar,openstack/zaqar
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
<commit_before># Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
a25b03f83c7003ccea2eb554117e8fedc153e4fe
corgi/coerce.py
corgi/coerce.py
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if isinstance(obj, dict): return obj return {key: obj}
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if not isinstance(obj, dict): return {key: obj} return obj
Make dictify similar in flow to listify
Make dictify similar in flow to listify
Python
mit
log0ymxm/corgi
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if isinstance(obj, dict): return obj return {key: obj} Make dictify similar in flow to listify
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if not isinstance(obj, dict): return {key: obj} return obj
<commit_before>def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if isinstance(obj, dict): return obj return {key: obj} <commit_msg>Make dictify similar in flow to listify<commit_after>
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if not isinstance(obj, dict): return {key: obj} return obj
def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if isinstance(obj, dict): return obj return {key: obj} Make dictify similar in flow to listifydef listify(obj): if not isinstance(obj, list): return [obj] return obj def dic...
<commit_before>def listify(obj): if not isinstance(obj, list): return [obj] return obj def dictify(obj, key): if isinstance(obj, dict): return obj return {key: obj} <commit_msg>Make dictify similar in flow to listify<commit_after>def listify(obj): if not isinstance(obj, list): ...
25cd8afdfede8a522f8d0f08ee4678a2e9c46a4b
curious/commands/__init__.py
curious/commands/__init__.py
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. All arguments are pass...
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, klass: type=Command, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. A...
Allow changing what object is returned from Command instances.
Allow changing what object is returned from Command instances.
Python
mit
SunDwarf/curious
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. All arguments are pass...
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, klass: type=Command, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. A...
<commit_before>""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. All arg...
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, klass: type=Command, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. A...
""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. All arguments are pass...
<commit_before>""" Commands helpers. """ import functools from curious.commands.command import Command def command(*args, **kwargs): """ A decorator to mark a function as a command. This will put a `factory` attribute on the function, which can later be called to create the Command instance. All arg...
79c449473f5ee0c349df8f4de4577e61776bd337
lily/utils/models/factories.py
lily/utils/models/factories.py
from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES faker = Factory.cr...
import unicodedata from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES ...
Fix tests generating invalid email addresses
LILY-1809: Fix tests generating invalid email addresses
Python
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES faker = Factory.cr...
import unicodedata from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES ...
<commit_before>from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES fak...
import unicodedata from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES ...
from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES faker = Factory.cr...
<commit_before>from factory.declarations import LazyAttribute from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyChoice from faker.factory import Factory from .models import EmailAddress, PhoneNumber, Address, PHONE_TYPE_CHOICES, ExternalAppLink from lily.utils.countries import COUNTRIES fak...
b8cacab927c5b98285f15ae4d400b9577dbacef6
openstack_dashboard/dashboards/admin/dashboard.py
openstack_dashboard/dashboards/admin/dashboard.py
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
Remove broken telemetry policy check
Remove broken telemetry policy check The reference to telemetry policy is no longer needed as well as broken causing the admin dashboard to show up inappropriately. Closes-Bug: #1643009 Change-Id: I07406f5d6c23b0fcc34df00a29b573ffc2c900e7
Python
apache-2.0
yeming233/horizon,ChameleonCloud/horizon,noironetworks/horizon,ChameleonCloud/horizon,noironetworks/horizon,NeCTAR-RC/horizon,noironetworks/horizon,BiznetGIO/horizon,BiznetGIO/horizon,yeming233/horizon,NeCTAR-RC/horizon,BiznetGIO/horizon,openstack/horizon,BiznetGIO/horizon,ChameleonCloud/horizon,openstack/horizon,Chame...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
<commit_before># Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
<commit_before># Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
ce4923461b0f9202ec6ca9ccdbbc5b700018ba18
src/adhocracy/lib/helpers/adhocracy_service.py
src/adhocracy/lib/helpers/adhocracy_service.py
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
Change API to get single external static page
Adhocracy-service: Change API to get single external static page
Python
agpl-3.0
liqd/adhocracy,alkadis/vcv,phihag/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,liqd/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,liqd/adhocracy,alkadis/v...
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
<commit_before>import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('a...
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('adhocracy_servic...
<commit_before>import requests from pylons import config class RESTAPI(object): """Helper to work with the adhocarcy_service rest api (adhocracy_kotti.mediacenter, adhocracy_kotti.staticpages, plone). """ session = requests.Session() def __init__(self): self.api_token = config.get('a...
d5007da66f8fb179d3cefd1668d767d4e9a3d9d5
TitanicData.py
TitanicData.py
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
Add Combined DataFrame by Merging Train/Test Sets
Add Combined DataFrame by Merging Train/Test Sets Before merging, a new column was assigned to both sets with discrete values ['Train'/'Test'] that correspond to the set an observation is inclusive of.
Python
mit
vnaidu/kaggle-titanic
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
<commit_before># coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/trai...
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
# coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/train.csv', index_c...
<commit_before># coding=utf-8 # Import necessary packages (Pandas, NumPy, etc.) import pandas as pd import numpy as np # Set file paths for Titanic data (Source: Kaggle) filepath_train = 'Data/train.csv' filepath_test = 'Data/test.csv' # Load train/test datasets as Pandas DataFrames df_train = pd.read_csv('Data/trai...
ad6d981cfbb9af0b02b40346548eb37631538016
poradnia/users/migrations/0007_migrate_avatars.py
poradnia/users/migrations/0007_migrate_avatars.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter(primary=True).all(): avatar.user.picture = avatar.avatar avatar.use...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations if 'avatar' in settings.INSTALLED_APPS: def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter...
Fix migrations after django-avatar drop
Fix migrations after django-avatar drop
Python
mit
watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia,watchdogpolska/poradnia,rwakulszowa/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter(primary=True).all(): avatar.user.picture = avatar.avatar avatar.use...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations if 'avatar' in settings.INSTALLED_APPS: def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter(primary=True).all(): avatar.user.picture = avatar.avatar ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations if 'avatar' in settings.INSTALLED_APPS: def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter(primary=True).all(): avatar.user.picture = avatar.avatar avatar.use...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def migrate_avatar(apps, schema_editor): Avatar = apps.get_model("avatar", "Avatar") for avatar in Avatar.objects.filter(primary=True).all(): avatar.user.picture = avatar.avatar ...
9c9a33869747223952b4a999a5a14354ffb3e540
contrib/examples/actions/pythonactions/forloop_parse_github_repos.py
contrib/examples/actions/pythonactions/forloop_parse_github_repos.py
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
Throw exception instead of returning false.
Throw exception instead of returning false.
Python
apache-2.0
StackStorm/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2,StackStorm/st2
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
<commit_before>from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_ha...
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_half_url = each_i...
<commit_before>from st2actions.runners.pythonrunner import Action from bs4 import BeautifulSoup class ParseGithubRepos(Action): def run(self, content): try: soup = BeautifulSoup(content, 'html.parser') repo_list = soup.find_all("h3") output = {} for each_item in repo_list: repo_ha...
99899f753ff9697f926389efe688c1ae2088c4c4
kpi/management/commands/wait_for_database.py
kpi/management/commands/wait_for_database.py
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
Make database connection error more descriptive
Make database connection error more descriptive
Python
agpl-3.0
kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
<commit_before># coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silent...
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
# coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silently once the con...
<commit_before># coding: utf-8 import time from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.utils import OperationalError class Command(BaseCommand): help = ( 'Repeatedly attempt to connect to the default database, exiting ' 'silent...
0da53cf2fcdc37574bebfe538778fffdae58e516
examples/delete_old_files.py
examples/delete_old_files.py
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
Add file sorting in the example script
Add file sorting in the example script
Python
mit
uploadcare/pyuploadcare
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
<commit_before>#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'dem...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
<commit_before>#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'dem...
0599e667625e64acf20ea02853523622f539885d
faker/providers/phone_number/uk_UA/__init__.py
faker/providers/phone_number/uk_UA/__init__.py
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 ### ###-##-##', '+38 ### ###-##-##', '+38 ...
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 0## ###-##-##', '+38 0## ###-##-##', '+38 ...
Use a proper international format for Ukrainian phone numbers
Use a proper international format for Ukrainian phone numbers The third digit should always be '0'.
Python
mit
danhuss/faker,joke2k/faker,joke2k/faker
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 ### ###-##-##', '+38 ### ###-##-##', '+38 ...
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 0## ###-##-##', '+38 0## ###-##-##', '+38 ...
<commit_before># coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 ### ###-##-##', '+38 ### ###-##-##'...
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 0## ###-##-##', '+38 0## ###-##-##', '+38 ...
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 ### ###-##-##', '+38 ### ###-##-##', '+38 ...
<commit_before># coding=utf-8 from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( '###-##-##', '### ## ##', '0## ### ## ##', '0## ###-##-##', '+38 ### ###-##-##', '+38 ### ###-##-##'...
a9de2f3c9a05236c7254a2b1b03049b034fd555e
elections/bf_elections_2015/lib.py
elections/bf_elections_2015/lib.py
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
Fix missing post group defaults for Burkina Faso
Fix missing post group defaults for Burkina Faso
Python
agpl-3.0
neavouli/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextrepresentative,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextmp-popit,datamade/yournextmp-popit,mysociety/yournextmp-popit,datamade/yournext...
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
<commit_before>from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name':...
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name': 'National'}, ...
<commit_before>from candidates.static_data import ( BaseMapItData, BasePartyData, BaseAreaPostData ) class MapItData(BaseMapItData): pass class PartyData(BasePartyData): def __init__(self): super(PartyData, self).__init__() self.ALL_PARTY_SETS = ( {'slug': 'national', 'name':...
8b13cd7e19d8f7c8080baa6b3cc532bb6aa79c8a
tests/basics/try_finally_loops.py
tests/basics/try_finally_loops.py
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
Add more tests for unwind jumps from within a try-finally.
tests/basics: Add more tests for unwind jumps from within a try-finally. These tests excercise cases that are fixed by the previous two commits.
Python
mit
hiway/micropython,henriknelson/micropython,PappaPeppar/micropython,pfalcon/micropython,HenrikSolver/micropython,PappaPeppar/micropython,MrSurly/micropython-esp32,kerneltask/micropython,alex-robbins/micropython,tobbad/micropython,trezor/micropython,Timmenem/micropython,lowRISC/micropython,selste/micropython,deshipu/micr...
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
<commit_before># Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: p...
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
# Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: print('finally 3...
<commit_before># Test various loop types, some may be implemented/optimized differently while True: try: break finally: print('finally 1') for i in [1, 5, 10]: try: continue finally: print('finally 2') for i in range(3): try: continue finally: p...
f34a6b4ec6b192607f4a3557f6da3f5c119aab04
tests/scoring_engine/unit_test.py
tests/scoring_engine/unit_test.py
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.create_all(engine) self.create_default_settings() def teardown(self...
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.drop_all(engine) Base.metadata.create_all(engine) self.create_de...
Modify unit test framework to delete db during setup
Modify unit test framework to delete db during setup
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.create_all(engine) self.create_default_settings() def teardown(self...
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.drop_all(engine) Base.metadata.create_all(engine) self.create_de...
<commit_before>from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.create_all(engine) self.create_default_settings() de...
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.drop_all(engine) Base.metadata.create_all(engine) self.create_de...
from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.create_all(engine) self.create_default_settings() def teardown(self...
<commit_before>from scoring_engine.db import session, engine from scoring_engine.models.base import Base from scoring_engine.models.setting import Setting class UnitTest(object): def setup(self): self.session = session Base.metadata.create_all(engine) self.create_default_settings() de...
2ef0571e5468ac72f712a69180fa5dc18652e8d7
app/applier.py
app/applier.py
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
Implement rule filtering by phoneme.
Implement rule filtering by phoneme.
Python
mit
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
<commit_before>import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(...
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): ...
<commit_before>import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(...
bdbb773f896936e9889617a8d1a21fcc4f17b54e
bot.py
bot.py
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig() import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["username"], config...
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig(level=logging.DEBUG) import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["usernam...
Enable debug logging for xmpppy
Enable debug logging for xmpppy
Python
mit
dotdoom/comicsbot,dotdoom/comicsbot
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig() import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["username"], config...
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig(level=logging.DEBUG) import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["usernam...
<commit_before>#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig() import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["username"],...
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig(level=logging.DEBUG) import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["usernam...
#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig() import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["username"], config...
<commit_before>#!/usr/bin/env python2.7 # coding: utf-8 import inspect import logging logging.basicConfig() import time import uuid from comicsbot import ComicsBot from dokuwiki import DokuWiki from roomlogger import RoomLogger execfile("config.py") w = DokuWiki() if w.dokuwiki.login(config["dokuwiki"]["username"],...
556e9f5a9f04b730260268a769cbd7170868f693
opps/__init__.py
opps/__init__.py
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__)
Fix pkg resources declare namespace
Fix pkg resources declare namespace
Python
mit
opps/opps-polls,opps/opps-polls
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) Fix pkg resources declare namespace
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__)
<commit_before># See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) <commit_msg>Fix pkg resources declare namespace<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__)
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) Fix pkg resources declare namespace#!/usr/bin/env python # -*- coding: utf-8...
<commit_before># See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) <commit_msg>Fix pkg resources declare namespace<commit_after>...
501eb4ee71e47d90c155072b15d8ad840ff01098
voting/management/commands/send_vote_invitation_emails.py
voting/management/commands/send_vote_invitation_emails.py
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
Add print statement to send invite command
Add print statement to send invite command
Python
bsd-3-clause
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
<commit_before>import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseComman...
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseCommand): def ha...
<commit_before>import datetime from django.core.mail.message import EmailMultiAlternatives from django.core.management.base import BaseCommand from django.template import Context from django.template.loader import get_template from project import settings from voting.models import VoteToken class Command(BaseComman...
f7a601284d1654671fb87a006cb303bd792e14b4
tracpro/polls/tests/test_utils.py
tracpro/polls/tests/test_utils.py
# coding=utf-8 from __future__ import absolute_import, unicode_literals from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's good", "eng"), ['think',...
# coding=utf-8 from __future__ import absolute_import, unicode_literals from django.test import TestCase from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's go...
Add test for sorting with category natural key
Add test for sorting with category natural key
Python
bsd-3-clause
xkmato/tracpro,rapidpro/tracpro,rapidpro/tracpro,rapidpro/tracpro,xkmato/tracpro,xkmato/tracpro,xkmato/tracpro
# coding=utf-8 from __future__ import absolute_import, unicode_literals from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's good", "eng"), ['think',...
# coding=utf-8 from __future__ import absolute_import, unicode_literals from django.test import TestCase from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's go...
<commit_before># coding=utf-8 from __future__ import absolute_import, unicode_literals from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's good", "eng"), ...
# coding=utf-8 from __future__ import absolute_import, unicode_literals from django.test import TestCase from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's go...
# coding=utf-8 from __future__ import absolute_import, unicode_literals from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's good", "eng"), ['think',...
<commit_before># coding=utf-8 from __future__ import absolute_import, unicode_literals from tracpro.test.cases import TracProTest from .. import utils class TestExtractWords(TracProTest): def test_extract_words(self): self.assertEqual( utils.extract_words("I think it's good", "eng"), ...
e91dc26cc983f98de1efb09cbf687c70ca0f557d
transitions/extensions/locking.py
transitions/extensions/locking.py
from ..core import Machine, Transition, Event from threading import RLock import inspect class LockedMethod: def __init__(self, lock, func): self.lock = lock self.func = func def __call__(self, *args, **kwargs): with self.lock: return self.func(*args, **kwargs) class L...
from ..core import Machine, Transition, Event, listify from threading import RLock import inspect try: from contextlib import nested # Python 2 except ImportError: from contextlib import ExitStack, contextmanager @contextmanager def nested(*contexts): """ Reimplementation of nested i...
Allow injecting a lock, or arbitrary context managers into LockedMachine
Allow injecting a lock, or arbitrary context managers into LockedMachine
Python
mit
pytransitions/transitions,tyarkoni/transitions,pytransitions/transitions
from ..core import Machine, Transition, Event from threading import RLock import inspect class LockedMethod: def __init__(self, lock, func): self.lock = lock self.func = func def __call__(self, *args, **kwargs): with self.lock: return self.func(*args, **kwargs) class L...
from ..core import Machine, Transition, Event, listify from threading import RLock import inspect try: from contextlib import nested # Python 2 except ImportError: from contextlib import ExitStack, contextmanager @contextmanager def nested(*contexts): """ Reimplementation of nested i...
<commit_before>from ..core import Machine, Transition, Event from threading import RLock import inspect class LockedMethod: def __init__(self, lock, func): self.lock = lock self.func = func def __call__(self, *args, **kwargs): with self.lock: return self.func(*args, **kw...
from ..core import Machine, Transition, Event, listify from threading import RLock import inspect try: from contextlib import nested # Python 2 except ImportError: from contextlib import ExitStack, contextmanager @contextmanager def nested(*contexts): """ Reimplementation of nested i...
from ..core import Machine, Transition, Event from threading import RLock import inspect class LockedMethod: def __init__(self, lock, func): self.lock = lock self.func = func def __call__(self, *args, **kwargs): with self.lock: return self.func(*args, **kwargs) class L...
<commit_before>from ..core import Machine, Transition, Event from threading import RLock import inspect class LockedMethod: def __init__(self, lock, func): self.lock = lock self.func = func def __call__(self, *args, **kwargs): with self.lock: return self.func(*args, **kw...
9839041ca70b40ec37fcd296e4aa8d75e1c72f03
run.py
run.py
from app.plugin import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
from app.app import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
Use app in app module
Use app in app module
Python
mit
Brok-Bucholtz/CloneTube,Brok-Bucholtz/CloneTube,Brok-Bucholtz/CloneTube
from app.plugin import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run() Use app in app module
from app.app import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
<commit_before>from app.plugin import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run() <commit_msg>Use app in app module<commit_after>
from app.app import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
from app.plugin import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run() Use app in app modulefrom app.app import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
<commit_before>from app.plugin import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run() <commit_msg>Use app in app module<commit_after>from app.app import app from app.route import build_route if __name__ == '__main__': build_route(app) app.run()
954fae8ece0c1f2c36a9f8eace9d060546022b2e
filters/tests/config_test.py
filters/tests/config_test.py
from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return value.""" self.assertIsInstan...
"""Test configuration utilities.""" from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return ...
Remove protected class access, add module docstrings.
Remove protected class access, add module docstrings.
Python
mit
christabor/flask_extras,christabor/jinja2_template_pack,christabor/jinja2_template_pack,christabor/flask_extras
from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return value.""" self.assertIsInstan...
"""Test configuration utilities.""" from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return ...
<commit_before>from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return value.""" self...
"""Test configuration utilities.""" from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return ...
from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return value.""" self.assertIsInstan...
<commit_before>from __future__ import absolute_import import unittest from flask import Flask from .. import config app = Flask('__config_test') class GetFuncsTest(unittest.TestCase): """All tests for get funcs function.""" def test_get_module_funcs(self): """Test the return value.""" self...
cad1e9bac1694bcb297a962481a18fac5a90bb0e
froide/publicbody/widgets.py
froide/publicbody/widgets.py
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
Return a list for objects on pb widget
Return a list for objects on pb widget
Python
mit
stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
<commit_before>import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_s...
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_search(self, sea...
<commit_before>import json from django import forms from .models import PublicBody class PublicBodySelect(forms.Widget): input_type = "text" template_name = 'publicbody/_chooser.html' initial_search = None class Media: extend = False js = ('js/publicbody.js',) def set_initial_s...
edca0ed4d7a03c0cd36a0ff132d6a9b89c374203
lizard_auth_server/utils.py
lizard_auth_server/utils.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digit...
Add is_active to the list of keys to be dumped as json
Add is_active to the list of keys to be dumped as json
Python
mit
lizardsystem/lizard-auth-server,lizardsystem/lizard-auth-server
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digit...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letter...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digit...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letters + string.digi...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from random import SystemRandom from django.conf import settings import string # Note: the code in this module must be identical in both lizard-auth-server # and lizard-auth-client! random = SystemRandom() KEY_CHARACTERS = string.letter...
5e9dda55d69749eb28c664150a64ad9a6a849b12
tools/grit/grit/extern/FP.py
tools/grit/grit/extern/FP.py
#!/usr/bin/python2.2 # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Fi...
#!/usr/bin/python # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Finge...
Remove version number from Python shebang.
Remove version number from Python shebang. On special request from someone trying to purge python2.2 from code indexed internally at Google. git-svn-id: http://src.chromium.org/svn/trunk/src@7071 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 6b204b6013b516c1f312ac19097dcdc068f85b93
Python
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
#!/usr/bin/python2.2 # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Fi...
#!/usr/bin/python # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Finge...
<commit_before>#!/usr/bin/python2.2 # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint ...
#!/usr/bin/python # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Finge...
#!/usr/bin/python2.2 # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint is %ld' % FP.Fi...
<commit_before>#!/usr/bin/python2.2 # Copyright (c) 2006-2008 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. import md5 """64-bit fingerprint support for strings. Usage: from extern import FP print 'Fingerprint ...
faae5df8648afbfa5921bd67a7f3e082ba626a95
poyo/__init__.py
poyo/__init__.py
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' from .parser import parse_string __all__ = ['parse_string']
# -*- coding: utf-8 -*- from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' __all__ = ['parse_string']
Move module level import to top of file
Move module level import to top of file
Python
mit
hackebrot/poyo
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' from .parser import parse_string __all__ = ['parse_string'] Move module level import to top of file
# -*- coding: utf-8 -*- from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' __all__ = ['parse_string']
<commit_before># -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' from .parser import parse_string __all__ = ['parse_string'] <commit_msg>Move module level import to top of file<commit_after>
# -*- coding: utf-8 -*- from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' __all__ = ['parse_string']
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' from .parser import parse_string __all__ = ['parse_string'] Move module level import to top of file# -*- coding: utf-8 -*- from .parser import parse_string __author__ = 'Raphael Pierzina' __email__ = 'r...
<commit_before># -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = '[email protected]' __version__ = '0.1.0' from .parser import parse_string __all__ = ['parse_string'] <commit_msg>Move module level import to top of file<commit_after># -*- coding: utf-8 -*- from .parser import parse_string __aut...
4c5acfeac467d9323be47da304e6a3e51b28a78d
python/python_condaenv_preamble/time_once.py
python/python_condaenv_preamble/time_once.py
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
Add __float__ operator to TimeOnce
Add __float__ operator to TimeOnce
Python
mit
bgoodr/how-to,bgoodr/how-to
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
<commit_before>import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example w...
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example with exception: ...
<commit_before>import time class TimeOnce: """Time a sequence of code, allowing access to the time difference in seconds. Example without exception: elapsed = TimeOnce() with elapsed: print('sleeping ...') time.sleep(3) print("elapsed", elapsed) Example w...
8d80401d19a5635053ceefcbb2bc4cfe8bb7a339
spoppy/config.py
spoppy/config.py
import getpass import os from appdirs import user_cache_dir CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as f: return [ line.strip() for line in f.read...
import getpass import os from appdirs import user_cache_dir try: # python2.7 input = raw_input except NameError: pass CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as ...
Fix error with saving credentials in python 2.7
Fix error with saving credentials in python 2.7 This fixes #102
Python
mit
sindrig/spoppy,sindrig/spoppy
import getpass import os from appdirs import user_cache_dir CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as f: return [ line.strip() for line in f.read...
import getpass import os from appdirs import user_cache_dir try: # python2.7 input = raw_input except NameError: pass CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as ...
<commit_before>import getpass import os from appdirs import user_cache_dir CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as f: return [ line.strip() for...
import getpass import os from appdirs import user_cache_dir try: # python2.7 input = raw_input except NameError: pass CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as ...
import getpass import os from appdirs import user_cache_dir CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as f: return [ line.strip() for line in f.read...
<commit_before>import getpass import os from appdirs import user_cache_dir CONFIG_FILE_NAME = os.path.join( user_cache_dir(appname='spoppy'), '.creds' ) def get_config(): if os.path.exists(CONFIG_FILE_NAME): with open(CONFIG_FILE_NAME, 'r') as f: return [ line.strip() for...
51185cff2c75da068f2f250a61e99472880f11d6
app/duckbot.py
app/duckbot.py
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
Put main bot setup code inside main function
Put main bot setup code inside main function
Python
mit
andrewlin16/duckbot,andrewlin16/duckbot
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
<commit_before>import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True,...
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True, ...
<commit_before>import argparse import discord from discord.ext import commands import config from cmd import general, emotes _DESCRIPTION = '''quack''' def parse_arguments(): parser = argparse.ArgumentParser(description="quack") parser.add_argument('-b', '--botname', required=True,...
4495b28c9483baddcc89097310b0e9699ce13406
app/helpers.py
app/helpers.py
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore or...
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore o...
Add row between third party library and standard library import
Add row between third party library and standard library import
Python
mit
thebitstick/Flask-Blog,thebitstick/Flask-Blog
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore or...
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore o...
<commit_before>import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ ...
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore o...
import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ underscore or...
<commit_before>import re import unidecode from datetime import datetime from flask.ext.wtf import regexp is_name = regexp( # not using \w since it allows for unlimited underscores r'^[a-zA-Z0-9]+([ \-\_][a-zA-Z0-9]+)*$', message='Field characters can only be letters and digits with one space, \ ...
5a744dc3a27564f0d8c7fe618c6900bff711420a
funnel/forms/usergroup.py
funnel/forms/usergroup.py
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validators.DataRequired(), forms.validators.ValidName(), A...
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName from ..models import User from .. import lastuser __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validato...
Change to user select widget
Change to user select widget
Python
agpl-3.0
hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validators.DataRequired(), forms.validators.ValidName(), A...
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName from ..models import User from .. import lastuser __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validato...
<commit_before># -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validators.DataRequired(), forms.validators...
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName from ..models import User from .. import lastuser __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validato...
# -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validators.DataRequired(), forms.validators.ValidName(), A...
<commit_before># -*- coding: utf-8 -*- from baseframe import __ import baseframe.forms as forms from baseframe.forms.sqlalchemy import AvailableName __all__ = ['UserGroupForm'] class UserGroupForm(forms.Form): name = forms.StringField(__("URL name"), validators=[forms.validators.DataRequired(), forms.validators...
b75df498fe27aec68460a880b6067d970bead926
alchemist_armet/resources.py
alchemist_armet/resources.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
Update for changes in alchemist.
Update for changes in alchemist.
Python
mit
concordusapps/alchemist-armet
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource', 'ModelRes...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division from armet.connectors.flask import resources as flask_resources from armet.connectors.sqlalchemy import resources as sqlalchemy_resources from armet import utils from alchemist import db __all__ = [ 'Resource'...
469d73255365392a821d701b4df9098d97b7546a
judge/toyojjudge/taskrunner.py
judge/toyojjudge/taskrunner.py
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
Print running task, language and checker as INFO
judge: Print running task, language and checker as INFO
Python
agpl-3.0
johnchen902/toyoj,johnchen902/toyoj,johnchen902/toyoj,johnchen902/toyoj,johnchen902/toyoj,johnchen902/toyoj
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
<commit_before>import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with...
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with self.sandbox_p...
<commit_before>import asyncio import logging logger = logging.getLogger(__name__) class TaskRunner: def __init__(self, sandbox_pool, languages, checkers): self.sandbox_pool = sandbox_pool self.languages = languages self.checkers = checkers async def run(self, task): async with...
d794fea9cce98c719caef69b1c50f2783da81b1d
pritunl_node/call_buffer.py
pritunl_node/call_buffer.py
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
Add optional callbacks for call buffer
Add optional callbacks for call buffer
Python
agpl-3.0
pritunl/pritunl-node,pritunl/pritunl-node
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
<commit_before>from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: ...
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: calls = [] ...
<commit_before>from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiters = set() self.cache = collections.deque(maxlen=CALL_CACHE_MAX) self.call_waiters = {} def wait_for_calls(self, callback, cursor=None): if cursor: ...
69722d7c2db9869074474373eefacd8b5577cbe6
project/apps/api/signals.py
project/apps/api/signals.py
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
Add check for fixture loading
Add check for fixture loading
Python
bsd-2-clause
dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore,barberscore/barberscore-api
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
<commit_before>from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, insta...
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, instance=None, creat...
<commit_before>from django.db.models.signals import ( post_save, ) from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.conf import settings from .models import ( Contest, ) @receiver(post_save, sender=settings.AUTH_USER_MODEL) def user_post_save(sender, insta...
0cff7d25a9d0fc76c723e058652551bb2c43d1fc
benchmarks/test_benchmark.py
benchmarks/test_benchmark.py
import re import urllib import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
import re import urllib.parse import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
Update benchmarks to Pyton 3.
Update benchmarks to Pyton 3.
Python
apache-2.0
ludovicchabant/Wikked,ludovicchabant/Wikked,ludovicchabant/Wikked
import re import urllib import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
import re import urllib.parse import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
<commit_before>import re import urllib import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(...
import re import urllib.parse import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
import re import urllib import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(self): ...
<commit_before>import re import urllib import random import unittest from funkload.FunkLoadTestCase import FunkLoadTestCase class Benchmark(FunkLoadTestCase): """This test uses a configuration file Benchmark.conf.""" def setUp(self): self.server_url = self.conf_get('main', 'url') def test_simple(...
215737ef0094f430ca9945841d25fbbaf0301a52
feature_extraction.py
feature_extraction.py
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
Add filename to square masks
Add filename to square masks
Python
mit
Brok-Bucholtz/Ultrasound-Nerve-Segmentation
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
<commit_before>from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) ...
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) mask_coord = ...
<commit_before>from PIL import Image import glob def _get_masks(): TRAIN_MASKS = './data/train/*_mask.tif' return [Image.open(file_name) for file_name in glob.glob(TRAIN_MASKS)] def _get_rectangle_masks(): rectangle_masks = [] for image in _get_masks(): rectangle_mask = ((0,0), (0,0)) ...
4ca1aeb4b0fd3e8d3406d5b5152eb382e32abc1f
app/main/views.py
app/main/views.py
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
Allow trailing slash in URL
Allow trailing slash in URL
Python
mit
saltastro/salt-data-quality-site,saltastro/salt-data-quality-site,saltastro/salt-data-quality-site,saltastro/salt-data-quality-site
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
<commit_before>import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """...
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """Serve a data qu...
<commit_before>import importlib from flask import render_template from werkzeug.exceptions import NotFound from . import main DATA_QUALITY_ROUTE = '/data-quality/' @main.route('/') def index(): return render_template('index.html') @main.route('/data-quality/<path:page>') def data_quality_page(page): """...
21efcb7c0793533ff7e4ed52f09573463f0fb1f0
scripts/configuration.py
scripts/configuration.py
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, cap...
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-pars...
Change distribution script to support python 3.5
Change distribution script to support python 3.5
Python
mit
dontnod/nimp
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, cap...
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-pars...
<commit_before>import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], ch...
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-pars...
import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, cap...
<commit_before>import subprocess def load_configuration(environment): configuration = { "project": "nimp", "project_version": { "identifier": "0.9.6" }, "distribution": "nimp-cli", } revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], ch...
d2674e1ce5a6baaabf82b96c9a551457bb87d718
headlines/__init__.py
headlines/__init__.py
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOURCES =...
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOUR...
Add newline in docstring to separate summary.
Add newline in docstring to separate summary.
Python
mit
alchermd/headlines,alchermd/headlines
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOURCES =...
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOUR...
<commit_before># -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig....
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOUR...
# -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig.py") SOURCES =...
<commit_before># -*- coding: utf-8 -*- """ headlines ~~~~~~~~~ A Flask powered news aggregation web app. :copyright: (c) 2017, John Alcher :license: MIT, see LICENSE for more info. """ from flask import Flask app = Flask(__name__, instance_relative_config=True) app.config.from_pyfile("appconfig....
46359266de70275a53cc9d82d3387ca6c0266f3b
jwst_lib/models/dynamicdq.py
jwst_lib/models/dynamicdq.py
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
Fix bug that appears when a reference file model is created from scratch where the dq_def member exists, but has no rows.
Fix bug that appears when a reference file model is created from scratch where the dq_def member exists, but has no rows. git-svn-id: 7ab1303e5df1b63f74144546e35d3203cc1d26c5@3127 560b4ebf-6bc0-4cc5-b8e0-b136f69d22d4
Python
bsd-3-clause
mdboom/jwst_lib.models
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
<commit_before>import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions ...
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions if dq_table i...
<commit_before>import numpy as np from . import dqflags def dynamic_mask(input_model): # # Return a mask model given a mask with dynamic DQ flags # Dynamic flags define what each plane refers to using the DQ_DEF extension dq_table = input_model.dq_def # Get the DQ array and the flag definitions ...
a691946e7321ce7d2db55642b99eecbc61fceb82
kpi/utils/private_storage.py
kpi/utils/private_storage.py
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
Fix `TypeError: 'bool' object is not callable`
Fix `TypeError: 'bool' object is not callable` …when attempting to download an export
Python
agpl-3.0
kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
<commit_before># coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.Privat...
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
# coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.PrivateFile object, w...
<commit_before># coding: utf-8 from rest_framework.request import Request as DRFRequest from rest_framework.settings import api_settings def superuser_or_username_matches_prefix(private_file): """ You can create a custom function, and use that instead. The function receives a private_storate.models.Privat...
73399a7cf86d20a3cda4336cb37f64bcc0508274
masters/master.client.skia/master_site_config.py
masters/master.client.skia/master_site_config.py
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 10115 slave_port...
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 8053 slave_port ...
Change Skia master ports again
Change Skia master ports again BUG=393690 Review URL: https://codereview.chromium.org/390903004 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@283235 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 10115 slave_port...
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 8053 slave_port ...
<commit_before># Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 101...
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 8053 slave_port ...
# Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 10115 slave_port...
<commit_before># Copyright 2013 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. """ActiveMaster definition.""" from config_bootstrap import Master class Skia(Master.Master3): project_name = 'Skia' master_port = 101...
668440b16916651b85b4a4a507214cee721906a8
scanpointgenerator/__init__.py
scanpointgenerator/__init__.py
from point import Point # noqa from generator import Generator # noqa from arraygenerator import ArrayGenerator # noqa from compoundgenerator import CompoundGenerator # noqa from linegenerator import LineGenerator # noqa from lissajousgenerator import LissajousGenerator # noqa from randomoffsetgenerator import Ra...
from scanpointgenerator.point import Point # noqa from scanpointgenerator.generator import Generator # noqa from scanpointgenerator.arraygenerator import ArrayGenerator # noqa from scanpointgenerator.compoundgenerator import CompoundGenerator # noqa from scanpointgenerator.linegenerator import LineGenerator # noqa...
Add absolute imports in init
Add absolute imports in init
Python
apache-2.0
dls-controls/scanpointgenerator
from point import Point # noqa from generator import Generator # noqa from arraygenerator import ArrayGenerator # noqa from compoundgenerator import CompoundGenerator # noqa from linegenerator import LineGenerator # noqa from lissajousgenerator import LissajousGenerator # noqa from randomoffsetgenerator import Ra...
from scanpointgenerator.point import Point # noqa from scanpointgenerator.generator import Generator # noqa from scanpointgenerator.arraygenerator import ArrayGenerator # noqa from scanpointgenerator.compoundgenerator import CompoundGenerator # noqa from scanpointgenerator.linegenerator import LineGenerator # noqa...
<commit_before>from point import Point # noqa from generator import Generator # noqa from arraygenerator import ArrayGenerator # noqa from compoundgenerator import CompoundGenerator # noqa from linegenerator import LineGenerator # noqa from lissajousgenerator import LissajousGenerator # noqa from randomoffsetgene...
from scanpointgenerator.point import Point # noqa from scanpointgenerator.generator import Generator # noqa from scanpointgenerator.arraygenerator import ArrayGenerator # noqa from scanpointgenerator.compoundgenerator import CompoundGenerator # noqa from scanpointgenerator.linegenerator import LineGenerator # noqa...
from point import Point # noqa from generator import Generator # noqa from arraygenerator import ArrayGenerator # noqa from compoundgenerator import CompoundGenerator # noqa from linegenerator import LineGenerator # noqa from lissajousgenerator import LissajousGenerator # noqa from randomoffsetgenerator import Ra...
<commit_before>from point import Point # noqa from generator import Generator # noqa from arraygenerator import ArrayGenerator # noqa from compoundgenerator import CompoundGenerator # noqa from linegenerator import LineGenerator # noqa from lissajousgenerator import LissajousGenerator # noqa from randomoffsetgene...
0d27c83861106c275113cf8018806a5c22c73579
cio/plugins/md.py
cio/plugins/md.py
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: return markdown.markdown(data)
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: extensions = self.settings.get('EXTENSIONS', []) return markdown.markdown(data, extensions=extensions...
Add support for Markdown extensions via plugin settings.
Add support for Markdown extensions via plugin settings.
Python
bsd-3-clause
5monkeys/content-io
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: return markdown.markdown(data) Add support for Markdown extensions via plugin settings.
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: extensions = self.settings.get('EXTENSIONS', []) return markdown.markdown(data, extensions=extensions...
<commit_before>from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: return markdown.markdown(data) <commit_msg>Add support for Markdown extensions via plugin settings...
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: extensions = self.settings.get('EXTENSIONS', []) return markdown.markdown(data, extensions=extensions...
from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: return markdown.markdown(data) Add support for Markdown extensions via plugin settings.from .txt import TextPlugi...
<commit_before>from .txt import TextPlugin class MarkdownPlugin(TextPlugin): ext = 'md' def render(self, data): # TODO: Handle markdown import error import markdown if data: return markdown.markdown(data) <commit_msg>Add support for Markdown extensions via plugin settings...
6ae95c747b7b1e96423fab3de59b52c2bbddd884
sklearn_porter/utils/Logger.py
sklearn_porter/utils/Logger.py
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
Fix and cast path to `str`
feature/oop-api-refactoring: Fix and cast path to `str`
Python
bsd-3-clause
nok/sklearn-porter
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
<commit_before># -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent ...
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
# -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent / 'logging.ini'...
<commit_before># -*- coding: utf-8 -*- from pathlib import Path import logging from logging.config import fileConfig class Logger: loggers = {} @staticmethod def get_logger(name: str = '') -> logging.Logger: if name not in Logger.loggers.keys(): config_path = Path(__file__).parent ...
e82ed9fcaa6745f849dfb65968ed44da30f6065b
src/plugins/spikeProbability.py
src/plugins/spikeProbability.py
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
Add line to spike prob
Add line to spike prob
Python
bsd-3-clause
baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
<commit_before>### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB....
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB.mean(count)) ...
<commit_before>### Spike Probability SpikeDB.plotClear() files = SpikeDB.getFiles(True) for f in files: means = [] err = [] x = [] raw = [] for t in f['trials']: count = [] x.append(t['xvalue']) for p in t['passes']: if len(p) > 0: count.append(1) else: count.append(0) means.append(SpikeDB....
effd1010abb7dbe920e11627fe555bacecced194
rst2pdf/utils.py
rst2pdf/utils.py
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
Fix encoding (thanks to Yasushi Masuda)
Fix encoding (thanks to Yasushi Masuda) git-svn-id: 305ad3fa995f01f9ce4b4f46c2a806ba00a97020@433 3777fadb-0f44-0410-9e7f-9d8fa6171d72
Python
mit
aquavitae/rst2pdf-py3-dev,tonioo/rst2pdf,sychen/rst2pdf,tonioo/rst2pdf,aquavitae/rst2pdf,sychen/rst2pdf,openpolis/rst2pdf-patched-docutils-0.8,aquavitae/rst2pdf-py3-dev,aquavitae/rst2pdf,openpolis/rst2pdf-patched-docutils-0.8
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
<commit_before>#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
<commit_before>#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others...
dafd7689eaca4705ace7b462a1f039982d47cd71
panoply/errors.py
panoply/errors.py
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable class IncorrectParamError(Exception): def __init__(self, msg: str = "Incorrect input parametr"): super().__init__(msg)
Add new exception class for ssh tunnel logic
Add new exception class for ssh tunnel logic
Python
mit
panoplyio/panoply-python-sdk
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable Add new exception class for ssh tunnel logic
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable class IncorrectParamError(Exception): def __init__(self, msg: str = "Incorrect input parametr"): super().__init__(msg)
<commit_before>class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable <commit_msg>Add new exception class for ssh tunnel logic<commit_after>
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable class IncorrectParamError(Exception): def __init__(self, msg: str = "Incorrect input parametr"): super().__init__(msg)
class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable Add new exception class for ssh tunnel logicclass PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(Pa...
<commit_before>class PanoplyException(Exception): def __init__(self, args=None, retryable=True): super(PanoplyException, self).__init__(args) self.retryable = retryable <commit_msg>Add new exception class for ssh tunnel logic<commit_after>class PanoplyException(Exception): def __init__(self, arg...
d9cb41e12b3f64e71d64dc32fcdc133813897e0b
core/data/DataTransformer.py
core/data/DataTransformer.py
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
Make sure that the reslicer does not ommit any image data.
Make sure that the reslicer does not ommit any image data.
Python
mit
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
<commit_before>""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transfo...
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transform): """ :t...
<commit_before>""" DataTransformer :Authors: Berend Klein Haneveld """ from vtk import vtkImageReslice class DataTransformer(object): """DataTransformer is a class that can transform a given dataset""" def __init__(self): super(DataTransformer, self).__init__() def TransformImageData(self, imageData, transfo...
58fb8460b58e99b26abe9f3f279f87459f8b7ac4
patrol_mission.py
patrol_mission.py
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
Update patrol launcher to recent changes
Update patrol launcher to recent changes
Python
bsd-3-clause
cyrobin/patrolling,cyrobin/patrolling
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
<commit_before>#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) missio...
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) mission = Mission ( ...
<commit_before>#!/usr/bin/python """ Cyril Robin -- LAAS-CNRS -- 2014 TODO Descriptif """ from mission import * from constant import * from sys import argv, exit from timer import Timer if __name__ == "__main__": with Timer('Loading mission file'): json_mission = loaded_mission(argv[1]) missio...
65d7ff9fc275bd6186484236d7a0d03c65cc62d7
peerinst/admin.py
peerinst/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
Use nifty filter widget for selecting questions for an assignment.
Use nifty filter widget for selecting questions for an assignment.
Python
agpl-3.0
open-craft/dalite-ng,open-craft/dalite-ng,open-craft/dalite-ng
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), (_('Mai...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from . import models @admin.register(models.Question) class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['title']}), ...
83f6a1eaf41cb45f7e2d705966e269dcb514f9be
coinrpc.py
coinrpc.py
import bottle, jsonrpc, sys def with_rpc(orig_func): '''Function decorator to provide RPC service proxy''' def wrapped_func(*arg, **kwarg): app = bottle.default_app() svc = app.config['coinrpc.svc'] return orig_func(svc, *arg, **kwarg) return wrapped_func @bottle.get('/help') @...
import bottle, jsonrpc, sys def with_coinrpc(*items): '''Function decorator to provide coinrpc config items''' def wrap_func(orig_func): app = bottle.default_app() keys = tuple(['coinrpc.' + i for i in items]) def wrapped_func(*arg, **kwarg): config_items = tuple([app.config...
Make config-helper decorator more generic
Make config-helper decorator more generic Instead of only pulling 'coinrpc.svc' from app.config, pull out any number of items.
Python
mit
grantisu/Sericata
import bottle, jsonrpc, sys def with_rpc(orig_func): '''Function decorator to provide RPC service proxy''' def wrapped_func(*arg, **kwarg): app = bottle.default_app() svc = app.config['coinrpc.svc'] return orig_func(svc, *arg, **kwarg) return wrapped_func @bottle.get('/help') @...
import bottle, jsonrpc, sys def with_coinrpc(*items): '''Function decorator to provide coinrpc config items''' def wrap_func(orig_func): app = bottle.default_app() keys = tuple(['coinrpc.' + i for i in items]) def wrapped_func(*arg, **kwarg): config_items = tuple([app.config...
<commit_before>import bottle, jsonrpc, sys def with_rpc(orig_func): '''Function decorator to provide RPC service proxy''' def wrapped_func(*arg, **kwarg): app = bottle.default_app() svc = app.config['coinrpc.svc'] return orig_func(svc, *arg, **kwarg) return wrapped_func @bottle...
import bottle, jsonrpc, sys def with_coinrpc(*items): '''Function decorator to provide coinrpc config items''' def wrap_func(orig_func): app = bottle.default_app() keys = tuple(['coinrpc.' + i for i in items]) def wrapped_func(*arg, **kwarg): config_items = tuple([app.config...
import bottle, jsonrpc, sys def with_rpc(orig_func): '''Function decorator to provide RPC service proxy''' def wrapped_func(*arg, **kwarg): app = bottle.default_app() svc = app.config['coinrpc.svc'] return orig_func(svc, *arg, **kwarg) return wrapped_func @bottle.get('/help') @...
<commit_before>import bottle, jsonrpc, sys def with_rpc(orig_func): '''Function decorator to provide RPC service proxy''' def wrapped_func(*arg, **kwarg): app = bottle.default_app() svc = app.config['coinrpc.svc'] return orig_func(svc, *arg, **kwarg) return wrapped_func @bottle...
0e593183ccf9fe719d8dc6ced05a9967698f5c7d
api/app.py
api/app.py
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
Remove GET options in url
Remove GET options in url
Python
mit
joaojunior/y_text_recommender_system
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
<commit_before>from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) s...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
<commit_before>from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) s...
51cddfb654370aa57bd069dbbbf03638482c2e45
attributes/community/main.py
attributes/community/main.py
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
Update community to use new lib namespace
Update community to use new lib namespace
Python
apache-2.0
RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
<commit_before>import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
<commit_before>import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM ...
2405fd2619633e390343984d02763e037a736ef5
openstack/common/messaging/drivers/__init__.py
openstack/common/messaging/drivers/__init__.py
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Use : for loading classes in entry_points
Use : for loading classes in entry_points
Python
apache-2.0
isyippee/oslo.messaging,JioCloud/oslo.messaging,isyippee/oslo.messaging,dims/oslo.messaging,dukhlov/oslo.messaging,redhat-openstack/oslo.messaging,apporc/oslo.messaging,markmc/oslo.messaging,magic0704/oslo.messaging,hkumarmk/oslo.messaging,ozamiatin/oslo.messaging,citrix-openstack-build/oslo.messaging,redhat-openstack/...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<commit_before> # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<commit_before> # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
887ad6280df9c6e88a036783097f87626436ca9f
Lib/importlib/test/import_/util.py
Lib/importlib/test/import_/util.py
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
Fix the importlib_only test decorator to work again; don't capture the flag variable as it might change later.
Fix the importlib_only test decorator to work again; don't capture the flag variable as it might change later.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
<commit_before>import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: ret...
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: return importlib._...
<commit_before>import functools import importlib import importlib._bootstrap import unittest using___import__ = False def import_(*args, **kwargs): """Delegate to allow for injecting different implementations of import.""" if using___import__: return __import__(*args, **kwargs) else: ret...
802ffff14c7636b80073debfe2159a9fa71abe15
numba/tests/test_vectorization_type_inference.py
numba/tests/test_vectorization_type_inference.py
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
Mark test_type_inference test as expected failure
Mark test_type_inference test as expected failure
Python
bsd-2-clause
gdementen/numba,stefanseefeld/numba,pombredanne/numba,stuartarchibald/numba,seibert/numba,pitrou/numba,stuartarchibald/numba,stefanseefeld/numba,seibert/numba,cpcloud/numba,gmarkall/numba,sklam/numba,seibert/numba,cpcloud/numba,jriehl/numba,stonebig/numba,ssarangi/numba,jriehl/numba,gmarkall/numba,stonebig/numba,stoneb...
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
<commit_before>from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtyp...
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtypeB) return ...
<commit_before>from __future__ import print_function from numba import vectorize, jit, bool_, double, int_, float_, typeof, int8 import numba.unittest_support as unittest import numpy as np def add(a, b): return a + b def func(dtypeA, dtypeB): A = np.arange(10, dtype=dtypeA) B = np.arange(10, dtype=dtyp...
7019a211ae083d1b99d1c3ab580e6b8c0357b4f9
mne/commands/mne_coreg.py
mne/commands/mne_coreg.py
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': os.environ['ETS_TOOLKIT'] = 'qt4' mne.gui.coregistration() sys.exit(0)
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': from mne.commands.utils import get_optparser parser = get_optparser(__file__) options, args = p...
FIX coreg bin: add parser
FIX coreg bin: add parser
Python
bsd-3-clause
jaeilepp/mne-python,mne-tools/mne-python,pravsripad/mne-python,wmvanvliet/mne-python,dimkal/mne-python,trachelr/mne-python,jmontoyam/mne-python,effigies/mne-python,ARudiuk/mne-python,teonlamont/mne-python,lorenzo-desantis/mne-python,jniediek/mne-python,olafhauk/mne-python,mne-tools/mne-python,Odingod/mne-python,kingjr/...
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': os.environ['ETS_TOOLKIT'] = 'qt4' mne.gui.coregistration() sys.exit(0) FIX coreg bin: add parser
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': from mne.commands.utils import get_optparser parser = get_optparser(__file__) options, args = p...
<commit_before>#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': os.environ['ETS_TOOLKIT'] = 'qt4' mne.gui.coregistration() sys.exit(0) <commit_ms...
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': from mne.commands.utils import get_optparser parser = get_optparser(__file__) options, args = p...
#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': os.environ['ETS_TOOLKIT'] = 'qt4' mne.gui.coregistration() sys.exit(0) FIX coreg bin: add parser...
<commit_before>#!/usr/bin/env python # Authors: Christian Brodbeck <[email protected]> """ Open the coregistration GUI. example usage: $ mne coreg """ import os import sys import mne if __name__ == '__main__': os.environ['ETS_TOOLKIT'] = 'qt4' mne.gui.coregistration() sys.exit(0) <commit_ms...
c2abe8cee63def90846f2f5663e647133480946f
launch_control/models/test_case.py
launch_control/models/test_case.py
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
Fix argument name in TestCase constructor
Fix argument name in TestCase constructor
Python
agpl-3.0
Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
<commit_before>""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('te...
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('test_case_id', 'n...
<commit_before>""" Module with the TestCase model. """ from launch_control.utils.json.pod import PlainOldData class TestCase(PlainOldData): """ TestCase model. Currently contains just two fields: - test_case_id (test-case specific ID) - name (human readable) """ __slots__ = ('te...
274222aade5438448a05989bf2973e349d33fb04
skald/geometry.py
skald/geometry.py
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
Fix implementation of overlapping rectangles
Fix implementation of overlapping rectangles
Python
mit
bjornarg/skald,bjornarg/skald
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
<commit_before># -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this i...
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
# -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this is a bit of a ha...
<commit_before># -*- coding: utf-8 -*- from collections import namedtuple Size = namedtuple("Size", ["width", "height"]) class Rectangle(namedtuple("Rectangle", ["x0", "y0", "x1", "y1"])): def __contains__(self, other): """Check if this rectangle and `other` overlaps eachother. Essentially this i...
f20e7abc1672b3814062357add9f3adc1ca300f9
editorsnotes/main/migrations/0021_populate_display_name.py
editorsnotes/main/migrations/0021_populate_display_name.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): user.display_name = user._get_display_name() user.save() class Migration...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): if user.first_name or user.last_name: display_name = user.first_name ...
Fix data migration for user display names
Fix data migration for user display names
Python
agpl-3.0
editorsnotes/editorsnotes,editorsnotes/editorsnotes
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): user.display_name = user._get_display_name() user.save() class Migration...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): if user.first_name or user.last_name: display_name = user.first_name ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): user.display_name = user._get_display_name() user.save() ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): if user.first_name or user.last_name: display_name = user.first_name ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): user.display_name = user._get_display_name() user.save() class Migration...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def populate_usernames(apps, schema_editor): User = apps.get_model('main', 'User') for user in User.objects.all(): user.display_name = user._get_display_name() user.save() ...
7c65017fa16632f21eb94896a3d7c8d2cce989dd
user/admin.py
user/admin.py
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'get_name', 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_super...
Add Profile name to UserAdmin list.
Ch23: Add Profile name to UserAdmin list.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'get_name', 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_super...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser'...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'get_name', 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_super...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser'...
c58e3c207ad5f534ea8a7e17cb13f6a1a1b8c714
multi_schema/admin.py
multi_schema/admin.py
from django.contrib import admin from models import Schema class SchemaAdmin(admin.ModelAdmin): pass admin.site.register(Schema, SchemaAdmin)
from django.contrib import admin, auth from models import Schema, UserSchema class SchemaAdmin(admin.ModelAdmin): def get_readonly_fields(self, request, obj=None): if obj is not None: return ('schema',) return () admin.site.register(Schema, SchemaAdmin) class SchemaInline(admin.Stacke...
Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.
Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.
Python
bsd-3-clause
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
from django.contrib import admin from models import Schema class SchemaAdmin(admin.ModelAdmin): pass admin.site.register(Schema, SchemaAdmin)Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.
from django.contrib import admin, auth from models import Schema, UserSchema class SchemaAdmin(admin.ModelAdmin): def get_readonly_fields(self, request, obj=None): if obj is not None: return ('schema',) return () admin.site.register(Schema, SchemaAdmin) class SchemaInline(admin.Stacke...
<commit_before>from django.contrib import admin from models import Schema class SchemaAdmin(admin.ModelAdmin): pass admin.site.register(Schema, SchemaAdmin)<commit_msg>Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.<commit_after>
from django.contrib import admin, auth from models import Schema, UserSchema class SchemaAdmin(admin.ModelAdmin): def get_readonly_fields(self, request, obj=None): if obj is not None: return ('schema',) return () admin.site.register(Schema, SchemaAdmin) class SchemaInline(admin.Stacke...
from django.contrib import admin from models import Schema class SchemaAdmin(admin.ModelAdmin): pass admin.site.register(Schema, SchemaAdmin)Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.from django.contrib import admin, auth from models import Schema, UserSchema class Sch...
<commit_before>from django.contrib import admin from models import Schema class SchemaAdmin(admin.ModelAdmin): pass admin.site.register(Schema, SchemaAdmin)<commit_msg>Make 'schema' value readonly after creation. Inject SchemaUser into UserAdmin inlines.<commit_after>from django.contrib import admin, auth from mo...
c5eb0358e763d626f503fa45228752da10b7c70d
openfisca_core/commons.py
openfisca_core/commons.py
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
Make to_unicode work in Python 3
Make to_unicode work in Python 3
Python
agpl-3.0
openfisca/openfisca-core,openfisca/openfisca-core
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
<commit_before># -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded ...
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
# -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded :param encoding...
<commit_before># -*- coding: utf-8 -*- # The following two variables and the is_unicode function are there to bridge string types across Python 2 & 3 unicode_type = u"".__class__ basestring_type = (b"".__class__, unicode_type) def to_unicode(string): """ :param string: a string that needs to be unicoded ...
7c953b71cbcb01ce1fc2d7d1a476a33dffb8999e
fabfile.py
fabfile.py
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
Remove log chown step from post-deployment process.
Remove log chown step from post-deployment process.
Python
agpl-3.0
coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
<commit_before>import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout m...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout master') loc...
<commit_before>import os from fabric.api import task, run, local, sudo, cd, env env.hosts = [ os.environ['TWWEB_HOST'], ] def virtualenv(command, user=None): run('source /var/www/envs/twweb/bin/activate && ' + command) @task def deploy(): local('git push origin development') local('git checkout m...
e72fa5ab59a8c904d525a33652424b0acf5c9de4
cms/widgets.py
cms/widgets.py
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
Switch TextInput for Textarea for RichText widget base class
Switch TextInput for Textarea for RichText widget base class
Python
agpl-3.0
Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
<commit_before>## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of th...
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
<commit_before>## # Copyright (C) 2017 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of th...
0392e4e26b5affee2de648084198fa3375a7bdd3
src/zeit/brightcove/json/tests/test_update.py
src/zeit/brightcove/json/tests/test_update.py
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing import zope.testbrowser.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without aut...
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without authentication b = zeit.cms...
Update to changed zeit.cms test browser setup API
MAINT: Update to changed zeit.cms test browser setup API
Python
bsd-3-clause
ZeitOnline/zeit.brightcove
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing import zope.testbrowser.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without aut...
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without authentication b = zeit.cms...
<commit_before>import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing import zope.testbrowser.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is availa...
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without authentication b = zeit.cms...
import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing import zope.testbrowser.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is available without aut...
<commit_before>import mock import zeit.brightcove.convert import zeit.brightcove.testing import zeit.cms.testing import zope.testbrowser.testing class NotificationTest(zeit.cms.testing.BrowserTestCase): layer = zeit.brightcove.testing.LAYER def test_runs_import_as_system_user(self): # View is availa...
999688f963c2737fc699bd1a97d91e79eb125c38
test/test_path_utilities.py
test/test_path_utilities.py
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\/'), ('\\', '\\\\'), ('/\\', '\/\\\\'), ('\\//\\', '\\\\\/\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\/\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == encoded ...
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\\/'), ('\\', '\\\\'), ('/\\', '\\/\\\\'), ('\\//\\', '\\\\\\/\\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\\/\\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == en...
Fix escape sequence formatting linter errors
Fix escape sequence formatting linter errors
Python
apache-2.0
RafaelPalomar/girder,RafaelPalomar/girder,jbeezley/girder,manthey/girder,jbeezley/girder,Kitware/girder,girder/girder,RafaelPalomar/girder,girder/girder,Kitware/girder,manthey/girder,jbeezley/girder,RafaelPalomar/girder,girder/girder,Kitware/girder,manthey/girder,girder/girder,RafaelPalomar/girder,jbeezley/girder,Kitwa...
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\/'), ('\\', '\\\\'), ('/\\', '\/\\\\'), ('\\//\\', '\\\\\/\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\/\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == encoded ...
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\\/'), ('\\', '\\\\'), ('/\\', '\\/\\\\'), ('\\//\\', '\\\\\\/\\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\\/\\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == en...
<commit_before>import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\/'), ('\\', '\\\\'), ('/\\', '\/\\\\'), ('\\//\\', '\\\\\/\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\/\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(r...
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\\/'), ('\\', '\\\\'), ('/\\', '\\/\\\\'), ('\\//\\', '\\\\\\/\\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\\/\\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == en...
import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\/'), ('\\', '\\\\'), ('/\\', '\/\\\\'), ('\\//\\', '\\\\\/\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\/\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(raw) == encoded ...
<commit_before>import pytest from girder.utility import path @pytest.mark.parametrize('raw,encoded', [ ('abcd', 'abcd'), ('/', '\/'), ('\\', '\\\\'), ('/\\', '\/\\\\'), ('\\//\\', '\\\\\/\/\\\\'), ('a\\\\b//c\\d', 'a\\\\\\\\b\/\/c\\\\d') ]) def testCodec(raw, encoded): assert path.encode(r...
e89b1de0669dd54fb1c3e2153f0539f5f5559d74
readmore/content/helpers.py
readmore/content/helpers.py
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
Remove infobox, can be re-added if necessary
Remove infobox, can be re-added if necessary
Python
agpl-3.0
PerceptumNL/ReadMore,PerceptumNL/ReadMore,PerceptumNL/ReadMore,PerceptumNL/ReadMore
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
<commit_before>from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # ...
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # use: revers...
<commit_before>from django.core.urlresolvers import reverse from bs4 import BeautifulSoup def process_wiki_page_html(html): """Process the html of a wikipedia page to be used in ReadMore.""" #TODO: Write BeautifullSoup code to remove Edit links #TODO: Write BeautifullSoup code to alter local links, # ...
a75a6e071e532d981fe8e11bf3c1d33a3356578d
astropy/io/misc/tests/test_pandas.py
astropy/io/misc/tests/test_pandas.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO import pytest import numpy as np from astropy.io import ascii from astropy.table import Table, QTable from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io.misc.pandas.connect import PANDAS_FMTS ...
Add tests of pandas backend
Add tests of pandas backend
Python
bsd-3-clause
stargaser/astropy,astropy/astropy,lpsinger/astropy,StuartLittlefair/astropy,bsipocz/astropy,astropy/astropy,aleksandr-bakanov/astropy,bsipocz/astropy,MSeifert04/astropy,pllim/astropy,stargaser/astropy,MSeifert04/astropy,aleksandr-bakanov/astropy,stargaser/astropy,saimn/astropy,lpsinger/astropy,pllim/astropy,lpsinger/as...
Add tests of pandas backend
# Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO import pytest import numpy as np from astropy.io import ascii from astropy.table import Table, QTable from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io.misc.pandas.connect import PANDAS_FMTS ...
<commit_before><commit_msg>Add tests of pandas backend<commit_after>
# Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO import pytest import numpy as np from astropy.io import ascii from astropy.table import Table, QTable from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io.misc.pandas.connect import PANDAS_FMTS ...
Add tests of pandas backend# Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO import pytest import numpy as np from astropy.io import ascii from astropy.table import Table, QTable from astropy import units as u from astropy.coordinates import SkyCoord from astropy.io.misc.pandas....
<commit_before><commit_msg>Add tests of pandas backend<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO import pytest import numpy as np from astropy.io import ascii from astropy.table import Table, QTable from astropy import units as u from astropy.coordinates imp...
a5ec7be50e2ce2424883b859ff99fd77ff09f997
fabfile.py
fabfile.py
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
Add remote commands for vagrant and ec2
Add remote commands for vagrant and ec2
Python
mit
zkan/fabric-workshop,zkan/fabric-workshop
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
<commit_before># Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') ...
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
# Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') local('git c...
<commit_before># Simple Tasks def hello(): print 'Hello ThaiPy!' def hi(name='Kan'): print 'Hi ' + name # Local Commands from fabric.api import local, lcd def deploy_fizzbuzz(): with lcd('fizzbuzz'): local('python fizzbuzz_test.py') local('git add fizzbuzz.py fizzbuzz_test.py') ...
36c6b7e70c21b261dcb39568a17fd1cd353a25db
htmlify.py
htmlify.py
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): construct += " " + paramName + "=" + paramContent if contents is not None: construct += ">" + contents + "</" + tag + ">" else: construct += ">" + "</" + tag + ">" if newLine:...
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): if type(paramContent) == str: construct += " " + paramName + "=\"" + paramContent + "\"" if contents is not None: construct += ">" + contents + "</" + tag + ">" else: constr...
Add quotes to values htmlified
Add quotes to values htmlified
Python
apache-2.0
ISD-Sound-and-Lights/InventoryControl
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): construct += " " + paramName + "=" + paramContent if contents is not None: construct += ">" + contents + "</" + tag + ">" else: construct += ">" + "</" + tag + ">" if newLine:...
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): if type(paramContent) == str: construct += " " + paramName + "=\"" + paramContent + "\"" if contents is not None: construct += ">" + contents + "</" + tag + ">" else: constr...
<commit_before>def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): construct += " " + paramName + "=" + paramContent if contents is not None: construct += ">" + contents + "</" + tag + ">" else: construct += ">" + "</" + tag + "...
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): if type(paramContent) == str: construct += " " + paramName + "=\"" + paramContent + "\"" if contents is not None: construct += ">" + contents + "</" + tag + ">" else: constr...
def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): construct += " " + paramName + "=" + paramContent if contents is not None: construct += ">" + contents + "</" + tag + ">" else: construct += ">" + "</" + tag + ">" if newLine:...
<commit_before>def getHTML(tag, contents=None, newLine=True, **parameters): construct = "<" + tag for paramName, paramContent in parameters.items(): construct += " " + paramName + "=" + paramContent if contents is not None: construct += ">" + contents + "</" + tag + ">" else: construct += ">" + "</" + tag + "...
a2854d7bb90fa8e31afb86111f2f003d2b25fb90
scripts/data_download/higher_education/create_all_files.py
scripts/data_download/higher_education/create_all_files.py
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() logging.basicConfig(filename=os.path.abspath(os.path.join(sys.argv[2],s...
Add file to create all files to higher education.
Add file to create all files to higher education.
Python
mit
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() logging.basicConfig(filename=os.path.abspath(os.path.join(sys.argv[2],s...
<commit_before>import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts...
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() logging.basicConfig(filename=os.path.abspath(os.path.join(sys.argv[2],s...
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
<commit_before>import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts...