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
c4dae009a376f5ce4f707595c860e6d92f9953ea
web/webViews/dockletrequest.py
web/webViews/dockletrequest.py
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
Fix a bug that will lead to error when external_login() is called
Fix a bug that will lead to error when external_login() is called
Python
bsd-3-clause
FirmlyReality/docklet,scorpionis/docklet,caodg/docklet,caodg/docklet,scorpionis/docklet,caodg/docklet,FirmlyReality/docklet,caodg/docklet,FirmlyReality/docklet,FirmlyReality/docklet
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
<commit_before>import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("D...
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("Docklet Request:...
<commit_before>import requests from flask import abort, session from webViews.log import logger endpoint = "http://0.0.0.0:9000" class dockletRequest(): @classmethod def post(self, url = '/', data = {}): #try: data = dict(data) data['token'] = session['token'] logger.info ("D...
aa07f5afe1b976e6b7f503056387e184ec0b64c3
phileo/models.py
phileo/models.py
import datetime from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") receiver_content_typ...
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") rec...
Update the use of now()
Update the use of now()
Python
mit
rizumu/pinax-likes,pinax/pinax-likes,jacobwegner/phileo,pinax/phileo,rizumu/pinax-likes,pinax/phileo,jacobwegner/phileo
import datetime from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") receiver_content_typ...
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") rec...
<commit_before>import datetime from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") recei...
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") rec...
import datetime from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") receiver_content_typ...
<commit_before>import datetime from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Like(models.Model): sender = models.ForeignKey(User, related_name="liking") recei...
6dab43543e1b6a1e1e8119db9b38cc685dd81f82
ckanext/qa/controllers/base.py
ckanext/qa/controllers/base.py
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): def __init__(self, *args, **kwargs): super(QAController, self).__init(*args, **kwargs)
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): pass
Fix typo in constructor. Seems unnecessary anyway.
Fix typo in constructor. Seems unnecessary anyway.
Python
mit
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): def __init__(self, *args, **kwargs): super(QAController, self).__init(*args, **kwargs)Fix typo in constructor. Seems unnecessary anyway.
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): pass
<commit_before>from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): def __init__(self, *args, **kwargs): super(QAController, self).__init(*args, **kwargs)<commit_msg>Fix typo in constructor. Seems unnecessary anyway.<commit_after>
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): pass
from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): def __init__(self, *args, **kwargs): super(QAController, self).__init(*args, **kwargs)Fix typo in constructor. Seems unnecessary anyway.from ckan.lib.base import BaseController from pylons import config ...
<commit_before>from ckan.lib.base import BaseController from pylons import config class QAController(BaseController): def __init__(self, *args, **kwargs): super(QAController, self).__init(*args, **kwargs)<commit_msg>Fix typo in constructor. Seems unnecessary anyway.<commit_after>from ckan.lib.base import ...
461f23a52569067a26c18dbf70a830c0494c0342
deepchem/models/torch_models/__init__.py
deepchem/models/torch_models/__init__.py
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
Add layer to module imports
Add layer to module imports
Python
mit
deepchem/deepchem,deepchem/deepchem
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
<commit_before># flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models...
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
# flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models.torch_models.g...
<commit_before># flake8:noqa from deepchem.models.torch_models.torch_model import TorchModel from deepchem.models.torch_models.attentivefp import AttentiveFP, AttentiveFPModel from deepchem.models.torch_models.cgcnn import CGCNN, CGCNNModel from deepchem.models.torch_models.gat import GAT, GATModel from deepchem.models...
93bf6cafa078978890df74a75355a48345f40534
django_bootstrap_calendar/serializers.py
django_bootstrap_calendar/serializers.py
# -*- coding: utf-8 -*- __author__ = 'sandlbn' from django.utils import simplejson from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { ...
# -*- coding: utf-8 -*- __author__ = 'sandlbn' import json from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { "id": event.pk,...
Use json (from stdlib) instead of simplejson from django utils
Use json (from stdlib) instead of simplejson from django utils
Python
bsd-3-clause
sandlbn/django-bootstrap-calendar,mfmarlonferrari/django-bootstrap-calendar,arbitrahj/django-bootstrap-calendar,arbitrahj/django-bootstrap-calendar,dannybrowne86/django-bootstrap-calendar,tiagovaz/django-bootstrap-calendar,mfmarlonferrari/django-bootstrap-calendar,sandlbn/django-bootstrap-calendar,mfmarlonferrari/djang...
# -*- coding: utf-8 -*- __author__ = 'sandlbn' from django.utils import simplejson from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { ...
# -*- coding: utf-8 -*- __author__ = 'sandlbn' import json from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { "id": event.pk,...
<commit_before># -*- coding: utf-8 -*- __author__ = 'sandlbn' from django.utils import simplejson from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: fi...
# -*- coding: utf-8 -*- __author__ = 'sandlbn' import json from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { "id": event.pk,...
# -*- coding: utf-8 -*- __author__ = 'sandlbn' from django.utils import simplejson from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: field = { ...
<commit_before># -*- coding: utf-8 -*- __author__ = 'sandlbn' from django.utils import simplejson from django.db.models.query import QuerySet def event_serializer(events): """ serialize event model """ objects_body = [] if isinstance(events, QuerySet): for event in events: fi...
c9ffe4fb86ccd39d199c953c860a9076cb309e0c
labonneboite/importer/jobs/check_etablissements.py
labonneboite/importer/jobs/check_etablissements.py
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings if __name__ == "__main__": filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETAB...
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings def run(): filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETABLISSEMENT_INPUT_...
Add a run method for the entry point
Add a run method for the entry point
Python
agpl-3.0
StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings if __name__ == "__main__": filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETAB...
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings def run(): filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETABLISSEMENT_INPUT_...
<commit_before>import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings if __name__ == "__main__": filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f....
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings def run(): filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETABLISSEMENT_INPUT_...
import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings if __name__ == "__main__": filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f.write("LBB_ETAB...
<commit_before>import sys from labonneboite.importer import util as import_util from labonneboite.importer import settings if __name__ == "__main__": filename = import_util.detect_runnable_file("etablissements") if filename: with open(settings.JENKINS_ETAB_PROPERTIES_FILENAME, "w") as f: f....
25da28f685b9cffa86b9400957089bdd7b5513de
kaptan/handlers/yaml_handler.py
kaptan/handlers/yaml_handler.py
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
Make YAML handler safe by default
Make YAML handler safe by default Fixes #43
Python
bsd-3-clause
emre/kaptan
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
<commit_before># -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . imp...
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
# -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . import BaseHandler...
<commit_before># -*- coding: utf8 -*- """ kaptan.handlers.yaml_handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the authors and contributors (See AUTHORS file). :license: BSD, see LICENSE for more details. """ from __future__ import print_function, unicode_literals import yaml from . imp...
15d87fb06b3882334f48fd71b258e915dbefa6e1
koans/about_list_assignments.py
koans/about_list_assignments.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(__, names) def test_parallel_assignments(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(["John", "Smith"], names) def test_parallel_assi...
Add completed list assignments koan.
Add completed list assignments koan.
Python
mit
javierjulio/python-koans-completed,javierjulio/python-koans-completed
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(__, names) def test_parallel_assignments(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(["John", "Smith"], names) def test_parallel_assi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(__, names) def test_parallel_assi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(["John", "Smith"], names) def test_parallel_assi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(__, names) def test_parallel_assignments(self): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrayAssignments in the Ruby Koans # from runner.koan import * class AboutListAssignments(Koan): def test_non_parallel_assignment(self): names = ["John", "Smith"] self.assertEqual(__, names) def test_parallel_assi...
56e660ea4d42790fe0007100066d2add41c734f5
csunplugged/config/__init__.py
csunplugged/config/__init__.py
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.3" __version_english__ = "2.0 Alpha 3"
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
Increment version number to 2.0.0-alpha.4
Increment version number to 2.0.0-alpha.4
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.3" __version_english__ = "2.0 Alpha 3" Increment version number to 2.0.0-alpha.4
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
<commit_before>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.3" __version_english__ = "2.0 Alpha 3" <commit_msg>Increment version number to 2.0.0-alpha.4<commit_after>
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.3" __version_english__ = "2.0 Alpha 3" Increment version number to 2.0.0-alpha.4"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
<commit_before>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.3" __version_english__ = "2.0 Alpha 3" <commit_msg>Increment version number to 2.0.0-alpha.4<commit_after>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
4819b35205c1ef17909e825ea75f9e91f8883ee5
picoCTF-problems/Examples/Cryptography/ecb1/ecb.py
picoCTF-problems/Examples/Cryptography/ecb1/ecb.py
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediately sys.st...
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read().strip() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediatel...
Fix bug in problem caused by flag file having new lines
Fix bug in problem caused by flag file having new lines
Python
mit
picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediately sys.st...
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read().strip() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediatel...
<commit_before>#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output imm...
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read().strip() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediatel...
#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output immediately sys.st...
<commit_before>#!/usr/bin/python2 from Crypto.Cipher import AES import os, sys flag = open("flag", "r").read() key = open("key", "r").read().strip() welcome = """ {{welcome_message}} """ def encrypt(): cipher = AES.new(key.decode('hex'), AES.MODE_ECB) return cipher.encrypt(flag).encode("hex") # flush output imm...
75edc4ff2dfc244f79504eea9770e072fceb5df9
ppci/__main__.py
ppci/__main__.py
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "opt", "p...
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "ld", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "op...
Add ld alias for the link subcommand.
Add ld alias for the link subcommand.
Python
bsd-2-clause
windelbouwman/ppci-mirror,windelbouwman/ppci-mirror,windelbouwman/ppci-mirror,windelbouwman/ppci-mirror,windelbouwman/ppci-mirror,windelbouwman/ppci-mirror
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "opt", "p...
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "ld", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "op...
<commit_before>""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", ...
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "ld", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "op...
""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", "opt", "p...
<commit_before>""" Main entry point """ # from ppci.cli import main import sys import importlib valid_programs = [ "archive", "asm", "build", "c3c", "cc", "disasm", "hexdump", "hexutil", "java", "link", "llc", "mkuimage", "objcopy", "objdump", "ocaml", ...
9fa7f06319ef5dcdb349438db63e2ead89bad455
command_line/ispyb_xml.py
command_line/ispyb_xml.py
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
Read file as text not binary
Read file as text not binary Reads the working PHIL file, but reading this as binary breaks the phil parsing as the data are a byte array on Python 3 - open as text seems to fix this - fixes #483
Python
bsd-3-clause
xia2/xia2,xia2/xia2
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
<commit_before>import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists...
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists("xia2-working....
<commit_before>import os import sys import iotbx.phil import xia2.Handlers.Streams from xia2.Interfaces.ISPyB.ISPyBXmlHandler import ISPyBXmlHandler from xia2.Schema.XProject import XProject def ispyb_xml(xml_out): assert os.path.exists("xia2.json") assert os.path.exists("xia2.txt") assert os.path.exists...
0463d8937f9efd571f3ad6846f6d1f351fcfe8e1
px/px_cpuinfo.py
px/px_cpuinfo.py
def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_count_from_sysctl(): pass
import os import errno import subprocess def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_cou...
Implement core counting of OS X
Implement core counting of OS X
Python
mit
walles/px,walles/px
def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_count_from_sysctl(): pass Implement core co...
import os import errno import subprocess def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_cou...
<commit_before>def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_count_from_sysctl(): pass <c...
import os import errno import subprocess def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_cou...
def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_count_from_sysctl(): pass Implement core co...
<commit_before>def get_core_count(): """ Count the number of cores in the system. Returns a tuple (physical, logical) with counts of physical and logical cores. """ pass def get_core_count_from_proc_cpuinfo(proc_cpuinfo="/proc/cpuinfo"): pass def get_core_count_from_sysctl(): pass <c...
d7b2f41c5cd4602aa45c7c54f964e9bec5ce6190
pyof/__init__.py
pyof/__init__.py
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2'
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2.post2'
Increase lib version to make all projects compatible
Increase lib version to make all projects compatible Please, publish this version on pypi
Python
mit
cemsbr/python-openflow,kytos/python-openflow
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2' Increase lib version to make all projects compatible Please, publish this version on pypi
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2.post2'
<commit_before>"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2' <commit_msg>Increase lib version to make all projects compatible Please, publish th...
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2.post2'
"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2' Increase lib version to make all projects compatible Please, publish this version on pypi"""The of...
<commit_before>"""The ofx parser package. A package to parse OpenFlow messages. This package is a library that parses and creates OpenFlow Messages. It contains all implemented versions of OpenFlow protocol """ __version__ = '1.1.0a2' <commit_msg>Increase lib version to make all projects compatible Please, publish th...
d53499ed11b3592e4256e78f9a7186544760cf02
app/main/views/sub_navigation_dictionaries.py
app/main/views/sub_navigation_dictionaries.py
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
Correct 'message status' nav label
Correct 'message status' nav label
Python
mit
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
<commit_before>def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", ...
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", }, ...
<commit_before>def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", ...
1f2a30c4316c6da714b7cbda1d6052e6e5040312
rasterio/tool.py
rasterio/tool.py
import code import collections import logging import sys import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster using matplotlib. The raste...
import code import collections import logging import sys import matplotlib.pyplot as plt import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster usin...
Add plt to rio_insp locals.
Add plt to rio_insp locals.
Python
bsd-3-clause
johanvdw/rasterio,perrygeo/rasterio,youngpm/rasterio,youngpm/rasterio,clembou/rasterio,sgillies/rasterio,youngpm/rasterio,kapadia/rasterio,clembou/rasterio,kapadia/rasterio,kapadia/rasterio,brendan-ward/rasterio,brendan-ward/rasterio,perrygeo/rasterio,johanvdw/rasterio,njwilson23/rasterio,snorfalorpagus/rasterio,njwils...
import code import collections import logging import sys import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster using matplotlib. The raste...
import code import collections import logging import sys import matplotlib.pyplot as plt import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster usin...
<commit_before> import code import collections import logging import sys import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster using matplotlib. ...
import code import collections import logging import sys import matplotlib.pyplot as plt import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster usin...
import code import collections import logging import sys import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster using matplotlib. The raste...
<commit_before> import code import collections import logging import sys import numpy import rasterio logger = logging.getLogger('rasterio') Stats = collections.namedtuple('Stats', ['min', 'max', 'mean']) def main(banner, dataset): def show(source, cmap='gray'): """Show a raster using matplotlib. ...
8d544103d08b17a48dc9d424db4498184e10d8a3
tweepy/asynchronous/__init__.py
tweepy/asynchronous/__init__.py
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( "tweepy.asynchr...
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import async_lru import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( ...
Check for async_lru when importing asynchronous subpackage
Check for async_lru when importing asynchronous subpackage
Python
mit
svven/tweepy,tweepy/tweepy
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( "tweepy.asynchr...
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import async_lru import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( ...
<commit_before># Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( ...
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import async_lru import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( ...
# Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( "tweepy.asynchr...
<commit_before># Tweepy # Copyright 2009-2022 Joshua Roesslein # See LICENSE for details. """ Tweepy.asynchronoous Asynchronous interfaces with the Twitter API """ try: import aiohttp import oauthlib except ModuleNotFoundError: from tweepy.errors import TweepyException raise TweepyException( ...
679ca238e6a87c8178705b0715c0015224d2c00a
tests/adjust_unittesting_config_for_ci.py
tests/adjust_unittesting_config_for_ci.py
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 2, "capture_console": False, "failfa...
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 0, "capture_console": True, "failfas...
Adjust unittesting config for CI
Adjust unittesting config for CI
Python
mit
tomv564/LSP
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 2, "capture_console": False, "failfa...
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 0, "capture_console": True, "failfas...
<commit_before>from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 2, "capture_console": False, ...
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 0, "capture_console": True, "failfas...
from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 2, "capture_console": False, "failfa...
<commit_before>from os.path import abspath, dirname, join import json if __name__ == '__main__': file = abspath(join(dirname(__file__), '..', 'unittesting.json')) with open(file, 'w') as fp: config = { "deferred": True, "verbosity": 2, "capture_console": False, ...
4eae42a542c67e4b47e4b7fffc0b746fdb934f51
librarypaste/mongostore.py
librarypaste/mongostore.py
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid, data=bson.Binary(data)) doc.update(content) se...
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data=None): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid) if data: doc.update(data=bson.Binary(...
Allow data=None, even though the spec doesn't allow it
Allow data=None, even though the spec doesn't allow it
Python
mit
yougov/librarypaste,yougov/librarypaste
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid, data=bson.Binary(data)) doc.update(content) se...
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data=None): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid) if data: doc.update(data=bson.Binary(...
<commit_before>import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid, data=bson.Binary(data)) doc.update(cont...
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data=None): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid) if data: doc.update(data=bson.Binary(...
import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid, data=bson.Binary(data)) doc.update(content) se...
<commit_before>import pymongo import bson from datastore import DataStore class MongoDBDataStore(pymongo.Connection, DataStore): def _store(self, uid, content, data): """Store the given dict of content at uid. Nothing returned.""" doc = dict(uid=uid, data=bson.Binary(data)) doc.update(cont...
741b61eb6fbd5dede3d80801bdf09c9bea1fe755
tests/sentry/runner/commands/test_init.py
tests/sentry/runner/commands/test_init.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): def test_simple(self): with self.runner.isolated_filesystem(): rv = self.runner.invoke(init, ['config'],...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): command = init def test_simple(self): with self.runner.isolated_filesystem(): rv = self.invoke('con...
Test `sentry init` for directory branch
Test `sentry init` for directory branch
Python
bsd-3-clause
JamesMura/sentry,zenefits/sentry,daevaorn/sentry,ifduyue/sentry,nicholasserra/sentry,mitsuhiko/sentry,JamesMura/sentry,daevaorn/sentry,nicholasserra/sentry,mvaled/sentry,mvaled/sentry,ifduyue/sentry,jean/sentry,looker/sentry,daevaorn/sentry,fotinakis/sentry,mvaled/sentry,jean/sentry,gencer/sentry,fotinakis/sentry,zenef...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): def test_simple(self): with self.runner.isolated_filesystem(): rv = self.runner.invoke(init, ['config'],...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): command = init def test_simple(self): with self.runner.isolated_filesystem(): rv = self.invoke('con...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): def test_simple(self): with self.runner.isolated_filesystem(): rv = self.runner.invoke(in...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): command = init def test_simple(self): with self.runner.isolated_filesystem(): rv = self.invoke('con...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): def test_simple(self): with self.runner.isolated_filesystem(): rv = self.runner.invoke(init, ['config'],...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os from sentry.testutils import CliTestCase from sentry.runner.commands.init import init class InitTest(CliTestCase): def test_simple(self): with self.runner.isolated_filesystem(): rv = self.runner.invoke(in...
7dd8e3339d5e29f5be4e84f949ac607c9ebddb97
main.py
main.py
import time import os from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * class listener(StreamListener): def __init__(self, api, start_time, time_limit=60): self.time = start_time self.limit = time...
from time import ctime from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * from tweepy.utils import import_simplejson json = import_simplejson() class listener(StreamListener): def __init__(self, api, followed_user...
Remove unused code + follow only specific user status
Remove unused code + follow only specific user status
Python
mit
vishoo7/TwitterAutoReply
import time import os from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * class listener(StreamListener): def __init__(self, api, start_time, time_limit=60): self.time = start_time self.limit = time...
from time import ctime from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * from tweepy.utils import import_simplejson json = import_simplejson() class listener(StreamListener): def __init__(self, api, followed_user...
<commit_before> import time import os from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * class listener(StreamListener): def __init__(self, api, start_time, time_limit=60): self.time = start_time se...
from time import ctime from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * from tweepy.utils import import_simplejson json = import_simplejson() class listener(StreamListener): def __init__(self, api, followed_user...
import time import os from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * class listener(StreamListener): def __init__(self, api, start_time, time_limit=60): self.time = start_time self.limit = time...
<commit_before> import time import os from tweepy import API from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener from credentials import * class listener(StreamListener): def __init__(self, api, start_time, time_limit=60): self.time = start_time se...
cd174416301e03c0beea260925d6227c38444c73
shapely/geometry/__init__.py
shapely/geometry/__init__.py
"""Geometry classes and factories """ from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import MultiLineString, asMultiLineString from ...
"""Geometry classes and factories """ from base import CAP_STYLE, JOIN_STYLE from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import M...
Add missing cap and join style imports
Add missing cap and join style imports
Python
bsd-3-clause
jdmcbr/Shapely,jdmcbr/Shapely,mouadino/Shapely,abali96/Shapely,mindw/shapely,mindw/shapely,mouadino/Shapely,abali96/Shapely
"""Geometry classes and factories """ from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import MultiLineString, asMultiLineString from ...
"""Geometry classes and factories """ from base import CAP_STYLE, JOIN_STYLE from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import M...
<commit_before>"""Geometry classes and factories """ from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import MultiLineString, asMultiL...
"""Geometry classes and factories """ from base import CAP_STYLE, JOIN_STYLE from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import M...
"""Geometry classes and factories """ from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import MultiLineString, asMultiLineString from ...
<commit_before>"""Geometry classes and factories """ from geo import box, shape, asShape, mapping from point import Point, asPoint from linestring import LineString, asLineString from polygon import Polygon, asPolygon from multipoint import MultiPoint, asMultiPoint from multilinestring import MultiLineString, asMultiL...
29e01ab226f5451e22ba3291e81bbaff13ce1867
greenmine/settings/__init__.py
greenmine/settings/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import *
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
Send more print message to sys.stderr
Smallfix: Send more print message to sys.stderr
Python
agpl-3.0
Zaneh-/bearded-tribble-back,astagi/taiga-back,astronaut1712/taiga-back,dayatz/taiga-back,bdang2012/taiga-back-casting,jeffdwyatt/taiga-back,crr0004/taiga-back,seanchen/taiga-back,coopsource/taiga-back,EvgeneOskin/taiga-back,frt-arch/taiga-back,Rademade/taiga-back,obimod/taiga-back,dycodedev/taiga-back,Tigerwhit4/taiga-...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * Smallfix: Send more print message to sys.stderr
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * <commit_msg>Smallfix: Send more print message to ...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, print_function ) import os, sys try: print("Trying import local.py settings...", file=sys.stderr) from .local import * except ImportError: print("Trying import development.py settings...", file=sys.stderr) from .development impor...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * Smallfix: Send more print message to sys.stderr# -*- coding: utf...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import os try: print "Trying import local.py settings..." from .local import * except ImportError: print "Trying import development.py settings..." from .development import * <commit_msg>Smallfix: Send more print message to ...
a993ec7f6af7bd543c1084084117042e8a10be51
reports/tests.py
reports/tests.py
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
from datetime import time from django.test import client, TestCase from members.models import User from .models import Report from protocols.models import Topic client = client.Client() class ReportTest(TestCase): def setUp(self): self.kril = User.objects.create( username='Kril', ...
Add test for adding report
Add test for adding report
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
from datetime import time from django.test import client, TestCase from members.models import User from .models import Report from protocols.models import Topic client = client.Client() class ReportTest(TestCase): def setUp(self): self.kril = User.objects.create( username='Kril', ...
<commit_before>""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tes...
from datetime import time from django.test import client, TestCase from members.models import User from .models import Report from protocols.models import Topic client = client.Client() class ReportTest(TestCase): def setUp(self): self.kril = User.objects.create( username='Kril', ...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
<commit_before>""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tes...
0566fc979f582341f968b5fb17b064a41619e6f3
bifrost/tests/unit/test_inventory.py
bifrost/tests/unit/test_inventory.py
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
Replace assertEqual(None, *) with assertIsNone
Replace assertEqual(None, *) with assertIsNone Replace assertEqual(None, *) with assertIsNone in tests Change-Id: I257c479b7a23e39178d292c347d04ad979c48f0f Closes-bug: #1280522
Python
apache-2.0
bcornec/bifrost,openstack/bifrost,openstack/bifrost,EntropyWorks/bifrost,bcornec/bifrost,EntropyWorks/bifrost
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
<commit_before># -*- coding: utf-8 -*- # 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...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
<commit_before># -*- coding: utf-8 -*- # 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...
74c7f22cfdd14761932fb9c138435671d1490dfa
partner_industry_secondary/models/res_partner.py
partner_industry_secondary/models/res_partner.py
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
Make api constrains multi to avoid error when create a company with 2 contacts
partner_industry_Secondary: Make api constrains multi to avoid error when create a company with 2 contacts
Python
agpl-3.0
syci/partner-contact,syci/partner-contact
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
<commit_before># Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class Re...
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class ResPartner(models...
<commit_before># Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2018 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, exceptions, fields, models, _ class Re...
eed276146fe06e5d8191462cc7ef81a65c4bbdbb
pdf_generator/styles.py
pdf_generator/styles.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
Add bold and italic helpers
Add bold and italic helpers
Python
mit
cecedille1/PDF_generator
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = Par...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = ParagraphStyle('no...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from reportlab.platypus import ( Paragraph as BaseParagraph, Image as BaseImage, Spacer, ) from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet styles = getSampleStyleSheet() snormal = Par...
ee7147e6d781a92d0ded0e094cc01a187fcb64ae
openstates/people.py
openstates/people.py
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
Move the APIKey bits out to the init
Move the APIKey bits out to the init
Python
bsd-3-clause
openstates/billy,openstates/billy,sunlightlabs/billy,openstates/billy,sunlightlabs/billy,sunlightlabs/billy
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
<commit_before>from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) ...
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) new = L...
<commit_before>from pupa.scrape import Legislator from .base import OpenstatesBaseScraper class OpenstatesPersonScraper(OpenstatesBaseScraper): def scrape_legislator(self, legislator_id): old = self.api('legislators/' + legislator_id + '?') old.pop('country', None) old.pop('level', None) ...
76ceb2f7c39d6cd82710e8e02df7a7a4b7d6360a
spitfire/runtime/repeater.py
spitfire/runtime/repeater.py
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
Revert last change (breaks XSPT)
Revert last change (breaks XSPT)
Python
bsd-3-clause
ahmedissa/spitfire,tkisme/spitfire,infin8/spitfire,infin8/spitfire,funic/spitfire,ahmedissa/spitfire,YifanCao/spitfire,YifanCao/spitfire,infin8/spitfire,TheProjecter/spitfire,YifanCao/spitfire,ahmedissa/spitfire,lefay1982/spitfire,funic/spitfire,tkisme/spitfire,coverband/spitfire,ahmedissa/spitfire,tkisme/spitfire,cove...
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
<commit_before>class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] ...
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] class Repeater(...
<commit_before>class RepeatTracker(object): def __init__(self): self.repeater_map = {} def __setitem__(self, key, value): try: self.repeater_map[key].index = value except KeyError, e: self.repeater_map[key] = Repeater(value) def __getitem__(self, key): return self.repeater_map[key] ...
11f5b2a82da1fad974c4ed505b9cd4938414b859
sponsorship_compassion/model/project_compassion.py
sponsorship_compassion/model/project_compassion.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
Remove children of a suspended project from internet.
Remove children of a suspended project from internet.
Python
agpl-3.0
eicher31/compassion-modules,Secheron/compassion-modules,ndtran/compassion-accounting,emgirardin/compassion-modules,CompassionCH/compassion-modules,MickSandoz/compassion-modules,maxime-beck/compassion-modules,maxime-beck/compassion-modules,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence i...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file _...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence i...
29b5337132373d624f291af3f64bb3b05fd48e77
tests/test_list.py
tests/test_list.py
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
Make sure we're sorting results
Make sure we're sorting results
Python
mit
skbkontur/carbonate,unbrice/carbonate,skbkontur/carbonate,ross/carbonate,ross/carbonate,graphite-project/carbonate,deniszh/carbonate,unbrice/carbonate,jssjr/carbonate,criteo-forks/carbonate,criteo-forks/carbonate,ross/carbonate,jssjr/carbonate,unbrice/carbonate,skbkontur/carbonate,jssjr/carbonate,graphite-project/carbo...
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
<commit_before>import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks...
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks.wsp"] exp...
<commit_before>import os import unittest from carbonate.list import listMetrics class ListTest(unittest.TestCase): metrics_tree = ["foo", "foo/sprockets.wsp", "foo/widgets.wsp", "ham", "ham/bones.wsp", "ham/hocks...
bf383d4425510a17bed0780fd80d2e3b1c741aa8
run-preglyphs.py
run-preglyphs.py
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
Expand path for other folder structures.
Expand path for other folder structures.
Python
mit
n7s/scripts-for-glyphs,n7s/scripts-for-glyphs
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
<commit_before>#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' ...
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'N...
<commit_before>#MenuTitle: Run preglyphs # -*- coding: utf-8 -*- __doc__=""" Runs preglyphs from your chosen project folder then open the generated file """ __copyright__ = 'Copyright (c) 2019, SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' ...
5cd6ed09511fdd40714ebe647577cb77fd366f7f
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
Remove `error_stream`; Add `on_stderr` to make it works
Remove `error_stream`; Add `on_stderr` to make it works
Python
mit
benedfit/SublimeLinter-contrib-pug-lint,benedfit/SublimeLinter-contrib-jade-lint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): """Provides an ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, WARNING class PugLint(NodeLinter): ...
9bc6ae4eef9d3ac133dec5310180503c9e37807b
allauth/socialaccount/providers/kakao/provider.py
allauth/socialaccount/providers/kakao/provider.py
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
Change field name from 'nickname' to 'username'
fix(kakao): Change field name from 'nickname' to 'username'
Python
mit
AltSchool/django-allauth,AltSchool/django-allauth,AltSchool/django-allauth
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
<commit_before>from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data...
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data.get('propertie...
<commit_before>from allauth.account.models import EmailAddress from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class KakaoAccount(ProviderAccount): @property def properties(self): return self.account.extra_data...
7bb5329abb41c16bb59b03cf467b4abec4d948bf
my_test_suite/test_case.py
my_test_suite/test_case.py
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 def summary(self): return "{} run, {} failed".format(self.runCount, self.errorCount) def testStarted(self): self.runCount += 1 def testFailed(self): self.errorCount += 1 class...
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 self.setUpErrorCount = 0 def summary(self): return "{} run, {} failed, {} setups failed".format(self.runCount, self.errorCount, ...
Add handling for failed setup
Add handling for failed setup
Python
mit
stephtzhang/tdd
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 def summary(self): return "{} run, {} failed".format(self.runCount, self.errorCount) def testStarted(self): self.runCount += 1 def testFailed(self): self.errorCount += 1 class...
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 self.setUpErrorCount = 0 def summary(self): return "{} run, {} failed, {} setups failed".format(self.runCount, self.errorCount, ...
<commit_before>class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 def summary(self): return "{} run, {} failed".format(self.runCount, self.errorCount) def testStarted(self): self.runCount += 1 def testFailed(self): self.errorCou...
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 self.setUpErrorCount = 0 def summary(self): return "{} run, {} failed, {} setups failed".format(self.runCount, self.errorCount, ...
class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 def summary(self): return "{} run, {} failed".format(self.runCount, self.errorCount) def testStarted(self): self.runCount += 1 def testFailed(self): self.errorCount += 1 class...
<commit_before>class TestResult(object): def __init__(self): self.runCount = 0 self.errorCount = 0 def summary(self): return "{} run, {} failed".format(self.runCount, self.errorCount) def testStarted(self): self.runCount += 1 def testFailed(self): self.errorCou...
e28ba167fe0fafd9db5f2e582520b3237d1be36f
Python/Mac/sample_python_mac.py
Python/Mac/sample_python_mac.py
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn....
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn.cur...
Fix white space in python example.
Fix white space in python example.
Python
mit
Azure/azure-sql-database-samples,Azure/azure-sql-database-samples,Azure/azure-sql-database-samples,Azure/azure-sql-database-samples,Azure/azure-sql-database-samples,Azure/azure-sql-database-samples,Azure/azure-sql-database-samples
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn....
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn.cur...
<commit_before>#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks')...
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn.cur...
#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks') cursor = conn....
<commit_before>#using the pymssql driver import pymssql #Connect to your database. #Replace server name, username, password, and database name with your credentials conn = pymssql.connect(server='yourserver.database.windows.net', user='yourusername@yourserver', password='yourpassword', database='AdventureWorks')...
0ac444affdff8db699684aa4cf04c2cb0daf0286
rplugin/python3/denite/source/workspaceSymbol.py
rplugin/python3/denite/source/workspaceSymbol.py
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
Make workspace symbols interactive in denite
Make workspace symbols interactive in denite Some servers limit the amount of symbols they return. Having an interactive implementation allows us to use the server instead of the client which means we allways get the best results of the query.
Python
mit
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
<commit_before>from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, ...
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, vim): s...
<commit_before>from os import path import sys from .base import Base sys.path.insert(0, path.dirname(path.dirname(__file__))) from common import ( # isort:skip # noqa: I100 convert_symbols_to_candidates, SYMBOL_CANDIDATE_HIGHLIGHT_SYNTAX, highlight_setup, ) class Source(Base): def __init__(self, ...
831e09baadf3e7c426bc5558c04dae234b2902d2
account_companyweb/tests/__init__.py
account_companyweb/tests/__init__.py
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
Add checks on init file
[ADD] Add checks on init file
Python
agpl-3.0
QANSEE/l10n-belgium,Niboo/l10n-belgium,QANSEE/l10n-belgium,Noviat/l10n-belgium,acsone/l10n-belgium,akretion/l10n-belgium,Noviat/l10n-belgium,Niboo/l10n-belgium,acsone/l10n-belgium,akretion/l10n-belgium,yvaucher/l10n-belgium
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
<commit_before># -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
<commit_before># -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
be8ac3ac13fee7db684c931cdc15be98ca6a283c
ample/util/tests/test_mrbump_util.py
ample/util/tests/test_mrbump_util.py
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
Update unit test for changes to topf
Update unit test for changes to topf
Python
bsd-3-clause
rigdenlab/ample,rigdenlab/ample,linucks/ample,linucks/ample
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
<commit_before>"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file...
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file__ ) ) ...
<commit_before>"""Test functions for util.mrbump_util""" import cPickle import os import unittest from ample.constants import AMPLE_PKL, SHARE_DIR from ample.util import mrbump_util class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.thisd = os.path.abspath( os.path.dirname( __file...
cdb1b2b2a90010f6395abc813e27977560c659ba
numpy/distutils/msvccompiler.py
numpy/distutils/msvccompiler.py
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
Document the reason msvc requires SSE2 on 32 bit platforms.
DOC: Document the reason msvc requires SSE2 on 32 bit platforms.
Python
bsd-3-clause
ViralLeadership/numpy,ChristopherHogan/numpy,gfyoung/numpy,argriffing/numpy,abalkin/numpy,drasmuss/numpy,bertrand-l/numpy,numpy/numpy,mhvk/numpy,mattip/numpy,shoyer/numpy,abalkin/numpy,numpy/numpy,moreati/numpy,nbeaver/numpy,rgommers/numpy,SiccarPoint/numpy,mattip/numpy,ahaldane/numpy,chiffa/numpy,stuarteberg/numpy,arg...
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
<commit_before>import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_ru...
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_run, force) ...
<commit_before>import os import distutils.msvccompiler from distutils.msvccompiler import * from .system_info import platform_bits class MSVCCompiler(distutils.msvccompiler.MSVCCompiler): def __init__(self, verbose=0, dry_run=0, force=0): distutils.msvccompiler.MSVCCompiler.__init__(self, verbose, dry_ru...
701a6b4a4ed8a4db9f1b961cf8d5a1a6ef5c48a1
gratipay/renderers/csv_dump.py
gratipay/renderers/csv_dump.py
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): context['response'].headers['Content-Type'] = 'text/plain' rows = eval(self.com...
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): rows = eval(self.compiled, globals(), context) if not rows: return ...
Remove line that sets content type text/plain
Remove line that sets content type text/plain
Python
mit
studio666/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,gratipay/g...
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): context['response'].headers['Content-Type'] = 'text/plain' rows = eval(self.com...
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): rows = eval(self.compiled, globals(), context) if not rows: return ...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): context['response'].headers['Content-Type'] = 'text/plain' rows ...
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): rows = eval(self.compiled, globals(), context) if not rows: return ...
from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): context['response'].headers['Content-Type'] = 'text/plain' rows = eval(self.com...
<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals import csv from io import BytesIO from aspen import renderers class Renderer(renderers.Renderer): def render_content(self, context): context['response'].headers['Content-Type'] = 'text/plain' rows ...
2bf8888b3c39b8d044b1bc7bd196e0bbe275c583
konstrukteur/HtmlParser.py
konstrukteur/HtmlParser.py
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
Add summary to html parser
Add summary to html parser
Python
mit
fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
<commit_before># # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSo...
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSoup(open(filenam...
<commit_before># # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # __all__ = ["parse"] from jasy.env.State import session from jasy.core import Console from bs4 import BeautifulSoup def parse(filename): """ HTML parser class for Konstrukteur """ page = {} parsedContent = BeautifulSo...
2806517a37791b2b72e534a037bbc914cf33ba7c
fabfile.py
fabfile.py
from fabric.api import * def update(): require('code_root') git_pull() restart_web_server() def git_pull(): run('cd %s; git stash; git pull' % (env.code_root)) def restart_web_server(): "Restart the web server" run('%s/apache2/bin/restart' % env.code_root_parent) def migrate(): run...
from fabric.api import * def update(): """Requires code_root env variable. Does a git pull and restarts the web server""" require('code_root') git_pull() restart_web_server() def git_pull(): """Does a git stash then a git pull on the project""" run('cd %s; git stash; git pull' % (env.code_...
Add some info in the fab tasks
Add some info in the fab tasks
Python
mit
leominov/fabric-bolt,madazone/fabric-bolt,maximon93/fabric-bolt,fabric-bolt/fabric-bolt,paperreduction/fabric-bolt,naphthalene/fabric-bolt,yourilima/fabric-bolt,damoguyan8844/fabric-bolt,brajput24/fabric-bolt,brajput24/fabric-bolt,Hedde/fabric-bolt,paperreduction/fabric-bolt,jproffitt/fabric-bolt,leominov/fabric-bolt,m...
from fabric.api import * def update(): require('code_root') git_pull() restart_web_server() def git_pull(): run('cd %s; git stash; git pull' % (env.code_root)) def restart_web_server(): "Restart the web server" run('%s/apache2/bin/restart' % env.code_root_parent) def migrate(): run...
from fabric.api import * def update(): """Requires code_root env variable. Does a git pull and restarts the web server""" require('code_root') git_pull() restart_web_server() def git_pull(): """Does a git stash then a git pull on the project""" run('cd %s; git stash; git pull' % (env.code_...
<commit_before>from fabric.api import * def update(): require('code_root') git_pull() restart_web_server() def git_pull(): run('cd %s; git stash; git pull' % (env.code_root)) def restart_web_server(): "Restart the web server" run('%s/apache2/bin/restart' % env.code_root_parent) def mig...
from fabric.api import * def update(): """Requires code_root env variable. Does a git pull and restarts the web server""" require('code_root') git_pull() restart_web_server() def git_pull(): """Does a git stash then a git pull on the project""" run('cd %s; git stash; git pull' % (env.code_...
from fabric.api import * def update(): require('code_root') git_pull() restart_web_server() def git_pull(): run('cd %s; git stash; git pull' % (env.code_root)) def restart_web_server(): "Restart the web server" run('%s/apache2/bin/restart' % env.code_root_parent) def migrate(): run...
<commit_before>from fabric.api import * def update(): require('code_root') git_pull() restart_web_server() def git_pull(): run('cd %s; git stash; git pull' % (env.code_root)) def restart_web_server(): "Restart the web server" run('%s/apache2/bin/restart' % env.code_root_parent) def mig...
47dc7edf8ff16ed27e1e6b50415c8141d5ec6eb6
src/diamond/handler/Handler.py
src/diamond/handler/Handler.py
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
Fix try-except-finally statement for python 2.4 support
Fix try-except-finally statement for python 2.4 support
Python
mit
codepython/Diamond,Nihn/Diamond-1,EzyInsights/Diamond,acquia/Diamond,cannium/Diamond,TAKEALOT/Diamond,stuartbfox/Diamond,Basis/Diamond,russss/Diamond,tuenti/Diamond,Ssawa/Diamond,dcsquared13/Diamond,disqus/Diamond,janisz/Diamond-1,gg7/diamond,hamelg/Diamond,EzyInsights/Diamond,krbaker/Diamond,TAKEALOT/Diamond,cannium/D...
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
<commit_before># coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log...
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
# coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log self.l...
<commit_before># coding=utf-8 import logging import threading import traceback class Handler(object): """ Handlers process metrics that are collected by Collectors. """ def __init__(self, config=None): """ Create a new instance of the Handler class """ # Initialize Log...
332a73c1d7f50cb336577921f0af218dc39d40e1
raiden/tests/unit/transfer/test_utils.py
raiden/tests/unit/transfer/test_utils.py
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.transfer.utils import hash_balance_data @pytest.mark.parametrize( "values,expected", ( ((0, 0, EMPTY_HASH), bytes(32)), ( (1, 5, EMPTY_MERKLE_ROOT), de...
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.tests.utils import factories from raiden.transfer.secret_registry import events_for_onchain_secretreveal from raiden.transfer.state import TransactionExecutionStatus from raiden.transfer.utils import h...
Add unit tests for transfer/secret_registry
Add unit tests for transfer/secret_registry
Python
mit
hackaugusto/raiden,hackaugusto/raiden
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.transfer.utils import hash_balance_data @pytest.mark.parametrize( "values,expected", ( ((0, 0, EMPTY_HASH), bytes(32)), ( (1, 5, EMPTY_MERKLE_ROOT), de...
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.tests.utils import factories from raiden.transfer.secret_registry import events_for_onchain_secretreveal from raiden.transfer.state import TransactionExecutionStatus from raiden.transfer.utils import h...
<commit_before>import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.transfer.utils import hash_balance_data @pytest.mark.parametrize( "values,expected", ( ((0, 0, EMPTY_HASH), bytes(32)), ( (1, 5, EMPTY_MERKLE_ROOT),...
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.tests.utils import factories from raiden.transfer.secret_registry import events_for_onchain_secretreveal from raiden.transfer.state import TransactionExecutionStatus from raiden.transfer.utils import h...
import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.transfer.utils import hash_balance_data @pytest.mark.parametrize( "values,expected", ( ((0, 0, EMPTY_HASH), bytes(32)), ( (1, 5, EMPTY_MERKLE_ROOT), de...
<commit_before>import pytest from eth_utils import decode_hex from raiden.constants import EMPTY_HASH, EMPTY_MERKLE_ROOT from raiden.transfer.utils import hash_balance_data @pytest.mark.parametrize( "values,expected", ( ((0, 0, EMPTY_HASH), bytes(32)), ( (1, 5, EMPTY_MERKLE_ROOT),...
f8ac907837e198ddac3d4ce9c5f72243c89b5ca1
config.py
config.py
host = 'http://mech-ai.appspot.com' try: from local_config import * # Override with config-local if exists except ImportError: pass
import os host_envs = { 'prod': 'http://mech-ai.appspot.com', 'dev': 'http://127.0.0.1:8080', } environment = os.getenv('ENV', 'dev') host = host_env.get('environment') username = os.getenv('USER') access_token = os.getenv('TOKEN') try: from local_config import * # Override with local settings if exist...
Enable environment variables for settings
Enable environment variables for settings
Python
mit
supermitch/mech-ai,supermitch/mech-ai,supermitch/mech-ai
host = 'http://mech-ai.appspot.com' try: from local_config import * # Override with config-local if exists except ImportError: pass Enable environment variables for settings
import os host_envs = { 'prod': 'http://mech-ai.appspot.com', 'dev': 'http://127.0.0.1:8080', } environment = os.getenv('ENV', 'dev') host = host_env.get('environment') username = os.getenv('USER') access_token = os.getenv('TOKEN') try: from local_config import * # Override with local settings if exist...
<commit_before>host = 'http://mech-ai.appspot.com' try: from local_config import * # Override with config-local if exists except ImportError: pass <commit_msg>Enable environment variables for settings<commit_after>
import os host_envs = { 'prod': 'http://mech-ai.appspot.com', 'dev': 'http://127.0.0.1:8080', } environment = os.getenv('ENV', 'dev') host = host_env.get('environment') username = os.getenv('USER') access_token = os.getenv('TOKEN') try: from local_config import * # Override with local settings if exist...
host = 'http://mech-ai.appspot.com' try: from local_config import * # Override with config-local if exists except ImportError: pass Enable environment variables for settingsimport os host_envs = { 'prod': 'http://mech-ai.appspot.com', 'dev': 'http://127.0.0.1:8080', } environment = os.getenv('ENV',...
<commit_before>host = 'http://mech-ai.appspot.com' try: from local_config import * # Override with config-local if exists except ImportError: pass <commit_msg>Enable environment variables for settings<commit_after>import os host_envs = { 'prod': 'http://mech-ai.appspot.com', 'dev': 'http://127.0.0.1...
5e8d2e545fee83d942f6837dd43a59e92aad5cdb
fto/cli.py
fto/cli.py
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ .str...
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from fto.fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ ....
Use absolute import for python3
Use absolute import for python3
Python
mit
jad-b/Crank
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ .str...
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from fto.fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ ....
<commit_before># -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: "...
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from fto.fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ ....
# -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: ")\ .str...
<commit_before># -*- coding: utf-8 -*- """ cli.py === User-facing command-line functions for :module:`fto`. """ import string from .fto import print_exercise, MassUnit def process_input(units='lbs'): """Guide user through weight calculations via CLI prompts.""" name = input("Please enter the exercise name: "...
bc411a7069386196abc6de6ae2314182efbda048
avalonstar/apps/subscribers/admin.py
avalonstar/apps/subscribers/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.regi...
Add streak to list_display, remove created and updated from list_editable.
Add streak to list_display, remove created and updated from list_editable.
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.regi...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = [...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.regi...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = [...
1bbe01fb9cafcb2effd6e95f40ae5c9872469f08
exporter/mailer.py
exporter/mailer.py
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> Y...
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> <...
Add heading to export mail
Add heading to export mail
Python
mit
melonmanchan/achso-video-exporter,melonmanchan/achso-video-exporter
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> Y...
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> <...
<commit_before>import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/h...
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> <...
import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/html", "<html> Y...
<commit_before>import sendgrid import config as config from sendgrid.helpers.mail import Mail, Content sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY) from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL) def send_download_link(to, link): to_mail = sendgrid.Email(to) content = Content("text/h...
b0aa167c0d16b5262eceed9ff2af43643a987d47
learning_journal/models.py
learning_journal/models.py
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ) from zope.sqla...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
Add bridge between Entry and User(which will be created on the next commit)
Add bridge between Entry and User(which will be created on the next commit)
Python
mit
DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ) from zope.sqla...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
<commit_before>import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, )...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ) from zope.sqla...
<commit_before>import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, )...
e8ee7ad6e2560a4fd0ca287adc55155f066eb815
akanda/horizon/routers/views.py
akanda/horizon/routers/views.py
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
Remove wrong reference to quantum
Remove wrong reference to quantum Change-Id: Ic3d8b26e061e85c1d128a79b115fd2da4412e705 Signed-off-by: Rosario Di Somma <[email protected]>
Python
apache-2.0
dreamhost/akanda-horizon,dreamhost/akanda-horizon
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
<commit_before>from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods):...
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods): Filter off the...
<commit_before>from django.utils.translation import ugettext_lazy as _ # noqa from horizon import exceptions from openstack_dashboard import api def get_interfaces_data(self): try: router_id = self.kwargs['router_id'] router = api.quantum.router_get(self.request, router_id) # Note(rods):...
35bb090dd926d4327fa046ee2da64c4cb5b38a47
app/notify_client/email_branding_client.py
app/notify_client/email_branding_client.py
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
Remove old way of sorting
Remove old way of sorting This is redundant since the model layer has built-in sorting. It’s also not a good separation of concerns for something presentational (sort order) to be in the API client layer.
Python
mit
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
<commit_before>from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding"...
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding") def get_a...
<commit_before>from app.notify_client import NotifyAdminAPIClient, cache class EmailBrandingClient(NotifyAdminAPIClient): @cache.set("email_branding-{branding_id}") def get_email_branding(self, branding_id): return self.get(url="/email-branding/{}".format(branding_id)) @cache.set("email_branding"...
6c3a1d011ff51b99a7975ef186cff042aea086d4
poller.py
poller.py
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
Add call to show at pynotify
Add call to show at pynotify
Python
mit
koodilehto/website-poller,koodilehto/website-poller
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
<commit_before>#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportEr...
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportError: try: ...
<commit_before>#!/usr/bin/env python import urllib2 import ssl # Define the sites we want to poll and the timeout. SITES = ( 'https://redmine.codegrove.org', 'http://koodilehto.fi', 'http://vakiopaine.net', ) TIMEOUT = 5 try: import gntp.notifier notification = gntp.notifier.mini except ImportEr...
7f24d458d4953542ad481920642016f482978009
pyautoupdate/_file_glob.py
pyautoupdate/_file_glob.py
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folder. # """ # f...
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: # pragma: no branch from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folde...
Fix whitespace in file_glob and attempt coverage modification
Fix whitespace in file_glob and attempt coverage modification
Python
lgpl-2.1
rlee287/pyautoupdate,rlee287/pyautoupdate
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folder. # """ # f...
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: # pragma: no branch from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folde...
<commit_before>import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folder. # ...
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: # pragma: no branch from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folde...
import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folder. # """ # f...
<commit_before>import glob import shutil import os if os.name == "nt": # pragma: no branch from .ntcommonpath import commonpath else: from .posixcommonpath import commonpath # def move_glob(src,dst): # """Moves files from src to dest. # src may be any glob to recognize files. dst must be a folder. # ...
eb674c9bd91ff1c8baf95ad440d4a3897b2a030d
magpie/main.py
magpie/main.py
# -*- coding: utf-8 -*- import nltk from hazm import word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(word_tokenize(doc['text'])) features = {} for word in dist_words: features['contains(%s)' % word] = (word in words_...
# -*- coding: utf-8 -*- import nltk from hazm import Normalizer, Stemmer, word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(doc['words']) features = {} for word in dist_words: features['contains(%s)' % word] = (word in...
Add normalization and stemming, use fine grained selection of words.
Add normalization and stemming, use fine grained selection of words.
Python
mit
s1na/magpie
# -*- coding: utf-8 -*- import nltk from hazm import word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(word_tokenize(doc['text'])) features = {} for word in dist_words: features['contains(%s)' % word] = (word in words_...
# -*- coding: utf-8 -*- import nltk from hazm import Normalizer, Stemmer, word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(doc['words']) features = {} for word in dist_words: features['contains(%s)' % word] = (word in...
<commit_before># -*- coding: utf-8 -*- import nltk from hazm import word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(word_tokenize(doc['text'])) features = {} for word in dist_words: features['contains(%s)' % word] = ...
# -*- coding: utf-8 -*- import nltk from hazm import Normalizer, Stemmer, word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(doc['words']) features = {} for word in dist_words: features['contains(%s)' % word] = (word in...
# -*- coding: utf-8 -*- import nltk from hazm import word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(word_tokenize(doc['text'])) features = {} for word in dist_words: features['contains(%s)' % word] = (word in words_...
<commit_before># -*- coding: utf-8 -*- import nltk from hazm import word_tokenize from hazm.HamshahriReader import HamshahriReader import config def doc_features(doc, dist_words): words_set = set(word_tokenize(doc['text'])) features = {} for word in dist_words: features['contains(%s)' % word] = ...
90633f6aa401b40c6d94e623bac4268f752db430
flask_dynstatic.py
flask_dynstatic.py
__author__ = 'mkaplenko' views = [] def to_static_html(func): def wrapper(*args, **kwargs): if func not in views: views.append(func) print views return func(*args, **kwargs) return wrapper
from functools import wraps import os static_root = os.path.join(os.path.dirname(__file__), 'static') views = [] def to_static_html(path): def decorator(func): if func not in views: views.append((path, func)) @wraps(func) def wrapper(*args, **kwargs): return ...
Add to static_html decorator code
Add to static_html decorator code
Python
bsd-3-clause
mkaplenko/flask-dynstatic
__author__ = 'mkaplenko' views = [] def to_static_html(func): def wrapper(*args, **kwargs): if func not in views: views.append(func) print views return func(*args, **kwargs) return wrapper Add to static_html decorator code
from functools import wraps import os static_root = os.path.join(os.path.dirname(__file__), 'static') views = [] def to_static_html(path): def decorator(func): if func not in views: views.append((path, func)) @wraps(func) def wrapper(*args, **kwargs): return ...
<commit_before>__author__ = 'mkaplenko' views = [] def to_static_html(func): def wrapper(*args, **kwargs): if func not in views: views.append(func) print views return func(*args, **kwargs) return wrapper <commit_msg>Add to static_html decorator code<commit_after>
from functools import wraps import os static_root = os.path.join(os.path.dirname(__file__), 'static') views = [] def to_static_html(path): def decorator(func): if func not in views: views.append((path, func)) @wraps(func) def wrapper(*args, **kwargs): return ...
__author__ = 'mkaplenko' views = [] def to_static_html(func): def wrapper(*args, **kwargs): if func not in views: views.append(func) print views return func(*args, **kwargs) return wrapper Add to static_html decorator codefrom functools import wraps import os static_...
<commit_before>__author__ = 'mkaplenko' views = [] def to_static_html(func): def wrapper(*args, **kwargs): if func not in views: views.append(func) print views return func(*args, **kwargs) return wrapper <commit_msg>Add to static_html decorator code<commit_after>from ...
eec8f84aa12d692c8e042ac00eaca39faefb96f6
armstrong/core/arm_sections/backends.py
armstrong/core/arm_sections/backends.py
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
Use distinct() when getting section items
Use distinct() when getting section items
Python
apache-2.0
texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
<commit_before>from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def...
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def get_section_re...
<commit_before>from django.db.models import Q from .utils import get_section_relations, get_item_model_class class ItemFilter(object): manager_attr = 'objects' def get_manager(self, model): """Return the desired manager for the item model.""" return getattr(model, self.manager_attr) def...
12519845ea1e74276261a5fb4f6b07fe3fb2f82c
exploratory_analysis/console.py
exploratory_analysis/console.py
import os from utils import Reader import code if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(local=dict(globals(), **locals()))
import os from utils import Reader import code import sys if __name__ == '__main__': # coding=utf-8 reload(sys) sys.setdefaultencoding('utf-8') working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(...
Set default encoding to utf-8
Set default encoding to utf-8
Python
apache-2.0
chuajiesheng/twitter-sentiment-analysis
import os from utils import Reader import code if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(local=dict(globals(), **locals())) Set default encoding to utf-8
import os from utils import Reader import code import sys if __name__ == '__main__': # coding=utf-8 reload(sys) sys.setdefaultencoding('utf-8') working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(...
<commit_before>import os from utils import Reader import code if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(local=dict(globals(), **locals())) <commit_msg>Set default encoding ...
import os from utils import Reader import code import sys if __name__ == '__main__': # coding=utf-8 reload(sys) sys.setdefaultencoding('utf-8') working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(...
import os from utils import Reader import code if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(local=dict(globals(), **locals())) Set default encoding to utf-8import os from util...
<commit_before>import os from utils import Reader import code if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) print '{} available data files'.format(len(files)) code.interact(local=dict(globals(), **locals())) <commit_msg>Set default encoding ...
6273ec6444577d756c91da2a9ab97fba3802d03a
src/build_osx.py
src/build_osx.py
from setuptools import setup name = "Bitmessage" version = "0.4.2" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
from setuptools import setup name = "Bitmessage" version = "0.4.3" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
Increment version number to 0.4.3
Increment version number to 0.4.3
Python
mit
metamarcdw/PyBitmessage-I2P,lightrabbit/PyBitmessage,Atheros1/PyBitmessage,hb9kns/PyBitmessage,torifier/PyBitmessage,debguy0x/PyBitmessage,lightrabbit/PyBitmessage,krytarowski/PyBitmessage,debguy0x/PyBitmessage,timothyparez/PyBitmessage,debguy0x/PyBitmessage,timothyparez/PyBitmessage,krytarowski/PyBitmessage,gnu3ra/PyB...
from setuptools import setup name = "Bitmessage" version = "0.4.2" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
from setuptools import setup name = "Bitmessage" version = "0.4.3" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
<commit_before>from setuptools import setup name = "Bitmessage" version = "0.4.2" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt']...
from setuptools import setup name = "Bitmessage" version = "0.4.3" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
from setuptools import setup name = "Bitmessage" version = "0.4.2" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt'], iconfile =...
<commit_before>from setuptools import setup name = "Bitmessage" version = "0.4.2" mainscript = ["bitmessagemain.py"] setup( name = name, version = version, app = mainscript, setup_requires = ["py2app"], options = dict( py2app = dict( resources = ["images", "translations"], includes = ['sip', 'PyQt4._qt']...
9c87a6889a0dc4ecf0c1034243c344022b2e32bf
redis_sessions/settings.py
redis_sessions/settings.py
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', 'session') SESSION_...
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', '') SESSION_REDIS_P...
Fix redis prefix for existing sessions
Fix redis prefix for existing sessions
Python
bsd-3-clause
gamechanger/django-redis-sessions,martinrusev/django-redis-sessions,izquierdo/django-redis-sessions,ProDG/django-redis-sessions-fork,hellysmile/django-redis-sessions-fork,mbodock/django-redis-sessions
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', 'session') SESSION_...
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', '') SESSION_REDIS_P...
<commit_before>from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', 'ses...
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', '') SESSION_REDIS_P...
from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', 'session') SESSION_...
<commit_before>from django.conf import settings SESSION_REDIS_HOST = getattr(settings, 'SESSION_REDIS_HOST', 'localhost') SESSION_REDIS_PORT = getattr(settings, 'SESSION_REDIS_PORT', 6379) SESSION_REDIS_DB = getattr(settings, 'SESSION_REDIS_DB', 0) SESSION_REDIS_PREFIX = getattr(settings, 'SESSION_REDIS_PREFIX', 'ses...
c06ab929e1f7a55ddc0ed978939ea604cad003cb
hamper/plugins/roulette.py
hamper/plugins/roulette.py
import random, datetime from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'ro...
import random from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'roulette' ...
Revert "This should break the flakes8 check on Travis"
Revert "This should break the flakes8 check on Travis" This reverts commit 91c3d6c30d75ce66228d52c74bf8a4d8e7628670.
Python
mit
hamperbot/hamper,maxking/hamper,iankronquist/hamper
import random, datetime from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'ro...
import random from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'roulette' ...
<commit_before>import random, datetime from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' ...
import random from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'roulette' ...
import random, datetime from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' name = 'ro...
<commit_before>import random, datetime from hamper.interfaces import ChatCommandPlugin, Command class Roulette(ChatCommandPlugin): """Feeling lucky? !roulette to see how lucky""" name = 'roulette' priority = 0 class Roulette(Command): '''Try not to die''' regex = r'^roulette$' ...
4c1164e3816af43c3a10dc5a68c579ef9ae574f8
ooni/output.py
ooni/output.py
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
Fix error in ouputting system
Fix error in ouputting system
Python
bsd-2-clause
hackerberry/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,hackerberry/ooni-probe,lordappsec/ooni-pro...
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
<commit_before>import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self...
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self, data, name=No...
<commit_before>import yaml class data: def __init__(self, name=None): if name: self.name = name def output(self, data, name=None): if name: self.name = name stream = open(self.name, 'w') yaml.dump(data, stream) stream.close() def append(self...
c2782795dc679897b333138482b99b21b4c60349
salt/modules/test.py
salt/modules/test.py
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
Fix assignment issue in coallatz
Fix assignment issue in coallatz
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
<commit_before>''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the m...
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the minion is up and...
<commit_before>''' Module for running arbitrairy tests ''' import time def echo(text): ''' Return a string - used for testing the connection CLI Example: salt '*' test.echo 'foo bar baz quo qux' ''' print 'Echo got called!' return text def ping(): ''' Just used to make sure the m...
5796093cecbe9e671dfe3b056f6e907a452694e5
autodbperftool/ADT/tpccmysql.py
autodbperftool/ADT/tpccmysql.py
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
Add function to save tpcc-mysql results
Add function to save tpcc-mysql results
Python
apache-2.0
mizhon/tools
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
<commit_before>#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None ...
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None if cmd_ac...
<commit_before>#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Created on 2015-06-19 @author: mizhon ''' #from common import CommonActions from Logs import logger log = logger.Log() class TpccmysqlActions(object): @classmethod def ta_get_cmds(cls, cmd_action): try: cmds = None ...
f7a420fa865ea2fcd871ad20800c2e21112ce2ec
examples/map/plot_frameless_image.py
examples/map/plot_frameless_image.py
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
Add a clip to the frameless example
Add a clip to the frameless example
Python
bsd-2-clause
dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
<commit_before>""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing ...
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing the necessary m...
<commit_before>""" =============================== Plotting a Map without any Axes =============================== This examples shows you how to plot a Map without any annotations at all, i.e. to save as an image. """ ############################################################################## # Start by importing ...
b1963f00e5290c11654eefbd24fbce185bbcd8b4
packages/Preferences/define.py
packages/Preferences/define.py
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0'
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) config_name = 'mantle_config.ini' preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0'
Add config ini file name.
Add config ini file name.
Python
mit
takavfx/Mantle
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0' Add config ini file name.
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) config_name = 'mantle_config.ini' preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0'
<commit_before>import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0' <commit_msg>Add config ini file name.<commit_after>
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) config_name = 'mantle_config.ini' preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0'
import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0' Add config ini file name.import os _CURRENTPATH = os.path.dirname(os.path.realpath(__fi...
<commit_before>import os _CURRENTPATH = os.path.dirname(os.path.realpath(__file__)) preferencesIconPath = os.path.join(_CURRENTPATH, 'static', 'gear.svg') preferencesUIPath = os.path.join(_CURRENTPATH, 'ui', 'preferences.ui') version = '0.1.0' <commit_msg>Add config ini file name.<commit_after>import os _CURRENTPAT...
c1a65072863fb4e21a7cd2259090996496450a42
code/processors/google_closure_compiler.py
code/processors/google_closure_compiler.py
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
Fix a stupid typo in the Google Closure Compiler processor that prevented it from working properly.
Fix a stupid typo in the Google Closure Compiler processor that prevented it from working properly.
Python
unlicense
WadiInternet/fileconveyor,edx/fileconveyor,wimleers/fileconveyor
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
<commit_before>__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def ru...
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def run(self): ...
<commit_before>__author__ = "Wim Leers ([email protected])" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from processor import * import os import os.path class GoogleClosureCompiler(Processor): """compresses .js files with Google Closure Compiler""" valid_extensions = (".js") def ru...
07df1678c620820053663cf0d07d79fff4fe2333
heroku.py
heroku.py
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
Add the option to enable debug mode with Heroku
Add the option to enable debug mode with Heroku Don't do this public servers, use it locally with foreman.
Python
bsd-2-clause
paxswill/evesrp,eskwire/evesrp,eskwire/evesrp,eskwire/evesrp,paxswill/evesrp,eskwire/evesrp,paxswill/evesrp
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
<commit_before>#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(...
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(CRESTMail, Ship...
<commit_before>#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ShipURLMixin import evesrp.auth.testauth from flask.ext.heroku import Heroku from os import environ as env from binascii import unhexlify skel_url = 'https://wiki.eveonline.com/en/wiki/{name}' class EOWikiCREST(...
8c691948069157e02ff00ca5cab427657e36487c
lights/patterns/scrollsmooth.py
lights/patterns/scrollsmooth.py
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
Fix issue with smoothscroll pattern
Fix issue with smoothscroll pattern
Python
mit
Chris-Johnston/Internet-Xmas-Tree,Chris-Johnston/Internet-Xmas-Tree,Chris-Johnston/Internet-Xmas-Tree,Chris-Johnston/Internet-Xmas-Tree
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
<commit_before>""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self...
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self): supe...
<commit_before>""" Smooth scroll pattern """ from .pattern import Pattern import time import math # fast linear sin approx def fastApprox(val): return 1.0 - math.fabs( math.fmod(val, 2.0) - 1.0) def constrain_int(value): return int(min(255, max(value, 0))) class ScrollSmooth(Pattern): def __init__(self...
7ef473cf7aa76168509c99e2d09428146cd599c5
server.py
server.py
from flask import Flask, request app = Flask(__name__) @app.route('/retrieve', methods=['POST']) def get(): public_key = request.form['PUBLIC_KEY'] enc_index = request.form['ENC_INDEX'] return "/retrieve index '{index}' with key '{key}'".format(index=enc_index, key=public_key) @app.route('/set', method...
import argparse from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() app = Flask(__name__) @app.r...
Add switch (-d or --debug) for debug mode
Add switch (-d or --debug) for debug mode
Python
mit
blindstore/blindstore-old-scarab
from flask import Flask, request app = Flask(__name__) @app.route('/retrieve', methods=['POST']) def get(): public_key = request.form['PUBLIC_KEY'] enc_index = request.form['ENC_INDEX'] return "/retrieve index '{index}' with key '{key}'".format(index=enc_index, key=public_key) @app.route('/set', method...
import argparse from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() app = Flask(__name__) @app.r...
<commit_before>from flask import Flask, request app = Flask(__name__) @app.route('/retrieve', methods=['POST']) def get(): public_key = request.form['PUBLIC_KEY'] enc_index = request.form['ENC_INDEX'] return "/retrieve index '{index}' with key '{key}'".format(index=enc_index, key=public_key) @app.route...
import argparse from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() app = Flask(__name__) @app.r...
from flask import Flask, request app = Flask(__name__) @app.route('/retrieve', methods=['POST']) def get(): public_key = request.form['PUBLIC_KEY'] enc_index = request.form['ENC_INDEX'] return "/retrieve index '{index}' with key '{key}'".format(index=enc_index, key=public_key) @app.route('/set', method...
<commit_before>from flask import Flask, request app = Flask(__name__) @app.route('/retrieve', methods=['POST']) def get(): public_key = request.form['PUBLIC_KEY'] enc_index = request.form['ENC_INDEX'] return "/retrieve index '{index}' with key '{key}'".format(index=enc_index, key=public_key) @app.route...
15964c974220c88a1b2fbca353d4a11b180e2bd8
_launch.py
_launch.py
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolon', '...
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command, Command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolo...
Refactor Command action to dragonglue.command
Refactor Command action to dragonglue.command
Python
mit
drocco007/vox_commands
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolon', '...
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command, Command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolo...
<commit_before>from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-se...
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command, Command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolo...
from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-semicolon', '...
<commit_before>from dragonfly import (Grammar, MappingRule, Choice, Text, Key, Function) from dragonglue.command import send_command grammar = Grammar("launch") applications = { 'sublime': 'w-s', 'pycharm': 'w-d', 'chrome': 'w-f', 'logs': 'w-j', 'SQL': 'w-k', 'IPython': 'w-l', 'shell': 'w-se...
18fa2a02b073ec0cf7fb82152389c312844b5fda
wsgi.py
wsgi.py
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ from suddendev import create_app, socketio app = create_app() socketio.run(app)
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() port = int(os.environ.get("PORT", 5000)) socketio.run(app, host='0.0.0.0', port=port)
Read Heroku port envvar and use if given.
[NG] Read Heroku port envvar and use if given.
Python
mit
SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ from suddendev import create_app, socketio app = create_app() socketio.run(app) [NG] Read Heroku port envvar and use if given.
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() port = int(os.environ.get("PORT", 5000)) socketio.run(app, host='0.0.0.0', port=port)
<commit_before>""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ from suddendev import create_app, socketio app = create_app() socketio.run(app) <commit_msg>[NG] Read Heroku port envvar and use if given.<commit_after>
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() port = int(os.environ.get("PORT", 5000)) socketio.run(app, host='0.0.0.0', port=port)
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ from suddendev import create_app, socketio app = create_app() socketio.run(app) [NG] Read Heroku port envvar and use if given.""" WSGI script run on Heroku using gunicorn. Exposes the app and configures...
<commit_before>""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ from suddendev import create_app, socketio app = create_app() socketio.run(app) <commit_msg>[NG] Read Heroku port envvar and use if given.<commit_after>""" WSGI script run on Heroku using...
8c1fa5b134bf6f64dca258c087dc01f9e19e6ca4
tests/__init__.py
tests/__init__.py
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ import os __all__ = ["test_util", "test_clean"] for file_ in os.listdir(os.path.dirname(__file__)): if file_.startswith('test_') and file_.endswith('.py'): __all__.append(file_...
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ from os import path import glob test_modules = [path.splitext(path.basename(filename))[0] for filename in glob.glob(path.join(path.dirname(__file__), 'test*.py'))] __all__ = test_modules
Improve detecting available test modules in test package
Improve detecting available test modules in test package By using glob and path.splitext instead of manually iterating over files in the directory and filtering out files based on their names.
Python
mit
farzadghanei/distutilazy
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ import os __all__ = ["test_util", "test_clean"] for file_ in os.listdir(os.path.dirname(__file__)): if file_.startswith('test_') and file_.endswith('.py'): __all__.append(file_...
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ from os import path import glob test_modules = [path.splitext(path.basename(filename))[0] for filename in glob.glob(path.join(path.dirname(__file__), 'test*.py'))] __all__ = test_modules
<commit_before>""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ import os __all__ = ["test_util", "test_clean"] for file_ in os.listdir(os.path.dirname(__file__)): if file_.startswith('test_') and file_.endswith('.py'): __all...
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ from os import path import glob test_modules = [path.splitext(path.basename(filename))[0] for filename in glob.glob(path.join(path.dirname(__file__), 'test*.py'))] __all__ = test_modules
""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ import os __all__ = ["test_util", "test_clean"] for file_ in os.listdir(os.path.dirname(__file__)): if file_.startswith('test_') and file_.endswith('.py'): __all__.append(file_...
<commit_before>""" distutilazy.tests ----------------- Tests for distutilazy :license: MIT, see LICENSE for more details. """ import os __all__ = ["test_util", "test_clean"] for file_ in os.listdir(os.path.dirname(__file__)): if file_.startswith('test_') and file_.endswith('.py'): __all...
76e1565200dda04e4091be761c737042f9a15e67
synapse/media/v1/__init__.py
synapse/media/v1/__init__.py
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Change error message for missing pillow libs.
Change error message for missing pillow libs.
Python
apache-2.0
illicitonion/synapse,howethomas/synapse,iot-factory/synapse,TribeMedia/synapse,matrix-org/synapse,iot-factory/synapse,illicitonion/synapse,matrix-org/synapse,matrix-org/synapse,rzr/synapse,howethomas/synapse,rzr/synapse,howethomas/synapse,howethomas/synapse,illicitonion/synapse,illicitonion/synapse,rzr/synapse,matrix-o...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # 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 requ...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # 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 requ...
e8bcd56727199de75a0dcefe7590d3866a14f39d
django_mailbox/tests/test_mailbox.py
django_mailbox/tests/test_mailbox.py
from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox._protocol_i...
import os from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox....
Add tests to update Mailbox.last_polling
Add tests to update Mailbox.last_polling
Python
mit
coddingtonbear/django-mailbox,ad-m/django-mailbox
from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox._protocol_i...
import os from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox....
<commit_before>from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mail...
import os from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox....
from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mailbox._protocol_i...
<commit_before>from django.test import TestCase from django_mailbox.models import Mailbox __all__ = ['TestMailbox'] class TestMailbox(TestCase): def test_protocol_info(self): mailbox = Mailbox() mailbox.uri = 'alpha://test.com' expected_protocol = 'alpha' actual_protocol = mail...
ccf9e48cf874e7970c5b2e587e797a0501483139
spec/data/anagram_index_spec.py
spec/data/anagram_index_spec.py
from data import anagram_index, warehouse from spec.mamba import * with description('anagram_index'): with before.all: self.subject = anagram_index.AnagramIndex(warehouse.get('/words/unigram')) with it('instantiates'): expect(len(self.subject)).to(be_above(0)) with it('accepts pre-sort-jumbled anagrams...
import collections from data import anagram_index from spec.data.fixtures import tries from spec.mamba import * with description('anagram_index'): with before.all: words = collections.OrderedDict(tries.kitchen_sink_data()) self.subject = anagram_index.AnagramIndex(words) with it('instantiates'): expe...
Update anagram index spec data source.
Update anagram index spec data source.
Python
mit
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
from data import anagram_index, warehouse from spec.mamba import * with description('anagram_index'): with before.all: self.subject = anagram_index.AnagramIndex(warehouse.get('/words/unigram')) with it('instantiates'): expect(len(self.subject)).to(be_above(0)) with it('accepts pre-sort-jumbled anagrams...
import collections from data import anagram_index from spec.data.fixtures import tries from spec.mamba import * with description('anagram_index'): with before.all: words = collections.OrderedDict(tries.kitchen_sink_data()) self.subject = anagram_index.AnagramIndex(words) with it('instantiates'): expe...
<commit_before>from data import anagram_index, warehouse from spec.mamba import * with description('anagram_index'): with before.all: self.subject = anagram_index.AnagramIndex(warehouse.get('/words/unigram')) with it('instantiates'): expect(len(self.subject)).to(be_above(0)) with it('accepts pre-sort-j...
import collections from data import anagram_index from spec.data.fixtures import tries from spec.mamba import * with description('anagram_index'): with before.all: words = collections.OrderedDict(tries.kitchen_sink_data()) self.subject = anagram_index.AnagramIndex(words) with it('instantiates'): expe...
from data import anagram_index, warehouse from spec.mamba import * with description('anagram_index'): with before.all: self.subject = anagram_index.AnagramIndex(warehouse.get('/words/unigram')) with it('instantiates'): expect(len(self.subject)).to(be_above(0)) with it('accepts pre-sort-jumbled anagrams...
<commit_before>from data import anagram_index, warehouse from spec.mamba import * with description('anagram_index'): with before.all: self.subject = anagram_index.AnagramIndex(warehouse.get('/words/unigram')) with it('instantiates'): expect(len(self.subject)).to(be_above(0)) with it('accepts pre-sort-j...
5a885124432ccb33d180a8e73c753ceab54ffdf5
src/Itemizers.py
src/Itemizers.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage def iconForName(klass, name): """Return the NSImage instance representing a `name` item.""" imgpath = NSBundle.bundleForClass_(klass).pathForResource_ofType_(name, 'png') img = NSIma...
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage haskellBundleIdentifier = 'org.purl.net.mkhl.haskell' def iconForName(name): """Return the NSImage instance representing a `name` item.""" bundle = NSBundle.bundleWithIdentifier_(has...
Simplify the icon finder function.
Simplify the icon finder function. We statically know our bundle identifier, so we don’t have too find the bundle by runtime class.
Python
mit
mkhl/haskell.sugar
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage def iconForName(klass, name): """Return the NSImage instance representing a `name` item.""" imgpath = NSBundle.bundleForClass_(klass).pathForResource_ofType_(name, 'png') img = NSIma...
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage haskellBundleIdentifier = 'org.purl.net.mkhl.haskell' def iconForName(name): """Return the NSImage instance representing a `name` item.""" bundle = NSBundle.bundleWithIdentifier_(has...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage def iconForName(klass, name): """Return the NSImage instance representing a `name` item.""" imgpath = NSBundle.bundleForClass_(klass).pathForResource_ofType_(name, 'png...
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage haskellBundleIdentifier = 'org.purl.net.mkhl.haskell' def iconForName(name): """Return the NSImage instance representing a `name` item.""" bundle = NSBundle.bundleWithIdentifier_(has...
#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage def iconForName(klass, name): """Return the NSImage instance representing a `name` item.""" imgpath = NSBundle.bundleForClass_(klass).pathForResource_ofType_(name, 'png') img = NSIma...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from Foundation import objc from Foundation import NSBundle from AppKit import NSImage def iconForName(klass, name): """Return the NSImage instance representing a `name` item.""" imgpath = NSBundle.bundleForClass_(klass).pathForResource_ofType_(name, 'png...
08cb044062abbc6442d687bdae8bd49cfb7b2d9f
test/test_obj.py
test/test_obj.py
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_ply(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_obj(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
Correct typo in test name
Correct typo in test name
Python
mit
nschloe/meshio
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_ply(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_obj(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
<commit_before>import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_ply(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: ...
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_obj(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_ply(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: mesh.cells...
<commit_before>import os import numpy import pytest import helpers import meshio @pytest.mark.parametrize( "mesh", [helpers.tri_mesh, helpers.quad_mesh, helpers.tri_quad_mesh] ) def test_ply(mesh): def writer(*args, **kwargs): return meshio._obj.write(*args, **kwargs) for key in mesh.cells: ...
92a3a4522968d170a8d19649bd6848187736f8f4
src/DeltaDetector.py
src/DeltaDetector.py
import numpy as N import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold def send_frame(self, frame): self._previous_frame = self._...
import numpy as N import gobject import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold self._timed_out = False def send_frame(self...
Add a timeout to the delta detector
Add a timeout to the delta detector Make it so that the detector doesn't beep more than once per second. It would be even better if the beeping occurred in another thread...
Python
mit
ptomato/Beams
import numpy as N import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold def send_frame(self, frame): self._previous_frame = self._...
import numpy as N import gobject import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold self._timed_out = False def send_frame(self...
<commit_before>import numpy as N import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold def send_frame(self, frame): self._previous...
import numpy as N import gobject import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold self._timed_out = False def send_frame(self...
import numpy as N import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold def send_frame(self, frame): self._previous_frame = self._...
<commit_before>import numpy as N import gtk.gdk class DeltaDetector(object): def __init__(self, active=False, threshold=20.0): self._previous_frame = None self._frame = None self.active = active self.threshold = threshold def send_frame(self, frame): self._previous...
8eccb87791ca608be4508fee80f2de9454e4403c
pytask/urls.py
pytask/urls.py
from django.conf import settings from django.conf.urls.defaults import * from registration.views import register from pytask.profile.forms import CustomRegistrationForm from pytask.views import home_page from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', home_page), (r...
from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from registration.views import register from pytask.profile.forms import CustomRegistrationForm admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'pytask.views.home_page', name='home_page'), (...
Modify the home page URL mapper to be consistent with other mappers.
Modify the home page URL mapper to be consistent with other mappers.
Python
agpl-3.0
madhusudancs/pytask,madhusudancs/pytask,madhusudancs/pytask
from django.conf import settings from django.conf.urls.defaults import * from registration.views import register from pytask.profile.forms import CustomRegistrationForm from pytask.views import home_page from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', home_page), (r...
from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from registration.views import register from pytask.profile.forms import CustomRegistrationForm admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'pytask.views.home_page', name='home_page'), (...
<commit_before>from django.conf import settings from django.conf.urls.defaults import * from registration.views import register from pytask.profile.forms import CustomRegistrationForm from pytask.views import home_page from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', hom...
from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin from registration.views import register from pytask.profile.forms import CustomRegistrationForm admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'pytask.views.home_page', name='home_page'), (...
from django.conf import settings from django.conf.urls.defaults import * from registration.views import register from pytask.profile.forms import CustomRegistrationForm from pytask.views import home_page from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', home_page), (r...
<commit_before>from django.conf import settings from django.conf.urls.defaults import * from registration.views import register from pytask.profile.forms import CustomRegistrationForm from pytask.views import home_page from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', hom...
9b35326243c3e6d991bba8dfc948600262ebc557
test/_helpers.py
test/_helpers.py
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
Make DeferredHelper even more like a Deferred by subclassing
Make DeferredHelper even more like a Deferred by subclassing
Python
mit
mineo/lala,mineo/lala
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
<commit_before>import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 1...
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 12, 10, 00, 00, ...
<commit_before>import datetime import mock from functools import wraps from twisted.internet.defer import Deferred class NewDate(datetime.date): @classmethod def today(cls): return cls(2012, 12, 10) class NewDateTime(datetime.datetime): @classmethod def now(cls): return cls(2012, 1...
b15bf76c9a3d3a55423923038e374695a7b302a8
microcosm_pubsub/chain/__init__.py
microcosm_pubsub/chain/__init__.py
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain # noqa: F401
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain, for_each # noqa: F401
Add for_each to chain exports
Add for_each to chain exports
Python
apache-2.0
globality-corp/microcosm-pubsub,globality-corp/microcosm-pubsub
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain # noqa: F401 Add for_each to chain exports
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain, for_each # noqa: F401
<commit_before>from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain # noqa: F401 <commit_msg>Add for_each to chain exports<commit_after>
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain, for_each # noqa: F401
from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain # noqa: F401 Add for_each to chain exportsfrom microcosm_pubsub.chain.chain import Chain # noqa: F401 ...
<commit_before>from microcosm_pubsub.chain.chain import Chain # noqa: F401 from microcosm_pubsub.chain.decorators import binds, extracts # noqa: F401 from microcosm_pubsub.chain.statements import extract, when, switch, try_chain # noqa: F401 <commit_msg>Add for_each to chain exports<commit_after>from microcosm_pubsu...
daafe2152e13d32e7e03533151feeeac9464dddf
mycli/packages/expanded.py
mycli/packages/expanded.py
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): total_len = header_len + data_len + 1 sep = u"-[ RECORD {0} ]".format(num) if len(sep) < header_len: sep = pad(sep, header_len - 1, u"-...
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): sep = u"***************************[ %d. row ]***************************\n" % (num + 1) return sep def expanded_table(rows, headers): header_...
Fix formatting issue for \G.
Fix formatting issue for \G. Closes #49
Python
bsd-3-clause
ksmaheshkumar/mycli,douglasvegas/mycli,webwlsong/mycli,thanatoskira/mycli,tkuipers/mycli,qbdsoft/mycli,douglasvegas/mycli,chenpingzhao/mycli,D-e-e-m-o/mycli,oguzy/mycli,tkuipers/mycli,j-bennet/mycli,suzukaze/mycli,D-e-e-m-o/mycli,thanatoskira/mycli,suzukaze/mycli,mdsrosa/mycli,brewneaux/mycli,danieljwest/mycli,shaunsta...
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): total_len = header_len + data_len + 1 sep = u"-[ RECORD {0} ]".format(num) if len(sep) < header_len: sep = pad(sep, header_len - 1, u"-...
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): sep = u"***************************[ %d. row ]***************************\n" % (num + 1) return sep def expanded_table(rows, headers): header_...
<commit_before>from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): total_len = header_len + data_len + 1 sep = u"-[ RECORD {0} ]".format(num) if len(sep) < header_len: sep = pad(sep, head...
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): sep = u"***************************[ %d. row ]***************************\n" % (num + 1) return sep def expanded_table(rows, headers): header_...
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): total_len = header_len + data_len + 1 sep = u"-[ RECORD {0} ]".format(num) if len(sep) < header_len: sep = pad(sep, header_len - 1, u"-...
<commit_before>from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def get_separator(num, header_len, data_len): total_len = header_len + data_len + 1 sep = u"-[ RECORD {0} ]".format(num) if len(sep) < header_len: sep = pad(sep, head...
40ae95e87e439645d35376942f8c48ce9e62b2ad
test/test_pluginmount.py
test/test_pluginmount.py
from JsonStats.FetchStats.Plugins import * from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher def test_get_...
from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher class _example_plugin(Fetcher): def __ini...
Fix the plugin mount text. And make it way more intelligent.
Fix the plugin mount text. And make it way more intelligent.
Python
mit
RHInception/jsonstats,pombredanne/jsonstats,pombredanne/jsonstats,RHInception/jsonstats
from JsonStats.FetchStats.Plugins import * from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher def test_get_...
from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher class _example_plugin(Fetcher): def __ini...
<commit_before>from JsonStats.FetchStats.Plugins import * from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher ...
from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher class _example_plugin(Fetcher): def __ini...
from JsonStats.FetchStats.Plugins import * from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher def test_get_...
<commit_before>from JsonStats.FetchStats.Plugins import * from . import TestCase import JsonStats.FetchStats.Plugins from JsonStats.FetchStats import Fetcher class TestPluginMount(TestCase): def setUp(self): # Do stuff that has to happen on every test in this instance self.fetcher = Fetcher ...
0a0b87d584bd731c1db65e32a7e438b0f9aea1a9
testing/test_direct_wrapper.py
testing/test_direct_wrapper.py
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename)
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) def test_open_file(tes...
Add test for open file
Add test for open file
Python
mit
mindriot101/fitsio-cffi
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) Add test for open file
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) def test_open_file(tes...
<commit_before>import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) <commit_m...
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) def test_open_file(tes...
import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) Add test for open fileim...
<commit_before>import os from cffitsio._cfitsio import ffi, lib def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = ffi.new('fitsfile **') status = ffi.new('int *') lib.fits_create_file(f, filename, status) assert status[0] == 0 assert os.path.isfile(filename) <commit_m...
efa90202a0586f15575af11ef299b122de413b30
duralex/AddGitHubIssueVisitor.py
duralex/AddGitHubIssueVisitor.py
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
Add the GitHub issue number as a new line in the commitMessage field.
Add the GitHub issue number as a new line in the commitMessage field.
Python
mit
Legilibre/duralex
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
<commit_before># -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.g...
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.github_repositor...
<commit_before># -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor from duralex.alinea_parser import * from github import Github class AddGitHubIssueVisitor(AbstractVisitor): def __init__(self, args): self.github = Github(args.github_token) self.repo = self.github.get_repo(args.g...
0d1e5990d55bea9530beaa49aaf5091a6434a48e
newswall/providers/base.py
newswall/providers/base.py
from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defaults = {'source': self.source} ...
from datetime import date, timedelta from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defa...
Set stories to inactive if a story with the same title has been published recently
Set stories to inactive if a story with the same title has been published recently
Python
bsd-3-clause
HerraLampila/django-newswall,michaelkuty/django-newswall,matthiask/django-newswall,matthiask/django-newswall,HerraLampila/django-newswall,registerguard/django-newswall,registerguard/django-newswall,michaelkuty/django-newswall
from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defaults = {'source': self.source} ...
from datetime import date, timedelta from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defa...
<commit_before>from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defaults = {'source': self....
from datetime import date, timedelta from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defa...
from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defaults = {'source': self.source} ...
<commit_before>from newswall.models import Story class ProviderBase(object): def __init__(self, source, config): self.source = source self.config = config def update(self): raise NotImplementedError def create_story(self, object_url, **kwargs): defaults = {'source': self....
d26fe68901948899221cd4ad0ee3ee2e42d69dbd
tests/newsletters/factories.py
tests/newsletters/factories.py
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
Use sentence faker for email subjects
Use sentence faker for email subjects
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
<commit_before>import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: ...
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: model = fol...
<commit_before>import factory from adhocracy4.follows import models as follow_models from adhocracy4.test import factories as a4_factories from meinberlin.apps.newsletters import models from tests import factories # FIXME: copied from core class FollowFactory(factory.django.DjangoModelFactory): class Meta: ...
8840cedd74c6c1959358366a88a85e7567b84439
tests/test_vector2_negation.py
tests/test_vector2_negation.py
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector @given(vector=vectors()) def test_negation_involutive(vector: Vector2): assert vector == - (- vector)
Test that negation is involutive
tests/negation: Test that negation is involutive
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector tests/negation: Test that negation is involutive
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector @given(vector=vectors()) def test_negation_involutive(vector: Vector2): assert vector == - (- vector)
<commit_before>from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector <commit_msg>tests/negation: Test that negation is involutive<commit_after>
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector @given(vector=vectors()) def test_negation_involutive(vector: Vector2): assert vector == - (- vector)
from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector tests/negation: Test that negation is involutivefrom hypothesis import given from ppb_vector import Vector2 from utils import ...
<commit_before>from hypothesis import given from ppb_vector import Vector2 from utils import vectors @given(vector=vectors()) def test_negation_scalar(vector: Vector2): assert - vector == (-1) * vector <commit_msg>tests/negation: Test that negation is involutive<commit_after>from hypothesis import given from ppb...
5f07fd7b5d916ca1442a5b599bcec49026295209
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
8: Create documentation of DataSource Settings Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
8987187ddb1b60e667217d6c068ec4e235fd2c5e
core/helpers/constants.py
core/helpers/constants.py
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
Edit to the regular expression pattern used to identify meta-mapped references.
Edit to the regular expression pattern used to identify meta-mapped references.
Python
mit
Quantipy/quantipy,Quantipy/quantipy,Quantipy/quantipy,Quantipy/quantipy
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
<commit_before>#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], ...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], "string": [...
<commit_before>#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' Constant mapping appropriate quantipy types to pandas dtypes ''' DTYPE_MAP = { "float": ["float64", "float32", "float16"], "int": ["int64", "int32", "int16", "int8", "int0", "float64", "float32", "float16"], ...
f3eb4ffe0017b850fcd9a66bcfa0bc00f724064e
gapipy/resources/booking/document.py
gapipy/resources/booking/document.py
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booking', 'Bookin...
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type', 'audience'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booki...
Add audience field to Document resource
Add audience field to Document resource - 'audience' field is displayed on list of invoices (bookings/<booking_id>/invoices) and now, also on list of documents (bookings/<booking_id>/documents) to match what is being returned in the API
Python
mit
gadventures/gapipy
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booking', 'Bookin...
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type', 'audience'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booki...
<commit_before>from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('bo...
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type', 'audience'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booki...
from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('booking', 'Bookin...
<commit_before>from __future__ import unicode_literals from ..base import Resource class Document(Resource): _resource_name = 'documents' _is_listable = False _as_is_fields = ['id', 'href', 'mime_type', 'content', 'type'] _date_time_fields_utc = ['date_created'] _resource_fields = [ ('bo...
da693543eb2c2daa3228dc583bb527647cc1602c
vc_zoom/setup.py
vc_zoom/setup.py
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
Use more specific PyJWT version pin
VC/Zoom: Use more specific PyJWT version pin
Python
mit
ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,indico/indico-plugins
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
<commit_before># This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools imp...
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
# This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools import setup # X...
<commit_before># This file is part of the Indico plugins. # Copyright (C) 2020 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from setuptools imp...
f674890edde22bf70324d4a5da12c2ca01874ae8
tgrsite/utils.py
tgrsite/utils.py
class PermsError: val = False @classmethod def suppress(cls): cls.val = True def __bool__(self): return self.val
class PermsError: val = True @classmethod def suppress(cls): cls.val = False def __bool__(self): return self.val
Fix PermsError.suppress() doing the exact opposite...
Fix PermsError.suppress() doing the exact opposite...
Python
isc
ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite
class PermsError: val = False @classmethod def suppress(cls): cls.val = True def __bool__(self): return self.val Fix PermsError.suppress() doing the exact opposite...
class PermsError: val = True @classmethod def suppress(cls): cls.val = False def __bool__(self): return self.val
<commit_before>class PermsError: val = False @classmethod def suppress(cls): cls.val = True def __bool__(self): return self.val <commit_msg>Fix PermsError.suppress() doing the exact opposite...<commit_after>
class PermsError: val = True @classmethod def suppress(cls): cls.val = False def __bool__(self): return self.val
class PermsError: val = False @classmethod def suppress(cls): cls.val = True def __bool__(self): return self.val Fix PermsError.suppress() doing the exact opposite...class PermsError: val = True @classmethod def suppress(cls): cls.val = False def __bool__(self...
<commit_before>class PermsError: val = False @classmethod def suppress(cls): cls.val = True def __bool__(self): return self.val <commit_msg>Fix PermsError.suppress() doing the exact opposite...<commit_after>class PermsError: val = True @classmethod def suppress(cls): ...
84e964eba11e344f6f0ec612b5743e693a8825bd
thoonk/config.py
thoonk/config.py
import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): with self.lock:...
import json import threading import uuid class ConfigCache(object): """ The ConfigCache class stores an in-memory version of each feed's configuration. As there may be multiple systems using Thoonk with the same Redis server, and each with its own ConfigCache instance, each ConfigCache has a self...
Add docs to the ConfigCache.
Add docs to the ConfigCache.
Python
mit
andyet/thoonk.py,fritzy/thoonk.py
import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): with self.lock:...
import json import threading import uuid class ConfigCache(object): """ The ConfigCache class stores an in-memory version of each feed's configuration. As there may be multiple systems using Thoonk with the same Redis server, and each with its own ConfigCache instance, each ConfigCache has a self...
<commit_before>import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): ...
import json import threading import uuid class ConfigCache(object): """ The ConfigCache class stores an in-memory version of each feed's configuration. As there may be multiple systems using Thoonk with the same Redis server, and each with its own ConfigCache instance, each ConfigCache has a self...
import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): with self.lock:...
<commit_before>import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): ...
2e4b3f3dc8e0f949700c810912e32a2dffa2def3
ttag/__init__.py
ttag/__init__.py
from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, ModelInstanceArg, \ StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError VERSION = (1, 0, 'alpha') def get_version(number_on...
try: from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, \ ModelInstanceArg, StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError except ImportError: # Thi...
Work around an error if ttag is installed at the same time as Django
Work around an error if ttag is installed at the same time as Django
Python
bsd-3-clause
caktus/django-ttag,caktus/django-ttag,matuu/django-ttag,matuu/django-ttag,lincolnloop/django-ttag,lincolnloop/django-ttag
from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, ModelInstanceArg, \ StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError VERSION = (1, 0, 'alpha') def get_version(number_on...
try: from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, \ ModelInstanceArg, StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError except ImportError: # Thi...
<commit_before>from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, ModelInstanceArg, \ StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError VERSION = (1, 0, 'alpha') def get_ve...
try: from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, \ ModelInstanceArg, StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError except ImportError: # Thi...
from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, ModelInstanceArg, \ StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError VERSION = (1, 0, 'alpha') def get_version(number_on...
<commit_before>from ttag.args import Arg, BasicArg, BooleanArg, ConstantArg, DateArg, \ DateTimeArg, IntegerArg, IsInstanceArg, KeywordsArg, ModelInstanceArg, \ StringArg, TimeArg from ttag.core import Tag from ttag.exceptions import TagArgumentMissing, TagValidationError VERSION = (1, 0, 'alpha') def get_ve...
0ee942eaffc2a60b87c21eeec75f01eb1a50b8e0
tests/demo_project/manage.py
tests/demo_project/manage.py
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
Make sure the demo project is in the pythonpath
Make sure the demo project is in the pythonpath
Python
bsd-3-clause
oscarmlage/django-cruds-adminlte,oscarmlage/django-cruds-adminlte,oscarmlage/django-cruds-adminlte
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
<commit_before>#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) ...
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) sys.path.inse...
<commit_before>#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": # We add ourselves into the python path, so we can find # the package later. demo_root =os.path.dirname(os.path.abspath(__file__)) crud_install = os.path.dirname(os.path.dirname(demo_root)) ...
7d1dc8851f1571b2f39a886298bc7b8ff270a6b7
tests/run/generators_py35.py
tests/run/generators_py35.py
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
Make annotation tests work with non-evaluated annotations (GH-4050)
Make annotation tests work with non-evaluated annotations (GH-4050) Backported from 3dc2b9dfc23638fbef2558d619709b5235d5df08 Partial fix for https://github.com/cython/cython/issues/3919
Python
apache-2.0
scoder/cython,scoder/cython,cython/cython,da-woods/cython,scoder/cython,scoder/cython,cython/cython,da-woods/cython,da-woods/cython,da-woods/cython,cython/cython,cython/cython
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
<commit_before># mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else...
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
# mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else: ... p...
<commit_before># mode: run # tag: generators, pure3.5 from __future__ import generator_stop # "generator_stop" was only added in Py3.5. def with_outer_raising(*args): """ >>> x = with_outer_raising(1, 2, 3) >>> try: ... list(x()) ... except RuntimeError: ... print("OK!") ... else...
5a5e820fa50377904e6fdd592fed5e883698c3f0
tests/testapp/models/city.py
tests/testapp/models/city.py
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.TextField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.CharField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
Change text field to charfields, since those are indexable in mysql
Change text field to charfields, since those are indexable in mysql
Python
mit
CodeYellowBV/django-binder
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.TextField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.CharField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
<commit_before>from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.TextField(unique=True, max_length=100) class CityState(BinderModel): ...
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.CharField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.TextField(unique=True, max_length=100) class CityState(BinderModel): """ City st...
<commit_before>from django.db import models from binder.models import BinderModel class City(BinderModel): country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE) name = models.TextField(unique=True, max_length=100) class CityState(BinderModel): ...
48132de52d573f7f650ab693c1ad0b6007ebfaef
cybox/test/common/vocab_test.py
cybox/test/common/vocab_test.py
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): attr_dict = {...
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): vocab_dict = ...
Clean up controlled vocab tests
Clean up controlled vocab tests
Python
bsd-3-clause
CybOXProject/python-cybox
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): attr_dict = {...
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): vocab_dict = ...
<commit_before>import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): ...
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): vocab_dict = ...
import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): attr_dict = {...
<commit_before>import unittest from cybox.common.vocabs import VocabString import cybox.test from cybox.utils import normalize_to_xml class TestVocabString(unittest.TestCase): def test_plain(self): a = VocabString("test_value") self.assertTrue(a.is_plain()) def test_round_trip(self): ...