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
12906fd952bb03a98411ccf51f1ab40e6f580e3a
surveil/tests/api/controllers/v1/test_hello.py
surveil/tests/api/controllers/v1/test_hello.py
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
Use self.assertEqual instead of assert
Use self.assertEqual instead of assert Change-Id: Icae26d907eec2c4ab9f430c69491a96bd549c45a
Python
apache-2.0
stackforge/surveil,openstack/surveil,openstack/surveil,stackforge/surveil
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
<commit_before># Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
<commit_before># Copyright 2014 - Savoir-Faire Linux inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
2ad6b7b57b20e75c5a98cb64d11b74e536057906
diary/forms.py
diary/forms.py
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
Set booked_by for cloned/additional showings
Set booked_by for cloned/additional showings
Python
agpl-3.0
BenMotz/cubetoolkit,BenMotz/cubetoolkit,BenMotz/cubetoolkit,BenMotz/cubetoolkit
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
<commit_before>from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textare...
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textareas: wid...
<commit_before>from django import forms import cube.diary.models class DiaryIdeaForm(forms.ModelForm): class Meta(object): model = cube.diary.models.DiaryIdea class EventForm(forms.ModelForm): class Meta(object): model = cube.diary.models.Event # Ensure soft wrapping is set for textare...
75157b852ae174359d1665658d99852bfeca07c3
reportlab/rl_config.py
reportlab/rl_config.py
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.3 2001/04/05 09:30:11 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.4 2001/04/17 18:28:54 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
Fix typo in T1SearchPath name
Fix typo in T1SearchPath name
Python
bsd-3-clause
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.3 2001/04/05 09:30:11 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.4 2001/04/17 18:28:54 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
<commit_before>#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.3 2001/04/05 09:30:11 rgbecker Exp $ import sys from reportlab.lib import pagesizes ...
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.4 2001/04/17 18:28:54 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.3 2001/04/05 09:30:11 rgbecker Exp $ import sys from reportlab.lib import pagesizes shapeChecking =...
<commit_before>#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/rl_config.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/rl_config.py,v 1.3 2001/04/05 09:30:11 rgbecker Exp $ import sys from reportlab.lib import pagesizes ...
3a711d6005b16fcc6faf19c80f292ad6ef25455c
sqlserver_ado/__init__.py
sqlserver_ado/__init__.py
import os.path VERSION = (1, 0, 0, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
import os.path VERSION = (1, 0, 1, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
Bump version to 1.0.1 for unit test fix.
Bump version to 1.0.1 for unit test fix.
Python
mit
theoriginalgri/django-mssql,theoriginalgri/django-mssql
import os.path VERSION = (1, 0, 0, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
import os.path VERSION = (1, 0, 1, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
<commit_before>import os.path VERSION = (1, 0, 0, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERS...
import os.path VERSION = (1, 0, 1, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
import os.path VERSION = (1, 0, 0, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERSION: t...
<commit_before>import os.path VERSION = (1, 0, 0, 'stable') def get_version(): """ Return the version as a string. If this is flagged as a development release and mercurial can be loaded the specifics about the changeset will be appended to the version string. """ if 'dev' in VERS...
f8677eff328d50e16b51c2802b3f9e168c38534b
user_test.py
user_test.py
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '0.7.5': print("SymPy version 0.7.5 or newer is required. You have", sympy.__version__) if sympy.__version__ != '0.7.5': print("The stable SymPy version 0.7.5 is recomme...
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '1.0': print("SymPy version 1.0 or newer is required. You have", sympy.__version__) if sympy.__version__ != '1.0': print("The stable SymPy version 1.0 is recommended. Yo...
Update SymPy/IPython version in test script
Update SymPy/IPython version in test script
Python
bsd-3-clause
leosartaj/scipy-2016-tutorial,aktech/scipy-2016-tutorial
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '0.7.5': print("SymPy version 0.7.5 or newer is required. You have", sympy.__version__) if sympy.__version__ != '0.7.5': print("The stable SymPy version 0.7.5 is recomme...
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '1.0': print("SymPy version 1.0 or newer is required. You have", sympy.__version__) if sympy.__version__ != '1.0': print("The stable SymPy version 1.0 is recommended. Yo...
<commit_before>#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '0.7.5': print("SymPy version 0.7.5 or newer is required. You have", sympy.__version__) if sympy.__version__ != '0.7.5': print("The stable SymPy version 0...
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '1.0': print("SymPy version 1.0 or newer is required. You have", sympy.__version__) if sympy.__version__ != '1.0': print("The stable SymPy version 1.0 is recommended. Yo...
#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '0.7.5': print("SymPy version 0.7.5 or newer is required. You have", sympy.__version__) if sympy.__version__ != '0.7.5': print("The stable SymPy version 0.7.5 is recomme...
<commit_before>#!/usr/bin/env python try: import sympy except ImportError: print("sympy is required") else: if sympy.__version__ < '0.7.5': print("SymPy version 0.7.5 or newer is required. You have", sympy.__version__) if sympy.__version__ != '0.7.5': print("The stable SymPy version 0...
df21a8558f28887b3f38a892e8c7f45c12169764
src/ansible/urls.py
src/ansible/urls.py
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, AnsibleForm2])), url(r'...
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileEditView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, Ansib...
Add PlaybookFile edit view url
Add PlaybookFile edit view url
Python
bsd-3-clause
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, AnsibleForm2])), url(r'...
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileEditView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, Ansib...
<commit_before>from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, AnsibleForm2...
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileEditView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, Ansib...
from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, AnsibleForm2])), url(r'...
<commit_before>from django.conf.urls import url from ansible.forms import AnsibleForm1, AnsibleForm2 from ansible.views import ( PlaybookWizard, PlaybookListView, PlaybookDetailView, PlaybookFileView ) from . import views urlpatterns = [ url(r'^create/$', PlaybookWizard.as_view([AnsibleForm1, AnsibleForm2...
fdd6f31c582318bbbb1ca8b408a7a3194e5de85a
groundstation/gref.py
groundstation/gref.py
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
Fix broken attempts to open r+ non existant files
Fix broken attempts to open r+ non existant files
Python
mit
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
<commit_before>import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), ...
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), self.ch...
<commit_before>import os class Gref(object): def __init__(self, store, channel, identifier): self.store = store self.channel = channel.replace("/", "_") self.identifier = identifier def node_path(self): node_path = os.path.join(self.store.gref_path(), ...
4304409d6f6028cb5f22edd97b8ecffa197dd9ed
server.py
server.py
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
Use Task instead of run_until_complete
Use Task instead of run_until_complete
Python
unlicense
ajdavis/asyncio-chat-example,ajdavis/asyncio-chat-example
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
<commit_before>import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: ...
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: retu...
<commit_before>import asyncio import logging # https://pypi.python.org/pypi/websockets import websockets clients = set() logging.basicConfig(level=logging.INFO) @asyncio.coroutine def chat(websocket, uri): clients.add(websocket) while True: msg = yield from websocket.recv() if msg is None: ...
f18111d1a4227ce43326fd90c645ce09f6a183f7
shared.py
shared.py
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
Add a setting so that people can disable mirrored saves
Add a setting so that people can disable mirrored saves
Python
apache-2.0
Floobits/plugin-common-python,Floobits/flootty
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
<commit_before>import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAUL...
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAULT_PORT = 3448 S...
<commit_before>import os __VERSION__ = '' __PLUGIN_VERSION__ = '' # Config settings USERNAME = '' SECRET = '' API_KEY = '' DEBUG = False SOCK_DEBUG = False ALERT_ON_MSG = True LOG_TO_CONSOLE = False BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits')) # Shared globals DEFAULT_HOST = 'floobits.com' DEFAUL...
301463a99dceceb21ecec933f3a83e55ca37c3b8
wagtail/wagtailimages/api/admin/serializers.py
wagtail/wagtailimages/api/admin/serializers.py
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
Use source keyword argument (instead of overriding get_attribute)
Use source keyword argument (instead of overriding get_attribute) This allows the ImageRenditionField to be used on models that contain an image field.
Python
bsd-3-clause
nealtodd/wagtail,mikedingjan/wagtail,FlipperPA/wagtail,torchbox/wagtail,iansprice/wagtail,jnns/wagtail,wagtail/wagtail,zerolab/wagtail,thenewguy/wagtail,iansprice/wagtail,zerolab/wagtail,rsalmaso/wagtail,gasman/wagtail,timorieber/wagtail,kaedroho/wagtail,mikedingjan/wagtail,torchbox/wagtail,thenewguy/wagtail,zerolab/wa...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
<commit_before>from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition ...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition with the specif...
<commit_before>from __future__ import absolute_import, unicode_literals from collections import OrderedDict from rest_framework.fields import Field from ...models import SourceImageIOError from ..v2.serializers import ImageSerializer class ImageRenditionField(Field): """ A field that generates a rendition ...
e21f17b7d3ee810ce587a67609a53cbe038e5458
src/pubmed.py
src/pubmed.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
Return Pubmed title and abstract
Return Pubmed title and abstract
Python
mit
AndreLamurias/IBEnt,AndreLamurias/IBRel,AndreLamurias/IBEnt,AndreLamurias/IBRel
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efet...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efet...
969bc09c515f208738da67ebf77ef543ab358613
leonardo_agenda/__init__.py
leonardo_agenda/__init__.py
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
Use leonardo helper for declare html text widget.
Use leonardo helper for declare html text widget.
Python
bsd-3-clause
leonardo-modules/leonardo-agenda,leonardo-modules/leonardo-agenda,leonardo-modules/leonardo-agenda
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
<commit_before> from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo_agenda.models....
<commit_before> from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ default_app_config = 'leonardo_agenda.Config' LEONARDO_OPTGROUP = 'Events' LEONARDO_APPS = [ 'leonardo_agenda', 'elephantagenda', 'elephantagenda.backends.agenda' ] LEONARDO_WIDGETS = [ 'leonardo...
06cf113cc45e7eaa8ab63e2791c2f2a0990ac946
EasyEuler/data.py
EasyEuler/data.py
import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') templates = Environment(loader=FileSystem...
import collections import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') with open('%s/problems...
Add support for XDG spec configuration
Add support for XDG spec configuration
Python
mit
Encrylize/EasyEuler
import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') templates = Environment(loader=FileSystem...
import collections import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') with open('%s/problems...
<commit_before>import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') templates = Environment(lo...
import collections import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') with open('%s/problems...
import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') templates = Environment(loader=FileSystem...
<commit_before>import json import os from jinja2 import Environment, FileSystemLoader BASE_PATH = os.path.abspath(os.path.dirname(__file__)) DATA_PATH = os.path.join(BASE_PATH, 'data') TEMPLATE_PATH = os.path.join(BASE_PATH, 'templates') CONFIG_PATH = os.path.join(BASE_PATH, 'config.json') templates = Environment(lo...
77d491ea43fcd00dcfcee1f0b9c2fdb50dc50c8e
tests/test_models.py
tests/test_models.py
import unittest from datetime import datetime from twofa import create_app, db from twofa.models import User class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') db.create_all() def tearDown(self): db.session.remove() db.drop_all() def ...
import unittest from twofa import create_app, db from twofa.models import User from unittest.mock import patch class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.user = User( 'example@example.com', 'fakepassword', 'Ali...
Add some tests for the model
Add some tests for the model
Python
mit
TwilioDevEd/authy2fa-flask,TwilioDevEd/authy2fa-flask,TwilioDevEd/authy2fa-flask,TwilioDevEd/authy2fa-flask
import unittest from datetime import datetime from twofa import create_app, db from twofa.models import User class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') db.create_all() def tearDown(self): db.session.remove() db.drop_all() def ...
import unittest from twofa import create_app, db from twofa.models import User from unittest.mock import patch class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.user = User( 'example@example.com', 'fakepassword', 'Ali...
<commit_before>import unittest from datetime import datetime from twofa import create_app, db from twofa.models import User class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') db.create_all() def tearDown(self): db.session.remove() db.drop_...
import unittest from twofa import create_app, db from twofa.models import User from unittest.mock import patch class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.user = User( 'example@example.com', 'fakepassword', 'Ali...
import unittest from datetime import datetime from twofa import create_app, db from twofa.models import User class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') db.create_all() def tearDown(self): db.session.remove() db.drop_all() def ...
<commit_before>import unittest from datetime import datetime from twofa import create_app, db from twofa.models import User class UserTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') db.create_all() def tearDown(self): db.session.remove() db.drop_...
69a763860202c42026b2c7146dcf915e30bc3f9b
misc/utils/LogTools/LogView.py
misc/utils/LogTools/LogView.py
import threading import socket import logging import os import colorama from termcolor import colored from collections import deque markerStack = deque(['']) def colorMessage(message): if 'Info' in message : print(colored(message, 'green')) elif 'Error' in message : print(colored(message, 're...
"""Usage: logview [options] Options: -h, --help show this help message -v, --verbose print status messages --ignore=loglevels ignore logs of the specified levels """ import threading import socket import logging import os import colorama import docopt from termcolor import colored from collections import deque ...
Add docopt - not finished
Add docopt - not finished
Python
mit
xfleckx/BeMoBI,xfleckx/BeMoBI
import threading import socket import logging import os import colorama from termcolor import colored from collections import deque markerStack = deque(['']) def colorMessage(message): if 'Info' in message : print(colored(message, 'green')) elif 'Error' in message : print(colored(message, 're...
"""Usage: logview [options] Options: -h, --help show this help message -v, --verbose print status messages --ignore=loglevels ignore logs of the specified levels """ import threading import socket import logging import os import colorama import docopt from termcolor import colored from collections import deque ...
<commit_before>import threading import socket import logging import os import colorama from termcolor import colored from collections import deque markerStack = deque(['']) def colorMessage(message): if 'Info' in message : print(colored(message, 'green')) elif 'Error' in message : print(color...
"""Usage: logview [options] Options: -h, --help show this help message -v, --verbose print status messages --ignore=loglevels ignore logs of the specified levels """ import threading import socket import logging import os import colorama import docopt from termcolor import colored from collections import deque ...
import threading import socket import logging import os import colorama from termcolor import colored from collections import deque markerStack = deque(['']) def colorMessage(message): if 'Info' in message : print(colored(message, 'green')) elif 'Error' in message : print(colored(message, 're...
<commit_before>import threading import socket import logging import os import colorama from termcolor import colored from collections import deque markerStack = deque(['']) def colorMessage(message): if 'Info' in message : print(colored(message, 'green')) elif 'Error' in message : print(color...
0547675bc4530681181005d1f502a43baf7deb56
napalm_ios/__init__.py
napalm_ios/__init__.py
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
Verify fails travis-ci due to pylama (just a test
Verify fails travis-ci due to pylama (just a test
Python
apache-2.0
spotify/napalm,napalm-automation/napalm-ios,napalm-automation/napalm,spotify/napalm
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
<commit_before># Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
<commit_before># Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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...
8378b474fca360696adc8a7c11439ac78912fab4
tools/test_filter.py
tools/test_filter.py
{ 'bslstl_iteratorutil': [ {'OS': 'SunOS'} ], 'bslstl_unorderedmultiset': [ {'OS': 'SunOS'} ], 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], }
{ 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], }
Remove test driver exceptions for bslstl_iteratorutil and bslstl_unorderedmultiset on Sun
Remove test driver exceptions for bslstl_iteratorutil and bslstl_unorderedmultiset on Sun
Python
apache-2.0
mversche/bde,gbleaney/Allocator-Benchmarks,abeels/bde,RMGiroux/bde-allocator-benchmarks,bowlofstew/bde,abeels/bde,che2/bde,saxena84/bde,minhlongdo/bde,jmptrader/bde,che2/bde,dharesign/bde,bloomberg/bde-allocator-benchmarks,bloomberg/bde-allocator-benchmarks,apaprocki/bde,jmptrader/bde,osubboo/bde,bloomberg/bde-allocato...
{ 'bslstl_iteratorutil': [ {'OS': 'SunOS'} ], 'bslstl_unorderedmultiset': [ {'OS': 'SunOS'} ], 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], } Remov...
{ 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], }
<commit_before>{ 'bslstl_iteratorutil': [ {'OS': 'SunOS'} ], 'bslstl_unorderedmultiset': [ {'OS': 'SunOS'} ], 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'ski...
{ 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], }
{ 'bslstl_iteratorutil': [ {'OS': 'SunOS'} ], 'bslstl_unorderedmultiset': [ {'OS': 'SunOS'} ], 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'skip' } ], } Remov...
<commit_before>{ 'bslstl_iteratorutil': [ {'OS': 'SunOS'} ], 'bslstl_unorderedmultiset': [ {'OS': 'SunOS'} ], 'bsls_atomic' : [ {'case': 7, 'HOST': 'VM', 'policy': 'skip' }, {'case': 8, 'HOST': 'VM', 'policy': 'skip' }, ], 'bsls_stopwatch' : [ {'case': 6, 'HOST': 'VM', 'policy': 'ski...
0d8c37cb0ebdc88c11be60e856677ac090aeea49
users/views.py
users/views.py
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
Add expiration value of 5m to the session.
Add expiration value of 5m to the session.
Python
bsd-3-clause
codefordurham/food-inspector,codefordurham/Durham-Restaurants,codefordurham/Durham-Restaurants,codefordurham/food-inspector,codefordurham/food-inspector,codefordurham/Durham-Restaurants,codefordurham/food-inspector,codefordurham/Durham-Restaurants
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
<commit_before>import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csr...
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csrf_exempt) d...
<commit_before>import json import logging from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt logger = logging.getLogger(__name__) class CSRFExemptMixin(object): @method_decorator(csr...
16b3cc9be877710c80146a439b74d46987859771
ui_devel/discover.py
ui_devel/discover.py
from django.conf import settings from django.utils.importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. ...
from django.conf import settings from importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. Code modif...
Use Python importlib instead of sjango.utils.importlib
Use Python importlib instead of sjango.utils.importlib
Python
bsd-3-clause
alexkasina/django-ui-devel,atul-bhouraskar/django-ui-devel,atul-bhouraskar/django-ui-devel,alexkasina/django-ui-devel
from django.conf import settings from django.utils.importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. ...
from django.conf import settings from importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. Code modif...
<commit_before>from django.conf import settings from django.utils.importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for fa...
from django.conf import settings from importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. Code modif...
from django.conf import settings from django.utils.importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for faster access. ...
<commit_before>from django.conf import settings from django.utils.importlib import import_module class InvalidTemplateFixture(Exception): pass # holds all the fixtures template_fixtures = {} def get_template_fixtures(): """ Return the list of all available template fixtures. Caches the result for fa...
826251dc100914bf644f09acafba0f01d168a797
mysite/haystack_configuration.py
mysite/haystack_configuration.py
################ We could, import haystack, but what's the point? #import haystack ################# The docs suggest we do this: #haystack.autodiscover() ################# but we will NOT because this causes explosions in the sky. ################# We should talk to the Haystack folks. It seems that they have #######...
### The docs suggest we do this: import haystack haystack.autodiscover()
Use haystack.autodiscover() again, in the hopes it no longer breaks the world
Use haystack.autodiscover() again, in the hopes it no longer breaks the world
Python
agpl-3.0
SnappleCap/oh-mainline,vipul-sharma20/oh-mainline,mzdaniel/oh-mainline,nirmeshk/oh-mainline,moijes12/oh-mainline,openhatch/oh-mainline,Changaco/oh-mainline,mzdaniel/oh-mainline,mzdaniel/oh-mainline,mzdaniel/oh-mainline,sudheesh001/oh-mainline,Changaco/oh-mainline,moijes12/oh-mainline,sudheesh001/oh-mainline,nirmeshk/oh...
################ We could, import haystack, but what's the point? #import haystack ################# The docs suggest we do this: #haystack.autodiscover() ################# but we will NOT because this causes explosions in the sky. ################# We should talk to the Haystack folks. It seems that they have #######...
### The docs suggest we do this: import haystack haystack.autodiscover()
<commit_before>################ We could, import haystack, but what's the point? #import haystack ################# The docs suggest we do this: #haystack.autodiscover() ################# but we will NOT because this causes explosions in the sky. ################# We should talk to the Haystack folks. It seems that th...
### The docs suggest we do this: import haystack haystack.autodiscover()
################ We could, import haystack, but what's the point? #import haystack ################# The docs suggest we do this: #haystack.autodiscover() ################# but we will NOT because this causes explosions in the sky. ################# We should talk to the Haystack folks. It seems that they have #######...
<commit_before>################ We could, import haystack, but what's the point? #import haystack ################# The docs suggest we do this: #haystack.autodiscover() ################# but we will NOT because this causes explosions in the sky. ################# We should talk to the Haystack folks. It seems that th...
3e42af8ac949032d8dc2c4bc181a64fc2fbed651
downstream_node/models.py
downstream_node/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import Table
#!/usr/bin/env python # -*- coding: utf-8 -*- from downstream_node.startup import db class Files(db.Model): __tablename__ = 'files' id = db.Column(db.Integer(), primary_key=True, autoincrement=True) filepath = db.Column('filepath', db.String()) class Challenges(db.Model): __tablename__ = 'challenge...
Add model stuff into DB
Add model stuff into DB
Python
mit
Storj/downstream-node,Storj/downstream-node
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import TableAdd model stuff into DB
#!/usr/bin/env python # -*- coding: utf-8 -*- from downstream_node.startup import db class Files(db.Model): __tablename__ = 'files' id = db.Column(db.Integer(), primary_key=True, autoincrement=True) filepath = db.Column('filepath', db.String()) class Challenges(db.Model): __tablename__ = 'challenge...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import Table<commit_msg>Add model stuff into DB<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from downstream_node.startup import db class Files(db.Model): __tablename__ = 'files' id = db.Column(db.Integer(), primary_key=True, autoincrement=True) filepath = db.Column('filepath', db.String()) class Challenges(db.Model): __tablename__ = 'challenge...
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import TableAdd model stuff into DB#!/usr/bin/env python # -*- coding: utf-8 -*- from downstream_node.startup import db class Files(db.Model): __tablename__ = 'files' id = db.Column(db.Integer(), primary_key=True, autoincrement=True) filepath...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import Table<commit_msg>Add model stuff into DB<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from downstream_node.startup import db class Files(db.Model): __tablename__ = 'files' id = db.Column(db.Integer(), primary_k...
599e2328ba0ab4f5fa467a363e35b8c99392ad3c
elvis/utils.py
elvis/utils.py
from datetime import datetime, timedelta import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str_timestamp = str...
from datetime import datetime import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') UTC = pytz.timezone('UTC') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str...
Fix date parsing having wrong offset
Fix date parsing having wrong offset
Python
bsd-2-clause
thorgate/python-lvis
from datetime import datetime, timedelta import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str_timestamp = str...
from datetime import datetime import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') UTC = pytz.timezone('UTC') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str...
<commit_before>from datetime import datetime, timedelta import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str_...
from datetime import datetime import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') UTC = pytz.timezone('UTC') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str...
from datetime import datetime, timedelta import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str_timestamp = str...
<commit_before>from datetime import datetime, timedelta import pytz DATE_PREFIX = '/Date(' DATE_SUFFIX = ')/' ELVIS_TIMEZONE = pytz.timezone('Europe/Tallinn') def decode_elvis_timestamp(timestamp: str): """Try to convert the argument to timestamp using ELVIS rules, return it unmodified if impossible""" str_...
80326d96a8137c1d285d3c24eda15039e03dedfe
opps/contrib/logging/models.py
opps/contrib/logging/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
Add index in text field on Logging
Add index in text field on Logging
Python
mit
opps/opps,williamroot/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USE...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USER_MODEL, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from opps.core.models import NotUserPublishable class Logging(NotUserPublishable): user = models.ForeignKey( settings.AUTH_USE...
00c87d7b169119c8d9e5972d47ec9293870f313f
gui.py
gui.py
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(500, 400) win = MainWindow() win.connect("delete-event", Gtk.ma...
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(400, 350) box = Gtk.Box(orientation=Gtk.Orientation.VERT...
Set up beginning template - definitely requires changes
Set up beginning template - definitely requires changes
Python
mit
Giovanni21M/Text-Playing-Game
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(500, 400) win = MainWindow() win.connect("delete-event", Gtk.ma...
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(400, 350) box = Gtk.Box(orientation=Gtk.Orientation.VERT...
<commit_before>import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(500, 400) win = MainWindow() win.connect("delete...
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(400, 350) box = Gtk.Box(orientation=Gtk.Orientation.VERT...
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(500, 400) win = MainWindow() win.connect("delete-event", Gtk.ma...
<commit_before>import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Text Playing Game") self.set_border_width(10) self.set_size_request(500, 400) win = MainWindow() win.connect("delete...
1079550f0742a446c1b64e6080a40e06ffa6a30d
nova/policies/instance_actions.py
nova/policies/instance_actions.py
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
Add policy description for instance actions
Add policy description for instance actions This commit adds policy doc for instance actions policies. Partial implement blueprint policy-docs Change-Id: Id336b660fb687d096cd55bf8758dc408c45f9382
Python
apache-2.0
gooddata/openstack-nova,vmturbo/nova,rahulunair/nova,rajalokan/nova,klmitch/nova,openstack/nova,openstack/nova,vmturbo/nova,mikalstill/nova,mahak/nova,klmitch/nova,openstack/nova,mikalstill/nova,vmturbo/nova,mahak/nova,phenoxim/nova,mikalstill/nova,klmitch/nova,gooddata/openstack-nova,Juniper/nova,gooddata/openstack-no...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
<commit_before># Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
<commit_before># Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
720996b538862220a3b6c822beff52840e53aaac
seleniumbase/config/proxy_list.py
seleniumbase/config/proxy_list.py
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
Update the sample proxy list
Update the sample proxy list
Python
mit
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
<commit_before>""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:passwor...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:password@ip_address:po...
<commit_before>""" Proxy Server "Phone Book". Simplify running browser tests through a proxy server by adding your frequently-used proxies here. Now you can do something like this on the command line: "pytest SOME_TEST.py --proxy=proxy1" Format of PROXY_LIST server entries: * "ip_address:port" OR "username:passwor...
5c9100b40ce5d99368ace789f8545be10ec9db71
providers/tasks/gog.py
providers/tasks/gog.py
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb LOGGER = get_task_logger(__name__) @task def load_gog_games(): """Task to load GOG g...
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb from common.models import save_action_log LOGGER = get_task_logger(__name__) @task def lo...
Add stats logging for GOG tasks
Add stats logging for GOG tasks
Python
agpl-3.0
lutris/website,lutris/website,lutris/website,lutris/website
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb LOGGER = get_task_logger(__name__) @task def load_gog_games(): """Task to load GOG g...
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb from common.models import save_action_log LOGGER = get_task_logger(__name__) @task def lo...
<commit_before>""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb LOGGER = get_task_logger(__name__) @task def load_gog_games(): """Tas...
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb from common.models import save_action_log LOGGER = get_task_logger(__name__) @task def lo...
""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb LOGGER = get_task_logger(__name__) @task def load_gog_games(): """Task to load GOG g...
<commit_before>""" Compare GOG games to the Lutris library """ import os from celery import task from celery.utils.log import get_task_logger from django.conf import settings from providers.gog import load_games_from_gogdb, match_from_gogdb LOGGER = get_task_logger(__name__) @task def load_gog_games(): """Tas...
65e76bb4d4d2731046d90ef874fdf17e324f1dc3
tests/test_localstorage.py
tests/test_localstorage.py
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind]] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind2] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
Fix typo in localstorage test
Fix typo in localstorage test
Python
mit
miguelfrde/roomcontrol_backend
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind]] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind2] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
<commit_before>import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind]] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls...
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind2] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind]] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls): ls.set('...
<commit_before>import pytest from roomcontrol.utils.localstorage import LocalStorage TEST_FILE = """ [kind1] a=1 b=2 [kind]] c=3 """ @pytest.fixture def ls(tmpdir): p = tmpdir.join('test_localstorage.in') p.write(TEST_FILE) obj = LocalStorage(str(p)) return obj def test_set_corresponds_to_get(ls...
5ff2a8655caa66369733d7c151f36737217498f8
scoring_engine/db.py
scoring_engine/db.py
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
Add monkeypatch for session query problems
Add monkeypatch for session query problems
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
<commit_before>import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manuall...
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manually set it to som...
<commit_before>import bcrypt from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from scoring_engine.config import config isolation_level = "READ COMMITTED" if 'sqlite' in config.db_uri: # sqlite db does not support transaction based statements # so we have to manuall...
6c929f04559698a5988aaa3b03d42a03c091fc57
pyes/tests/pyestest.py
pyes/tests/pyestest.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
Add a checkRaises method to check that an exception is raised, but also return it for futher tests.
Add a checkRaises method to check that an exception is raised, but also return it for futher tests.
Python
bsd-3-clause
mouadino/pyes,Fiedzia/pyes,haiwen/pyes,HackLinux/pyes,haiwen/pyes,Fiedzia/pyes,Fiedzia/pyes,aparo/pyes,aparo/pyes,haiwen/pyes,rookdev/pyes,HackLinux/pyes,jayzeng/pyes,HackLinux/pyes,mavarick/pyes,mavarick/pyes,rookdev/pyes,mavarick/pyes,jayzeng/pyes,mouadino/pyes,aparo/pyes,jayzeng/pyes
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os c...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os class ESTestCase...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """ Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500). """ import unittest from pyes import ES, file_to_attachment from pyes.exceptions import NotFoundException from pprint import pprint import os c...
95f89ab590555bd4cc6c92b6b24883a27b323d2a
tests/test_methods.py
tests/test_methods.py
from apiritif import http from unittest import TestCase class TestRequests(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
from apiritif import http from unittest import TestCase class TestHTTPMethods(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
Add a lot more tests
Add a lot more tests
Python
apache-2.0
Blazemeter/apiritif,Blazemeter/apiritif
from apiritif import http from unittest import TestCase class TestRequests(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
from apiritif import http from unittest import TestCase class TestHTTPMethods(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
<commit_before>from apiritif import http from unittest import TestCase class TestRequests(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?...
from apiritif import http from unittest import TestCase class TestHTTPMethods(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
from apiritif import http from unittest import TestCase class TestRequests(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?tag=put') ...
<commit_before>from apiritif import http from unittest import TestCase class TestRequests(TestCase): def test_get(self): http.get('http://blazedemo.com/?tag=get') def test_post(self): http.post('http://blazedemo.com/?tag=post') def test_put(self): http.put('http://blazedemo.com/?...
301af589415dfa0f074f19a3b234a4613f3e5bad
tools/misc/bin2hex.py
tools/misc/bin2hex.py
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
Fix broken bootloader build on systems that default to python3
Fix broken bootloader build on systems that default to python3 binascii.hexlify was returning a byte array, which python would print with a leading b'. Use decode() method to convert to string. [ci skip]
Python
apache-2.0
jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
<commit_before>#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 app...
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 ...
<commit_before>#!/usr/bin/env python # # Copyright 2016 Jeff Bush # # 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 app...
5c8741b8c4fe7ce447fadeeb1707144903728836
tests/builtins/test_sum.py
tests/builtins/test_sum.py
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes', 'test_class', 'test_...
from unittest import expectedFailure from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes'...
Add extra testcases for `sum`.
Add extra testcases for `sum`.
Python
bsd-3-clause
ASP1234/voc,Felix5721/voc,cflee/voc,cflee/voc,freakboy3742/voc,pombredanne/voc,gEt-rIgHt-jR/voc,pombredanne/voc,gEt-rIgHt-jR/voc,ASP1234/voc,Felix5721/voc,freakboy3742/voc
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes', 'test_class', 'test_...
from unittest import expectedFailure from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes'...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes', 'test_class',...
from unittest import expectedFailure from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes'...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes', 'test_class', 'test_...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): pass class BuiltinSumFunctionTests(BuiltinFunctionTestCase, TranspileTestCase): functions = ["sum"] not_implemented = [ 'test_bytearray', 'test_bytes', 'test_class',...
0d5e5bb3eec9a4603b7e0899c296042e09c80911
gatekeeper/app.py
gatekeeper/app.py
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
Add a print when running pulseaudio
Add a print when running pulseaudio
Python
mit
git-commit/iot-gatekeeper,git-commit/iot-gatekeeper
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
<commit_before>#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) door...
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) doorBellServer.star...
<commit_before>#!/usr/bin/env python3 import bot as chat_bot from intercom import Intercom import logging from facerecognition import FaceRecognition import nodered import subprocess from sys import platform icom = Intercom() facerec = FaceRecognition() doorBellServer = nodered.NodeRedDoorbellServerThread(icom) door...
758227a735c914ace87e6648e95cecc445fe4e68
lab/provider/files.py
lab/provider/files.py
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
Add comment on FileProvider init
Add comment on FileProvider init I swear I added this prior to merging, somehow slipped through. Sorry
Python
mpl-2.0
sangoma/pytestlab
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
<commit_before>import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: w...
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: with io.open(sel...
<commit_before>import os import io import errno from xdg import BaseDirectory from .common import ProviderError class Record(object): def __init__(self, *path): data_dir = BaseDirectory.save_data_path('lab', 'v1', *path[:-1]) self.path = os.path.join(data_dir, path[-1]) try: w...
28884ff33b913f0613a2b271b428d91066440793
moksha/hub/amqp/__init__.py
moksha/hub/amqp/__init__.py
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
""" Here is where we configure which AMQP hub implementation we are going to use. """ import logging log = logging.getLogger(__name__) try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: log.debug("Unable to import qpid module") class FakeHub(object): pass AMQPHub...
Make our python-qpid detection code use the logger, as to not anger mod_wsgi
Make our python-qpid detection code use the logger, as to not anger mod_wsgi
Python
apache-2.0
mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha,pombredanne/moksha,ralphbean/moksha,ralphbean/moksha,lmacken/moksha,pombredanne/moksha,ralphbean/moksha,pombredanne/moksha
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
""" Here is where we configure which AMQP hub implementation we are going to use. """ import logging log = logging.getLogger(__name__) try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: log.debug("Unable to import qpid module") class FakeHub(object): pass AMQPHub...
<commit_before>""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQP...
""" Here is where we configure which AMQP hub implementation we are going to use. """ import logging log = logging.getLogger(__name__) try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: log.debug("Unable to import qpid module") class FakeHub(object): pass AMQPHub...
""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQPLibHub #AMQPHub...
<commit_before>""" Here is where we configure which AMQP hub implementation we are going to use. """ try: from qpid010 import QpidAMQPHub AMQPHub = QpidAMQPHub except ImportError: print "Unable to import qpid module" class FakeHub(object): pass AMQPHub = FakeHub #from pyamqplib import AMQP...
806fcd76941efe6971709509623876d5181c1f8d
mopidy_subsonic/__init__.py
mopidy_subsonic/__init__.py
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
Use new extension setup() API
Use new extension setup() API
Python
mit
rattboi/mopidy-subsonic
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
<commit_before>from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.p...
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__f...
<commit_before>from __future__ import unicode_literals import os from mopidy import ext, config __version__ = '0.2' class SubsonicExtension(ext.Extension): dist_name = 'Mopidy-Subsonic' ext_name = 'subsonic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.p...
08e4669d7ac743c152c552edf0617caa1d4934ad
tests/settings-djcelery.py
tests/settings-djcelery.py
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__, 'ATOMIC': True } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', ...
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__ } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', 'test' ...
Make both test settings more similar
Make both test settings more similar
Python
bsd-2-clause
roverdotcom/django-celery-transactions,stored/django-celery-transactions,fellowshipofone/django-celery-transactions
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__, 'ATOMIC': True } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', ...
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__ } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', 'test' ...
<commit_before>__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__, 'ATOMIC': True } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions'...
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__ } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', 'test' ...
__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__, 'ATOMIC': True } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions', ...
<commit_before>__doc__ = """Minimal django settings to run manage.py test command""" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __name__, 'ATOMIC': True } } BROKER_BACKEND = 'memory' ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ('djcelery_transactions'...
86036942f32b629e7d3ccc5307be6b3e03ae4053
tests/test_content_type.py
tests/test_content_type.py
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
Test that not all content types are overridden
Test that not all content types are overridden
Python
mit
hzdg/drf-url-content-type-override
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
<commit_before>import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation i...
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation import \ ...
<commit_before>import pytest from rest_framework.request import Request from rest_framework.test import APIRequestFactory from rest_framework.parsers import JSONParser, FormParser, MultiPartParser factory = APIRequestFactory() def test_content_type_override_query(): from rest_url_override_content_negotiation i...
d37c1dca5ffe0508b0944b811a2a65daf8717bea
tests/test_garner_dates.py
tests/test_garner_dates.py
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
Fix bug in print statement
Fix bug in print statement
Python
bsd-3-clause
jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
<commit_before>"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" ...
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" text = """The...
<commit_before>"""Test garner.dates.""" from __future__ import absolute_import from .check import Check from proselint.checks.garner import dates class TestCheck(Check): """Test class for garner.dates.""" __test__ = True def test_50s_hyphenation(self): """Find uneeded hyphen in 50's.""" ...
dd35907f9164cd8f75babb1b5b9b6ff9711628fb
djangopeople/djangopeople/management/commands/fix_counts.py
djangopeople/djangopeople/management/commands/fix_counts.py
from django.core.management.base import NoArgsCommand from ...models import Country, Region class Command(NoArgsCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle_noargs(self, **options): for qs in...
from django.core.management.base import BaseCommand from ...models import Country, Region class Command(BaseCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle(self, **options): for qs in (Country.o...
Remove usage of deprecated NoArgsCommand
Remove usage of deprecated NoArgsCommand
Python
mit
brutasse/djangopeople,django/djangopeople,django/djangopeople,django/djangopeople,brutasse/djangopeople,brutasse/djangopeople,brutasse/djangopeople
from django.core.management.base import NoArgsCommand from ...models import Country, Region class Command(NoArgsCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle_noargs(self, **options): for qs in...
from django.core.management.base import BaseCommand from ...models import Country, Region class Command(BaseCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle(self, **options): for qs in (Country.o...
<commit_before>from django.core.management.base import NoArgsCommand from ...models import Country, Region class Command(NoArgsCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle_noargs(self, **options): ...
from django.core.management.base import BaseCommand from ...models import Country, Region class Command(BaseCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle(self, **options): for qs in (Country.o...
from django.core.management.base import NoArgsCommand from ...models import Country, Region class Command(NoArgsCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle_noargs(self, **options): for qs in...
<commit_before>from django.core.management.base import NoArgsCommand from ...models import Country, Region class Command(NoArgsCommand): """ Countries and regions keep a denormalized count of people that gets out of sync during migrate. This updates it. """ def handle_noargs(self, **options): ...
5aa55190bae3657e09f6c2fbdedb9ab71210fad5
cocktails/drinks/models.py
cocktails/drinks/models.py
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
Remove 0.0 from ings line
Remove 0.0 from ings line
Python
mit
jake-jake-jake/cocktails,jake-jake-jake/cocktails,jake-jake-jake/cocktails,jake-jake-jake/cocktails
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
<commit_before>from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') ...
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') class Meta...
<commit_before>from django.db import models # Create your models here. class Ingredient(models.Model): name = models.CharField(max_length=100) abv = models.FloatField() type = models.CharField(max_length=25) def __str__(self): return self.name class Admin: list_display = ('name') ...
bcd5ea69815405508d7f862754f910fe381172b9
responsive/context_processors.py
responsive/context_processors.py
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
Update message for missing ResponsiveMiddleware
Update message for missing ResponsiveMiddleware
Python
bsd-3-clause
mishbahr/django-responsive2,mishbahr/django-responsive2
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
<commit_before>from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured...
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured( "...
<commit_before>from django.core.exceptions import ImproperlyConfigured from .conf import settings from .utils import Device def device(request): responsive_middleware = 'responsive.middleware.ResponsiveMiddleware' if responsive_middleware not in settings.MIDDLEWARE_CLASSES: raise ImproperlyConfigured...
77e78827237b1d3dfcb173075970377d17db4627
formly/utils/views.py
formly/utils/views.py
from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DeleteView def cbv_decorator(decorator): def _decorator(cls): cls.dispatch = m...
from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.urls import reverse from django.views.generic import DeleteView class BaseDeleteView(LoginRequiredMixin, DeleteView): success_url_name = "" pk_obj_name = "" def get_object(self, query...
Use modern login required mixin
Use modern login required mixin
Python
bsd-3-clause
eldarion/formly,eldarion/formly
from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DeleteView def cbv_decorator(decorator): def _decorator(cls): cls.dispatch = m...
from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.urls import reverse from django.views.generic import DeleteView class BaseDeleteView(LoginRequiredMixin, DeleteView): success_url_name = "" pk_obj_name = "" def get_object(self, query...
<commit_before>from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DeleteView def cbv_decorator(decorator): def _decorator(cls): c...
from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.urls import reverse from django.views.generic import DeleteView class BaseDeleteView(LoginRequiredMixin, DeleteView): success_url_name = "" pk_obj_name = "" def get_object(self, query...
from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DeleteView def cbv_decorator(decorator): def _decorator(cls): cls.dispatch = m...
<commit_before>from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DeleteView def cbv_decorator(decorator): def _decorator(cls): c...
9294f54822d9c73b27cd225fa318c3119a999e4a
pylearn2/training_algorithms/training_algorithm.py
pylearn2/training_algorithms/training_algorithm.py
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model): """ Initialize the given training algorithm. Parameters ---------- model : object Object that implements the...
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model, dataset): """ Initialize the given training algorithm. Parameters ---------- model : object Object that imple...
Make TrainingAlgorithm interface to respect reality.
Make TrainingAlgorithm interface to respect reality.
Python
bsd-3-clause
TNick/pylearn2,caidongyun/pylearn2,alexjc/pylearn2,cosmoharrigan/pylearn2,mclaughlin6464/pylearn2,alexjc/pylearn2,abergeron/pylearn2,kastnerkyle/pylearn2,chrish42/pylearn,pombredanne/pylearn2,JesseLivezey/pylearn2,lamblin/pylearn2,kose-y/pylearn2,msingh172/pylearn2,se4u/pylearn2,lancezlin/pylearn2,w1kke/pylearn2,fulmic...
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model): """ Initialize the given training algorithm. Parameters ---------- model : object Object that implements the...
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model, dataset): """ Initialize the given training algorithm. Parameters ---------- model : object Object that imple...
<commit_before>class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model): """ Initialize the given training algorithm. Parameters ---------- model : object Object that...
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model, dataset): """ Initialize the given training algorithm. Parameters ---------- model : object Object that imple...
class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model): """ Initialize the given training algorithm. Parameters ---------- model : object Object that implements the...
<commit_before>class TrainingAlgorithm(object): """ An abstract superclass that defines the interface of training algorithms. """ def setup(self, model): """ Initialize the given training algorithm. Parameters ---------- model : object Object that...
98ed31aa995bfdf08b2b069c00ecc0d0b0b29b90
twitter/endpoints_v1_1.py
twitter/endpoints_v1_1.py
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'] }, }
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'], }, 'show_status' : { 'path': '/statuses/show.json', 'valid_params': ['id'...
Add method to show a status by id.
Add method to show a status by id.
Python
mit
alexcchan/twitter
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'] }, } Add method to show a status by id.
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'], }, 'show_status' : { 'path': '/statuses/show.json', 'valid_params': ['id'...
<commit_before>""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'] }, } <commit_msg>Add method to show a status by id.<commit_after>
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'], }, 'show_status' : { 'path': '/statuses/show.json', 'valid_params': ['id'...
""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'] }, } Add method to show a status by id.""" API Mapping for Twitter API 1.1 """ mapping_table =...
<commit_before>""" API Mapping for Twitter API 1.1 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/1.1', 'search_tweets' : { 'path': '/search/tweets.json', 'valid_params': ['q'] }, } <commit_msg>Add method to show a status by id.<commit_after>""" API Mapping...
5383db76e043057217dfbebd2dd484f5b6418260
app/models.py
app/models.py
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(self): re...
from app import db # Define char limits allowed in names and passwords user_limits = {'name': 16, 'email': 50} # Define char limits allowed in titles and bodies of posts post_limits = {'title': 1000, 'body': 30000} # of pages page_limits = {'title': 1000, 'body': 75000} ...
Add Page class and restructure hard-coded character limits
Add Page class and restructure hard-coded character limits
Python
agpl-3.0
lasa/website,lasa/website,lasa/website
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(self): re...
from app import db # Define char limits allowed in names and passwords user_limits = {'name': 16, 'email': 50} # Define char limits allowed in titles and bodies of posts post_limits = {'title': 1000, 'body': 30000} # of pages page_limits = {'title': 1000, 'body': 75000} ...
<commit_before>from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(se...
from app import db # Define char limits allowed in names and passwords user_limits = {'name': 16, 'email': 50} # Define char limits allowed in titles and bodies of posts post_limits = {'title': 1000, 'body': 30000} # of pages page_limits = {'title': 1000, 'body': 75000} ...
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(self): re...
<commit_before>from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(se...
2d1290b7a4ba750611a23fe38b7d028f2f0db030
txircd/modules/cmd_user.py
txircd/modules/cmd_user.py
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
Fix message with 462 numeric
Fix message with 462 numeric
Python
bsd-3-clause
ElementalAlchemist/txircd,DesertBus/txircd,Heufneutje/txircd
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register()...
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def process...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command import string class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register()...
201d8d532b907d97823c2dbf61fdd6e75b8eb615
form_designer/contrib/cms_plugins/form_designer_form/cms_plugins.py
form_designer/contrib/cms_plugins/form_designer_form/cms_plugins.py
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
Disable caching for CMS plugin.
Disable caching for CMS plugin. CSRF tokens may get cached otherwise. This is for compatibility with Django CMS 3.0+.
Python
bsd-3-clause
andersinno/django-form-designer-ai,andersinno/django-form-designer,kcsry/django-form-designer,andersinno/django-form-designer,kcsry/django-form-designer,andersinno/django-form-designer-ai
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
<commit_before>from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ ...
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ class FormDes...
<commit_before>from form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition from form_designer.views import process_form from form_designer import settings from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext as _ ...
d030e9bfaf8cd4f83d0db7728f4f546c48bd8934
harness/ext/SciKit.py
harness/ext/SciKit.py
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[11]: get_ipython().magic('pinfo2 model_selection.ShuffleSplit') ...
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[10]: class SciKitExtension(HarnessExtension): alias = 'sklearn...
Fix error message in the scikitlearn extension.
Fix error message in the scikitlearn extension.
Python
bsd-3-clause
tonyfast/tidy-harness,tonyfast/tidy-harness
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[11]: get_ipython().magic('pinfo2 model_selection.ShuffleSplit') ...
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[10]: class SciKitExtension(HarnessExtension): alias = 'sklearn...
<commit_before> # coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[11]: get_ipython().magic('pinfo2 model_selection.Sh...
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[10]: class SciKitExtension(HarnessExtension): alias = 'sklearn...
# coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[11]: get_ipython().magic('pinfo2 model_selection.ShuffleSplit') ...
<commit_before> # coding: utf-8 # A jinja extension for the harness # In[9]: try: from .base import HarnessExtension except: from base import HarnessExtension import pandas, sklearn.model_selection as model_selection from toolz.curried import first # In[11]: get_ipython().magic('pinfo2 model_selection.Sh...
44e21fa7504a4650eb2db0036a66ecf7b0ab5e5d
d_parser/helpers/re_set.py
d_parser/helpers/re_set.py
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract_int_compile() @stat...
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None extract_float = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract...
Add float extractor, fix extractors rules
Add float extractor, fix extractors rules
Python
mit
Holovin/D_GrabDemo
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract_int_compile() @stat...
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None extract_float = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract...
<commit_before># re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract_int_compi...
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None extract_float = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract...
# re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract_int_compile() @stat...
<commit_before># re_set.py # Module for generating regex rules # r1 import re class Ree: float = None number = None page_number = None extract_int = None @staticmethod def init(): Ree._is_float() Ree._is_number() Ree._is_page_number('') Ree._extract_int_compi...
18e056339492c8dde9ae53aafa9d53d16d3bb455
src/mcedit2/editortools/select_block.py
src/mcedit2/editortools/select_block.py
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockCommand(QtGui.QUndoCommand): ...
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockTool(EditorTool): name = "Se...
Select Block is no longer undoable
Select Block is no longer undoable
Python
bsd-3-clause
vorburger/mcedit2,vorburger/mcedit2,Rubisk/mcedit2,Rubisk/mcedit2
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockCommand(QtGui.QUndoCommand): ...
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockTool(EditorTool): name = "Se...
<commit_before>""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockCommand(QtGui.QU...
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockTool(EditorTool): name = "Se...
""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockCommand(QtGui.QUndoCommand): ...
<commit_before>""" select block """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui from mcedit2.editortools import EditorTool from mcedit2.util.load_ui import load_ui log = logging.getLogger(__name__) class SelectBlockCommand(QtGui.QU...
75922744effcd1748a9d16887c771149a2026e20
mfr/ext/pdf/render.py
mfr/ext/pdf/render.py
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError: re...
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib import mfr def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError:...
Change path to mfr directory
Change path to mfr directory
Python
apache-2.0
AddisonSchiller/modular-file-renderer,Johnetordoff/modular-file-renderer,rdhyee/modular-file-renderer,mfraezz/modular-file-renderer,TomBaxter/modular-file-renderer,icereval/modular-file-renderer,CenterForOpenScience/modular-file-renderer,mfraezz/modular-file-renderer,mfraezz/modular-file-renderer,Johnetordoff/modular-f...
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError: re...
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib import mfr def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError:...
<commit_before>"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadEr...
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib import mfr def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError:...
"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadError: re...
<commit_before>"""PDF renderer module.""" from mfr.core import RenderResult import PyPDF2 import urllib def is_valid(fp): """Tests file pointer for validity :return: True if fp is a valid pdf, False if not """ try: PyPDF2.PdfFileReader(fp) return True except PyPDF2.utils.PdfReadEr...
e5f22a2e59a44535cde1a3a41ccae4eee440bbf2
mica/report/tests/test_write_report.py
mica/report/tests/test_write_report.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
Add one more test skip on mica.report
Add one more test skip on mica.report
Python
bsd-3-clause
sot/mica,sot/mica
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 HAS_SYBA...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import os import shutil import pytest from .. import report try: import Ska.DBI with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_ops', database='axafocat') as db: assert db.conn._is_connected == 1 ...
638dda46a63f1c98f674febe170df55fe36cea5e
tests/test_timestepping.py
tests/test_timestepping.py
import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, tim...
import numpy as np from sympy import Eq import pytest from devito.interfaces import Backward, Forward, TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, ...
Add explicit test for reverse timestepping
TimeData: Add explicit test for reverse timestepping
Python
mit
opesci/devito,opesci/devito
import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, tim...
import numpy as np from sympy import Eq import pytest from devito.interfaces import Backward, Forward, TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, ...
<commit_before>import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, ...
import numpy as np from sympy import Eq import pytest from devito.interfaces import Backward, Forward, TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, ...
import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, tim...
<commit_before>import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, ...
1eea70f8f378477b216b608aaa93e524a900cdf8
tests/unit/test_stencil.py
tests/unit/test_stencil.py
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
Add simple context push test
Add simple context push test
Python
mit
funkybob/stencil,funkybob/stencil
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
<commit_before># -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc...
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
# -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc {{ x }} xyz') ...
<commit_before># -*- coding: utf-8 -*- import unittest import stencil from stencil import Token class ModuleTestCase(unittest.TestCase): """Test cases for the stencil module.""" @staticmethod def test_tokenise(): """Test stencil.tokenise() function.""" it_token = stencil.tokenise('abc...
f5c2f39892d3ec10bf00a5df661b3d6bb3a30399
web_paullaroid/__init__.py
web_paullaroid/__init__.py
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
Add event and image route
Add event and image route
Python
mit
mips-lab/web_paullaroid,mips-lab/web_paullaroid,mips-lab/web_paullaroid
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
<commit_before>from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) conf...
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('h...
<commit_before>from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.include('pyramid_chameleon') config.add_static_view('static', 'static', cache_max_age=3600) conf...
4b1ab446ffb396b6ddec8fa593c4225d5878363a
deflect/management/commands/checkurls.py
deflect/management/commands/checkurls.py
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
Modify text for management command message
Modify text for management command message
Python
bsd-3-clause
jbittel/django-deflect
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
<commit_before>from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in Shor...
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in ShortURL.objects.al...
<commit_before>from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse import requests from deflect.models import ShortURL class Command(NoArgsCommand): help = "Validate short URL redirect targets" def handle_noargs(self, *args, **options): for url in Shor...
31d0278bb7eb40e108af1ad455275c86aa462390
src/helpers/utils.py
src/helpers/utils.py
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
Add data change to updates string only if new value is not None in order to preserve scraped data, that user decided to hide.
Add data change to updates string only if new value is not None in order to preserve scraped data, that user decided to hide.
Python
mit
lesh1k/VKStalk
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
<commit_before>from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format...
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format(attr, val) d...
<commit_before>from __future__ import unicode_literals from config import settings import os import re import string import pytz def clear_screen(): # Clear screen os.system(['clear', 'cls'][os.name == 'nt']) def print_obj(obj): for attr, val in obj.__dict__.iteritems(): print "{0}: {1}".format...
aab722e1072fe5857ee1f4dbe699676ac3c2c061
sparts/tasks/periodic.py
sparts/tasks/periodic.py
from ..vtask import VTask import time from ..sparts import option class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should run [%(default)s] (s)') ...
from ..vtask import VTask import time from ..sparts import option from threading import Event class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should ...
Use threading.Event() to stop PeriodicTasks
Use threading.Event() to stop PeriodicTasks This is a lot more cpu efficient and results in less tasks swapping randomly.
Python
bsd-3-clause
fmoo/sparts,pshuff/sparts,bboozzoo/sparts,djipko/sparts,facebook/sparts,facebook/sparts,djipko/sparts,fmoo/sparts,pshuff/sparts,bboozzoo/sparts
from ..vtask import VTask import time from ..sparts import option class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should run [%(default)s] (s)') ...
from ..vtask import VTask import time from ..sparts import option from threading import Event class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should ...
<commit_before>from ..vtask import VTask import time from ..sparts import option class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should run [%(defaul...
from ..vtask import VTask import time from ..sparts import option from threading import Event class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should ...
from ..vtask import VTask import time from ..sparts import option class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should run [%(default)s] (s)') ...
<commit_before>from ..vtask import VTask import time from ..sparts import option class PeriodicTask(VTask): INTERVAL = None interval = option('interval', type=float, metavar='SECONDS', default=lambda cls: cls.INTERVAL, help='How often this task should run [%(defaul...
e81155d845ec2455d5a673e06d614f7086ebd2e0
todo_file_generator/test/test_remove_file_more_than_a_week.py
todo_file_generator/test/test_remove_file_more_than_a_week.py
"""test_remove_file_more_than_a_week.py: Creates an todo file with title name as current date""" import os import time def get_files(): files_array = [] for file in os.listdir("files/"): if file.endswith(".todo"): files_array.append(file) return files_array # todo: fix file duration...
"""test_remove_file_more_than_a_week.py: Moves files to archive than a more than a week""" import os import time def get_files(): files_array = [] files_directory = 'files/' extension = 'todo' for file in os.listdir(files_directory): if file.endswith(extension): files_array.append(...
Move files to archive test case
Move files to archive test case
Python
mit
prajesh-ananthan/Tools
"""test_remove_file_more_than_a_week.py: Creates an todo file with title name as current date""" import os import time def get_files(): files_array = [] for file in os.listdir("files/"): if file.endswith(".todo"): files_array.append(file) return files_array # todo: fix file duration...
"""test_remove_file_more_than_a_week.py: Moves files to archive than a more than a week""" import os import time def get_files(): files_array = [] files_directory = 'files/' extension = 'todo' for file in os.listdir(files_directory): if file.endswith(extension): files_array.append(...
<commit_before>"""test_remove_file_more_than_a_week.py: Creates an todo file with title name as current date""" import os import time def get_files(): files_array = [] for file in os.listdir("files/"): if file.endswith(".todo"): files_array.append(file) return files_array # todo: fi...
"""test_remove_file_more_than_a_week.py: Moves files to archive than a more than a week""" import os import time def get_files(): files_array = [] files_directory = 'files/' extension = 'todo' for file in os.listdir(files_directory): if file.endswith(extension): files_array.append(...
"""test_remove_file_more_than_a_week.py: Creates an todo file with title name as current date""" import os import time def get_files(): files_array = [] for file in os.listdir("files/"): if file.endswith(".todo"): files_array.append(file) return files_array # todo: fix file duration...
<commit_before>"""test_remove_file_more_than_a_week.py: Creates an todo file with title name as current date""" import os import time def get_files(): files_array = [] for file in os.listdir("files/"): if file.endswith(".todo"): files_array.append(file) return files_array # todo: fi...
8e6532b9e3d47948f6d1a37b74e54c91a8cdc0b4
examples/translations/japanese_test_1.py
examples/translations/japanese_test_1.py
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="メインページに移動する"]') self.JS入力('input[name="search"]', "アニ...
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="ウィキペディアへようこそ"]') self.JS入力('input[name="search"]', "ア...
Update the Japanese example test
Update the Japanese example test
Python
mit
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="メインページに移動する"]') self.JS入力('input[name="search"]', "アニ...
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="ウィキペディアへようこそ"]') self.JS入力('input[name="search"]', "ア...
<commit_before># Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="メインページに移動する"]') self.JS入力('input[name=...
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="ウィキペディアへようこそ"]') self.JS入力('input[name="search"]', "ア...
# Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="メインページに移動する"]') self.JS入力('input[name="search"]', "アニ...
<commit_before># Japanese Language Test from seleniumbase.translate.japanese import セレニウムテストケース # noqa class 私のテストクラス(セレニウムテストケース): def test_例1(self): self.を開く("https://ja.wikipedia.org/wiki/") self.テキストを確認する("ウィキペディア") self.要素を確認する('[title*="メインページに移動する"]') self.JS入力('input[name=...
a6935b78a8411fafe05543d928449a98ba89c4be
Orange/tests/test_sparse_table.py
Orange/tests/test_sparse_table.py
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
Call same methods on parent class.
Call same methods on parent class.
Python
bsd-2-clause
marinkaz/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,marinkaz/orange3,qusp/orange3,marinkaz/orange3,qusp/orange3,cheral/orange3,qPCR4vir/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,cheral/orange3,qPCR4vir/orange3,kwikadi/orange3,cheral/orange3,qusp/orange3,marinkaz/orange3,marin...
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
<commit_before>import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( ...
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( self.domain...
<commit_before>import unittest import numpy as np from scipy.sparse import csr_matrix, lil_matrix from Orange import data from Orange.tests import test_table as tabletests class InterfaceTest(tabletests.InterfaceTest): def setUp(self): super().setUp() self.table = data.Table.from_numpy( ...
d2e9289167b538fe5ef83edcbfce3d5f023de088
lib/core/countpage.py
lib/core/countpage.py
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): __number = 0 def __init__(self, number=0): self.__number = number def setNumber(self, number): self.__number = number def getNumber(self): return self.__number def incNumber(s...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): number = 0 def __init__(self, number=0): self.number = number def setNumber(self, number): self.number = number def getNumber(self): return self.number def incNumber(self): ...
Modify CountPage to a public class
Modify CountPage to a public class
Python
mit
lewangbtcc/anti-XSS,lewangbtcc/anti-XSS
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): __number = 0 def __init__(self, number=0): self.__number = number def setNumber(self, number): self.__number = number def getNumber(self): return self.__number def incNumber(s...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): number = 0 def __init__(self, number=0): self.number = number def setNumber(self, number): self.number = number def getNumber(self): return self.number def incNumber(self): ...
<commit_before>#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): __number = 0 def __init__(self, number=0): self.__number = number def setNumber(self, number): self.__number = number def getNumber(self): return self.__number ...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): number = 0 def __init__(self, number=0): self.number = number def setNumber(self, number): self.number = number def getNumber(self): return self.number def incNumber(self): ...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): __number = 0 def __init__(self, number=0): self.__number = number def setNumber(self, number): self.__number = number def getNumber(self): return self.__number def incNumber(s...
<commit_before>#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' class CountPage(object): __number = 0 def __init__(self, number=0): self.__number = number def setNumber(self, number): self.__number = number def getNumber(self): return self.__number ...
27e7a2a429367b52ae7eff6b1b4aaf9adc212813
JasmineCoffeeScriptDetectFileType.py
JasmineCoffeeScriptDetectFileType.py
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ """ Modified for Ruby on Rails and Sublime Text 2 """ """ Original pastie here: http://pastie.org/private/kz8gtts0cjcvk...
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ def on_load(self, view): filename = view.file_name() if not filename: # buffer has never been saved return...
Remove copied comment from Rspec Syntax detector
Remove copied comment from Rspec Syntax detector
Python
mit
integrum/sublime-text-jasmine-coffeescript
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ """ Modified for Ruby on Rails and Sublime Text 2 """ """ Original pastie here: http://pastie.org/private/kz8gtts0cjcvk...
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ def on_load(self, view): filename = view.file_name() if not filename: # buffer has never been saved return...
<commit_before>import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ """ Modified for Ruby on Rails and Sublime Text 2 """ """ Original pastie here: http://pastie.org/privat...
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ def on_load(self, view): filename = view.file_name() if not filename: # buffer has never been saved return...
import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ """ Modified for Ruby on Rails and Sublime Text 2 """ """ Original pastie here: http://pastie.org/private/kz8gtts0cjcvk...
<commit_before>import sublime, sublime_plugin import os class JasmineCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener): """ Detects current file type if the file's extension isn't conclusive """ """ Modified for Ruby on Rails and Sublime Text 2 """ """ Original pastie here: http://pastie.org/privat...
a35a25732159e4c8b5655755ce31ec4c3e6e7975
dummy_robot/dummy_robot_bringup/launch/dummy_robot_bringup.launch.py
dummy_robot/dummy_robot_bringup/launch/dummy_robot_bringup.launch.py
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Switch dummy_robot_bringup to use parameter for rsp.
Switch dummy_robot_bringup to use parameter for rsp. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@openrobotics.org>
Python
apache-2.0
ros2/demos,ros2/demos,ros2/demos,ros2/demos
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
<commit_before># Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
<commit_before># Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
1faf32fb45bf69b9486e79ba3aee5c290f9e7ab1
plugins/reversedns.py
plugins/reversedns.py
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
Return DNS data in the correct format
Return DNS data in the correct format
Python
bsd-3-clause
heyaaron/openmesher,darkpixel/openmesher,heyaaron/openmesher,darkpixel/openmesher
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
<commit_before>import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO(...
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO() for r...
<commit_before>import logging, interfaces, os, IPy from StringIO import StringIO class Shorewall(interfaces.IOpenMesherPlugin): def __init__(self): self._files = {} def process(self, mesh): logging.debug('Generating DNS config...') self._files = {} rdns = StringIO(...
123ffcabb6fa783b1524a55dd3dce52ad33a13db
nitrogen/local.py
nitrogen/local.py
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock from .proxy import Proxy class Local(Local): # Just adding a __dict__ property to the object. def __init__(self): super(Local, self).__init__() object.__setattr__(self, '__storage_...
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock, get_ident from .proxy import Proxy class Local(Local): # We are extending this class for the only purpose of adding a __dict__ # attribute, so that this will work nearly identically to the builtin...
Fix Local class to work with older werkzeug.
Fix Local class to work with older werkzeug.
Python
bsd-3-clause
mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock from .proxy import Proxy class Local(Local): # Just adding a __dict__ property to the object. def __init__(self): super(Local, self).__init__() object.__setattr__(self, '__storage_...
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock, get_ident from .proxy import Proxy class Local(Local): # We are extending this class for the only purpose of adding a __dict__ # attribute, so that this will work nearly identically to the builtin...
<commit_before> import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock from .proxy import Proxy class Local(Local): # Just adding a __dict__ property to the object. def __init__(self): super(Local, self).__init__() object.__setattr__(se...
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock, get_ident from .proxy import Proxy class Local(Local): # We are extending this class for the only purpose of adding a __dict__ # attribute, so that this will work nearly identically to the builtin...
import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock from .proxy import Proxy class Local(Local): # Just adding a __dict__ property to the object. def __init__(self): super(Local, self).__init__() object.__setattr__(self, '__storage_...
<commit_before> import collections from werkzeug.local import release_local, Local, LocalManager, LocalStack, allocate_lock from .proxy import Proxy class Local(Local): # Just adding a __dict__ property to the object. def __init__(self): super(Local, self).__init__() object.__setattr__(se...
4adb686fc15dc3dfdb872157df27b534f1ca7f98
tests/QtUiTools/bug_392.py
tests/QtUiTools/bug_392.py
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'action.ui...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui, QtDeclarative from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
Extend QUiLoader test to test ui files with custom widgets.
Extend QUiLoader test to test ui files with custom widgets.
Python
lgpl-2.1
PySide/PySide,RobinD42/pyside,M4rtinK/pyside-android,IronManMark20/pyside2,PySide/PySide,RobinD42/pyside,PySide/PySide,RobinD42/pyside,RobinD42/pyside,PySide/PySide,M4rtinK/pyside-android,BadSingleton/pyside2,BadSingleton/pyside2,RobinD42/pyside,enthought/pyside,pankajp/pyside,gbaty/pyside2,M4rtinK/pyside-android,IronM...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'action.ui...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui, QtDeclarative from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
<commit_before>import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui, QtDeclarative from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'action.ui...
<commit_before>import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
fd8c82855f233d2bc7fba482191de46ab5afef5a
wagtailimportexport/tests/test_views.py
wagtailimportexport/tests/test_views.py
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase from wagtailimportexport.compat import Page from wagtailimportexport import views # read this aloud class TestViews(TestCase): ...
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase, Client from wagtailimportexport.compat import Page from django.urls import reverse from wagtailimportexport import views # read ...
Add tests for wagtailimportexport forms.
Add tests for wagtailimportexport forms.
Python
agpl-3.0
openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,Connexions/openstax-cms,Connexions/openstax-cms
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase from wagtailimportexport.compat import Page from wagtailimportexport import views # read this aloud class TestViews(TestCase): ...
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase, Client from wagtailimportexport.compat import Page from django.urls import reverse from wagtailimportexport import views # read ...
<commit_before>import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase from wagtailimportexport.compat import Page from wagtailimportexport import views # read this aloud class TestView...
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase, Client from wagtailimportexport.compat import Page from django.urls import reverse from wagtailimportexport import views # read ...
import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase from wagtailimportexport.compat import Page from wagtailimportexport import views # read this aloud class TestViews(TestCase): ...
<commit_before>import json import os import tempfile import zipfile from django.core.serializers.json import DjangoJSONEncoder from django.contrib.auth.models import User from django.test import TestCase from wagtailimportexport.compat import Page from wagtailimportexport import views # read this aloud class TestView...
3fa49eda98233f4cd76cf4f3b9b1fc02006fb2de
website/search/mutation_result.py
website/search/mutation_result.py
from models import Protein, Mutation class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type self.meta_user = None self...
from models import Protein, Mutation from database import get_or_create class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type ...
Fix result loading for novel mutations
Fix result loading for novel mutations
Python
lgpl-2.1
reimandlab/ActiveDriverDB,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/ActiveDriverDB,reimandlab/ActiveDriverDB,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualisat...
from models import Protein, Mutation class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type self.meta_user = None self...
from models import Protein, Mutation from database import get_or_create class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type ...
<commit_before>from models import Protein, Mutation class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type self.meta_user = No...
from models import Protein, Mutation from database import get_or_create class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type ...
from models import Protein, Mutation class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type self.meta_user = None self...
<commit_before>from models import Protein, Mutation class SearchResult: def __init__(self, protein, mutation, is_mutation_novel, type, **kwargs): self.protein = protein self.mutation = mutation self.is_mutation_novel = is_mutation_novel self.type = type self.meta_user = No...
bbf3d68b9566a826f404aa1ab3da198d765dca58
contacts/rules.py
contacts/rules.py
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'phone_number', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]
Add 'phone_number' field to ALLOWED_FIELDS.
Add 'phone_number' field to ALLOWED_FIELDS.
Python
mit
heimann/contacts
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]Add 'phone_number' field to ALL...
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'phone_number', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]
<commit_before>""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]<commit_msg>Add ...
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'phone_number', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]
""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]Add 'phone_number' field to ALL...
<commit_before>""" contacts.rules ~~~~~~~~~~~~ This module sets rules for Contacts 📕. :copyright: (c) 2017 by David Heimann. :license: MIT, see LICENSE for more details. """ ALLOWED_FIELDS = [ 'name', 'first_name', 'last_name', 'phone_number', 'photo', 'email', 'twitter' ]<commit_msg>Add ...
12555db92719be1aa96111ac788bc2fba784b5de
mapclientplugins/plainmodelviewerstep/view/plainmodelviewerwidget.py
mapclientplugins/plainmodelviewerstep/view/plainmodelviewerwidget.py
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
Add functions defineStandardMaterials and defineStandardGlyphs.
Add functions defineStandardMaterials and defineStandardGlyphs.
Python
apache-2.0
mapclient-plugins/plainmodelviewer
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
<commit_before>__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainM...
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainModelViewerWidge...
<commit_before>__author__ = 'hsor001' from PySide import QtGui from opencmiss.zinc.context import Context from mapclientplugins.plainmodelviewerstep.view.ui_plainmodelviewerwidget import Ui_PlainModelViewerWidget class PlainModelViewerWidget(QtGui.QWidget): def __init__(self, parent=None): super(PlainM...
ba3282d4df890daa054be808dfbf503404b77c3c
src/dirtyfields/dirtyfields.py
src/dirtyfields/dirtyfields.py
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
Use field.to_python to do django type conversions on the field before checking if dirty.
Use field.to_python to do django type conversions on the field before checking if dirty. This solves issues where you might have a decimal field that you write a string to, eg: >>> m = MyModel.objects.get(id=1) >>> m.my_decimal_field Decimal('1.00') >>> m.my_decimal_field = u'1.00' # from a form or something >>...
Python
bsd-3-clause
romgar/django-dirtyfields,smn/django-dirtyfields,jdotjdot/django-dirtyfields
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
<commit_before># Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, s...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
<commit_before># Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, s...
ccc667bb7c4fc014bf1d9c8f8bb90d419b979dcf
medlem.py
medlem.py
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): self.authentication = controller.authentication.Authentication() self.user = controller.user.User()
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): cherrypy.tools.content_type_json = cherrypy.Tool("before_finalize", self.content_type_json) cherrypy.config.update({"tools.content_type_json.on": True}) cherrypy.config.u...
Set content-type to json on everything
Set content-type to json on everything
Python
bsd-3-clause
UngaForskareStockholm/medlem2
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): self.authentication = controller.authentication.Authentication() self.user = controller.user.User() Set content-type to json on everything
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): cherrypy.tools.content_type_json = cherrypy.Tool("before_finalize", self.content_type_json) cherrypy.config.update({"tools.content_type_json.on": True}) cherrypy.config.u...
<commit_before>#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): self.authentication = controller.authentication.Authentication() self.user = controller.user.User() <commit_msg>Set content-type to json on everything<commit...
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): cherrypy.tools.content_type_json = cherrypy.Tool("before_finalize", self.content_type_json) cherrypy.config.update({"tools.content_type_json.on": True}) cherrypy.config.u...
#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): self.authentication = controller.authentication.Authentication() self.user = controller.user.User() Set content-type to json on everything#! /usr/bin/env python2.7 import ...
<commit_before>#! /usr/bin/env python2.7 import cherrypy import controller.authentication import controller.user class Medlem(object): def __init__(self): self.authentication = controller.authentication.Authentication() self.user = controller.user.User() <commit_msg>Set content-type to json on everything<commit...
d6912d7453bd128aafb9ee8634782b26427a42a4
src/dashboard/src/main/templatetags/active.py
src/dashboard/src/main/templatetags/active.py
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active'
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' else: return ''
Return sth in every case
Return sth in every case Autoconverted from SVN (revision:1844)
Python
agpl-3.0
artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' Return sth in every case Autoconverted from SVN (revision:18...
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' else: return ''
<commit_before>from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' <commit_msg>Return sth in every case Autoconv...
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' else: return ''
from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' Return sth in every case Autoconverted from SVN (revision:18...
<commit_before>from django.template import Library import math register = Library() @register.simple_tag def active(request, pattern): if request.path.startswith(pattern) and pattern != '/': return 'active' elif request.path == pattern == '/': return 'active' <commit_msg>Return sth in every case Autoconv...
8d5b0682c3262fa210c3ed5e50c91259f1f2550c
myhome/blog/models.py
myhome/blog/models.py
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) content = models.TextField() live = model...
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) class Meta: ordering = ['name'] def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) ...
Set default ordering for blog post tags
Set default ordering for blog post tags
Python
mit
plumdog/myhome,plumdog/myhome,plumdog/myhome,plumdog/myhome
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) content = models.TextField() live = model...
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) class Meta: ordering = ['name'] def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) ...
<commit_before>from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) content = models.TextField() ...
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) class Meta: ordering = ['name'] def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) ...
from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) content = models.TextField() live = model...
<commit_before>from django.db import models class BlogPostTag(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class BlogPost(models.Model): datetime = models.DateTimeField() title = models.CharField(max_length=255) content = models.TextField() ...
2459239188b4a6f9e46363ef84fc9dc252793774
trie_search/record_trie.py
trie_search/record_trie.py
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
Modify the condition for selection of longest patterns
Modify the condition for selection of longest patterns
Python
mit
nkmrtty/trie-search
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
<commit_before>from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath)...
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath) def searc...
<commit_before>from marisa_trie import RecordTrie from .trie import TrieSearch class RecordTrieSearch(RecordTrie, TrieSearch): def __init__(self, record_format, records=None, filepath=None): super(RecordTrieSearch, self).__init__(record_format, records) if filepath: self.load(filepath)...
caf1cce23853955bf0a04fc4e255f23b730dca97
tests/test__utils.py
tests/test__utils.py
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
Update the argument normalization test
Update the argument normalization test Needs to make sure it unpacks the right number of return values. Also since we are changing the input array, it is good to add a check to make sure it is still of the expected type.
Python
bsd-3-clause
dask-image/dask-ndfourier
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
<commit_before># -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, ...
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
# -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, s, n, axis): ...
<commit_before># -*- coding: utf-8 -*- import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndfourier._utils @pytest.mark.parametrize( "a, s, n, axis", [ (da.ones((3, 4), chunks=(3, 4)), da.ones((2,), chunks=(2,)), -1, -1), ] ) def test_norm_args(a, ...
23fbdabb97689a355abaac7310d3b1e887f921b8
tests/test_logger.py
tests/test_logger.py
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
Convert exceptions in a type-safe manner to string before string cats
Convert exceptions in a type-safe manner to string before string cats
Python
mit
thatsIch/sublime-rainmeter
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
<commit_before>"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def t...
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def test_info(self):...
<commit_before>"""This module is about testing the logger.""" import sys from unittest import TestCase LOGGER = sys.modules["Rainmeter.logger"] class TestFunctions(TestCase): """Test class wrapper using unittest.""" # pylint: disable=W0703; This is acceptable since we are testing it not failing def t...
6446af2cd11bdc5069fdc8ab47a0881089e7cbab
tests/test_normal.py
tests/test_normal.py
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
Add a parametrized sample test. Make xfast faster.
Add a parametrized sample test. Make xfast faster.
Python
bsd-2-clause
SectorLabs/pytest-benchmark,thedrow/pytest-benchmark,aldanor/pytest-benchmark,ionelmc/pytest-benchmark
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
<commit_before>""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def t...
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def test_slow(benchm...
<commit_before>""" Just to make sure the plugin doesn't choke on doctests:: >>> print('Yay, doctests!') Yay, doctests! """ import time from functools import partial import pytest def test_fast(benchmark): @benchmark def result(): return time.sleep(0.000001) assert result is None def t...
6dd4eb21f6598bbaad329645a3965ad9d47c41db
fortuitus/frunner/tasks.py
fortuitus/frunner/tasks.py
from celery import task @task() def add(x, y): """ Test task. """ return x + y
from celery import task @task() def add(x, y): """ Test task. """ return x + y @task() def run_tests(test_id): """ A task that actually runs the API testing. First it copies the test data to the run history tables, then runs the tests. """ # TODO pass
Add test runner task stub
Add test runner task stub
Python
mit
elegion/djangodash2012,elegion/djangodash2012
from celery import task @task() def add(x, y): """ Test task. """ return x + y Add test runner task stub
from celery import task @task() def add(x, y): """ Test task. """ return x + y @task() def run_tests(test_id): """ A task that actually runs the API testing. First it copies the test data to the run history tables, then runs the tests. """ # TODO pass
<commit_before>from celery import task @task() def add(x, y): """ Test task. """ return x + y <commit_msg>Add test runner task stub<commit_after>
from celery import task @task() def add(x, y): """ Test task. """ return x + y @task() def run_tests(test_id): """ A task that actually runs the API testing. First it copies the test data to the run history tables, then runs the tests. """ # TODO pass
from celery import task @task() def add(x, y): """ Test task. """ return x + y Add test runner task stubfrom celery import task @task() def add(x, y): """ Test task. """ return x + y @task() def run_tests(test_id): """ A task that actually runs the API testing. First it copies the tes...
<commit_before>from celery import task @task() def add(x, y): """ Test task. """ return x + y <commit_msg>Add test runner task stub<commit_after>from celery import task @task() def add(x, y): """ Test task. """ return x + y @task() def run_tests(test_id): """ A task that actually runs the ...
0a517d99330c4691e076bf1023901a85a63c75a6
tmt/visi/__init__.py
tmt/visi/__init__.py
from os.path import join, dirname, realpath from tmt.util import load_config from visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAPSToo...
from os.path import join, dirname, realpath from tmt.util import load_config from tmt.visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAP...
Fix import issue in visi
Fix import issue in visi
Python
agpl-3.0
TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary
from os.path import join, dirname, realpath from tmt.util import load_config from visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAPSToo...
from os.path import join, dirname, realpath from tmt.util import load_config from tmt.visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAP...
<commit_before>from os.path import join, dirname, realpath from tmt.util import load_config from visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerM...
from os.path import join, dirname, realpath from tmt.util import load_config from tmt.visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAP...
from os.path import join, dirname, realpath from tmt.util import load_config from visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerMD/TissueMAPSToo...
<commit_before>from os.path import join, dirname, realpath from tmt.util import load_config from visi.util import check_visi_config __version__ = '0.1.0' logo = ''' _ _ __ _(_)__(_) visi (%(version)s) \ V / (_-< | Convert Visitron's .stk files to .png images \_/|_/__/_| https://github.com/HackerM...
512ca99144da537da61e7437d17782e5a95addb9
S3utility/s3_sqs_message.py
S3utility/s3_sqs_message.py
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
Tweak for when SQS message is missing the eTag from a bucket notification.
Tweak for when SQS message is missing the eTag from a bucket notification.
Python
mit
gnott/elife-bot,gnott/elife-bot,jhroot/elife-bot,jhroot/elife-bot,gnott/elife-bot,jhroot/elife-bot
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
<commit_before>from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info...
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info' def even...
<commit_before>from boto.sqs.message import Message import json from s3_notification_info import S3NotificationInfo class S3SQSMessage(Message): def __init__(self, queue=None, body='', xml_attrs=None): Message.__init__(self, queue, body) self.payload = None self.notification_type = 'S3Info...
566ae40b7f546e3773933217506f917845c8b468
virtool/subtractions/db.py
virtool/subtractions/db.py
import virtool.utils PROJECTION = [ "_id", "file", "ready", "job" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor]
import virtool.utils PROJECTION = [ "_id", "count", "file", "ready", "job", "nickname", "user" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor]
Return more fields in subtraction find API response
Return more fields in subtraction find API response
Python
mit
igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool
import virtool.utils PROJECTION = [ "_id", "file", "ready", "job" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor] Return more fields in subtraction find AP...
import virtool.utils PROJECTION = [ "_id", "count", "file", "ready", "job", "nickname", "user" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor]
<commit_before>import virtool.utils PROJECTION = [ "_id", "file", "ready", "job" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor] <commit_msg>Return more fi...
import virtool.utils PROJECTION = [ "_id", "count", "file", "ready", "job", "nickname", "user" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor]
import virtool.utils PROJECTION = [ "_id", "file", "ready", "job" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor] Return more fields in subtraction find AP...
<commit_before>import virtool.utils PROJECTION = [ "_id", "file", "ready", "job" ] async def get_linked_samples(db, subtraction_id): cursor = db.samples.find({"subtraction.id": subtraction_id}, ["name"]) return [virtool.utils.base_processor(d) async for d in cursor] <commit_msg>Return more fi...
d918c5e28bc2505407cc3245ecae378bdb97ba19
registration/admin.py
registration/admin.py
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin)
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Python
bsd-3-clause
sandipagr/django-registration,myimages/django-registration,euanlau/django-registration,Troyhy/django-registration,kennydude/djregs,spurfly/django-registration,futurecolors/django-registration,hacklabr/django-registration,futurecolors/django-registration,awakeup/django-registration,sandipagr/django-registration,akvo/dja...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
b42003c15132f8e5874f1b5e8a7133b813a71aaa
backdrop/read/config/development.py
backdrop/read/config/development.py
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True }
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True, "government_annotations": True, }
Allow raw queries to annotations bucket
Allow raw queries to annotations bucket This bucket holds the annotations for the insidegov dashboard.
Python
mit
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True } Allow raw queries to annotations bucket This bucket holds the annotations for the insidegov dashboard.
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True, "government_annotations": True, }
<commit_before>DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True } <commit_msg>Allow raw queries to annotations bucket This bucket holds the annotations for the insidegov dashboard.<commit_after>
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True, "government_annotations": True, }
DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True } Allow raw queries to annotations bucket This bucket holds the annotations for the insidegov dashboard.DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017...
<commit_before>DATABASE_NAME = "backdrop" MONGO_HOST = 'localhost' MONGO_PORT = 27017 LOG_LEVEL = "DEBUG" RAW_QUERIES_ALLOWED = { "licensing_journey": True } <commit_msg>Allow raw queries to annotations bucket This bucket holds the annotations for the insidegov dashboard.<commit_after>DATABASE_NAME = "backdrop" MO...
32ce73328d7644601a848cf5ac6d0de1242eb900
config.py
config.py
import os class Config(object): DEBUG = False SECRET_KEY = os.urandom(30).encode('hex') TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True
class Config(object): DEBUG = False SECRET_KEY = 'CHANGEME' TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True
Use constant secret key for easier debugging
Use constant secret key for easier debugging
Python
mit
citruspi/Alexandria,citruspi/Alexandria
import os class Config(object): DEBUG = False SECRET_KEY = os.urandom(30).encode('hex') TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True Use constant secret key for easi...
class Config(object): DEBUG = False SECRET_KEY = 'CHANGEME' TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True
<commit_before>import os class Config(object): DEBUG = False SECRET_KEY = os.urandom(30).encode('hex') TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True <commit_msg>Use c...
class Config(object): DEBUG = False SECRET_KEY = 'CHANGEME' TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True
import os class Config(object): DEBUG = False SECRET_KEY = os.urandom(30).encode('hex') TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True Use constant secret key for easi...
<commit_before>import os class Config(object): DEBUG = False SECRET_KEY = os.urandom(30).encode('hex') TEMP_DIR = 'tmp' LIB_DIR = 'books' MONGO = { 'HOST' : 'localhost', 'PORT' : 27017, 'DATABASE' : 'Alexandria' } class Debug(Config): DEBUG=True <commit_msg>Use c...
0d58d7c7a3eee8748efbf7405aba7a5f3e0f7eb3
bluebottle/funding_telesom/admin.py
bluebottle/funding_telesom/admin.py
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
Add some search fields to Zaad
Add some search fields to Zaad
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
<commit_before>from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccoun...
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccount @admin.regi...
<commit_before>from django.contrib import admin from bluebottle.funding.admin import PaymentChildAdmin, PaymentProviderChildAdmin, BankAccountChildAdmin from bluebottle.funding.models import PaymentProvider, Payment from bluebottle.funding_telesom.models import TelesomPayment, TelesomPaymentProvider, TelesomBankAccoun...
cda1d6b1cdb0a36a3e9d9e5a65eabfb22a29e94e
src/ocspdash/web/blueprints/ui.py
src/ocspdash/web/blueprints/ui.py
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
Handle bad signature with flask abort
Handle bad signature with flask abort
Python
mit
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
<commit_before>import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...mode...
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...models import Locat...
<commit_before>import base64 from collections import namedtuple, OrderedDict from itertools import groupby import json from operator import itemgetter from typing import List from flask import Blueprint, render_template, request, current_app import nacl.signing import nacl.encoding import nacl.exceptions from ...mode...
234df393c438fdf729dc050d20084e1fe1a4c2ee
backend/mcapi/mcdir.py
backend/mcapi/mcdir.py
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data/materialscommons' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
Change directory where data is written to.
Change directory where data is written to.
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path Change directory where data is written to.
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data/materialscommons' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
<commit_before>import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path <commit_msg>Change directory where data is written ...
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data/materialscommons' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path
import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path Change directory where data is written to.import utils from os imp...
<commit_before>import utils from os import environ import os.path MCDIR = environ.get("MCDIR") or '/mcfs/data' def for_uid(uidstr): pieces = uidstr.split('-') path = os.path.join(MCDIR, pieces[1][0:2], pieces[1][2:4]) utils.mkdirp(path) return path <commit_msg>Change directory where data is written ...
72f84b49ea9781f3252c49a1805c0ce19af5c635
corehq/apps/case_search/dsl_utils.py
corehq/apps/case_search/dsl_utils.py
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
Revert "support unwrapping of basic types"
Revert "support unwrapping of basic types" This reverts commit 86a5a1c8
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
<commit_before>from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unw...
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unwrap_value(value...
<commit_before>from django.utils.translation import gettext as _ from eulxml.xpath.ast import FunctionCall, UnaryExpression, serialize from corehq.apps.case_search.exceptions import ( CaseFilterError, XPathFunctionException, ) from corehq.apps.case_search.xpath_functions import XPATH_VALUE_FUNCTIONS def unw...
f6a974a1dc5337e482fe6fcac402597735892567
saleor/delivery/__init__.py
saleor/delivery/__init__.py
from __future__ import unicode_literals from django.conf import settings from prices import Price from satchless.item import Item class BaseDelivery(Item): def __init__(self, delivery_group): self.group = delivery_group def get_price_per_item(self, **kwargs): return Price(0, currency=settin...
from __future__ import unicode_literals from re import sub from django.conf import settings from prices import Price from satchless.item import ItemSet from ..cart import ShippedGroup class BaseDelivery(ItemSet): group = None def __init__(self, delivery_group): self.group = delivery_group def...
Use the delivery classes as proxy for items groups
Use the delivery classes as proxy for items groups
Python
bsd-3-clause
Drekscott/Motlaesaleor,taedori81/saleor,rchav/vinerack,maferelo/saleor,rodrigozn/CW-Shop,dashmug/saleor,taedori81/saleor,laosunhust/saleor,laosunhust/saleor,car3oon/saleor,mociepka/saleor,hongquan/saleor,arth-co/saleor,taedori81/saleor,car3oon/saleor,spartonia/saleor,dashmug/saleor,hongquan/saleor,hongquan/saleor,car3o...
from __future__ import unicode_literals from django.conf import settings from prices import Price from satchless.item import Item class BaseDelivery(Item): def __init__(self, delivery_group): self.group = delivery_group def get_price_per_item(self, **kwargs): return Price(0, currency=settin...
from __future__ import unicode_literals from re import sub from django.conf import settings from prices import Price from satchless.item import ItemSet from ..cart import ShippedGroup class BaseDelivery(ItemSet): group = None def __init__(self, delivery_group): self.group = delivery_group def...
<commit_before>from __future__ import unicode_literals from django.conf import settings from prices import Price from satchless.item import Item class BaseDelivery(Item): def __init__(self, delivery_group): self.group = delivery_group def get_price_per_item(self, **kwargs): return Price(0, ...
from __future__ import unicode_literals from re import sub from django.conf import settings from prices import Price from satchless.item import ItemSet from ..cart import ShippedGroup class BaseDelivery(ItemSet): group = None def __init__(self, delivery_group): self.group = delivery_group def...
from __future__ import unicode_literals from django.conf import settings from prices import Price from satchless.item import Item class BaseDelivery(Item): def __init__(self, delivery_group): self.group = delivery_group def get_price_per_item(self, **kwargs): return Price(0, currency=settin...
<commit_before>from __future__ import unicode_literals from django.conf import settings from prices import Price from satchless.item import Item class BaseDelivery(Item): def __init__(self, delivery_group): self.group = delivery_group def get_price_per_item(self, **kwargs): return Price(0, ...
510edc5b7d5320deb568b2fab1d654ee4d7a5c83
autogenerate_config_docs/hooks.py
autogenerate_config_docs/hooks.py
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
Add a hook to load glance_store options
Add a hook to load glance_store options The backends configuration options are now in the glance_store package and are loaded at runtime. This patch adds a hook that calls a glance_store function to load the options. Change-Id: Iefd49afd578f2b5fa9318d8ed8fb9f7a76d8ba34
Python
apache-2.0
openstack/openstack-doc-tools,savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,openstack/openstack-doc-tools,savinash47/openstack-doc-tools
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
<commit_before># # A collection of shared functions for managing help flag mapping files. # # 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 #...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
<commit_before># # A collection of shared functions for managing help flag mapping files. # # 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 #...
dcf2dcb41e66ce01e386d526370ce23064e6e2a3
schemer/exceptions.py
schemer/exceptions.py
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format(path) self._path = path @property def path(self): """The field path at which...
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format('\"{}\"'.format(path)) self._path = path @property def path(self): """The fi...
Improve formatting of schema format exception messages
Improve formatting of schema format exception messages
Python
mit
gamechanger/schemer
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format(path) self._path = path @property def path(self): """The field path at which...
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format('\"{}\"'.format(path)) self._path = path @property def path(self): """The fi...
<commit_before> class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format(path) self._path = path @property def path(self): """The fiel...
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format('\"{}\"'.format(path)) self._path = path @property def path(self): """The fi...
class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format(path) self._path = path @property def path(self): """The field path at which...
<commit_before> class SchemaFormatException(Exception): """Exception which encapsulates a problem found during the verification of a a schema.""" def __init__(self, message, path): self._message = message.format(path) self._path = path @property def path(self): """The fiel...
2823b35d3bf3d521ae3c9769e2696455bbed8318
scriptorium/config.py
scriptorium/config.py
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
Expand home directory wildcards to ensure path is valid
Expand home directory wildcards to ensure path is valid
Python
mit
jasedit/scriptorium,jasedit/papers_base
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
<commit_before>#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DI...
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DIR, 'templates')...
<commit_before>#!/usr/bin/env python """Configuration related functionality for scriptorium.""" import os import yaml import scriptorium _DEFAULT_DIR = os.path.join(os.path.expanduser("~"), '.scriptorium') _CFG_FILE = os.path.join(_DEFAULT_DIR, 'config') _DEFAULT_CFG = { 'TEMPLATE_DIR': os.path.join(_DEFAULT_DI...
58915da451e59400d5f5a2a757c5af0919e87b61
buck-tools/onos_oar.py
buck-tools/onos_oar.py
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
Allow OAR file rule to use non-OSGI jars
Allow OAR file rule to use non-OSGI jars Change-Id: If2a82bdb5b217270ca02760f1c6cfc6f8f0dc7da
Python
apache-2.0
y-higuchi/onos,donNewtonAlpha/onos,VinodKumarS-Huawei/ietf96yang,kuujo/onos,LorenzReinhart/ONOSnew,gkatsikas/onos,maheshraju-Huawei/actn,VinodKumarS-Huawei/ietf96yang,gkatsikas/onos,opennetworkinglab/onos,mengmoya/onos,osinstom/onos,sdnwiselab/onos,osinstom/onos,sdnwiselab/onos,LorenzReinhart/ONOSnew,y-higuchi/onos,Lor...
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
<commit_before>#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': ...
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': des...
<commit_before>#!/usr/bin/env python #FIXME Add license from zipfile import ZipFile def generateOar(output, files=[]): # Note this is not a compressed zip with ZipFile(output, 'w') as zip: for file, mvnCoords in files: filename = file.split('/')[-1] if mvnCoords == 'NONE': ...
2d57d87b15c73fe1f9b884dc57ecf2c25a5e7454
tensorflow_probability/python/internal/backend/numpy/tensor_spec.py
tensorflow_probability/python/internal/backend/numpy/tensor_spec.py
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Add `from_tensor` classmethod to `TensorSpec` in the Numpy backend.
Add `from_tensor` classmethod to `TensorSpec` in the Numpy backend. PiperOrigin-RevId: 466171774
Python
apache-2.0
tensorflow/probability,tensorflow/probability
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
<commit_before># Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
<commit_before># Copyright 2021 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
311e02e13bf7ffd9f138fb562b02d51283e89abd
wheel_cms/settings/production.py
wheel_cms/settings/production.py
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable if not DATABASE_URL: PG_DEFAULT_DB = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DB_NAME'), 'USER': get_env_variable('DB_USER'), 'PASSWORD...
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable DEBUG=False STRACKS_URL = get_env_variable('STRACKS_URL', '') STRACKS_CONNECTOR = None if STRACKS_URL: from stracks_api.connector import ASyncHTTPConnector STRACKS_CONNECTOR = ASyncHTTPConnector(STRACKS_URL) MID...
Remove old style db config
Remove old style db config
Python
bsd-2-clause
wheelcms/wheel-site,wheelcms/wheel-site
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable if not DATABASE_URL: PG_DEFAULT_DB = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DB_NAME'), 'USER': get_env_variable('DB_USER'), 'PASSWORD...
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable DEBUG=False STRACKS_URL = get_env_variable('STRACKS_URL', '') STRACKS_CONNECTOR = None if STRACKS_URL: from stracks_api.connector import ASyncHTTPConnector STRACKS_CONNECTOR = ASyncHTTPConnector(STRACKS_URL) MID...
<commit_before>from settings.base import * from wheelcms_project.settings.base.util import get_env_variable if not DATABASE_URL: PG_DEFAULT_DB = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DB_NAME'), 'USER': get_env_variable('DB_USER'), ...
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable DEBUG=False STRACKS_URL = get_env_variable('STRACKS_URL', '') STRACKS_CONNECTOR = None if STRACKS_URL: from stracks_api.connector import ASyncHTTPConnector STRACKS_CONNECTOR = ASyncHTTPConnector(STRACKS_URL) MID...
from settings.base import * from wheelcms_project.settings.base.util import get_env_variable if not DATABASE_URL: PG_DEFAULT_DB = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DB_NAME'), 'USER': get_env_variable('DB_USER'), 'PASSWORD...
<commit_before>from settings.base import * from wheelcms_project.settings.base.util import get_env_variable if not DATABASE_URL: PG_DEFAULT_DB = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': get_env_variable('DB_NAME'), 'USER': get_env_variable('DB_USER'), ...
ba5bfeb652804e57203b1794c6293b8227590ac1
pyinstalive/logger.py
pyinstalive/logger.py
def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[0m' return color de...
import sys import os def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[...
Add proper logging support for consoles that don't accept ANSI
Add proper logging support for consoles that don't accept ANSI
Python
mit
notcammy/PyInstaLive
def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[0m' return color de...
import sys import os def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[...
<commit_before>def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[0m' r...
import sys import os def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[...
def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[0m' return color de...
<commit_before>def colors(state): color = '' if (state == 'BLUE'): color = '\033[94m' if (state == 'GREEN'): color = '\033[92m' if (state == 'YELLOW'): color = '\033[93m' if (state == 'RED'): color = '\033[91m' if (state == 'ENDC'): color = '\033[0m' if (state == 'WHITE'): color = '\033[0m' r...