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
dbe622d2297d62f61adf34e17de7c84d0cffbeaf
project/project/local_settings_example.py
project/project/local_settings_example.py
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
Add email settings example to localsettings
Add email settings example to localsettings
Python
mit
colbypalmer/cp-project-template,colbypalmer/cp-project-template,colbypalmer/cp-project-template
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
<commit_before>DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', ...
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'd...
<commit_before>DEBUG = True ADMINS = ( ('Zaphod Beeblebrox', 'hoopyfrood@heartofgold.com'), ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', ...
b6f3c619e8c3fa375ac9b66e7ce555c77f02f152
pytest_raisesregexp/plugin.py
pytest_raisesregexp/plugin.py
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
Add originally raised exception value to pytest error message
Add originally raised exception value to pytest error message
Python
mit
kissgyorgy/pytest-raisesregexp
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
<commit_before>import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __e...
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __enter__(self): ...
<commit_before>import re import py.code import pytest def pytest_namespace(): return {'raises_regexp': raises_regexp} class raises_regexp(object): def __init__(self, expected_exception, regexp): self.exception = expected_exception self.regexp = regexp self.excinfo = None def __e...
69cf5602ba9dd9d7e0a89c169682ac72e2e18a67
everywhere/base.py
everywhere/base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> None: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add4...
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> str: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add42...
Fix return type of hello
Fix return type of hello
Python
bsd-2-clause
wdv4758h/python-everywhere,wdv4758h/python-everywhere,wdv4758h/python-everywhere
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> None: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add4...
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> str: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add42...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> None: ''' >>> hello() 'Hello World' ''' return 'Hello Wo...
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> str: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add42...
#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> None: ''' >>> hello() 'Hello World' ''' return 'Hello World' def add4...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- def fib(number: int) -> int: ''' >>> fib(10) 55 ''' if number < 2: return number else: return fib(number-1) + fib(number-2) def hello() -> None: ''' >>> hello() 'Hello World' ''' return 'Hello Wo...
5b8da0d318d7b37b3f1a3d868980507b15aa4213
salt/renderers/json.py
salt/renderers/json.py
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] return json.loads(json_data)
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] if not json_data.strip(): return {} ...
Add missed changes for the previous commit.
Add missed changes for the previous commit.
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] return json.loads(json_data) Add missed ch...
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] if not json_data.strip(): return {} ...
<commit_before>from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] return json.loads(json_data)...
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] if not json_data.strip(): return {} ...
from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] return json.loads(json_data) Add missed ch...
<commit_before>from __future__ import absolute_import import json def render(json_data, env='', sls='', **kws): if not isinstance(json_data, basestring): json_data = json_data.read() if json_data.startswith('#!'): json_data = json_data[json_data.find('\n')+1:] return json.loads(json_data)...
3ad64c06f917efdaa94ad5debc23941f4d95105a
fuzzy_happiness/attributes.py
fuzzy_happiness/attributes.py
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
Return table name not model object name.
Return table name not model object name.
Python
apache-2.0
rcbau/fuzzy-happiness
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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>#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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>#!/usr/bin/python # # Copyright 2013 Rackspace Australia # # 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...
dbbd6e1e87964db6b2279a661a63751da31213e5
millipede.py
millipede.py
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None): self._millipede = "" if comment: self._millipede = comment + "\n\n" self._millipede += " ╚⊙ ⊙╝ \n" padding = 2 direction = -1 while (size): for i in range(0, ...
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None, reverse=False): self._padding_offsets = [2, 1, 0, 1, 2, 3, 4, 4, 3] head = " ╔⊙ ⊙╗\n" if reverse else " ╚⊙ ⊙╝\n" body = "".join([ "{}{}\n".format( " " * self._padding_offsets[...
Rewrite body generation and add reverse option
Rewrite body generation and add reverse option
Python
bsd-3-clause
evadot/millipede-python,getmillipede/millipede-python,moul/millipede-python,EasonYi/millipede-python,EasonYi/millipede-python,evadot/millipede-python,moul/millipede-python,getmillipede/millipede-python
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None): self._millipede = "" if comment: self._millipede = comment + "\n\n" self._millipede += " ╚⊙ ⊙╝ \n" padding = 2 direction = -1 while (size): for i in range(0, ...
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None, reverse=False): self._padding_offsets = [2, 1, 0, 1, 2, 3, 4, 4, 3] head = " ╔⊙ ⊙╗\n" if reverse else " ╚⊙ ⊙╝\n" body = "".join([ "{}{}\n".format( " " * self._padding_offsets[...
<commit_before>#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None): self._millipede = "" if comment: self._millipede = comment + "\n\n" self._millipede += " ╚⊙ ⊙╝ \n" padding = 2 direction = -1 while (size): for...
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None, reverse=False): self._padding_offsets = [2, 1, 0, 1, 2, 3, 4, 4, 3] head = " ╔⊙ ⊙╗\n" if reverse else " ╚⊙ ⊙╝\n" body = "".join([ "{}{}\n".format( " " * self._padding_offsets[...
#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None): self._millipede = "" if comment: self._millipede = comment + "\n\n" self._millipede += " ╚⊙ ⊙╝ \n" padding = 2 direction = -1 while (size): for i in range(0, ...
<commit_before>#!/usr/bin/env python3 class millipede: def __init__(self, size, comment=None): self._millipede = "" if comment: self._millipede = comment + "\n\n" self._millipede += " ╚⊙ ⊙╝ \n" padding = 2 direction = -1 while (size): for...
8233abab6084db39df064b87d256fd0caffecb89
simpy/test/test_simulation.py
simpy/test/test_simulation.py
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def p...
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def r...
Define subprocesses in the context of the root process. Maybe this is more readable?
Define subprocesses in the context of the root process. Maybe this is more readable?
Python
mit
Uzere/uSim
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def p...
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def r...
<commit_before>from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interru...
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def r...
from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interrupt(): def p...
<commit_before>from simpy import Simulation, InterruptedException def test_simple_process(): def pem(ctx, result): while True: result.append(ctx.now) yield ctx.wait(1) result = [] Simulation(pem, result).simulate(until=4) assert result == [0, 1, 2, 3] def test_interru...
a51f5e108f6fb81fce5d99b53888f2a2954fb9a6
server_app/__main__.py
server_app/__main__.py
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log"), level=logging.DEBUG)) sys.stderr.close() sys.stdout.clos...
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log")), level=logging.DEBUG) sys.stderr.close() sys.stdout.clos...
Make logger sort by date
Make logger sort by date
Python
bsd-3-clause
jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log"), level=logging.DEBUG)) sys.stderr.close() sys.stdout.clos...
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log")), level=logging.DEBUG) sys.stderr.close() sys.stdout.clos...
<commit_before>import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log"), level=logging.DEBUG)) sys.stderr.close() ...
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log")), level=logging.DEBUG) sys.stderr.close() sys.stdout.clos...
import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log"), level=logging.DEBUG)) sys.stderr.close() sys.stdout.clos...
<commit_before>import sys import os import logging import time if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat-"+time.strftime("%d-%m-%Y.log"), level=logging.DEBUG)) sys.stderr.close() ...
1b0edd2eeb722397e9c6c7da04ab6cbd3865a476
reddit_adzerk/adzerkads.py
reddit_adzerk/adzerkads.py
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" site_name = getattr(c.site, "analy...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" si...
Move special frontpage name to variable.
Move special frontpage name to variable.
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" site_name = getattr(c.site, "analy...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" si...
<commit_before>from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" site_name = getattr...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" si...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" site_name = getattr(c.site, "analy...
<commit_before>from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_https_url" if c.secure else "adzerk_url" site_name = getattr...
2cb03ff8c3d21f36b95103eaf9ae0fb3e43077bd
pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py
pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py
from django import template from django.contrib.messages.utils import get_level_tags LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix along with any tags includ...
from django import template from django.contrib.messages.utils import get_level_tags from django.utils.encoding import force_text LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "...
Allow for lazy translation of message tags
Allow for lazy translation of message tags
Python
mit
foraliving/foraliving,druss16/danslist,grahamu/pinax-theme-bootstrap,foraliving/foraliving,grahamu/pinax-theme-bootstrap,druss16/danslist,jacobwegner/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,druss16/danslist,grahamu/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,foraliving/foraliving
from django import template from django.contrib.messages.utils import get_level_tags LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix along with any tags includ...
from django import template from django.contrib.messages.utils import get_level_tags from django.utils.encoding import force_text LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "...
<commit_before>from django import template from django.contrib.messages.utils import get_level_tags LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix along with ...
from django import template from django.contrib.messages.utils import get_level_tags from django.utils.encoding import force_text LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "...
from django import template from django.contrib.messages.utils import get_level_tags LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix along with any tags includ...
<commit_before>from django import template from django.contrib.messages.utils import get_level_tags LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix along with ...
d20f9d5e56c4f430f6ca7b4ab03a279e34bbbd45
importer/tasks.py
importer/tasks.py
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
Use shared_task instead of task.
Use shared_task instead of task.
Python
mit
monokrome/django-drift
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
<commit_before>from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status =...
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status = 'success' succ...
<commit_before>from .models import FileImport from .importers import ImportFailure from django.db import transaction import celery assuming_failure_message = '{0} did not return True. Assuming failure.' processing_status = 'processing' processing_description = 'Processing the data in {filename}.' success_status =...
3973e0d2591b2554e96da0a22b2d723a71d2423e
imgaug/augmenters/__init__.py
imgaug/augmenters/__init__.py
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContrast, LinearContrast from imgaug.augmenters.convolutional import * from imgaug.augmen...
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import * from imgaug.augmenters.convolutional import * from imgaug.augmenters.flip import * from imgaug.augmenters.geometric import...
Switch import from contrast to all
Switch import from contrast to all Change import from contrast.py in augmenters/__init__.py to * instead of selective, as * should not import private methods anyways.
Python
mit
aleju/ImageAugmenter,aleju/imgaug,aleju/imgaug
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContrast, LinearContrast from imgaug.augmenters.convolutional import * from imgaug.augmen...
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import * from imgaug.augmenters.convolutional import * from imgaug.augmenters.flip import * from imgaug.augmenters.geometric import...
<commit_before>from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContrast, LinearContrast from imgaug.augmenters.convolutional import * fro...
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import * from imgaug.augmenters.convolutional import * from imgaug.augmenters.flip import * from imgaug.augmenters.geometric import...
from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContrast, LinearContrast from imgaug.augmenters.convolutional import * from imgaug.augmen...
<commit_before>from __future__ import absolute_import from imgaug.augmenters.arithmetic import * from imgaug.augmenters.blur import * from imgaug.augmenters.color import * from imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContrast, LinearContrast from imgaug.augmenters.convolutional import * fro...
ad558a5acc93e1e5206ed27b2dc679089b277890
me_api/app.py
me_api/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .middleware import github, keybase, medium from .cache import cache def create_app(config): app = Flask(__name__) app.config.from_object(config)...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .cache import cache def _register_module(app, module): if module == 'github': from .middleware import github app.register_blueprint(...
Fix giant bug: crash when don't config all modules
Fix giant bug: crash when don't config all modules that's bacause you import all the modules > from .middleware import github, keybase, medium while each module need to get configurations from modules.json, e.g. > config = Config.modules['modules']['github'] but can't get anything at all, so it will crash. that's not...
Python
mit
lord63/me-api
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .middleware import github, keybase, medium from .cache import cache def create_app(config): app = Flask(__name__) app.config.from_object(config)...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .cache import cache def _register_module(app, module): if module == 'github': from .middleware import github app.register_blueprint(...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .middleware import github, keybase, medium from .cache import cache def create_app(config): app = Flask(__name__) app.config.from...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .cache import cache def _register_module(app, module): if module == 'github': from .middleware import github app.register_blueprint(...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .middleware import github, keybase, medium from .cache import cache def create_app(config): app = Flask(__name__) app.config.from_object(config)...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .middleware import github, keybase, medium from .cache import cache def create_app(config): app = Flask(__name__) app.config.from...
42b330e5629b25db45e7a0f3f08bdb21e608b106
skimage/viewer/qt.py
skimage/viewer/qt.py
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
Add QWidget to the mock Qt
Add QWidget to the mock Qt
Python
bsd-3-clause
ClinicalGraphics/scikit-image,bsipocz/scikit-image,rjeli/scikit-image,juliusbierk/scikit-image,vighneshbirodkar/scikit-image,pratapvardhan/scikit-image,juliusbierk/scikit-image,keflavich/scikit-image,warmspringwinds/scikit-image,Britefury/scikit-image,oew1v07/scikit-image,bennlich/scikit-image,ClinicalGraphics/scikit-i...
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
<commit_before>has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainW...
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainWindow = object ...
<commit_before>has_qt = True try: from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets except ImportError: try: from matplotlib.backends.qt4_compat import QtGui, QtCore QtWidgets = QtGui except ImportError: # Mock objects class QtGui(object): QMainW...
bd3d97cefe61886ab8c2fa24eecd624ca1c6f751
profile_collection/startup/90-settings.py
profile_collection/startup/90-settings.py
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_scanid(name, doc): if name == 'start': print('Scan ID:', doc['scan_id']) print('Unique ID:', doc['uid']) ...
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_md(name, doc): if name == 'start': print('Metadata:\n', repr(doc)) RE.subscribe(print_scanid) #from eiger_io.fs_h...
Remove redundant Scan ID printing (there is another one elsewhere)
Remove redundant Scan ID printing (there is another one elsewhere)
Python
bsd-2-clause
NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_scanid(name, doc): if name == 'start': print('Scan ID:', doc['scan_id']) print('Unique ID:', doc['uid']) ...
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_md(name, doc): if name == 'start': print('Metadata:\n', repr(doc)) RE.subscribe(print_scanid) #from eiger_io.fs_h...
<commit_before>import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_scanid(name, doc): if name == 'start': print('Scan ID:', doc['scan_id']) print('Unique ID:...
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_md(name, doc): if name == 'start': print('Metadata:\n', repr(doc)) RE.subscribe(print_scanid) #from eiger_io.fs_h...
import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_scanid(name, doc): if name == 'start': print('Scan ID:', doc['scan_id']) print('Unique ID:', doc['uid']) ...
<commit_before>import logging # metadata set at startup RE.md['owner'] = 'xf11id' RE.md['beamline_id'] = 'CHX' # removing 'custom' as it is raising an exception in 0.3.2 # gs.RE.md['custom'] = {} def print_scanid(name, doc): if name == 'start': print('Scan ID:', doc['scan_id']) print('Unique ID:...
ad60b0cd3326c0729237afbb094d22f4415fb422
laboratory/experiment.py
laboratory/experiment.py
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
Call Experiment.publish in run method
Call Experiment.publish in run method
Python
mit
joealcorn/laboratory,shaunvxc/laboratory
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
<commit_before>import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = No...
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = None self...
<commit_before>import traceback from laboratory.observation import Observation, Test from laboratory import exceptions class Experiment(object): def __init__(self, name='Experiment', raise_on_mismatch=False): self.name = name self.raise_on_mismatch = raise_on_mismatch self._control = No...
9560ccf476a887c20b2373eca52f38f186b6ed58
conanfile.py
conanfile.py
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable", "qt/5.14.1@bincrafters/stable", "sqlite3/3.31.0", "libiconv/1.16" generators = "cmake", "cmake_find_package", "cmake_paths" ...
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable" generators = "cmake", "cmake_find_package", "cmake_paths" #default_options = { # "sdl2:nas": False #}
Remove conan Qt, as it is currently being ignored
[nostalgia] Remove conan Qt, as it is currently being ignored
Python
mpl-2.0
wombatant/nostalgia,wombatant/nostalgia,wombatant/nostalgia
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable", "qt/5.14.1@bincrafters/stable", "sqlite3/3.31.0", "libiconv/1.16" generators = "cmake", "cmake_find_package", "cmake_paths" ...
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable" generators = "cmake", "cmake_find_package", "cmake_paths" #default_options = { # "sdl2:nas": False #}
<commit_before>from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable", "qt/5.14.1@bincrafters/stable", "sqlite3/3.31.0", "libiconv/1.16" generators = "cmake", "cmake_find_package", "...
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable" generators = "cmake", "cmake_find_package", "cmake_paths" #default_options = { # "sdl2:nas": False #}
from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable", "qt/5.14.1@bincrafters/stable", "sqlite3/3.31.0", "libiconv/1.16" generators = "cmake", "cmake_find_package", "cmake_paths" ...
<commit_before>from conans import ConanFile, CMake class NostalgiaConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "jsoncpp/1.9.2", "sdl2/2.0.10@bincrafters/stable", "qt/5.14.1@bincrafters/stable", "sqlite3/3.31.0", "libiconv/1.16" generators = "cmake", "cmake_find_package", "...
a284a69432b2e0052fd2da4121cf4512fc9423da
lemon/dashboard/admin.py
lemon/dashboard/admin.py
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): instance = dashboard @property def urls(self): return self.instance.get_urls(self), 'dashboard', 'dash...
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): dashboard = dashboard @property def urls(self): return self.dashboard.get_urls(self), 'dashboard', 'da...
Rename instance to dashboard in DashboardAdmin
Rename instance to dashboard in DashboardAdmin
Python
bsd-3-clause
trilan/lemon,trilan/lemon,trilan/lemon
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): instance = dashboard @property def urls(self): return self.instance.get_urls(self), 'dashboard', 'dash...
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): dashboard = dashboard @property def urls(self): return self.dashboard.get_urls(self), 'dashboard', 'da...
<commit_before>from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): instance = dashboard @property def urls(self): return self.instance.get_urls(self), 'da...
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): dashboard = dashboard @property def urls(self): return self.dashboard.get_urls(self), 'dashboard', 'da...
from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): instance = dashboard @property def urls(self): return self.instance.get_urls(self), 'dashboard', 'dash...
<commit_before>from django.conf import settings from lemon import extradmin as admin from lemon.dashboard import views from lemon.dashboard.base import dashboard, Widget class DashboardAdmin(admin.AppAdmin): instance = dashboard @property def urls(self): return self.instance.get_urls(self), 'da...
8541ec09e237f1401095d31177bdde9ac1adaa39
util/linkJS.py
util/linkJS.py
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
Include full path to original files
Include full path to original files
Python
mpl-2.0
MozillaSecurity/funfuzz,nth10sd/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
<commit_before>#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in...
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in file_list: ...
<commit_before>#!/usr/bin/env python import os def linkJS(target_fn, file_list_fn, source_base, prologue="", module_dirs=[]): with open(target_fn, "wb") as target: target.write(prologue) # Add files listed in file_list_fn with open(file_list_fn) as file_list: for source_fn in...
72dd10849190fb191fdab4962996ea537322e103
tests/TestPluginManager.py
tests/TestPluginManager.py
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
Reduce sleep duration in PluginManager.stop() test
Reduce sleep duration in PluginManager.stop() test
Python
mit
ckaz18/honeypot,laurenmalone/honeypot,theplue/honeypot,ckaz18/honeypot,laurenmalone/honeypot,theplue/honeypot,coyle5280/honeypot,coyle5280/honeypot,ckaz18/honeypot,theplue/honeypot,theplue/honeypot,coyle5280/honeypot,ckaz18/honeypot,laurenmalone/honeypot,laurenmalone/honeypot,coyle5280/honeypot
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
<commit_before>import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any availa...
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any available port ...
<commit_before>import socket import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def __init__(self): sock = socket.socket() sock.bind(('', 0)) # bind to any availa...
2117778d777120293e506eca9743f97619b5ad5c
kiwi/interface.py
kiwi/interface.py
class Menu(object): def __init__(self, dialog, items, title, caller = None): self.d = dialog self.caller = caller self.entries = [] self.dispatch_table = {} tag = 1 self.title = title for entry, func in items: self.entries.append(tuple([str(tag)...
class MenuItem(object): def __init__(self, func=None): if func: self.function = func # Wrapper for child.function() that creates a call stack def run(self, ret=None): self.function() if ret: ret() class Menu(MenuItem): def __init__(self, dialog, items, title): self.d = ...
Create object MenuItem that wraps functions to create a call stack
Create object MenuItem that wraps functions to create a call stack
Python
mit
jakogut/KiWI
class Menu(object): def __init__(self, dialog, items, title, caller = None): self.d = dialog self.caller = caller self.entries = [] self.dispatch_table = {} tag = 1 self.title = title for entry, func in items: self.entries.append(tuple([str(tag)...
class MenuItem(object): def __init__(self, func=None): if func: self.function = func # Wrapper for child.function() that creates a call stack def run(self, ret=None): self.function() if ret: ret() class Menu(MenuItem): def __init__(self, dialog, items, title): self.d = ...
<commit_before>class Menu(object): def __init__(self, dialog, items, title, caller = None): self.d = dialog self.caller = caller self.entries = [] self.dispatch_table = {} tag = 1 self.title = title for entry, func in items: self.entries.append(...
class MenuItem(object): def __init__(self, func=None): if func: self.function = func # Wrapper for child.function() that creates a call stack def run(self, ret=None): self.function() if ret: ret() class Menu(MenuItem): def __init__(self, dialog, items, title): self.d = ...
class Menu(object): def __init__(self, dialog, items, title, caller = None): self.d = dialog self.caller = caller self.entries = [] self.dispatch_table = {} tag = 1 self.title = title for entry, func in items: self.entries.append(tuple([str(tag)...
<commit_before>class Menu(object): def __init__(self, dialog, items, title, caller = None): self.d = dialog self.caller = caller self.entries = [] self.dispatch_table = {} tag = 1 self.title = title for entry, func in items: self.entries.append(...
ccf285c30a0110f2ff59b91ec0166f9b5306239d
dukpy/evaljs.py
dukpy/evaljs.py
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) except NameError: # pragma: no cover string_types = (bytes, str) class JSInterpreter(object): """Jav...
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) jscode_type = str except NameError: # pragma: no cover string_types = (bytes, str) jscode_type = s...
Fix unicode source code on py3
Fix unicode source code on py3
Python
mit
amol-/dukpy,amol-/dukpy,amol-/dukpy
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) except NameError: # pragma: no cover string_types = (bytes, str) class JSInterpreter(object): """Jav...
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) jscode_type = str except NameError: # pragma: no cover string_types = (bytes, str) jscode_type = s...
<commit_before>import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) except NameError: # pragma: no cover string_types = (bytes, str) class JSInterpreter(obje...
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) jscode_type = str except NameError: # pragma: no cover string_types = (bytes, str) jscode_type = s...
import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) except NameError: # pragma: no cover string_types = (bytes, str) class JSInterpreter(object): """Jav...
<commit_before>import json from . import _dukpy try: from collections.abc import Iterable except ImportError: from collections import Iterable try: # pragma: no cover unicode string_types = (str, unicode) except NameError: # pragma: no cover string_types = (bytes, str) class JSInterpreter(obje...
fdcdb5416bccf85a1745ccd07915e15629128ff9
es_config.py
es_config.py
# A list of ES hosts ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx")
import os import ast # A list of ES hosts # Uncomment the following for debugging # ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] # ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") # Comment the following for debugging, # or set corresponding environment variables try: ES...
Update ES server config to make use of environment variables
Update ES server config to make use of environment variables
Python
mit
justinchuby/cmu-courseapi-flask
# A list of ES hosts ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") Update ES server config to make use of environment variables
import os import ast # A list of ES hosts # Uncomment the following for debugging # ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] # ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") # Comment the following for debugging, # or set corresponding environment variables try: ES...
<commit_before> # A list of ES hosts ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") <commit_msg>Update ES server config to make use of environment variables<commit_after>
import os import ast # A list of ES hosts # Uncomment the following for debugging # ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] # ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") # Comment the following for debugging, # or set corresponding environment variables try: ES...
# A list of ES hosts ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") Update ES server config to make use of environment variablesimport os import ast # A list of ES hosts # Uncomment the following for debugging # ES_HOSTS = ['htt...
<commit_before> # A list of ES hosts ES_HOSTS = ['https://c3d581bfab179c1101d5b7a9e22a5f95.us-east-1.aws.found.io:9243'] ES_HTTP_AUTH = ("elastic:u3Mk8jjADYJ4NzUmPTn15MNx") <commit_msg>Update ES server config to make use of environment variables<commit_after>import os import ast # A list of ES hosts # Uncomment the f...
08fe9e7beb4285feec9205012a62d464b3489bcf
natasha/grammars/person/interpretation.py
natasha/grammars/person/interpretation.py
from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович Lastname = 2 # путин Descriptor = 3 # президент ...
# coding: utf-8 from __future__ import unicode_literals from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович La...
Fix encoding for python 2.x
Fix encoding for python 2.x
Python
mit
natasha/natasha
from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович Lastname = 2 # путин Descriptor = 3 # президент ...
# coding: utf-8 from __future__ import unicode_literals from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович La...
<commit_before>from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович Lastname = 2 # путин Descriptor = 3 ...
# coding: utf-8 from __future__ import unicode_literals from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович La...
from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович Lastname = 2 # путин Descriptor = 3 # президент ...
<commit_before>from enum import Enum from collections import Counter from yargy.interpretation import InterpretationObject class PersonObject(InterpretationObject): class Attributes(Enum): Firstname = 0 # владимир Middlename = 1 # владимирович Lastname = 2 # путин Descriptor = 3 ...
294c251d83bec3738ce54a67d718c2ba959a7b4b
git.py
git.py
import os import subprocess class cd: """Context manager for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path = os.getcwd() os.chdir(self.new_path) def __exit__(self,...
import os import subprocess from contextlib import ContextDecorator class cd(ContextDecorator): """Context manager/decorator for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path =...
Extend cd context manager to decorator.
Extend cd context manager to decorator.
Python
mit
0xfoo/punchcard
import os import subprocess class cd: """Context manager for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path = os.getcwd() os.chdir(self.new_path) def __exit__(self,...
import os import subprocess from contextlib import ContextDecorator class cd(ContextDecorator): """Context manager/decorator for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path =...
<commit_before> import os import subprocess class cd: """Context manager for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path = os.getcwd() os.chdir(self.new_path) def...
import os import subprocess from contextlib import ContextDecorator class cd(ContextDecorator): """Context manager/decorator for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path =...
import os import subprocess class cd: """Context manager for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path = os.getcwd() os.chdir(self.new_path) def __exit__(self,...
<commit_before> import os import subprocess class cd: """Context manager for changing the current working directory.""" def __init__(self, new_path): self.new_path = os.path.expanduser(new_path) def __enter__(self): self.previous_path = os.getcwd() os.chdir(self.new_path) def...
2e6efd4ecf22a1e7c673f90f113bfae47b98d294
medical_insurance_us/models/__init__.py
medical_insurance_us/models/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
Add template and remove company from insurance_us imports
Add template and remove company from insurance_us imports
Python
agpl-3.0
ShaheenHossain/eagle-medical,laslabs/vertical-medical,ShaheenHossain/eagle-medical,laslabs/vertical-medical
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms ...
3d3a81efc36e39888929e62287b9d895922d8615
tests/sentry/filters/test_web_crawlers.py
tests/sentry/filters/test_web_crawlers.py
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
Add unit tests for filtering Twitterbot and Slack.
Add unit tests for filtering Twitterbot and Slack.
Python
bsd-3-clause
ifduyue/sentry,mvaled/sentry,gencer/sentry,gencer/sentry,mvaled/sentry,JackDanger/sentry,beeftornado/sentry,mvaled/sentry,mvaled/sentry,jean/sentry,looker/sentry,looker/sentry,jean/sentry,looker/sentry,mvaled/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,JackDanger/sentry,gencer/sentry,gencer/sentry,...
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
<commit_before>from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) ...
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) def get_mock...
<commit_before>from __future__ import absolute_import from sentry.filters.web_crawlers import WebCrawlersFilter from sentry.testutils import TestCase class WebCrawlersFilterTest(TestCase): filter_cls = WebCrawlersFilter def apply_filter(self, data): return self.filter_cls(self.project).test(data) ...
6bd088acd0ec0cfa5298051e286ce76e42430067
shuup/front/themes/views/_product_preview.py
shuup/front/themes/views/_product_preview.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
Remove reference to nonexistent file
Front: Remove reference to nonexistent file
Python
agpl-3.0
shoopio/shoop,shoopio/shoop,shawnadelic/shuup,suutari-ai/shoop,shawnadelic/shuup,hrayr-artunyan/shuup,suutari/shoop,suutari/shoop,shoopio/shoop,suutari-ai/shoop,hrayr-artunyan/shuup,shawnadelic/shuup,suutari/shoop,suutari-ai/shoop,hrayr-artunyan/shuup
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView cla...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView class ProductPrevi...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from shuup.front.views.product import ProductDetailView cla...
5fdedac2eae25d88d2595f0fe79ca3a332f24dfe
pysuru/api.py
pysuru/api.py
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServicesAPI
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServiceInstanceAPI
Fix service instance API class name
Fix service instance API class name
Python
mit
rcmachado/pysuru
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServicesAPI Fix service instance API class name
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServiceInstanceAPI
<commit_before># coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServicesAPI <commit_msg>Fix service ins...
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServiceInstanceAPI
# coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServicesAPI Fix service instance API class name# codin...
<commit_before># coding: utf-8 """ Public endpoint to import API classes Instead of importing each module individually (eg. ``from pysuru.apps import AppsAPI``), import from this module. """ from __future__ import absolute_imports from .apps import AppsAPI from .services import ServicesAPI <commit_msg>Fix service ins...
a347c699be3ce5659db4b76a26ce253a209e232e
webapp_health_monitor/verificators/base.py
webapp_health_monitor/verificators/base.py
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
Delete unused value extractor attribute.
Delete unused value extractor attribute.
Python
mit
pozytywnie/webapp-health-monitor,serathius/webapp-health-monitor
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
<commit_before>from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name ...
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
<commit_before>from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name ...
47672fe44673fe9cae54a736bdc9eb496494ab58
UI/utilities/synchronization_core.py
UI/utilities/synchronization_core.py
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # class StorjFileSynchronization(): def start_sync_thread(self): return 1 def reload_sync_configuration(self): return 1 def add_file_to_sync_queue(self): return 1
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # import time from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler import threading HANDLE_ON_MOVE_EVENT = True HANDLE_ON_DELETE_EVENT = True class StorjFileSynchronization(): def start_sync_thr...
Add synchronization directory observer and handler
Add synchronization directory observer and handler
Python
mit
lakewik/storj-gui-client
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # class StorjFileSynchronization(): def start_sync_thread(self): return 1 def reload_sync_configuration(self): return 1 def add_file_to_sync_queue(self): return 1 Add synchronization directory observer and...
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # import time from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler import threading HANDLE_ON_MOVE_EVENT = True HANDLE_ON_DELETE_EVENT = True class StorjFileSynchronization(): def start_sync_thr...
<commit_before># -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # class StorjFileSynchronization(): def start_sync_thread(self): return 1 def reload_sync_configuration(self): return 1 def add_file_to_sync_queue(self): return 1 <commit_msg>Add synchroniza...
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # import time from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler import threading HANDLE_ON_MOVE_EVENT = True HANDLE_ON_DELETE_EVENT = True class StorjFileSynchronization(): def start_sync_thr...
# -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # class StorjFileSynchronization(): def start_sync_thread(self): return 1 def reload_sync_configuration(self): return 1 def add_file_to_sync_queue(self): return 1 Add synchronization directory observer and...
<commit_before># -*- coding: utf-8 -*- # Synchronization core module for Storj GUI Client # class StorjFileSynchronization(): def start_sync_thread(self): return 1 def reload_sync_configuration(self): return 1 def add_file_to_sync_queue(self): return 1 <commit_msg>Add synchroniza...
23af33b7ca48c59ff58638b733437d8f348b279b
openapi_core/__init__.py
openapi_core/__init__.py
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciag' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
Replace unicode character for RPM build.
Replace unicode character for RPM build. To make building RPMs of package easier when using ascii by default.
Python
bsd-3-clause
p1c2u/openapi-core
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciag' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
<commit_before># -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license_...
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciag' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
# -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license__ = 'BSD 3-Clau...
<commit_before># -*- coding: utf-8 -*- """OpenAPI core module""" from openapi_core.shortcuts import ( create_spec, validate_parameters, validate_body, validate_data, ) __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.5.0' __url__ = 'https://github.com/p1c2u/openapi-core' __license_...
f4c9482e41ec2ee6c894a413e8fcb0349a9edbd1
tapiriik/web/templatetags/displayutils.py
tapiriik/web/templatetags/displayutils.py
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
Fix broken diagnostic dashboard with new sync progress values
Fix broken diagnostic dashboard with new sync progress values
Python
apache-2.0
campbellr/tapiriik,niosus/tapiriik,gavioto/tapiriik,cheatos101/tapiriik,cheatos101/tapiriik,brunoflores/tapiriik,abhijit86k/tapiriik,mjnbike/tapiriik,dlenski/tapiriik,abhijit86k/tapiriik,cpfair/tapiriik,marxin/tapiriik,abhijit86k/tapiriik,dlenski/tapiriik,cheatos101/tapiriik,abs0/tapiriik,niosus/tapiriik,dmschreiber/ta...
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
<commit_before>from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filte...
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filter(name='dict_ge...
<commit_before>from django import template import json register = template.Library() @register.filter(name="format_meters") def meters_to_kms(value): try: return round(value / 1000) except: return "NaN" @register.filter(name='json') def jsonit(obj): return json.dumps(obj) @register.filte...
03eb0081a4037e36775271fb2373277f8e89835b
src/mcedit2/resourceloader.py
src/mcedit2/resourceloader.py
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
Add function to ResourceLoader for listing all block models
Add function to ResourceLoader for listing all block models xxx only lists Vanilla models. haven't looked at mods with models yet.
Python
bsd-3-clause
vorburger/mcedit2,vorburger/mcedit2,Rubisk/mcedit2,Rubisk/mcedit2
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
<commit_before>""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__...
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__init__() ...
<commit_before>""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import zipfile log = logging.getLogger(__name__) class ResourceNotFound(KeyError): pass class ResourceLoader(object): def __init__(self): super(ResourceLoader, self).__...
de4f43613b5f3a8b6f49ace6b8e9585a242d7cb2
src/build.py
src/build.py
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
Exit with the proper value.
Exit with the proper value. git-svn-id: a26c1b3dc012bc7b166f1b96505d8277332098eb@265 9ffc3505-93cb-cd4b-9e5d-8a77f6415fcf
Python
bsd-3-clause
csnake-org/CSnake,csnake-org/CSnake,msteghofer/CSnake,msteghofer/CSnake,csnake-org/CSnake,msteghofer/CSnake
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
<commit_before># Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls fro...
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
# Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls from cruise contro...
<commit_before># Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu. # This software is distributed WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Script to automate CSnake calls fro...
55464daa00ca68b07737433b0983df4667432a9c
system/plugins/info.py
system/plugins/info.py
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
Fix missing dependencies on core
Fix missing dependencies on core
Python
artistic-2.0
UltrosBot/Ultros,UltrosBot/Ultros
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
<commit_before>__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data ...
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data if plugin_...
<commit_before>__author__ = 'Gareth Coles' import weakref class Info(object): data = None core = None info = None def __init__(self, yaml_data, plugin_object=None): """ :param yaml_data: :type yaml_data: dict :return: """ self.data = yaml_data ...
985dd1ada1b2ad9ceaae111fa32b1d8e54b61786
mailqueue/tasks.py
mailqueue/tasks.py
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail") def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() @task() def clear_sent_messages(): from mailqueue.models import MailerMessage MailerMessage.objects.clear_sent_messages()
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail", default_retry_delay=5, max_retries=5) def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() # Retry when message is not sent if not message.sent: send_mail.retry([message.pk...
Add retry to celery task
Add retry to celery task Messages do not always get delivered. Built in a retry when message is not sent. Max retry count could also be a setting.
Python
mit
Goury/django-mail-queue,dstegelman/django-mail-queue,winfieldco/django-mail-queue,Goury/django-mail-queue,styrmis/django-mail-queue,dstegelman/django-mail-queue
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail") def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() @task() def clear_sent_messages(): from mailqueue.models import MailerMessage MailerMessage.objects.clear_sent_messages() Add retry...
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail", default_retry_delay=5, max_retries=5) def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() # Retry when message is not sent if not message.sent: send_mail.retry([message.pk...
<commit_before>from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail") def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() @task() def clear_sent_messages(): from mailqueue.models import MailerMessage MailerMessage.objects.clear_sent_messa...
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail", default_retry_delay=5, max_retries=5) def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() # Retry when message is not sent if not message.sent: send_mail.retry([message.pk...
from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail") def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() @task() def clear_sent_messages(): from mailqueue.models import MailerMessage MailerMessage.objects.clear_sent_messages() Add retry...
<commit_before>from celery.task import task from .models import MailerMessage @task(name="tasks.send_mail") def send_mail(pk): message = MailerMessage.objects.get(pk=pk) message._send() @task() def clear_sent_messages(): from mailqueue.models import MailerMessage MailerMessage.objects.clear_sent_messa...
8d8798554d996776eecc61b673adcbc2680f327a
mastermind/main.py
mastermind/main.py
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
Write PID to a file
Write PID to a file
Python
mit
ustwo/mastermind,ustwo/mastermind
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
<commit_before>from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(...
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(args) excep...
<commit_before>from __future__ import (absolute_import, print_function, division) from itertools import repeat from mitmproxy.main import mitmdump import os from . import (cli, proxyswitch, say) def main(): parser = cli.args() args, extra_args = parser.parse_known_args() try: config = cli.config(...
4ef5d9ae7a571f97242cf2cc44e539d039486549
runserver.py
runserver.py
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
Add proper banner to dev launch script
Add proper banner to dev launch script
Python
bsd-2-clause
glasnost/kremlin,glasnost/kremlin,glasnost/kremlin
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
<commit_before>#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # ...
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
<commit_before>#!/usr/bin/env python """ # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # ...
928cbc47cb7430d8a2fef924b61179cd30f5ca34
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an i...
Remove empty line before class docstring
Remove empty line before class docstring
Python
mit
thebinarypenguin/SublimeLinter-contrib-raml-cop
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an i...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an i...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): ...
9ee0f3f7be90046f796f3395b2149288a2b52a26
src/zeit/magazin/preview.py
src/zeit/magazin/preview.py
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
Remove oddity marker, it's been resolved in zeit.find now
Remove oddity marker, it's been resolved in zeit.find now
Python
bsd-3-clause
ZeitOnline/zeit.magazin
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
<commit_before># Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(co...
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
# Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(content, preview_...
<commit_before># Copyright (c) 2013 gocept gmbh & co. kg # See also LICENSE.txt import grokcore.component as grok import zeit.cms.browser.preview import zeit.magazin.interfaces @grok.adapter(zeit.magazin.interfaces.IZMOContent, basestring) @grok.implementer(zeit.cms.browser.interfaces.IPreviewURL) def preview_url(co...
ee0f28abd70396bf1e094592028aa693e5d6fe6c
rechunker/executors/python.py
rechunker/executors/python.py
import itertools from functools import partial import math from typing import Any, Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor Thunk = Callable[[], None] class PythonExecutor(Executor[Thunk]): """An execution engine based on Python loops. Supports copying between any...
import itertools from functools import partial import math from typing import Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor # PythonExecutor represents delayed execution tasks as functions that require # no arguments. Task = Callable[[], None] class PythonExecutor(Executor[Task...
Remove 'thunk' jargon from PythonExecutor
Remove 'thunk' jargon from PythonExecutor
Python
mit
pangeo-data/rechunker
import itertools from functools import partial import math from typing import Any, Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor Thunk = Callable[[], None] class PythonExecutor(Executor[Thunk]): """An execution engine based on Python loops. Supports copying between any...
import itertools from functools import partial import math from typing import Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor # PythonExecutor represents delayed execution tasks as functions that require # no arguments. Task = Callable[[], None] class PythonExecutor(Executor[Task...
<commit_before>import itertools from functools import partial import math from typing import Any, Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor Thunk = Callable[[], None] class PythonExecutor(Executor[Thunk]): """An execution engine based on Python loops. Supports copy...
import itertools from functools import partial import math from typing import Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor # PythonExecutor represents delayed execution tasks as functions that require # no arguments. Task = Callable[[], None] class PythonExecutor(Executor[Task...
import itertools from functools import partial import math from typing import Any, Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor Thunk = Callable[[], None] class PythonExecutor(Executor[Thunk]): """An execution engine based on Python loops. Supports copying between any...
<commit_before>import itertools from functools import partial import math from typing import Any, Callable, Iterable from rechunker.types import CopySpec, StagedCopySpec, Executor Thunk = Callable[[], None] class PythonExecutor(Executor[Thunk]): """An execution engine based on Python loops. Supports copy...
01dc78bc4cea6c11744879c0f2066ab627314625
django_stackoverflow_trace/__init__.py
django_stackoverflow_trace/__init__.py
from django.views import debug def _patch_django_debug_view(): new_data = """ <h3 style="margin-bottom:10px;"> <a href="http://stackoverflow.com/search?q=[python] or [django]+{{ exception_value|force_escape }}" target="_blank">View in Stackoverflow</a> </h3> """ ...
from django.views import debug from django.conf import settings def get_search_link(): default_choice = "stackoverflow" search_urls = { "stackoverflow": "http://stackoverflow.com/search?q=[python] or " "[django]+{{ exception_value|force_escape }}", "googlesearch": "ht...
Add a google search option
Add a google search option
Python
mit
emre/django-stackoverflow-trace
from django.views import debug def _patch_django_debug_view(): new_data = """ <h3 style="margin-bottom:10px;"> <a href="http://stackoverflow.com/search?q=[python] or [django]+{{ exception_value|force_escape }}" target="_blank">View in Stackoverflow</a> </h3> """ ...
from django.views import debug from django.conf import settings def get_search_link(): default_choice = "stackoverflow" search_urls = { "stackoverflow": "http://stackoverflow.com/search?q=[python] or " "[django]+{{ exception_value|force_escape }}", "googlesearch": "ht...
<commit_before>from django.views import debug def _patch_django_debug_view(): new_data = """ <h3 style="margin-bottom:10px;"> <a href="http://stackoverflow.com/search?q=[python] or [django]+{{ exception_value|force_escape }}" target="_blank">View in Stackoverflow</a> </h3...
from django.views import debug from django.conf import settings def get_search_link(): default_choice = "stackoverflow" search_urls = { "stackoverflow": "http://stackoverflow.com/search?q=[python] or " "[django]+{{ exception_value|force_escape }}", "googlesearch": "ht...
from django.views import debug def _patch_django_debug_view(): new_data = """ <h3 style="margin-bottom:10px;"> <a href="http://stackoverflow.com/search?q=[python] or [django]+{{ exception_value|force_escape }}" target="_blank">View in Stackoverflow</a> </h3> """ ...
<commit_before>from django.views import debug def _patch_django_debug_view(): new_data = """ <h3 style="margin-bottom:10px;"> <a href="http://stackoverflow.com/search?q=[python] or [django]+{{ exception_value|force_escape }}" target="_blank">View in Stackoverflow</a> </h3...
ddc03637b19059f6fb06d72dc380afaf4fba57c2
indra/tests/test_context.py
indra/tests/test_context.py
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
Remove deprecated context client test
Remove deprecated context client test
Python
bsd-2-clause
johnbachman/belpy,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,jmuhlich/indra,jmuhlich/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,jmuhlich/indra,bgyori/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/ind...
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
<commit_before>from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BRE...
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BREAST'] > 1000) ...
<commit_before>from indra.databases import context_client def test_get_protein_expression(): res = context_client.get_protein_expression('EGFR', 'BT20_BREAST') assert(res is not None) assert(res.get('EGFR') is not None) assert(res['EGFR'].get('BT20_BREAST') is not None) assert(res['EGFR']['BT20_BRE...
a1f5a392d5270dd6f80a40e45c5e25b6ae04b7c3
embed_video/fields.py
embed_video/fields.py
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
Simplify validate method in FormField.
Simplify validate method in FormField.
Python
mit
yetty/django-embed-video,jazzband/django-embed-video,jazzband/django-embed-video,mpachas/django-embed-video,yetty/django-embed-video,mpachas/django-embed-video
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
<commit_before>from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ ...
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ Model field f...
<commit_before>from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ from .backends import detect_backend, UnknownIdException, \ UnknownBackendException __all__ = ('EmbedVideoField', 'EmbedVideoFormField') class EmbedVideoField(models.URLField): """ ...
7f6167ef9f62b9b79e3c30b358c796caae69a2e6
PyWXSB/exceptions_.py
PyWXSB/exceptions_.py
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
Add an exception to throw when a document does have the expected structure
Add an exception to throw when a document does have the expected structure
Python
apache-2.0
jonfoster/pyxb-upstream-mirror,jonfoster/pyxb-upstream-mirror,balanced/PyXB,jonfoster/pyxb2,pabigot/pyxb,CantemoInternal/pyxb,jonfoster/pyxb2,balanced/PyXB,CantemoInternal/pyxb,jonfoster/pyxb1,pabigot/pyxb,jonfoster/pyxb2,CantemoInternal/pyxb,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,balanced/PyXB
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
<commit_before>"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for excepti...
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for exceptions that indica...
<commit_before>"""Extensions of standard exceptions for PyWXSB events. Yeah, I'd love this module to be named exceptions.py, but it can't because the standard library has one of those, and we need to reference it below. """ import exceptions class PyWXSBException (exceptions.Exception): """Base class for excepti...
3bb0e65eac5c93fa6e331d22252fd7b17ecdf964
__main__.py
__main__.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Add pylint indentation check to sanity and fix existing indentation Change: 132840696
Add pylint indentation check to sanity and fix existing indentation Change: 132840696
Python
apache-2.0
francoisluus/tensorboard-supervise,qiuminxu/tensorboard,qiuminxu/tensorboard,tensorflow/tensorboard,shakedel/tensorboard,qiuminxu/tensorboard,ioeric/tensorboard,shakedel/tensorboard,qiuminxu/tensorboard,tensorflow/tensorboard,qiuminxu/tensorboard,francoisluus/tensorboard-supervise,agrubb/tensorboard,tensorflow/tensorbo...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
36298a9f9a7a373a716e44cac6226a0ec8c8c40c
__main__.py
__main__.py
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run()
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) print('Starting up...') reactor.run()
Print something at the start
Print something at the start
Python
apache-2.0
Floobits/floobits-emacs
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run() Print something at the start
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) print('Starting up...') reactor.run()
<commit_before>from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run() <commit_msg>Print something at the start<commi...
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) print('Starting up...') reactor.run()
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run() Print something at the startfrom twisted.internet.endpoints i...
<commit_before>from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run() <commit_msg>Print something at the start<commi...
602c01caa23df0c6dad5963412a340087012f692
thinc/tests/integration/test_shape_check.py
thinc/tests/integration/test_shape_check.py
import pytest import numpy from ...neural._classes.model import Model def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pytest.raises(ValueError): y = model.begin_training(X)
import pytest import numpy from ...neural._classes.model import Model from ...exceptions import UndefinedOperatorError, DifferentLengthError from ...exceptions import ExpectedTypeError, ShapeMismatchError def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pyte...
Update test and import errors
Update test and import errors
Python
mit
explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc
import pytest import numpy from ...neural._classes.model import Model def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pytest.raises(ValueError): y = model.begin_training(X) Update test and import errors
import pytest import numpy from ...neural._classes.model import Model from ...exceptions import UndefinedOperatorError, DifferentLengthError from ...exceptions import ExpectedTypeError, ShapeMismatchError def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pyte...
<commit_before>import pytest import numpy from ...neural._classes.model import Model def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pytest.raises(ValueError): y = model.begin_training(X) <commit_msg>Update test and import errors<commit_after>
import pytest import numpy from ...neural._classes.model import Model from ...exceptions import UndefinedOperatorError, DifferentLengthError from ...exceptions import ExpectedTypeError, ShapeMismatchError def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pyte...
import pytest import numpy from ...neural._classes.model import Model def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pytest.raises(ValueError): y = model.begin_training(X) Update test and import errorsimport pytest import numpy from ...neura...
<commit_before>import pytest import numpy from ...neural._classes.model import Model def test_mismatched_shapes_raise_ShapeError(): X = numpy.ones((3, 4)) model = Model(10, 5) with pytest.raises(ValueError): y = model.begin_training(X) <commit_msg>Update test and import errors<commit_after>...
3e413b9f0afea5e33f8698e13984fe5dcf4783dd
src/core/homepage_elements/about/hooks.py
src/core/homepage_elements/about/hooks.py
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
Swap IndexError for AttributeError as a result of the swap from HVAD to MT
Swap IndexError for AttributeError as a result of the swap from HVAD to MT
Python
agpl-3.0
BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
<commit_before>__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setti...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setting from core.ho...
<commit_before>__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.utils.translation import ugettext_lazy as _ from utils.setting_handler import get_plugin_setti...
838012c457d6c963707bb16259cd72d28c231672
cellcounter/accounts/decorators.py
cellcounter/accounts/decorators.py
__author__ = 'jvc26'
from functools import wraps from ratelimit.exceptions import Ratelimited from ratelimit.helpers import is_ratelimited def registration_ratelimit(ip=True, block=False, method=['POST'], field=None, rate='1/h', skip_if=None, keys=None): def decorator(fn): @wraps(fn) def _w...
Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errors
Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errors
Python
mit
haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter
__author__ = 'jvc26' Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errors
from functools import wraps from ratelimit.exceptions import Ratelimited from ratelimit.helpers import is_ratelimited def registration_ratelimit(ip=True, block=False, method=['POST'], field=None, rate='1/h', skip_if=None, keys=None): def decorator(fn): @wraps(fn) def _w...
<commit_before>__author__ = 'jvc26' <commit_msg>Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errors<commit_after>
from functools import wraps from ratelimit.exceptions import Ratelimited from ratelimit.helpers import is_ratelimited def registration_ratelimit(ip=True, block=False, method=['POST'], field=None, rate='1/h', skip_if=None, keys=None): def decorator(fn): @wraps(fn) def _w...
__author__ = 'jvc26' Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errorsfrom functools import wraps from ratelimit.exceptions import Ratelimited from ratelimit.helpers import is_ratelimited def registration_ratelimit(ip=True, block=False, method=['POST'], field=None, ra...
<commit_before>__author__ = 'jvc26' <commit_msg>Use custom decorator to allow ratelimiting only on successful POST - prevents blocking form errors<commit_after>from functools import wraps from ratelimit.exceptions import Ratelimited from ratelimit.helpers import is_ratelimited def registration_ratelimit(ip=True, blo...
6ec3b50a087e68373f71162b3dd2421ce7655e4f
neuroimaging/testing/__init__.py
neuroimaging/testing/__init__.py
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
Add some nose.tools to testing imports.
Add some nose.tools to testing imports.
Python
bsd-3-clause
alexis-roche/nipy,nipy/nipy-labs,bthirion/nipy,alexis-roche/niseg,arokem/nipy,alexis-roche/nipy,arokem/nipy,bthirion/nipy,nipy/nireg,nipy/nipy-labs,alexis-roche/niseg,nipy/nireg,alexis-roche/nipy,arokem/nipy,arokem/nipy,alexis-roche/register,alexis-roche/nireg,alexis-roche/register,bthirion/nipy,alexis-roche/register,a...
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
<commit_before>"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.cor...
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.core.image import ...
<commit_before>"""The testing directory contains a small set of imaging files to be used for doctests only. More thorough tests and example data will be stored in a nipy-data-suite to be created later and downloaded separately. Examples -------- >>> from neuroimaging.testing import funcfile >>> from neuroimaging.cor...
bda420a0f9abd31b78decdc43359d0dcff36381f
zephyr/management/commands/dump_pointers.py
zephyr/management/commands/dump_pointers.py
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
Fix email case issues when restoring user pointers.
Fix email case issues when restoring user pointers. (imported from commit 84d3288dffc1cb010d8cd2a749fe71aa2a4d0df3)
Python
apache-2.0
KingxBanana/zulip,zachallaun/zulip,themass/zulip,avastu/zulip,bastianh/zulip,bitemyapp/zulip,EasonYi/zulip,lfranchi/zulip,levixie/zulip,pradiptad/zulip,adnanh/zulip,hengqujushi/zulip,vaidap/zulip,ashwinirudrappa/zulip,reyha/zulip,brainwane/zulip,arpitpanwar/zulip,reyha/zulip,grave-w-grave/zulip,KJin99/zulip,Gabriel0402...
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
<commit_before>from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) f...
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) file("dumped-poi...
<commit_before>from optparse import make_option from django.core.management.base import BaseCommand from zephyr.models import Realm, UserProfile import simplejson def dump(): pointers = [] for u in UserProfile.objects.select_related("user__email").all(): pointers.append((u.user.email, u.pointer)) f...
4742f587e3e66fd1916dcb7200517e2ac06ddcf4
uconnrcmpy/__init__.py
uconnrcmpy/__init__.py
from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactiveExperiments __all__ = [ 'ExperimentalIgnitionDelay', 'CompareToSimulation', 'VolumeTraceBuilder', 'NonReactiveExperime...
import sys if sys.version_info[0] < 3 and sys.version_info[1] < 4: raise Exception('Python 3.4 is required to use this package.') from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactive...
Enforce Python >= 3.4 on import of the package
Enforce Python >= 3.4 on import of the package Python 3.4 is required for the pathlib module
Python
bsd-3-clause
bryanwweber/UConnRCMPy
from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactiveExperiments __all__ = [ 'ExperimentalIgnitionDelay', 'CompareToSimulation', 'VolumeTraceBuilder', 'NonReactiveExperime...
import sys if sys.version_info[0] < 3 and sys.version_info[1] < 4: raise Exception('Python 3.4 is required to use this package.') from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactive...
<commit_before>from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactiveExperiments __all__ = [ 'ExperimentalIgnitionDelay', 'CompareToSimulation', 'VolumeTraceBuilder', 'NonR...
import sys if sys.version_info[0] < 3 and sys.version_info[1] < 4: raise Exception('Python 3.4 is required to use this package.') from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactive...
from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactiveExperiments __all__ = [ 'ExperimentalIgnitionDelay', 'CompareToSimulation', 'VolumeTraceBuilder', 'NonReactiveExperime...
<commit_before>from .ignitiondelayexp import ExperimentalIgnitionDelay from .compare_to_sim import CompareToSimulation from .volume_trace import VolumeTraceBuilder from .nonreactive import NonReactiveExperiments __all__ = [ 'ExperimentalIgnitionDelay', 'CompareToSimulation', 'VolumeTraceBuilder', 'NonR...
77cf2fb0f63a5520de3b8b3456ce4c9181b91d16
spacy/tests/regression/test_issue595.py
spacy/tests/regression/test_issue595.py
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
Remove unnecessary argument in test
Remove unnecessary argument in test
Python
mit
oroszgy/spaCy.hu,honnibal/spaCy,banglakit/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,raphael0202/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,banglakit/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,honnibal/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,s...
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
<commit_before>from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}}...
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}} @pytest.fixtu...
<commit_before>from __future__ import unicode_literals import pytest from ...symbols import POS, VERB, VerbForm_inf from ...tokens import Doc from ...vocab import Vocab from ...lemmatizer import Lemmatizer @pytest.fixture def index(): return {'verb': {}} @pytest.fixture def exceptions(): return {'verb': {}}...
bca3c8f7b2c12b86e0d200009d23201bdc05d716
make_spectra.py
make_spectra.py
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
Handle the case where the savefile already exists by moving it out of the way
Handle the case where the savefile already exists by moving it out of the way
Python
mit
sbird/vw_spectra
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
<commit_before># -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(sna...
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
# -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'...
<commit_before># -*- coding: utf-8 -*- import randspectra as rs import sys import os.path as path snapnum=sys.argv[1] sim=sys.argv[2] #base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/" #savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(sna...
bed7f5c80f6c5b5ce9b9a17aea5c9eadd047ee47
mfr/conftest.py
mfr/conftest.py
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import io import pytest @pytest.fixture def fakefile(): return io.BytesIO(b'foo')
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import pytest import mock @pytest.fixture def fakefile(): """A simple file-like object.""" return mock...
Make fakefile a mock instead of an io object
Make fakefile a mock instead of an io object Makes it possible to mutate attributes, e.g. the name, for tests
Python
apache-2.0
felliott/modular-file-renderer,CenterForOpenScience/modular-file-renderer,mfraezz/modular-file-renderer,CenterForOpenScience/modular-file-renderer,Johnetordoff/modular-file-renderer,mfraezz/modular-file-renderer,icereval/modular-file-renderer,icereval/modular-file-renderer,AddisonSchiller/modular-file-renderer,chrisset...
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import io import pytest @pytest.fixture def fakefile(): return io.BytesIO(b'foo') Make fakefile a mock ins...
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import pytest import mock @pytest.fixture def fakefile(): """A simple file-like object.""" return mock...
<commit_before>"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import io import pytest @pytest.fixture def fakefile(): return io.BytesIO(b'foo') <commit_m...
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import pytest import mock @pytest.fixture def fakefile(): """A simple file-like object.""" return mock...
"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import io import pytest @pytest.fixture def fakefile(): return io.BytesIO(b'foo') Make fakefile a mock ins...
<commit_before>"""Project-wide test configuration, including fixutres that can be used by any module. Example test: :: def test_my_renderer(fakefile): assert my_renderer(fakefile) == '..expected result..' """ import io import pytest @pytest.fixture def fakefile(): return io.BytesIO(b'foo') <commit_m...
3770095f087309efe901c2f22afd29ba6f3ddd18
comrade/core/context_processors.py
comrade/core/context_processors.py
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
Add a context processor that adds the UserProfile to each context.
Add a context processor that adds the UserProfile to each context.
Python
mit
bueda/django-comrade
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.P...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.P...
921e315e61355d80caea673ce09f8944388d86e2
tests/unit/util/test_cache.py
tests/unit/util/test_cache.py
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
Test for property ten as well
Test for property ten as well
Python
bsd-2-clause
praw-dev/praw,gschizas/praw,praw-dev/praw,gschizas/praw
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
<commit_before>"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 t...
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 ten = cachedprop...
<commit_before>"""Test praw.util.cache.""" from .. import UnitTest from praw.util.cache import cachedproperty class TestCachedProperty(UnitTest): class Klass: @cachedproperty def nine(self): """Return 9.""" return 9 def ten(self): return 10 t...
6f29293e6f447dfd80d10c173b7c5a6cc13a4243
main/urls.py
main/urls.py
from django.conf.urls import url from django.views import generic from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.AboutView.as_view(), name='about'), url(r'^chas/$', views.AboutChasView.as_view(), name='chas'), url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'), ]
from django.urls import include, path from . import views app_name = 'main' urlpatterns = [ path('', views.AboutView.as_view(), name='about'), path('chas/', views.AboutChasView.as_view(), name='chas'), path('evan/', views.AboutEvanView.as_view(), name='evan'), ]
Move some urlpatterns to DJango 2.0 preferred method
Move some urlpatterns to DJango 2.0 preferred method
Python
mit
evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca
from django.conf.urls import url from django.views import generic from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.AboutView.as_view(), name='about'), url(r'^chas/$', views.AboutChasView.as_view(), name='chas'), url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'), ] Move some...
from django.urls import include, path from . import views app_name = 'main' urlpatterns = [ path('', views.AboutView.as_view(), name='about'), path('chas/', views.AboutChasView.as_view(), name='chas'), path('evan/', views.AboutEvanView.as_view(), name='evan'), ]
<commit_before>from django.conf.urls import url from django.views import generic from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.AboutView.as_view(), name='about'), url(r'^chas/$', views.AboutChasView.as_view(), name='chas'), url(r'^evan/$', views.AboutEvanView.as_view(), name='evan...
from django.urls import include, path from . import views app_name = 'main' urlpatterns = [ path('', views.AboutView.as_view(), name='about'), path('chas/', views.AboutChasView.as_view(), name='chas'), path('evan/', views.AboutEvanView.as_view(), name='evan'), ]
from django.conf.urls import url from django.views import generic from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.AboutView.as_view(), name='about'), url(r'^chas/$', views.AboutChasView.as_view(), name='chas'), url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'), ] Move some...
<commit_before>from django.conf.urls import url from django.views import generic from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.AboutView.as_view(), name='about'), url(r'^chas/$', views.AboutChasView.as_view(), name='chas'), url(r'^evan/$', views.AboutEvanView.as_view(), name='evan...
3de9cd44ef803b7c7f3e05e29ecaa30113caf1ba
test/db/relations.py
test/db/relations.py
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): if schema('loader-works') != 'SCHEMA LOAD WORKING PROPERLY': self.fail() suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad)
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): self.assertEqual(schema('loader-works'), 'SCHEMA LOAD WORKING PROPERLY') suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad)
Update the schema load test.
Update the schema load test. It now has 100% coverage if the tests pass.
Python
bsd-3-clause
rescrv/firmant
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): if schema('loader-works') != 'SCHEMA LOAD WORKING PROPERLY': self.fail() suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad) Update the schema load test. It ...
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): self.assertEqual(schema('loader-works'), 'SCHEMA LOAD WORKING PROPERLY') suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad)
<commit_before>import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): if schema('loader-works') != 'SCHEMA LOAD WORKING PROPERLY': self.fail() suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad) <commit_msg>Update...
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): self.assertEqual(schema('loader-works'), 'SCHEMA LOAD WORKING PROPERLY') suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad)
import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): if schema('loader-works') != 'SCHEMA LOAD WORKING PROPERLY': self.fail() suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad) Update the schema load test. It ...
<commit_before>import unittest from firmant.db.relations import schema class TestSchemaLoad(unittest.TestCase): def testLoad(self): if schema('loader-works') != 'SCHEMA LOAD WORKING PROPERLY': self.fail() suite = unittest.TestLoader().loadTestsFromTestCase(TestSchemaLoad) <commit_msg>Update...
ad7e1149081461d2d34578e06cf5f470d2d20e71
tomviz/python/Subtract_TiltSer_Background.py
tomviz/python/Subtract_TiltSer_Background.py
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array if data_bs is None: #Check if ...
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array data_bs = data_bs.astype(np.float3...
Change tilt series type to float in manual background sub.
Change tilt series type to float in manual background sub.
Python
bsd-3-clause
cjh1/tomviz,cryos/tomviz,cjh1/tomviz,mathturtle/tomviz,thewtex/tomviz,OpenChemistry/tomviz,cryos/tomviz,cryos/tomviz,OpenChemistry/tomviz,thewtex/tomviz,thewtex/tomviz,cjh1/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array if data_bs is None: #Check if ...
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array data_bs = data_bs.astype(np.float3...
<commit_before>def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array if data_bs is N...
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array data_bs = data_bs.astype(np.float3...
def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array if data_bs is None: #Check if ...
<commit_before>def transform_scalars(dataset): from tomviz import utils import numpy as np #----USER SPECIFIED VARIABLES-----# ###XRANGE### ###YRANGE### ###ZRANGE### #---------------------------------# data_bs = utils.get_array(dataset) #get data as numpy array if data_bs is N...
850c5c6f133fdfd131605eb1bf1e971b33dd7416
website/addons/twofactor/tests/test_views.py
website/addons/twofactor/tests/test_views.py
from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, settings_module='website.setting...
from nose.tools import * from webtest.app import AppError from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, ...
Add test for failure to confirm 2FA code
Add test for failure to confirm 2FA code
Python
apache-2.0
doublebits/osf.io,brianjgeiger/osf.io,billyhunt/osf.io,cwisecarver/osf.io,CenterForOpenScience/osf.io,barbour-em/osf.io,wearpants/osf.io,MerlinZhang/osf.io,alexschiller/osf.io,brandonPurvis/osf.io,haoyuchen1992/osf.io,SSJohns/osf.io,HalcyonChimera/osf.io,dplorimer/osf,amyshi188/osf.io,SSJohns/osf.io,chrisseto/osf.io,ti...
from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, settings_module='website.setting...
from nose.tools import * from webtest.app import AppError from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, ...
<commit_before>from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, settings_module='...
from nose.tools import * from webtest.app import AppError from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, ...
from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, settings_module='website.setting...
<commit_before>from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import AuthUserFactory from website.app import init_app from website.addons.twofactor.tests import _valid_code app = init_app( routes=True, set_backends=False, settings_module='...
33550cab832da5b90cf2fb5af2f211840dfe2caa
test/mintraatests.py
test/mintraatests.py
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
Fix relative path to plugin directories (RBL-2737)
Fix relative path to plugin directories (RBL-2737)
Python
apache-2.0
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
<commit_before>import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs...
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs = [os.path.abs...
<commit_before>import cherrypy import os import raatest from conary import dbstore from conary.server import schema class webPluginTest(raatest.webTest): def __init__( self, module = None, init = True, preInit = None, preConst = None): def func(rt): cherrypy.root.servicecfg.pluginDirs...
78f2ff20e86a7801c9b28cff17f3fe7db93c2788
alerts/views.py
alerts/views.py
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a success alert') messages.warning(request, 'This is ...
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.set_level(request, messages.DEBUG) messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a succes...
Set message level to DEBUG in test view
Set message level to DEBUG in test view
Python
mit
Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a success alert') messages.warning(request, 'This is ...
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.set_level(request, messages.DEBUG) messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a succes...
<commit_before>from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a success alert') messages.warning(req...
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.set_level(request, messages.DEBUG) messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a succes...
from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a success alert') messages.warning(request, 'This is ...
<commit_before>from django.shortcuts import render from django.contrib import messages # Create your views here. def test(request): messages.debug(request, 'This is a debug alert') messages.info(request, 'This is an info alert') messages.success(request, 'This is a success alert') messages.warning(req...
4744f3b3e5193ad66a4bba64d8a8d8c4e328fdcc
pychat.py
pychat.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login def pychat(): login = Login login() if __name__ == '__main__': pychat()
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login from lib.client import Client from Tkinter import * class PyChat(object): def __init__(self): self.root = Tk() self.root.geometry("300x275+400+100") def login(self): self.login = Login(self.root, self.create_c...
Rework to have a central root window controlled from a top class
Rework to have a central root window controlled from a top class
Python
mit
tijko/PyChat
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login def pychat(): login = Login login() if __name__ == '__main__': pychat() Rework to have a central root window controlled from a top class
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login from lib.client import Client from Tkinter import * class PyChat(object): def __init__(self): self.root = Tk() self.root.geometry("300x275+400+100") def login(self): self.login = Login(self.root, self.create_c...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login def pychat(): login = Login login() if __name__ == '__main__': pychat() <commit_msg>Rework to have a central root window controlled from a top class<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login from lib.client import Client from Tkinter import * class PyChat(object): def __init__(self): self.root = Tk() self.root.geometry("300x275+400+100") def login(self): self.login = Login(self.root, self.create_c...
#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login def pychat(): login = Login login() if __name__ == '__main__': pychat() Rework to have a central root window controlled from a top class#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Logi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from lib.login import Login def pychat(): login = Login login() if __name__ == '__main__': pychat() <commit_msg>Rework to have a central root window controlled from a top class<commit_after>#!/usr/bin/env python # -*- codi...
f49c132f0bc90daf98b89bcf7270a2d37cd411d2
tools/hexlifyscript.py
tools/hexlifyscript.py
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
Fix bug in heexlifyscript.py when computing checksum.
Fix bug in heexlifyscript.py when computing checksum.
Python
mit
JoeGlancy/micropython,JoeGlancy/micropython,JoeGlancy/micropython
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
<commit_before>''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of...
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of 16 bytes data ...
<commit_before>''' Turn a Python script into Intel HEX format to be concatenated at the end of the MicroPython firmware.hex. A simple header is added to the script. ''' import sys import struct import binascii # read script body with open(sys.argv[1], "rb") as f: data = f.read() # add header, pad to multiple of...
e40ef4cbe59c5c3d064e60f02f60f19b0bb202a4
test_daily_parser.py
test_daily_parser.py
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expected = 'https://dons...
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args, DonationsParser class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expecte...
Add unit test for DonationsParser.get_csv
Add unit test for DonationsParser.get_csv
Python
mit
Commonists/DonationsLogParser,Commonists/DonationsLogParser
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expected = 'https://dons...
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args, DonationsParser class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expecte...
<commit_before>#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expected ...
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args, DonationsParser class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expecte...
#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expected = 'https://dons...
<commit_before>#!/usr/bin/env python # -*- coding: latin-1 -*- """Unit tests.""" import unittest from daily_parser import url_from_args class TestDailyParser(unittest.TestCase): """Testing methods from daily_parser.""" def test_url_from_args(self): output = url_from_args(2014, 1) expected ...
2377f500d4667623da9a2921c62862b00d7f404c
school/frontend/views.py
school/frontend/views.py
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
Remove flash success message when logging in.
Remove flash success message when logging in.
Python
mit
leyyin/university-SE,leyyin/university-SE,leyyin/university-SE
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
<commit_before>from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend....
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend.route('/login',...
<commit_before>from flask import Blueprint, render_template, url_for, redirect, flash from flask.ext.login import login_required, logout_user, current_user, login_user from .forms import LoginForm from school.config import FLASH_SUCCESS, FLASH_INFO, FLASH_WARNING frontend = Blueprint('frontend', __name__) @frontend....
7aedc2151035174632a7f3e55be7563f71e65117
tests/audio/test_loading.py
tests/audio/test_loading.py
import pytest @pytest.mark.xfail def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert sound is None
import pytest def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert str(sound).startswith('NullAudioSound')
Update audio test to recognize missing sounds as NullAudioSound
tests: Update audio test to recognize missing sounds as NullAudioSound
Python
bsd-3-clause
chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d
import pytest @pytest.mark.xfail def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert sound is None tests: Update audio test to recognize missing sounds as NullAudioSound
import pytest def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert str(sound).startswith('NullAudioSound')
<commit_before>import pytest @pytest.mark.xfail def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert sound is None <commit_msg>tests: Update audio test to recognize missing sounds as NullAudioSound<commit_after>
import pytest def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert str(sound).startswith('NullAudioSound')
import pytest @pytest.mark.xfail def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert sound is None tests: Update audio test to recognize missing sounds as NullAudioSoundimport pytest def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg'...
<commit_before>import pytest @pytest.mark.xfail def test_missing_file(audiomgr): sound = audiomgr.get_sound('/not/a/valid/file.ogg') assert sound is None <commit_msg>tests: Update audio test to recognize missing sounds as NullAudioSound<commit_after>import pytest def test_missing_file(audiomgr): sound = a...
9c5349595dca8013f1353785bbd34fb3d7cd4a6a
misc/__init__.py
misc/__init__.py
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.1' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ )
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.2' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ )
Change version to 0.0.2 to update pypi repo
Change version to 0.0.2 to update pypi repo
Python
mit
ilblackdragon/django-misc
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.1' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ ) Change version to 0.0.2 to update pypi repo
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.2' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ )
<commit_before># -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.1' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ ) <commit_msg>Change version to 0.0.2 to update pypi repo<commit_after>
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.2' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ )
# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.1' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ ) Change version to 0.0.2 to update pypi repo# -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.2' __project__ = PROJECT = 'django-misc' log = logging.ge...
<commit_before># -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.1' __project__ = PROJECT = 'django-misc' log = logging.getLogger( __name__ ) <commit_msg>Change version to 0.0.2 to update pypi repo<commit_after># -*- coding: utf-8 -*- import logging __version__ = VERSION = '0.0.2' __project__ = ...
66c50cdeda974f2159259b466995339244ffb694
training/level-2-command-line-interfaces/dragon-warrior/tmarsha1/primes/Tests/PrimeFinderTests.py
training/level-2-command-line-interfaces/dragon-warrior/tmarsha1/primes/Tests/PrimeFinderTests.py
""" Test the Prime Finder class Still working on getting dependency injection working. """ import unittest from primes.Primes import PrimeFinder #from primes.Primes import PrimeGenerator class PrimeFinderTests(unittest.TestCase): def test_find_prime(self): prime_finder = PrimeFinder.PrimeFinder(PrimeGene...
""" Test the Prime Finder class Still working on getting dependency injection working. Injecting the Generator into the Finder allows for many possibilities. From the testing perspective this would allow me to inject a mock object for the Generator that returns a set value speeding up the testing of the Prime Finder c...
Add additional comments regarding Dependency Injection
Add additional comments regarding Dependency Injection
Python
artistic-2.0
bigfatpanda-training/pandas-practical-python-primer,bigfatpanda-training/pandas-practical-python-primer
""" Test the Prime Finder class Still working on getting dependency injection working. """ import unittest from primes.Primes import PrimeFinder #from primes.Primes import PrimeGenerator class PrimeFinderTests(unittest.TestCase): def test_find_prime(self): prime_finder = PrimeFinder.PrimeFinder(PrimeGene...
""" Test the Prime Finder class Still working on getting dependency injection working. Injecting the Generator into the Finder allows for many possibilities. From the testing perspective this would allow me to inject a mock object for the Generator that returns a set value speeding up the testing of the Prime Finder c...
<commit_before>""" Test the Prime Finder class Still working on getting dependency injection working. """ import unittest from primes.Primes import PrimeFinder #from primes.Primes import PrimeGenerator class PrimeFinderTests(unittest.TestCase): def test_find_prime(self): prime_finder = PrimeFinder.PrimeF...
""" Test the Prime Finder class Still working on getting dependency injection working. Injecting the Generator into the Finder allows for many possibilities. From the testing perspective this would allow me to inject a mock object for the Generator that returns a set value speeding up the testing of the Prime Finder c...
""" Test the Prime Finder class Still working on getting dependency injection working. """ import unittest from primes.Primes import PrimeFinder #from primes.Primes import PrimeGenerator class PrimeFinderTests(unittest.TestCase): def test_find_prime(self): prime_finder = PrimeFinder.PrimeFinder(PrimeGene...
<commit_before>""" Test the Prime Finder class Still working on getting dependency injection working. """ import unittest from primes.Primes import PrimeFinder #from primes.Primes import PrimeGenerator class PrimeFinderTests(unittest.TestCase): def test_find_prime(self): prime_finder = PrimeFinder.PrimeF...
7a7729e9af8e91411526525c19c5d434609e0f21
logger.py
logger.py
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR] " + msg) clas...
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("\033[1;31m[ERROR] " + ...
Add color for error message.
Add color for error message.
Python
mit
PyOCL/oclGA,PyOCL/OpenCLGA,PyOCL/OpenCLGA,PyOCL/oclGA,PyOCL/oclGA,PyOCL/TSP,PyOCL/TSP,PyOCL/oclGA,PyOCL/OpenCLGA
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR] " + msg) clas...
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("\033[1;31m[ERROR] " + ...
<commit_before>MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR]...
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("\033[1;31m[ERROR] " + ...
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR] " + msg) clas...
<commit_before>MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR]...
d3b326e421ca482723cafcadd2442eebb8cf2ee6
bot/main.py
bot/main.py
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
Stop bots from randomly disconnecting
Stop bots from randomly disconnecting
Python
agpl-3.0
samdroid-apps/aslo,samdroid-apps/aslo,samdroid-apps/aslo
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
<commit_before>import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-mast...
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-master.sugarlabs.or...
<commit_before>import os import json import time import socket from subprocess import call import requests from test import test_activity from build import compile_bundle # Fixes a weird bug... it might create some though :P os.environ['http_proxy'] = '' # HOST = 'http://localhost:5001' HOST = 'http://aslo-bot-mast...
fc50a002e967f8e3b7de205a866e010dda717962
logger.py
logger.py
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
Add file transport and update log msg formatting to include pid and fn name
Add file transport and update log msg formatting to include pid and fn name
Python
mit
zeusdeux/zulip-pairing-bot
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
<commit_before>import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': ...
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': loglevel = ...
<commit_before>import os import logging def logger_setup(name): loglevel = '' try: if os.environ['PB_LOGLEVEL'] == 'DEBUG': loglevel = logging.DEBUG if os.environ['PB_LOGLEVEL'] == 'INFO': loglevel = logging.INFO if os.environ['PB_LOGLEVEL'] == 'WARN': ...
4f71339cad35b2444ea295fd4b518e539f1088bb
fluent_faq/urls.py
fluent_faq/urls.py
from django.conf.urls import patterns, url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = patterns('', url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_...
from django.conf.urls import url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = [ url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_slug>[^/]+)/(?P<slug>...
Fix Django 1.9 warnings about patterns('', ..)
Fix Django 1.9 warnings about patterns('', ..)
Python
apache-2.0
edoburu/django-fluent-faq,edoburu/django-fluent-faq
from django.conf.urls import patterns, url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = patterns('', url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_...
from django.conf.urls import url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = [ url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_slug>[^/]+)/(?P<slug>...
<commit_before>from django.conf.urls import patterns, url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = patterns('', url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), ...
from django.conf.urls import url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = [ url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_slug>[^/]+)/(?P<slug>...
from django.conf.urls import patterns, url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = patterns('', url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), url(r'^(?P<cat_...
<commit_before>from django.conf.urls import patterns, url from .views import FaqQuestionList, FaqCategoryDetail, FaqQuestionDetail urlpatterns = patterns('', url(r'^$', FaqQuestionList.as_view(), name='faqquestion_index'), url(r'^(?P<slug>[^/]+)/$', FaqCategoryDetail.as_view(), name='faqcategory_detail'), ...
f113123a3f31e176ae7165f1ca11118dc00625a3
tests/test_backend_forms.py
tests/test_backend_forms.py
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.backend.base.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase)...
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase): def tes...
Fix forms import in tests
Fix forms import in tests
Python
bsd-3-clause
team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.backend.base.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase)...
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase): def tes...
<commit_before>import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.backend.base.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendForm...
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase): def tes...
import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.backend.base.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendFormTests(TestCase)...
<commit_before>import floppyforms.__future__ as floppyforms from django.test import TestCase from django_backend.backend.base.forms import BaseBackendForm from .models import OneFieldModel class OneFieldForm(BaseBackendForm): class Meta: model = OneFieldModel exclude = () class BaseBackendForm...
e291ae29926a3cd05c9268c625e14d205638dfe8
jarn/mkrelease/scp.py
jarn/mkrelease/scp.py
import tempfile import tee from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet: ...
import tempfile import tee from os.path import split from process import Process from chdir import ChdirStack from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() self.dirstack = ChdirStack(...
Change to dist dir before uploading to lose the absolute path.
Change to dist dir before uploading to lose the absolute path.
Python
bsd-2-clause
Jarn/jarn.mkrelease
import tempfile import tee from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet: ...
import tempfile import tee from os.path import split from process import Process from chdir import ChdirStack from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() self.dirstack = ChdirStack(...
<commit_before>import tempfile import tee from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quie...
import tempfile import tee from os.path import split from process import Process from chdir import ChdirStack from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() self.dirstack = ChdirStack(...
import tempfile import tee from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet: ...
<commit_before>import tempfile import tee from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quie...
6b9ccae880e9582f38e2a8aa3c451bc6f6a88d37
thing/tasks/tablecleaner.py
thing/tasks/tablecleaner.py
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
Change thing.tasks.table_cleaner to delete TaskState objects for any invalid APIKeys
Change thing.tasks.table_cleaner to delete TaskState objects for any invalid APIKeys
Python
bsd-2-clause
madcowfred/evething,madcowfred/evething,Gillingham/evething,Gillingham/evething,cmptrgeekken/evething,madcowfred/evething,Gillingham/evething,cmptrgeekken/evething,cmptrgeekken/evething,Gillingham/evething,madcowfred/evething,cmptrgeekken/evething,cmptrgeekken/evething
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
<commit_before>import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform da...
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform database table cl...
<commit_before>import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform da...
e1c970d76dbd0eb631e726e101b09c0f5e5599ec
doc/api_changes/2015-04-27-core.py
doc/api_changes/2015-04-27-core.py
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details.
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. Importantly, the orientation of the output of ...
Add change in angle_grid orientation to API changes.
DOC: Add change in angle_grid orientation to API changes.
Python
bsd-3-clause
licode/scikit-xray,Nikea/scikit-xray,hainm/scikit-xray,celiafish/scikit-xray,licode/scikit-beam,CJ-Wright/scikit-beam,CJ-Wright/scikit-beam,tacaswell/scikit-xray,giltis/scikit-xray,ericdill/scikit-xray,scikit-xray/scikit-xray,yugangzhang/scikit-beam,scikit-xray/scikit-xray,giltis/scikit-xray,danielballan/scikit-xray,ta...
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. DOC: Add change in angle_grid orientation to A...
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. Importantly, the orientation of the output of ...
<commit_before>Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. <commit_msg>DOC: Add change in ...
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. Importantly, the orientation of the output of ...
Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. DOC: Add change in angle_grid orientation to A...
<commit_before>Grid-building functions ----------------------- :func:`pixels_to_radius` and :func:`pixels_to_phi` were renamed to :func:`radial_grid` and :func:`angle_grid` respectively. The name and order of their arguments was also changed: see their docstring or API docs for details. <commit_msg>DOC: Add change in ...
6974cba56413527c8b7cef9e4b6ad6ca9fe5049e
tests/test_memory.py
tests/test_memory.py
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(0x200, 0x01) self.assertEqual...
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(address, 0x01) self.assertEqu...
Clarify values used in tests.
Clarify values used in tests.
Python
bsd-3-clause
gutomaia/chipy8
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(0x200, 0x01) self.assertEqual...
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(address, 0x01) self.assertEqu...
<commit_before># coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(0x200, 0x01) s...
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(address, 0x01) self.assertEqu...
# coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(0x200, 0x01) self.assertEqual...
<commit_before># coding: utf-8 from unittest import TestCase from chipy8 import Memory class TestMemory(TestCase): def setUp(self): self.memory = Memory() def test_write(self): 'Write a byte to memory then read it.' address = 0x200 self.memory.write_byte(0x200, 0x01) s...
ff489b1541f896025a0c630be6abe2d23843ec36
examples/05_alternative_language.py
examples/05_alternative_language.py
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Fyodor Dostoyevsky', {'ru': u'Фёдор Миха́йлович Достое́вский'}) datafile.header.author = author print(datafile.header.author.alternatives['ru']) # Returns ...
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Wilhelm Conrad Roentgen', {'de': u'Wilhelm Conrad Röntgen'}) datafile.header.author = author print(datafile.header.author.alternatives['de']) # Returns ...
Replace name in alternative language to prevent compilation problems with LaTeX
Replace name in alternative language to prevent compilation problems with LaTeX
Python
mit
pyhmsa/pyhmsa
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Fyodor Dostoyevsky', {'ru': u'Фёдор Миха́йлович Достое́вский'}) datafile.header.author = author print(datafile.header.author.alternatives['ru']) # Returns ...Replace name in alt...
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Wilhelm Conrad Roentgen', {'de': u'Wilhelm Conrad Röntgen'}) datafile.header.author = author print(datafile.header.author.alternatives['de']) # Returns ...
<commit_before>#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Fyodor Dostoyevsky', {'ru': u'Фёдор Миха́йлович Достое́вский'}) datafile.header.author = author print(datafile.header.author.alternatives['ru']) # Returns ...<com...
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Wilhelm Conrad Roentgen', {'de': u'Wilhelm Conrad Röntgen'}) datafile.header.author = author print(datafile.header.author.alternatives['de']) # Returns ...
#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Fyodor Dostoyevsky', {'ru': u'Фёдор Миха́йлович Достое́вский'}) datafile.header.author = author print(datafile.header.author.alternatives['ru']) # Returns ...Replace name in alt...
<commit_before>#!/usr/bin/env python from pyhmsa.datafile import DataFile from pyhmsa.type.language import langstr datafile = DataFile() author = langstr('Fyodor Dostoyevsky', {'ru': u'Фёдор Миха́йлович Достое́вский'}) datafile.header.author = author print(datafile.header.author.alternatives['ru']) # Returns ...<com...
61fecbed71129228e7020a9e95dbcd2487bbdbb3
turbustat/tests/test_scf.py
turbustat/tests/test_scf.py
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances class testSCF(Tes...
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from scipy.ndimage import zoom from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, compute...
Add simple SCF test for unequal grids
Add simple SCF test for unequal grids
Python
mit
e-koch/TurbuStat,Astroua/TurbuStat
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances class testSCF(Tes...
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from scipy.ndimage import zoom from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, compute...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances cl...
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from scipy.ndimage import zoom from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, compute...
# Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances class testSCF(Tes...
<commit_before># Licensed under an MIT open source license - see LICENSE ''' Test functions for SCF ''' from unittest import TestCase import numpy as np import numpy.testing as npt from ..statistics import SCF, SCF_Distance from ._testing_data import \ dataset1, dataset2, computed_data, computed_distances cl...
698677a623722b63ec4cceb7690b62fa7e4ede37
django_prices_openexchangerates/templatetags/prices_multicurrency_i18n.py
django_prices_openexchangerates/templatetags/prices_multicurrency_i18n.py
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
Add templatetag for converting discounts between currencies
Add templatetag for converting discounts between currencies
Python
bsd-3-clause
mirumee/django-prices-openexchangerates,artursmet/django-prices-openexchangerates
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
<commit_before>from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gro...
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gross(converted_pr...
<commit_before>from django.template import Library from django_prices.templatetags import prices_i18n from .. import exchange_currency register = Library() @register.simple_tag # noqa def gross_in_currency(price, currency): # noqa converted_price = exchange_currency(price, currency) return prices_i18n.gro...
32a54ff0588930efc5e0ee3c61f2efbf57e450e0
inviter/tests.py
inviter/tests.py
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import get_connection from django.test import TestCase from inviter.uti...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import outbox from django.test import TestCase from inviter.utils impor...
Test fix to check django.core.mail.outbox
Test fix to check django.core.mail.outbox
Python
mit
caffeinehit/django-inviter
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import get_connection from django.test import TestCase from inviter.uti...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import outbox from django.test import TestCase from inviter.utils impor...
<commit_before>""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import get_connection from django.test import TestCase f...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import outbox from django.test import TestCase from inviter.utils impor...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import get_connection from django.test import TestCase from inviter.uti...
<commit_before>""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.contrib.auth.models import User from django.core.mail import get_connection from django.test import TestCase f...
9d6c8eaa491d0988bf16633bbba9847350f57778
spacy/lang/norm_exceptions.py
spacy/lang/norm_exceptions.py
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
Update base norm exceptions with more unicode characters
Update base norm exceptions with more unicode characters e.g. unicode variations of punctuation used in Chinese
Python
mit
aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/s...
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
<commit_before># coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alterna...
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
# coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alternative is provide...
<commit_before># coding: utf8 from __future__ import unicode_literals # These exceptions are used to add NORM values based on a token's ORTH value. # Individual languages can also add their own exceptions and overwrite them - # for example, British vs. American spelling in English. # Norms are only set if no alterna...
56c4de583847be5fb16818dcd1ca855fc6007b50
pylsdj/__init__.py
pylsdj/__init__.py
__title__ = 'pylsdj' __version__ = '1.1.0' __build__ = 0x010100 __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Alex Rasmussen' import bread_spec import chain import clock import consts import filepack from instrument import Instrument from phrase import Phrase from project import loa...
Make imports a little more intuitive.
Make imports a little more intuitive.
Python
mit
alexras/pylsdj,alexras/pylsdj
Make imports a little more intuitive.
__title__ = 'pylsdj' __version__ = '1.1.0' __build__ = 0x010100 __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Alex Rasmussen' import bread_spec import chain import clock import consts import filepack from instrument import Instrument from phrase import Phrase from project import loa...
<commit_before><commit_msg>Make imports a little more intuitive.<commit_after>
__title__ = 'pylsdj' __version__ = '1.1.0' __build__ = 0x010100 __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Alex Rasmussen' import bread_spec import chain import clock import consts import filepack from instrument import Instrument from phrase import Phrase from project import loa...
Make imports a little more intuitive.__title__ = 'pylsdj' __version__ = '1.1.0' __build__ = 0x010100 __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Alex Rasmussen' import bread_spec import chain import clock import consts import filepack from instrument import Instrument from phrase ...
<commit_before><commit_msg>Make imports a little more intuitive.<commit_after>__title__ = 'pylsdj' __version__ = '1.1.0' __build__ = 0x010100 __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Alex Rasmussen' import bread_spec import chain import clock import consts import filepack from ...
770fd77e0fc7a0700b81e4418e5f97bd88d842d0
pymoira/filesys.py
pymoira/filesys.py
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
Fix a name collision for two types of types.
Fix a name collision for two types of types.
Python
mit
vasilvv/pymoira
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
<commit_before># ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str)...
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
# ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str), ('mac...
<commit_before># ## PyMoira client library ## ## This file contains the more abstract methods which allow user to work with ## lists and list members. # import protocol import utils import datetime from errors import * class Filesys(object): info_query_description = ( ('label', str), ('type', str)...
7394ba6eba50282bd7252e504a80e5d595dd12bc
ci/fix_paths.py
ci/fix_paths.py
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
Copy zlib.dll into Windows h5py installed from source
Copy zlib.dll into Windows h5py installed from source
Python
bsd-3-clause
h5py/h5py,h5py/h5py,h5py/h5py
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
<commit_before>import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) ...
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
<commit_before>import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) ...
6db2bb9b1634a7b37790207e5b8d420de643a9cb
turbasen/__init__.py
turbasen/__init__.py
VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
Add relevant models to turbasen module
Add relevant models to turbasen module
Python
mit
Turbasen/turbasen.py
VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value) Add relevant models to turbasen module
VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
<commit_before>VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value) <commit_msg>Add relevant models to turbasen module<commit_after>
VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value) Add relevant models to turbasen moduleVERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settin...
<commit_before>VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value) <commit_msg>Add relevant models to turbasen module<commit_after>VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**se...
e8b1cee54f679cbd6a2d158b3c2789f3f6a3d9c0
uppercase.py
uppercase.py
from twisted.internet import protocol, reactor factory = protocol.ServerFactory() factory.protocol = protocol.Protocol reactor.listenTCP(8000, factory) reactor.run()
from twisted.internet import endpoints, protocol, reactor class UpperProtocol(protocol.Protocol): pass factory = protocol.ServerFactory() factory.protocol = UpperProtocol endpoints.serverFromString(reactor, 'tcp:8000').listen(factory) reactor.run()
Convert to endpoints API and use custom protocol class
Convert to endpoints API and use custom protocol class
Python
mit
cataliniacob/ep2012-tutorial-twisted
from twisted.internet import protocol, reactor factory = protocol.ServerFactory() factory.protocol = protocol.Protocol reactor.listenTCP(8000, factory) reactor.run() Convert to endpoints API and use custom protocol class
from twisted.internet import endpoints, protocol, reactor class UpperProtocol(protocol.Protocol): pass factory = protocol.ServerFactory() factory.protocol = UpperProtocol endpoints.serverFromString(reactor, 'tcp:8000').listen(factory) reactor.run()
<commit_before>from twisted.internet import protocol, reactor factory = protocol.ServerFactory() factory.protocol = protocol.Protocol reactor.listenTCP(8000, factory) reactor.run() <commit_msg>Convert to endpoints API and use custom protocol class<commit_after>
from twisted.internet import endpoints, protocol, reactor class UpperProtocol(protocol.Protocol): pass factory = protocol.ServerFactory() factory.protocol = UpperProtocol endpoints.serverFromString(reactor, 'tcp:8000').listen(factory) reactor.run()
from twisted.internet import protocol, reactor factory = protocol.ServerFactory() factory.protocol = protocol.Protocol reactor.listenTCP(8000, factory) reactor.run() Convert to endpoints API and use custom protocol classfrom twisted.internet import endpoints, protocol, reactor class UpperProtocol(protocol.Protocol):...
<commit_before>from twisted.internet import protocol, reactor factory = protocol.ServerFactory() factory.protocol = protocol.Protocol reactor.listenTCP(8000, factory) reactor.run() <commit_msg>Convert to endpoints API and use custom protocol class<commit_after>from twisted.internet import endpoints, protocol, reactor...
6b179dc4fb95f4db380b9156381b6210adeef2e5
conftest.py
conftest.py
# Copyright 2016 Google Inc. 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 required by applicable law or ...
# Copyright 2016 Google Inc. 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 required by applicable law or ...
Set the Project in code
Set the Project in code
Python
apache-2.0
GoogleCloudPlatform/getting-started-python,GoogleCloudPlatform/getting-started-python,GoogleCloudPlatform/getting-started-python
# Copyright 2016 Google Inc. 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 required by applicable law or ...
# Copyright 2016 Google Inc. 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 required by applicable law or ...
<commit_before># Copyright 2016 Google Inc. 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 required by app...
# Copyright 2016 Google Inc. 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 required by applicable law or ...
# Copyright 2016 Google Inc. 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 required by applicable law or ...
<commit_before># Copyright 2016 Google Inc. 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 required by app...
378f3bf0bb2e05260b7cbeeb4a4637d7d3a7ca7c
workflows/consumers.py
workflows/consumers.py
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs['workflow_pk'][0] message.channel_session['workflow_pk']...
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs[b'workflow_pk'][0].decode('utf-8') message.channel_sessi...
Fix query string problem of comparing byte strings and unicode strings in py3
Fix query string problem of comparing byte strings and unicode strings in py3
Python
mit
xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs['workflow_pk'][0] message.channel_session['workflow_pk']...
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs[b'workflow_pk'][0].decode('utf-8') message.channel_sessi...
<commit_before>from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs['workflow_pk'][0] message.channel_session...
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs[b'workflow_pk'][0].decode('utf-8') message.channel_sessi...
from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs['workflow_pk'][0] message.channel_session['workflow_pk']...
<commit_before>from urllib.parse import parse_qs from channels import Group from channels.sessions import channel_session @channel_session def ws_add(message): message.reply_channel.send({"accept": True}) qs = parse_qs(message['query_string']) workflow_pk = qs['workflow_pk'][0] message.channel_session...
9a7c80744bc1e57fe0ec5fc7cf149dada2d05121
neuroimaging/utils/tests/data/__init__.py
neuroimaging/utils/tests/data/__init__.py
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
Extend error message regarding missing test data.
Extend error message regarding missing test data.
Python
bsd-3-clause
alexis-roche/register,bthirion/nipy,bthirion/nipy,nipy/nipy-labs,alexis-roche/nipy,bthirion/nipy,alexis-roche/register,alexis-roche/nireg,bthirion/nipy,arokem/nipy,alexis-roche/register,alexis-roche/niseg,alexis-roche/nipy,arokem/nipy,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/nipy,alexis-roche/nireg,arokem/nipy,aro...
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
<commit_before>"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroi...
""" Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.org/svn/ni/data/trunk/fmri .nipy/tests/data """...
"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroimaging.scipy.or...
<commit_before>"""Information used for locating nipy test data. Nipy uses a set of test data that is installed separately. The test data should be located in the directory ``~/.nipy/tests/data``. Install the data in your home directory from the data repository:: $ mkdir -p .nipy/tests/data $ svn co http://neuroi...
446400fa4e40ca7e47e48dd00209d80858094552
buffer/managers/profiles.py
buffer/managers/profiles.py
import json from buffer.models.profile import PATHS, Profile class Profiles(list): def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) self.api = api def all(self): response = self.api.get(url=PATHS['GET_PROFILES'], parser=json.loads) for raw_profile in re...
import json from buffer.models.profile import PATHS, Profile class Profiles(list): ''' Manage profiles + all -> get all the profiles from buffer + filter -> wrapper for list filtering ''' def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) sel...
Write documentation for profile mananger
Write documentation for profile mananger
Python
mit
bufferapp/buffer-python,vtemian/buffpy
import json from buffer.models.profile import PATHS, Profile class Profiles(list): def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) self.api = api def all(self): response = self.api.get(url=PATHS['GET_PROFILES'], parser=json.loads) for raw_profile in re...
import json from buffer.models.profile import PATHS, Profile class Profiles(list): ''' Manage profiles + all -> get all the profiles from buffer + filter -> wrapper for list filtering ''' def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) sel...
<commit_before>import json from buffer.models.profile import PATHS, Profile class Profiles(list): def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) self.api = api def all(self): response = self.api.get(url=PATHS['GET_PROFILES'], parser=json.loads) for ra...
import json from buffer.models.profile import PATHS, Profile class Profiles(list): ''' Manage profiles + all -> get all the profiles from buffer + filter -> wrapper for list filtering ''' def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) sel...
import json from buffer.models.profile import PATHS, Profile class Profiles(list): def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) self.api = api def all(self): response = self.api.get(url=PATHS['GET_PROFILES'], parser=json.loads) for raw_profile in re...
<commit_before>import json from buffer.models.profile import PATHS, Profile class Profiles(list): def __init__(self, api, *args, **kwargs): super(Profiles, self).__init__(*args, **kwargs) self.api = api def all(self): response = self.api.get(url=PATHS['GET_PROFILES'], parser=json.loads) for ra...
1c7bbeabe1c1f3eea053c8fd8b6649ba388c1d2e
waliki/slides/views.py
waliki/slides/views.py
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page def slides(request, slug): page = get_object_or_404(Page, slug=slug) outpath = tempfile.mkdtemp() try: infi...
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page from waliki.acl import permission_required @permission_required('view_page') def slides(request, slug): page = get_object_o...
Add permission check to slide urls.
Add permission check to slide urls.
Python
bsd-3-clause
RobertoMaurizzi/waliki,aszepieniec/waliki,aszepieniec/waliki,OlegGirko/waliki,RobertoMaurizzi/waliki,rizotas/waliki,beres/waliki,beres/waliki,santiavenda2/waliki,mgaitan/waliki,fpytloun/waliki,OlegGirko/waliki,OlegGirko/waliki,santiavenda2/waliki,santiavenda2/waliki,beres/waliki,mgaitan/waliki,RobertoMaurizzi/waliki,as...
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page def slides(request, slug): page = get_object_or_404(Page, slug=slug) outpath = tempfile.mkdtemp() try: infi...
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page from waliki.acl import permission_required @permission_required('view_page') def slides(request, slug): page = get_object_o...
<commit_before>from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page def slides(request, slug): page = get_object_or_404(Page, slug=slug) outpath = tempfile.mkdtemp() tr...
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page from waliki.acl import permission_required @permission_required('view_page') def slides(request, slug): page = get_object_o...
from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page def slides(request, slug): page = get_object_or_404(Page, slug=slug) outpath = tempfile.mkdtemp() try: infi...
<commit_before>from os import path import shutil import tempfile from sh import hovercraft from django.shortcuts import get_object_or_404 from django.http import HttpResponse from waliki.models import Page def slides(request, slug): page = get_object_or_404(Page, slug=slug) outpath = tempfile.mkdtemp() tr...
ceac9c401f80a279e7291e7ba2a9e06757d4dd1d
buildtools/wrapper/cmake.py
buildtools/wrapper/cmake.py
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
Fix mismatched args in CMake.build
Fix mismatched args in CMake.build
Python
mit
N3X15/python-build-tools,N3X15/python-build-tools,N3X15/python-build-tools
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
<commit_before>import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[ke...
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[key] = val ...
<commit_before>import os from buildtools.bt_logging import log from buildtools.os_utils import cmd, ENV class CMake(object): def __init__(self): self.flags = {} self.generator = None def setFlag(self, key, val): log.info('CMake: {} = {}'.format(key, val)) self.flags[ke...
f04c451de83b66b733dc28eb13bc16ade2675b3a
changes/api/stream.py
changes/api/stream.py
from __future__ import absolute_import import gevent from gevent.queue import Queue from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = Queue() self.channels = channels self.active = True ...
from __future__ import absolute_import import gevent from collections import deque from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = deque() self.channels = channels self.active = True ...
Revert "Switch to gevent queues for EventStream"
Revert "Switch to gevent queues for EventStream" This reverts commit 4c102945fe46bb463e6a641324d26384c77fbae8.
Python
apache-2.0
bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes
from __future__ import absolute_import import gevent from gevent.queue import Queue from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = Queue() self.channels = channels self.active = True ...
from __future__ import absolute_import import gevent from collections import deque from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = deque() self.channels = channels self.active = True ...
<commit_before>from __future__ import absolute_import import gevent from gevent.queue import Queue from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = Queue() self.channels = channels self....
from __future__ import absolute_import import gevent from collections import deque from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = deque() self.channels = channels self.active = True ...
from __future__ import absolute_import import gevent from gevent.queue import Queue from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = Queue() self.channels = channels self.active = True ...
<commit_before>from __future__ import absolute_import import gevent from gevent.queue import Queue from changes.config import pubsub class EventStream(object): def __init__(self, channels, pubsub=pubsub): self.pubsub = pubsub self.pending = Queue() self.channels = channels self....
24a90b0aa38a21c9b116d4b8b9c4878678fda9cc
suddendev/tasks.py
suddendev/tasks.py
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=5, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=15, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
Bump up max game time to 15.
[NG] Bump up max game time to 15.
Python
mit
SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=5, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=15, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
<commit_before>from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=5, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: curre...
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=15, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=5, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: current_wave += 1 ...
<commit_before>from . import celery, celery_socketio from .game_instance import GameInstance import time @celery.task(time_limit=5, max_retries=3) def play_game(game_id, player_names, scripts, player_ids, colors, namespace, room, wave=1): cleared = True current_wave = wave - 1 while cleared: curre...
1b0428aaf77f1c6eadfb6b20611a2e2e6f30fbce
poller.py
poller.py
#!/usr/bin/env python import urllib2 import ssl def poll(sites, timeout): for site in sites: print 'polling ' + site try: response = urllib2.urlopen(site, timeout=timeout) response.read() except urllib2.URLError as e: print e.code except ssl.SSL...
#!/usr/bin/env python import urllib2 import ssl try: import gntp.notifier as notify except ImportError: notify = None def poll(sites, timeout, ok, error): for site in sites: ok('polling ' + site) try: response = urllib2.urlopen(site, timeout=timeout) response.read(...
Add initial support for growl
Add initial support for growl If growl lib isn't available, prints to console instead.
Python
mit
koodilehto/website-poller,koodilehto/website-poller
#!/usr/bin/env python import urllib2 import ssl def poll(sites, timeout): for site in sites: print 'polling ' + site try: response = urllib2.urlopen(site, timeout=timeout) response.read() except urllib2.URLError as e: print e.code except ssl.SSL...
#!/usr/bin/env python import urllib2 import ssl try: import gntp.notifier as notify except ImportError: notify = None def poll(sites, timeout, ok, error): for site in sites: ok('polling ' + site) try: response = urllib2.urlopen(site, timeout=timeout) response.read(...
<commit_before>#!/usr/bin/env python import urllib2 import ssl def poll(sites, timeout): for site in sites: print 'polling ' + site try: response = urllib2.urlopen(site, timeout=timeout) response.read() except urllib2.URLError as e: print e.code ...
#!/usr/bin/env python import urllib2 import ssl try: import gntp.notifier as notify except ImportError: notify = None def poll(sites, timeout, ok, error): for site in sites: ok('polling ' + site) try: response = urllib2.urlopen(site, timeout=timeout) response.read(...
#!/usr/bin/env python import urllib2 import ssl def poll(sites, timeout): for site in sites: print 'polling ' + site try: response = urllib2.urlopen(site, timeout=timeout) response.read() except urllib2.URLError as e: print e.code except ssl.SSL...
<commit_before>#!/usr/bin/env python import urllib2 import ssl def poll(sites, timeout): for site in sites: print 'polling ' + site try: response = urllib2.urlopen(site, timeout=timeout) response.read() except urllib2.URLError as e: print e.code ...