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
74010276715e3570ad6f66144f2c2e31aff8948a
tests/test_local.py
tests/test_local.py
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
Add test to make sure memoize works for methods
Add test to make sure memoize works for methods
Python
mit
suzaku/cachelper
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
<commit_before>import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 ...
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 assert fu...
<commit_before>import cachelper class TestMemorize: def test_should_cache_return_value(self, mocker): func = mocker.Mock() func.side_effect = lambda i: i * 2 func.__name__ = 'double' cached = cachelper.memoize()(func) assert cached(2) == 4 assert cached(2) == 4 ...
5f3491b583599148dba71dac5279f4ef6eb77c10
tests/test_suite.py
tests/test_suite.py
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test def suite()...
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test from . impor...
Update test suite generator to import tests in source_test.
Update test suite generator to import tests in source_test.
Python
mit
jkawamoto/roadie-gcp,jkawamoto/roadie-gcp
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test def suite()...
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test from . impor...
<commit_before>#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_te...
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test from . impor...
#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_test def suite()...
<commit_before>#! /usr/bin/env python # # test_suite.py # # Copyright (c) 2015-2016 Junpei Kawamoto # # This software is released under the MIT License. # # http://opensource.org/licenses/mit-license.php # """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import downloader_te...
b987306d23c6d7ee42fad25e4c1451c865320a49
examples/example.py
examples/example.py
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.append('..') from pgi.repository import Gtk if __name__ == '__main__': b...
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.insert(0, '..') from pgi.repository import Gtk if __name__ == '__main__': ...
Prepend path so we always get the local copy.
Prepend path so we always get the local copy.
Python
lgpl-2.1
lazka/pgi,lazka/pgi
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.append('..') from pgi.repository import Gtk if __name__ == '__main__': b...
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.insert(0, '..') from pgi.repository import Gtk if __name__ == '__main__': ...
<commit_before># Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.append('..') from pgi.repository import Gtk if __name__ == '_...
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.insert(0, '..') from pgi.repository import Gtk if __name__ == '__main__': ...
# Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.append('..') from pgi.repository import Gtk if __name__ == '__main__': b...
<commit_before># Copyright 2012 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import sys sys.path.append('..') from pgi.repository import Gtk if __name__ == '_...
a10ffe519c50bd248bd9bfcde648f66e15fb6fd3
node_bridge.py
node_bridge.py
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += ':/us...
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += os.pa...
Add support for `n` Node.js version manager
Add support for `n` Node.js version manager
Python
mit
hudochenkov/sublime-postcss-sorting,hudochenkov/sublime-postcss-sorting
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += ':/us...
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += os.pa...
<commit_before>import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['...
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += os.pa...
import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['PATH'] += ':/us...
<commit_before>import os import platform import subprocess IS_OSX = platform.system() == 'Darwin' IS_WINDOWS = platform.system() == 'Windows' def node_bridge(data, bin, args=[]): env = None startupinfo = None if IS_OSX: # GUI apps in OS X doesn't contain .bashrc/.zshrc set paths env = os.environ.copy() env['...
6edd80b47eb5e84ac8d7a711b687c404616c4c6f
kqueen_ui/server.py
kqueen_ui/server.py
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
Allow override of backend urls from env variables
Allow override of backend urls from env variables
Python
mit
atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
<commit_before>from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE...
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE', 'config/dev....
<commit_before>from flask import Flask from flask import redirect from flask import url_for from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging import os logger = logging.getLogger(__name__) cache = SimpleCache() config_file = os.environ.get('KQUEEN_CONFIG_FILE...
744d4a34fa3f5f514f3f1e525822360dd97e28e2
astroquery/ogle/tests/test_ogle_remote.py
astroquery/ogle/tests/test_ogle_remote.py
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
Fix column name in tests
Fix column name in tests
Python
bsd-3-clause
imbasimba/astroquery,imbasimba/astroquery
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
<commit_before> import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest...
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest.mark.remote_da...
<commit_before> import pytest import astropy.units as u from astropy.coordinates import SkyCoord from .. import Ogle @pytest.mark.remote_data def test_ogle_single(): co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic') response = Ogle.query_region(coord=co) assert len(response) == 1 @pytest...
315aedbfff9e345b1e4a4ffab999741bb9a802da
oopconcepts.py
oopconcepts.py
class Person: def __init__(self, name): self.name = name def say_hello(self): print("Hello, ", self.name) p1 = Person("Allan") p1.say_hello() p2 = Person("John") p2.say_hello()
class Classroom: def __init__(self): self._people = [] def add_person(self, person): self._people.append(person) def remove_person(self, person): self._people.remove(person) def greet(self): for person in self._people: person.say_hello() class Person: ...
Create classroom and some encapsulation
Create classroom and some encapsulation
Python
mit
cunctat0r/pythonstudy
class Person: def __init__(self, name): self.name = name def say_hello(self): print("Hello, ", self.name) p1 = Person("Allan") p1.say_hello() p2 = Person("John") p2.say_hello() Create classroom and some encapsulation
class Classroom: def __init__(self): self._people = [] def add_person(self, person): self._people.append(person) def remove_person(self, person): self._people.remove(person) def greet(self): for person in self._people: person.say_hello() class Person: ...
<commit_before>class Person: def __init__(self, name): self.name = name def say_hello(self): print("Hello, ", self.name) p1 = Person("Allan") p1.say_hello() p2 = Person("John") p2.say_hello() <commit_msg>Create classroom and some encapsulation<commit_after>
class Classroom: def __init__(self): self._people = [] def add_person(self, person): self._people.append(person) def remove_person(self, person): self._people.remove(person) def greet(self): for person in self._people: person.say_hello() class Person: ...
class Person: def __init__(self, name): self.name = name def say_hello(self): print("Hello, ", self.name) p1 = Person("Allan") p1.say_hello() p2 = Person("John") p2.say_hello() Create classroom and some encapsulationclass Classroom: def __init__(self): self._people = [] def...
<commit_before>class Person: def __init__(self, name): self.name = name def say_hello(self): print("Hello, ", self.name) p1 = Person("Allan") p1.say_hello() p2 = Person("John") p2.say_hello() <commit_msg>Create classroom and some encapsulation<commit_after>class Classroom: def __init__(...
d4bc8cebf1d629ff1f3de18ca17af4b1fdde4926
thefuck/system/win32.py
thefuck/system/win32.py
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
Replace raise with return for Ctrl+C in Windows
Replace raise with return for Ctrl+C in Windows - Replace the raise `const.CtrlC` with `return const.CtrlC` the match the unix implementation and prevent a stacktrace when cancelling a command on Windows
Python
mit
scorphus/thefuck,mlk/thefuck,Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,nvbn/thefuck,scorphus/thefuck,SimenB/thefuck,nvbn/thefuck,Clpsplug/thefuck
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
<commit_before>import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # ...
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # second call ret...
<commit_before>import sys import msvcrt import win_unicode_console from .. import const def init_output(): import colorama win_unicode_console.enable() colorama.init() def get_key(): ch = msvcrt.getch() if ch in (b'\x00', b'\xe0'): # arrow or function key prefix? ch = msvcrt.getch() # ...
3e37a216f532382e9a730a41677859f64b521574
thunder/utils/common.py
thunder/utils/common.py
def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output path does not already exist The ValueError message will suggest calling with overwrite=True; this f...
def notsupported(mode): raise NotImplementedError("Operation not supported for mode '%s'" % mode) def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output ...
Add method for raising not supported error
Add method for raising not supported error
Python
apache-2.0
thunder-project/thunder,jwittenbach/thunder,j-friedrich/thunder,j-friedrich/thunder
def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output path does not already exist The ValueError message will suggest calling with overwrite=True; this f...
def notsupported(mode): raise NotImplementedError("Operation not supported for mode '%s'" % mode) def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output ...
<commit_before>def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output path does not already exist The ValueError message will suggest calling with overwri...
def notsupported(mode): raise NotImplementedError("Operation not supported for mode '%s'" % mode) def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output ...
def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output path does not already exist The ValueError message will suggest calling with overwrite=True; this f...
<commit_before>def check_spark(): SparkContext = False try: from pyspark import SparkContext finally: return SparkContext def check_path(path, credentials=None): """ Check that specified output path does not already exist The ValueError message will suggest calling with overwri...
e30d433153d9ad2f1d931f7f48b0ebbe9ba6763c
modules/new_module/new_module.py
modules/new_module/new_module.py
from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" global_urls = [ ('/new-global-url', handlers.NewURLHandler) # Global URLs go on mycourse.appspot.com/url ] course_urls = [ ('/new-course-url', handlers.NewUR...
import logging from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" def on_module_enabled(): logging.info('Module new_module.py was just enabled') def on_module_disabled(): logging.info('Module new_module.py was j...
Add enable and dissable hooks
Add enable and dissable hooks
Python
apache-2.0
UniMOOC/gcb-new-module,UniMOOC/gcb-new-module,UniMOOC/gcb-new-module,UniMOOC/gcb-new-module
from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" global_urls = [ ('/new-global-url', handlers.NewURLHandler) # Global URLs go on mycourse.appspot.com/url ] course_urls = [ ('/new-course-url', handlers.NewUR...
import logging from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" def on_module_enabled(): logging.info('Module new_module.py was just enabled') def on_module_disabled(): logging.info('Module new_module.py was j...
<commit_before> from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" global_urls = [ ('/new-global-url', handlers.NewURLHandler) # Global URLs go on mycourse.appspot.com/url ] course_urls = [ ('/new-course-url',...
import logging from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" def on_module_enabled(): logging.info('Module new_module.py was just enabled') def on_module_disabled(): logging.info('Module new_module.py was j...
from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" global_urls = [ ('/new-global-url', handlers.NewURLHandler) # Global URLs go on mycourse.appspot.com/url ] course_urls = [ ('/new-course-url', handlers.NewUR...
<commit_before> from models import custom_modules from . import handlers def register_module(): """Registers this module in the registry.""" global_urls = [ ('/new-global-url', handlers.NewURLHandler) # Global URLs go on mycourse.appspot.com/url ] course_urls = [ ('/new-course-url',...
314f387e3a227181926531f5230f21887d35038b
uploader/uploader.py
uploader/uploader.py
import os import glob import logging import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def has_valid_dropbox_t...
import os import glob import logging import subprocess import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def h...
Add util to test network connection
Add util to test network connection
Python
mit
projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse
import os import glob import logging import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def has_valid_dropbox_t...
import os import glob import logging import subprocess import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def h...
<commit_before>import os import glob import logging import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def has_...
import os import glob import logging import subprocess import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def h...
import os import glob import logging import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def has_valid_dropbox_t...
<commit_before>import os import glob import logging import dropbox from dropbox.client import DropboxClient, ErrorResponse import settings from settings import DROPBOX_TOKEN_FILE def load_dropbox_token(): with open(DROPBOX_TOKEN_FILE, 'r') as f: dropbox_token = f.read() return dropbox_token def has_...
59fd414849907f73d5904f46139127ae3638c9bd
ankieta/petition_custom/forms.py
ankieta/petition_custom/forms.py
from petition.forms import SignatureForm from crispy_forms.layout import Layout, Submit from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from django.utils.translation import ugettext as _ import swapper Signature = swapper.load_model("petition", "Signature") class CustomSig...
from petition.forms import SignatureForm from crispy_forms.layout import Layout from crispy_forms.bootstrap import PrependedText import swapper Signature = swapper.load_model("petition", "Signature") class CustomSignatureForm(SignatureForm): def __init__(self, *args, **kwargs): super(CustomSignatureForm,...
Fix typo in CustomSignatureForm fields definition
Fix typo in CustomSignatureForm fields definition
Python
bsd-3-clause
ad-m/petycja-faoo,ad-m/petycja-faoo,ad-m/petycja-faoo
from petition.forms import SignatureForm from crispy_forms.layout import Layout, Submit from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from django.utils.translation import ugettext as _ import swapper Signature = swapper.load_model("petition", "Signature") class CustomSig...
from petition.forms import SignatureForm from crispy_forms.layout import Layout from crispy_forms.bootstrap import PrependedText import swapper Signature = swapper.load_model("petition", "Signature") class CustomSignatureForm(SignatureForm): def __init__(self, *args, **kwargs): super(CustomSignatureForm,...
<commit_before>from petition.forms import SignatureForm from crispy_forms.layout import Layout, Submit from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from django.utils.translation import ugettext as _ import swapper Signature = swapper.load_model("petition", "Signature") ...
from petition.forms import SignatureForm from crispy_forms.layout import Layout from crispy_forms.bootstrap import PrependedText import swapper Signature = swapper.load_model("petition", "Signature") class CustomSignatureForm(SignatureForm): def __init__(self, *args, **kwargs): super(CustomSignatureForm,...
from petition.forms import SignatureForm from crispy_forms.layout import Layout, Submit from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from django.utils.translation import ugettext as _ import swapper Signature = swapper.load_model("petition", "Signature") class CustomSig...
<commit_before>from petition.forms import SignatureForm from crispy_forms.layout import Layout, Submit from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from django.utils.translation import ugettext as _ import swapper Signature = swapper.load_model("petition", "Signature") ...
80a9019cb24ea581a9cef0344caaf4cec4a95a94
testproject/chtest/consumers.py
testproject/chtest/consumers.py
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send(message.content)
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send({ "text": message['text'], })
Fix echo endpoint in testproject
Fix echo endpoint in testproject
Python
bsd-3-clause
Krukov/channels,Coread/channels,django/channels,andrewgodwin/channels,linuxlewis/channels,Krukov/channels,raphael-boucher/channels,andrewgodwin/django-channels,raiderrobert/channels,Coread/channels
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send(message.content) Fix echo endpoint in testproject
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send({ "text": message['text'], })
<commit_before>from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send(message.content) <commit_msg>Fix echo endpoint in testproje...
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send({ "text": message['text'], })
from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send(message.content) Fix echo endpoint in testprojectfrom channels.sessions im...
<commit_before>from channels.sessions import enforce_ordering #@enforce_ordering(slight=True) def ws_connect(message): pass #@enforce_ordering(slight=True) def ws_message(message): "Echoes messages back to the client" message.reply_channel.send(message.content) <commit_msg>Fix echo endpoint in testproje...
824c8cd3eb563de60ddf13fac1f7ca1341aa01f1
astral/api/tests/test_streams.py
astral/api/tests/test_streams.py
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
Update tests for new redirect-after-create stream.
Update tests for new redirect-after-create stream.
Python
mit
peplin/astral
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
<commit_before>from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): ...
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): [StreamFactory(...
<commit_before>from tornado.httpclient import HTTPRequest from nose.tools import eq_, ok_ import json import faker from astral.api.tests import BaseTest from astral.models import Stream from astral.models.tests.factories import StreamFactory class StreamsHandlerTest(BaseTest): def test_get_streams(self): ...
e6a251da6d6902d2633afab7c4e9ecaf366f964c
tools/build_modref_templates.py
tools/build_modref_templates.py
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
Remove gorlin_glue from generated docs for now. It produces about 100 warnings during doc build.
Remove gorlin_glue from generated docs for now. It produces about 100 warnings during doc build. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@926 ead46cd0-7350-4e37-8683-fc4c6f79bf00
Python
bsd-3-clause
glatard/nipype,grlee77/nipype,glatard/nipype,arokem/nipype,wanderine/nipype,FCP-INDI/nipype,arokem/nipype,mick-d/nipype_source,sgiavasis/nipype,FredLoney/nipype,carolFrohlich/nipype,mick-d/nipype,gerddie/nipype,Leoniela/nipype,wanderine/nipype,gerddie/nipype,dgellis90/nipype,Leoniela/nipype,FCP-INDI/nipype,FredLoney/ni...
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
<commit_before>#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') s...
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') sys.path.insert(...
<commit_before>#!/usr/bin/env python """Script to auto-generate our API docs. """ # stdlib imports import os import sys # local imports from apigen import ApiDocWriter #***************************************************************************** if __name__ == '__main__': nipypepath = os.path.abspath('..') s...
97cfc12433b32997bf7345512326d160ea4e48fa
systemd/install.py
systemd/install.py
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) pr...
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) # ...
Remove creation of service files.
Remove creation of service files.
Python
mit
vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) pr...
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) # ...
<commit_before>""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Con...
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) # ...
""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Config(CONFIG) pr...
<commit_before>""" Install Wabbit Systemd service. """ from glob import glob from shutil import copy from os import chdir from os.path import dirname, realpath from subprocess import call import sys import coils # Load configuration file. CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.conf' config = coils.Con...
d2032ed28e97b8a23c4eec95fcadfaa80e944f01
conman/pages/tests/test_views.py
conman/pages/tests/test_views.py
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
Remove unused test class attr
Remove unused test class attr
Python
bsd-2-clause
meshy/django-conman,Ian-Foote/django-conman,meshy/django-conman
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
<commit_before>from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create...
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create_request() ...
<commit_before>from django.test import TestCase from conman.tests.utils import RequestTestCase from . import factories from .. import views class TestPageDetail(RequestTestCase): def test_get_object(self): """PageDetail displays the page instance passed in the node kwarg.""" request = self.create...
42d3a71acc586bc92800e7ac21b7838f05cb595c
osbrain/__init__.py
osbrain/__init__.py
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.2' from .core...
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.3-devel' from...
Set osBrain version to 0.2.3-devel
Set osBrain version to 0.2.3-devel
Python
apache-2.0
opensistemas-hub/osbrain
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.2' from .core...
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.3-devel' from...
<commit_before>import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2...
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.3-devel' from...
import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2.2' from .core...
<commit_before>import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZER = 'pickle' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'multiplex' Pyro4.config.REQUIRE_EXPOSE = False # TODO: should we set COMMTIMEOUT as well? Pyro4.config.DETAILED_TRACEBACK = True __version__ = '0.2...
b83958697004d7203fed20a3024efe3c653f9535
tiddlywebconfig.py
tiddlywebconfig.py
config = { 'wikitext.default_renderer': 'twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'twikified' } }
config = { 'wikitext.default_renderer': 'tiddlywebplugins.twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'tiddlywebplugins.twikified' } }
Use fully qualified module names
Use fully qualified module names This is so that the tiddlyweb instance used in the tests can find the renderer
Python
bsd-3-clause
TiddlySpace/tiddlywebplugins.twikified
config = { 'wikitext.default_renderer': 'twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'twikified' } } Use fully qualified module names This is so that the tiddlyweb instance used in the tests can find the renderer
config = { 'wikitext.default_renderer': 'tiddlywebplugins.twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'tiddlywebplugins.twikified' } }
<commit_before>config = { 'wikitext.default_renderer': 'twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'twikified' } } <commit_msg>Use fully qualified module names This is so that the tiddlyweb instance used in the tests can find the renderer<commit_after>
config = { 'wikitext.default_renderer': 'tiddlywebplugins.twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'tiddlywebplugins.twikified' } }
config = { 'wikitext.default_renderer': 'twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'twikified' } } Use fully qualified module names This is so that the tiddlyweb instance used in the tests can find the rendererconfig = { 'wikitext.default_renderer': 'tiddlywebplugins.twikif...
<commit_before>config = { 'wikitext.default_renderer': 'twikified', 'wikitext.type_render_map': { 'text/x-tiddlywiki': 'twikified' } } <commit_msg>Use fully qualified module names This is so that the tiddlyweb instance used in the tests can find the renderer<commit_after>config = { 'wikitext.de...
fab0855e7076d7cfcfe2d65a820ed5099084f543
privileges/views.py
privileges/views.py
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
Add mixin to put the username in context
Add mixin to put the username in context
Python
bsd-3-clause
eldarion/privileges,jacobwegner/privileges,jacobwegner/privileges
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
<commit_before>import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_f...
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_func): @wrap...
<commit_before>import urlparse from functools import wraps from django.conf import settings from django.utils.decorators import available_attrs, method_decorator from django.contrib.auth import REDIRECT_FIELD_NAME from privileges.forms import GrantForm from privileges.models import Grant def owner_required(view_f...
e30c65f6dc35c53e5f0caaace36ba3fa0a928efa
testing/settings.py
testing/settings.py
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-...
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } MIDDLEWARE_CLASSES = () TIME_ZONE = 'America/Chic...
Fix warning on running tests adding missing setting.
Fix warning on running tests adding missing setting.
Python
bsd-3-clause
CloudNcodeInc/djmail,CloudNcodeInc/djmail,CloudNcodeInc/djmail
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-...
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } MIDDLEWARE_CLASSES = () TIME_ZONE = 'America/Chic...
<commit_before># -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } TIME_ZONE = 'America/Chicago' LANGU...
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } MIDDLEWARE_CLASSES = () TIME_ZONE = 'America/Chic...
# -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-...
<commit_before># -*- encoding: utf-8 -*- import os, sys sys.path.insert(0, '..') PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test' } } TIME_ZONE = 'America/Chicago' LANGU...
3db3d9b827f3acaef2223fec75bc41a531a4f1ee
takeyourmeds/reminders/checks.py
takeyourmeds/reminders/checks.py
import os from django.core import checks from django.contrib.staticfiles.finders import find from .apps import RemindersConfig @checks.register() def voice_reminders_exist(app_configs, **kwargs): for x, _ in RemindersConfig.voice_reminders: if not find(os.path.join('mp3', x)): yield checks.Er...
Check that the MP3 files actually exist.
Check that the MP3 files actually exist. Signed-off-by: Chris Lamb <[email protected]>
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
Check that the MP3 files actually exist. Signed-off-by: Chris Lamb <[email protected]>
import os from django.core import checks from django.contrib.staticfiles.finders import find from .apps import RemindersConfig @checks.register() def voice_reminders_exist(app_configs, **kwargs): for x, _ in RemindersConfig.voice_reminders: if not find(os.path.join('mp3', x)): yield checks.Er...
<commit_before><commit_msg>Check that the MP3 files actually exist. Signed-off-by: Chris Lamb <[email protected]><commit_after>
import os from django.core import checks from django.contrib.staticfiles.finders import find from .apps import RemindersConfig @checks.register() def voice_reminders_exist(app_configs, **kwargs): for x, _ in RemindersConfig.voice_reminders: if not find(os.path.join('mp3', x)): yield checks.Er...
Check that the MP3 files actually exist. Signed-off-by: Chris Lamb <[email protected]>import os from django.core import checks from django.contrib.staticfiles.finders import find from .apps import RemindersConfig @checks.register() def voice_reminders_exist(app_configs, **kwa...
<commit_before><commit_msg>Check that the MP3 files actually exist. Signed-off-by: Chris Lamb <[email protected]><commit_after>import os from django.core import checks from django.contrib.staticfiles.finders import find from .apps import RemindersConfig @checks.register() def...
f3eb94bbe10160a4337c5eb9241166f60b9724a8
pyvideo/settings.py
pyvideo/settings.py
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIRS = ( os.path.join(ROOT...
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru', 'pyvideoru.herokuapp.com'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIR...
Add heroku host to ALLOWED_HOSTS
Add heroku host to ALLOWED_HOSTS
Python
bsd-3-clause
WarmongeR1/pyvideo.ru,WarmongeR1/pyvideo.ru,WarmongeR1/pyvideo.ru,coagulant/pyvideo.ru,coagulant/pyvideo.ru,coagulant/pyvideo.ru
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIRS = ( os.path.join(ROOT...
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru', 'pyvideoru.herokuapp.com'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIR...
<commit_before># Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIRS = ( os...
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru', 'pyvideoru.herokuapp.com'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIR...
# Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIRS = ( os.path.join(ROOT...
<commit_before># Django settings for pyvideo project. from richard.settings import * ALLOWED_HOSTS = ['pyvideo.ru'] TIME_ZONE = 'Europe/Moscow' LANGUAGE_CODE = 'ru' SECRET_KEY = 'this_is_not_production_so_who_cares' ROOT_URLCONF = 'pyvideo.urls' WSGI_APPLICATION = 'pyvideo.wsgi.application' TEMPLATE_DIRS = ( os...
722e975e8819b59d9d2f53627a5d37550ea09c55
tests/test_clean.py
tests/test_clean.py
from mergepurge import clean import pandas as pd import numpy as np t_data = pd.Series({'name': 'Timothy Testerosa III'}) t_parsed = (np.nan, 'Timothy', 'Testerosa', 'Timothy Testerosa') # FIXME - load a csv file with a name column and the 4 correctly parsed name parts as 4 other cols # Then, iterate over the names ...
from mergepurge import clean import pandas as pd import numpy as np complete = pd.read_csv('complete_parsed.tsv', sep='\t', encoding='utf-8', dtype={'aa_streetnum': str, 'aa_zip': str, 'zipcode': str}) COMP_LOC_COLS = ['address', 'city', 'state', 'zipcode'] COMP_CONTACT_...
Add tests for most functions in clean module
Add tests for most functions in clean module Iterate over the complete and parsed test data and confirm we can still produce the excepted output for most functions in clean.py.
Python
mit
mikecunha/mergepurge
from mergepurge import clean import pandas as pd import numpy as np t_data = pd.Series({'name': 'Timothy Testerosa III'}) t_parsed = (np.nan, 'Timothy', 'Testerosa', 'Timothy Testerosa') # FIXME - load a csv file with a name column and the 4 correctly parsed name parts as 4 other cols # Then, iterate over the names ...
from mergepurge import clean import pandas as pd import numpy as np complete = pd.read_csv('complete_parsed.tsv', sep='\t', encoding='utf-8', dtype={'aa_streetnum': str, 'aa_zip': str, 'zipcode': str}) COMP_LOC_COLS = ['address', 'city', 'state', 'zipcode'] COMP_CONTACT_...
<commit_before>from mergepurge import clean import pandas as pd import numpy as np t_data = pd.Series({'name': 'Timothy Testerosa III'}) t_parsed = (np.nan, 'Timothy', 'Testerosa', 'Timothy Testerosa') # FIXME - load a csv file with a name column and the 4 correctly parsed name parts as 4 other cols # Then, iterate o...
from mergepurge import clean import pandas as pd import numpy as np complete = pd.read_csv('complete_parsed.tsv', sep='\t', encoding='utf-8', dtype={'aa_streetnum': str, 'aa_zip': str, 'zipcode': str}) COMP_LOC_COLS = ['address', 'city', 'state', 'zipcode'] COMP_CONTACT_...
from mergepurge import clean import pandas as pd import numpy as np t_data = pd.Series({'name': 'Timothy Testerosa III'}) t_parsed = (np.nan, 'Timothy', 'Testerosa', 'Timothy Testerosa') # FIXME - load a csv file with a name column and the 4 correctly parsed name parts as 4 other cols # Then, iterate over the names ...
<commit_before>from mergepurge import clean import pandas as pd import numpy as np t_data = pd.Series({'name': 'Timothy Testerosa III'}) t_parsed = (np.nan, 'Timothy', 'Testerosa', 'Timothy Testerosa') # FIXME - load a csv file with a name column and the 4 correctly parsed name parts as 4 other cols # Then, iterate o...
1aed26838d1616b3686b74697e01bb4da5e47b79
sqlobject/tests/test_identity.py
sqlobject/tests/test_identity.py
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
Fix `flake8` E275 missing whitespace after keyword
Style: Fix `flake8` E275 missing whitespace after keyword
Python
lgpl-2.1
sqlobject/sqlobject,sqlobject/sqlobject
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
<commit_before>from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table ...
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
<commit_before>from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table ...
59b59e75f87942dfd54f8542b04e4185a871cf4b
utils/messaging.py
utils/messaging.py
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
Add util function for accepting input by PM
Add util function for accepting input by PM
Python
mit
randomic/antinub-gregbot
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
<commit_before>""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_s...
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_size: re...
<commit_before>""" Contains utilities regarding messages """ def paginate(string, pref='```\n', aff='```', max_length=2000, sep='\n'): 'Chop a string into even chunks of max_length around the given separator' max_size = max_length - len(pref) - len(aff) str_length = len(string) if str_length <= max_s...
0e75e31b9e038ca6e0b399ff3b684afcd271c090
prefixlist/prefixlist.py
prefixlist/prefixlist.py
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = [] def __iter__(self): for member in self.members: yield member def a...
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = {} def __iter__(self): for asn in self.members: yield self.members[asn] ...
Store data set as dict instead of list
Store data set as dict instead of list
Python
bsd-2-clause
emjemj/pre-fixlist
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = [] def __iter__(self): for member in self.members: yield member def a...
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = {} def __iter__(self): for asn in self.members: yield self.members[asn] ...
<commit_before>class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = [] def __iter__(self): for member in self.members: yield me...
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = {} def __iter__(self): for asn in self.members: yield self.members[asn] ...
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = [] def __iter__(self): for member in self.members: yield member def a...
<commit_before>class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = [] def __iter__(self): for member in self.members: yield me...
0947643977b989ca924bcf932a5153472e362108
plata/utils.py
plata/utils.py
from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_field): try: setattr(obj, cache...
from django.core.serializers.json import DjangoJSONEncoder from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_...
Use DjangoJSONEncoder, it knows how to handle dates and decimals
JSONFieldDescriptor: Use DjangoJSONEncoder, it knows how to handle dates and decimals
Python
bsd-3-clause
armicron/plata,stefanklug/plata,allink/plata,armicron/plata,armicron/plata
from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_field): try: setattr(obj, cache...
from django.core.serializers.json import DjangoJSONEncoder from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_...
<commit_before>from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_field): try: set...
from django.core.serializers.json import DjangoJSONEncoder from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_...
from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_field): try: setattr(obj, cache...
<commit_before>from django.utils import simplejson class JSONFieldDescriptor(object): def __init__(self, field): self.field = field def __get__(self, obj, objtype): cache_field = '_cached_jsonfield_%s' % self.field if not hasattr(obj, cache_field): try: set...
d81c64f68aa47581aa8207f858aec8af1bb805d9
wallace/sources.py
wallace/sources.py
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self, w...
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self): ...
Fix bug that arose through grammar tweaking
Fix bug that arose through grammar tweaking
Python
mit
jcpeterson/Dallinger,berkeley-cocosci/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger,suchow/Wallace,suchow/Wallace,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,suchow/Wallace,berkeley-cocosci/Wallace,Dallinger/Dallinger,berkeley-cocosci/Wal...
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self, w...
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self): ...
<commit_before>from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_info...
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self): ...
from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_information(self, w...
<commit_before>from .models import Node, Info from sqlalchemy import ForeignKey, Column, String import random class Source(Node): __tablename__ = "source" __mapper_args__ = {"polymorphic_identity": "generic_source"} uuid = Column(String(32), ForeignKey("node.uuid"), primary_key=True) def create_info...
8f0502d618a35b2b63ee280caee91c508482dbf4
services/api/app.py
services/api/app.py
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: nodes = redis.smembers(...
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: # nodes = redis.smember...
Update fetching nodes to manually get all keys with iid prefix instead of using an index
Update fetching nodes to manually get all keys with iid prefix instead of using an index
Python
mit
pnw/Chch-openhack,pnw/Chch-openhack
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: nodes = redis.smembers(...
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: # nodes = redis.smember...
<commit_before>import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: nodes = ...
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: # nodes = redis.smember...
import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: nodes = redis.smembers(...
<commit_before>import json import itertools import logging __author__ = 'patrickwalsh' from flask import Flask from redis import Redis app = Flask(__name__) logger = logging.getLogger(__name__) redis = Redis() IID_INDEX = 'index' @app.route('/intersections') def get_all_intersections(): try: nodes = ...
10ef76977e724cff86361db07a7fcb844d8376e7
scrapi/util.py
scrapi/util.py
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
Add scrapi create rename iterable if we want to move to chunks in the fuure
Add scrapi create rename iterable if we want to move to chunks in the fuure
Python
apache-2.0
mehanig/scrapi,fabianvf/scrapi,fabianvf/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,felliott/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,mehanig/scrapi,erinspace/scrapi,ostwald/scrapi
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
<commit_before>from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for l...
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for linting """ ...
<commit_before>from datetime import datetime import pytz def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat().decode('utf-8') def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard version of unicode that can be pickalable - necessary for l...
bab5ed65fb9530b9cd3e9bfabc1e2632da31d106
knowledge_repo/app/auth_providers/ldap.py
knowledge_repo/app/auth_providers/ldap.py
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Server, Connection, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Connection, Server, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
Fix a lint indent issue
Fix a lint indent issue
Python
apache-2.0
airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Server, Connection, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Connection, Server, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
<commit_before>from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Server, Connection, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeA...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Connection, Server, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Server, Connection, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeAuthProvider): ...
<commit_before>from ..auth_provider import KnowledgeAuthProvider from ..models import User from flask import ( redirect, render_template, request, url_for, ) from ldap3 import Server, Connection, ALL from knowledge_repo.constants import AUTH_LOGIN_FORM, LDAP, USERNAME class LdapAuthProvider(KnowledgeA...
c47f93796bfc4f9026e5451121de7a419ed88e96
lobster/cmssw/data/merge_cfg.py
lobster/cmssw/data/merge_cfg.py
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.parseArguments() process = cms.Process("PickEvent") process.source = cms.Source ("...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.register('loginterval', 1000, mytype=VarParsing.varType.int) options.parseArguments...
Trim down merge verbosity to avoid overly large log files.
Trim down merge verbosity to avoid overly large log files.
Python
mit
matz-e/lobster,matz-e/lobster,matz-e/lobster
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.parseArguments() process = cms.Process("PickEvent") process.source = cms.Source ("...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.register('loginterval', 1000, mytype=VarParsing.varType.int) options.parseArguments...
<commit_before>import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.parseArguments() process = cms.Process("PickEvent") process.source ...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.register('loginterval', 1000, mytype=VarParsing.varType.int) options.parseArguments...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.parseArguments() process = cms.Process("PickEvent") process.source = cms.Source ("...
<commit_before>import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('output', mytype=VarParsing.varType.string) options.parseArguments() process = cms.Process("PickEvent") process.source ...
a63d37f6817098c75d0863ab5513e9de8369f6ff
apps/curia_vista/management/commands/update_all.py
apps/curia_vista/management/commands/update_all.py
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_affairs import Command as ImportCommandAffairs from apps.curia...
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_committee import Command as ImportCommandCommittee from apps....
Remove reference to no longer existing command update_affairs
Remove reference to no longer existing command update_affairs
Python
agpl-3.0
rettichschnidi/politkarma,rettichschnidi/politkarma,rettichschnidi/politkarma,rettichschnidi/politkarma
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_affairs import Command as ImportCommandAffairs from apps.curia...
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_committee import Command as ImportCommandCommittee from apps....
<commit_before>from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_affairs import Command as ImportCommandAffairs ...
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_committee import Command as ImportCommandCommittee from apps....
from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_affairs import Command as ImportCommandAffairs from apps.curia...
<commit_before>from timeit import default_timer as timer from django.core.management.base import BaseCommand from apps.curia_vista.management.commands.update_affair_summaries import Command as ImportCommandAffairSummaries from apps.curia_vista.management.commands.update_affairs import Command as ImportCommandAffairs ...
4bd16d369cc9c89973247afee6ee5ab28eeee014
tests/providers/test_dnsimple.py
tests/providers/test_dnsimple.py
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
Add OTP to test filters
Add OTP to test filters
Python
mit
AnalogJ/lexicon,tnwhitwell/lexicon,tnwhitwell/lexicon,AnalogJ/lexicon
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
<commit_before># Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the int...
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
# Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # p...
<commit_before># Test for one implementation of the interface from lexicon.providers.dnsimple import Provider from integration_tests import IntegrationTests from unittest import TestCase # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the int...
b1a28600e6b97ab020c69ff410aebd962b4e1e93
testproject/tablib_test/tests.py
testproject/tablib_test/tests.py
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
Test that specifying fields and exclude in ModelDataset.Meta works.
Test that specifying fields and exclude in ModelDataset.Meta works.
Python
mit
joshourisman/django-tablib,ebrelsford/django-tablib,joshourisman/django-tablib,ebrelsford/django-tablib
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset)...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset)...
95d3401b29d2cba2d282256cdd2513c67e3df858
ipython_notebook_config.py
ipython_notebook_config.py
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
Set the content security policy
Set the content security policy
Python
bsd-3-clause
jupyter/nature-demo,jupyter/nature-demo,jupyter/nature-demo
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
<commit_before># Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles...
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
# Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SSL c.Notebo...
<commit_before># Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles...
fe41ecce4b840374a561bbef0bbf4ad465e66180
tests/ml/test_fasttext_helpers.py
tests/ml/test_fasttext_helpers.py
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fasttext_train_calls(...
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' test_path = 'ft_simple_test.txt' probability_path = 'ft_simple_prob.txt' def test_train_call_pa...
Add unittest for testing file path
Add unittest for testing file path
Python
mit
JungeAlexander/cocoscore
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fasttext_train_calls(...
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' test_path = 'ft_simple_test.txt' probability_path = 'ft_simple_prob.txt' def test_train_call_pa...
<commit_before>import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fastte...
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' test_path = 'ft_simple_test.txt' probability_path = 'ft_simple_prob.txt' def test_train_call_pa...
import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fasttext_train_calls(...
<commit_before>import pandas import unittest import cocoscore.ml.fasttext_helpers as fth class CVTest(unittest.TestCase): train_path = 'ft_simple_test.txt' ft_path = '/home/lib/fastText' model_path = 'testmodel' def test_train_call_parameters(self): train_call, compress_call = fth.get_fastte...
fd1590ad0ceab26e281c58aefeac1365a3f332d5
tests/test_lib_tokens_webauthn.py
tests/test_lib_tokens_webauthn.py
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ from .base import MyTestCase from privacyidea.lib.tokens.webauthntoken import WebAuthnTokenClass, WEBAUTHNACTION from privacyidea.lib.token import init_token from privacyidea.lib.policy import set_...
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ import unittest from copy import copy from privacyidea.lib.tokens import webauthn from privacyidea.lib.tokens.webauthn import COSEALGORITHM from .base import MyTestCase from privacyidea.lib.tokens...
Add testing for the WebAuthn implementation
Add testing for the WebAuthn implementation
Python
agpl-3.0
privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ from .base import MyTestCase from privacyidea.lib.tokens.webauthntoken import WebAuthnTokenClass, WEBAUTHNACTION from privacyidea.lib.token import init_token from privacyidea.lib.policy import set_...
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ import unittest from copy import copy from privacyidea.lib.tokens import webauthn from privacyidea.lib.tokens.webauthn import COSEALGORITHM from .base import MyTestCase from privacyidea.lib.tokens...
<commit_before>""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ from .base import MyTestCase from privacyidea.lib.tokens.webauthntoken import WebAuthnTokenClass, WEBAUTHNACTION from privacyidea.lib.token import init_token from privacyidea.lib.pol...
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ import unittest from copy import copy from privacyidea.lib.tokens import webauthn from privacyidea.lib.tokens.webauthn import COSEALGORITHM from .base import MyTestCase from privacyidea.lib.tokens...
""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ from .base import MyTestCase from privacyidea.lib.tokens.webauthntoken import WebAuthnTokenClass, WEBAUTHNACTION from privacyidea.lib.token import init_token from privacyidea.lib.policy import set_...
<commit_before>""" This test file tests the lib.tokens.webauthntoken, along with lib.tokens.webauthn. This depends on lib.tokenclass """ from .base import MyTestCase from privacyidea.lib.tokens.webauthntoken import WebAuthnTokenClass, WEBAUTHNACTION from privacyidea.lib.token import init_token from privacyidea.lib.pol...
7c16ad1dbe97a2f06968f508e605485e86751a5b
tests/utils.py
tests/utils.py
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.k...
Remove debug flag from tests
Remove debug flag from tests
Python
mit
funkybob/knights-templater,funkybob/knights-templater
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.k...
<commit_before>import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: ...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.k...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl...
<commit_before>import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: ...
7e7b0ce7c31c50bdcfaf80d950206e58401c5a8c
workshopvenues/venues/models.py
workshopvenues/venues/models.py
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
Add country field to Address model
Add country field to Address model
Python
bsd-3-clause
andreagrandi/workshopvenues
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
<commit_before>from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharFiel...
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharField(max_length=10...
<commit_before>from django.db import models class Facility(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.name class Address(models.Model): street = models.CharField(max_length=200) town = models.CharField(max_length=30) postcode = models.CharFiel...
e20d0725e47ea6fe671f7889c02f212962963083
pyinstaller/hook-googleapiclient.model.py
pyinstaller/hook-googleapiclient.model.py
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Fix pyinstall-build by including discovery cache documents.
Fix pyinstall-build by including discovery cache documents. Produced an error related to serviceusage API. Change-Id: Idf6b83912c3e71e7081ef1b6b0a2836a18723542 GitOrigin-RevId: e38c69cfc7269177570a8aa8c23f8eaa2d32ddd2
Python
apache-2.0
GoogleCloudPlatform/gcpdiag,GoogleCloudPlatform/gcpdiag,GoogleCloudPlatform/gcpdiag
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
43282f7f1c9094691f64543b284ee06813e4d6a2
singleuser/user-fixes.py
singleuser/user-fixes.py
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'r') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cust...
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cus...
Use 'rb' mode for reading files
Use 'rb' mode for reading files To stick to pwb conventions
Python
mit
yuvipanda/paws,yuvipanda/paws
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'r') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cust...
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cus...
<commit_before>import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'r') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt ...
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cus...
import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'r') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt config del cust...
<commit_before>import os custom_path = os.path.expanduser('~/user-fixes.py') if os.path.exists(custom_path): with open(custom_path, 'r') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to help people catch misspelt ...
97b2e90f4f9a4f3c08f4556856aec1d31b44749a
flocker/control/_clusterstate.py
flocker/control/_clusterstate.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
Address review comment: Link to issue.
Address review comment: Link to issue.
Python
apache-2.0
achanda/flocker,runcom/flocker,Azulinho/flocker,mbrukman/flocker,jml/flocker,moypray/flocker,AndyHuu/flocker,agonzalezro/flocker,Azulinho/flocker,moypray/flocker,w4ngyi/flocker,moypray/flocker,jml/flocker,LaynePeng/flocker,hackday-profilers/flocker,adamtheturtle/flocker,LaynePeng/flocker,1d4Nf6/flocker,w4ngyi/flocker,a...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial updates with ...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Combine and retrieve current cluster state. """ from twisted.application.service import Service from ._model import Deployment, Node class ClusterStateService(Service): """ Store known current cluster state, and combine partial...
9044f377d3018e7589f16126e65bcea173576918
joby/tests/test_data_science_jobs.py
joby/tests/test_data_science_jobs.py
""" Test the data_science_jobs spider. """ from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames def test_parse_overview_table(): expected_fields = { '...
""" Test the data_science_jobs spider. """ from joby.spiders.data_science_jobs import DataScienceJobsSpider from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames d...
Add new Parser class argument (spider) and fix test parameters.
Add new Parser class argument (spider) and fix test parameters.
Python
mit
cyberbikepunk/job-spiders
""" Test the data_science_jobs spider. """ from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames def test_parse_overview_table(): expected_fields = { '...
""" Test the data_science_jobs spider. """ from joby.spiders.data_science_jobs import DataScienceJobsSpider from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames d...
<commit_before>""" Test the data_science_jobs spider. """ from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames def test_parse_overview_table(): expected_field...
""" Test the data_science_jobs spider. """ from joby.spiders.data_science_jobs import DataScienceJobsSpider from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames d...
""" Test the data_science_jobs spider. """ from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames def test_parse_overview_table(): expected_fields = { '...
<commit_before>""" Test the data_science_jobs spider. """ from joby.items import JobLoader, Job from joby.tests.utilities import make_offline_parser from datetime import date TEST_URL = 'http://www.data-science-jobs.com/detail/20' # noinspection PyShadowingNames def test_parse_overview_table(): expected_field...
e874e98c95c26381056aacc731b24193800b8670
ansible-tests/validations-api.py
ansible-tests/validations-api.py
#!/usr/bin/env python from flask import Flask, abort, jsonify import validations app = Flask(__name__) @app.route('/') def index(): return jsonify({"msg": "Hello World!"}) @app.route('/v1/validations/') def list_validations(): result = [{ 'uuid': validation['uuid'], 'ref': '/v1/validatio...
#!/usr/bin/env python from flask import Flask, abort, json, make_response import validations app = Flask(__name__) def json_response(code, result): # NOTE: flask.jsonify doesn't handle lists, so we need to do it manually: response = make_response(json.dumps(result), code) response.headers['Content-Typ...
Use a custom response renderer
Use a custom response renderer This lets us specify the error codes and make sure we always return json.
Python
apache-2.0
coolsvap/clapper,coolsvap/clapper,rthallisey/clapper,rthallisey/clapper,coolsvap/clapper
#!/usr/bin/env python from flask import Flask, abort, jsonify import validations app = Flask(__name__) @app.route('/') def index(): return jsonify({"msg": "Hello World!"}) @app.route('/v1/validations/') def list_validations(): result = [{ 'uuid': validation['uuid'], 'ref': '/v1/validatio...
#!/usr/bin/env python from flask import Flask, abort, json, make_response import validations app = Flask(__name__) def json_response(code, result): # NOTE: flask.jsonify doesn't handle lists, so we need to do it manually: response = make_response(json.dumps(result), code) response.headers['Content-Typ...
<commit_before>#!/usr/bin/env python from flask import Flask, abort, jsonify import validations app = Flask(__name__) @app.route('/') def index(): return jsonify({"msg": "Hello World!"}) @app.route('/v1/validations/') def list_validations(): result = [{ 'uuid': validation['uuid'], 'ref':...
#!/usr/bin/env python from flask import Flask, abort, json, make_response import validations app = Flask(__name__) def json_response(code, result): # NOTE: flask.jsonify doesn't handle lists, so we need to do it manually: response = make_response(json.dumps(result), code) response.headers['Content-Typ...
#!/usr/bin/env python from flask import Flask, abort, jsonify import validations app = Flask(__name__) @app.route('/') def index(): return jsonify({"msg": "Hello World!"}) @app.route('/v1/validations/') def list_validations(): result = [{ 'uuid': validation['uuid'], 'ref': '/v1/validatio...
<commit_before>#!/usr/bin/env python from flask import Flask, abort, jsonify import validations app = Flask(__name__) @app.route('/') def index(): return jsonify({"msg": "Hello World!"}) @app.route('/v1/validations/') def list_validations(): result = [{ 'uuid': validation['uuid'], 'ref':...
9ec8d2b01e0f8aefc9d4c2c82c22af6f8c48a75b
usingnamespace/api/interfaces.py
usingnamespace/api/interfaces.py
from zope.interface import Interface class ISerializer(Interface): """Marker Interface"""
from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" class IDigestMethod(Interface): """Marker Interface"""
Add new marker interface for a digest method
Add new marker interface for a digest method
Python
isc
usingnamespace/usingnamespace
from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" Add new marker interface for a digest method
from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" class IDigestMethod(Interface): """Marker Interface"""
<commit_before>from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" <commit_msg>Add new marker interface for a digest method<commit_after>
from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" class IDigestMethod(Interface): """Marker Interface"""
from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" Add new marker interface for a digest methodfrom zope.interface import Interface class ISerializer(Interface): """Marker Interface""" class IDigestMethod(Interface): """Marker Interface"""
<commit_before>from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" <commit_msg>Add new marker interface for a digest method<commit_after>from zope.interface import Interface class ISerializer(Interface): """Marker Interface""" class IDigestMethod(Interface): """Marke...
a748d217ec3f09e8b477203f1a3a0ebf060714d5
scality_sproxyd_client/__init__.py
scality_sproxyd_client/__init__.py
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9']
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9,<2.0']
Set upper bound to urllib3
Set upper bound to urllib3
Python
apache-2.0
scality/scality-sproxyd-client
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9'] Set upper bound to urllib3
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9,<2.0']
<commit_before>__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9'] <commit_msg>Set upper bound to urllib3<commit_after>
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9,<2.0']
__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9'] Set upper bound to urllib3__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9,<2.0']
<commit_before>__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9'] <commit_msg>Set upper bound to urllib3<commit_after>__requires__ = ['eventlet>=0.9.15', 'urllib3>=1.9,<2.0']
343c5eb47510f784588e425619c43df916a40fe7
delivery/services/external_program_service.py
delivery/services/external_program_service.py
import subprocess import atexit from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
import subprocess from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
Remove at exit handler it doesnt work...
Remove at exit handler it doesnt work...
Python
mit
arteria-project/arteria-delivery
import subprocess import atexit from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
import subprocess from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
<commit_before> import subprocess import atexit from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.P...
import subprocess from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
import subprocess import atexit from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ...
<commit_before> import subprocess import atexit from delivery.models.execution import ExecutionResult, Execution class ExternalProgramService(): @staticmethod def run(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.P...
bc7de1382f5df8253a3680fbba435a6485148815
main.py
main.py
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
Make remove commands match docstring
Make remove commands match docstring
Python
mit
veryhappythings/discord-gather
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
<commit_before>import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: ...
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: config = js...
<commit_before>import logging import json from gather.gatherbot import GatherBot from gather import commands if __name__ == '__main__': logging.basicConfig( level=logging.INFO, format="%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s", ) with open('config.json') as f: ...
64d2a7a7e4cd0375efaddc8ef20889755d691b7e
simplenote-backup.py
simplenote-backup.py
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
Set the modification dates of the created files to that of the notes
Set the modification dates of the created files to that of the notes
Python
mit
hiroshi/simplenote-backup
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
<commit_before>import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % back...
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % backup_dir if not o...
<commit_before>import os, sys, json from simperium.core import Api as SimperiumApi appname = 'chalk-bump-f49' # Simplenote token = os.environ['TOKEN'] backup_dir = sys.argv[1] if len(sys.argv) > 1 else (os.path.join(os.environ['HOME'], "Dropbox/SimplenoteBackups")) print "Starting backup your simplenote to: %s" % back...
476754a381fe38a0bbe6e3c7892c59a6cfa47db1
openedx/features/job_board/models.py
openedx/features/job_board/models.py
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
Add support for countries with accented characters
Add support for countries with accented characters
Python
agpl-3.0
philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
<commit_before>from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a j...
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a job being po...
<commit_before>from django.db import models from django_countries.fields import CountryField from model_utils.models import TimeStampedModel from .constants import JOB_COMPENSATION_CHOICES, JOB_HOURS_CHOICES, JOB_TYPE_CHOICES class Job(TimeStampedModel): """ This model contains all the fields related to a j...
d0c82bdd2d7e801c5bebc8ef0d87ed436e29fb82
wiblog/formatting.py
wiblog/formatting.py
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): return mark_safe(CommonMark.commonmark(value)) # Get a summary of a post def summarize(fullBody): firstNewline = fullBody.find("\n") if firstNewline >...
Remove full CommonMark syntax for a simplified version
Remove full CommonMark syntax for a simplified version
Python
agpl-3.0
lo-windigo/fragdev,lo-windigo/fragdev
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): return mark_safe(CommonMark.commonmark(value)) # Get a summary of a post def summarize(fullBody): firstNewline = fullBody.find("\n") if firstNewline >...
<commit_before>from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # G...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): return mark_safe(CommonMark.commonmark(value)) # Get a summary of a post def summarize(fullBody): firstNewline = fullBody.find("\n") if firstNewline >...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
<commit_before>from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # G...
fb5583562f9c48c82d51b24f901a5111542eb1a9
website/project/spam/__init__.py
website/project/spam/__init__.py
from celery.utils.log import get_task_logger from framework.celery_tasks import app as celery_app from website import settings from website.util import akismet logger = get_task_logger(__name__) @celery_app.task def _check_for_spam(node_id, content, author_info, request_headers, flag=True): client = akismet.Ak...
Add logging to spam tasks
Add logging to spam tasks [#OSF-6977] [skip ci]
Python
apache-2.0
cslzchen/osf.io,binoculars/osf.io,alexschiller/osf.io,Johnetordoff/osf.io,rdhyee/osf.io,chennan47/osf.io,pattisdr/osf.io,caneruguz/osf.io,erinspace/osf.io,mfraezz/osf.io,erinspace/osf.io,crcresearch/osf.io,Johnetordoff/osf.io,sloria/osf.io,aaxelb/osf.io,cwisecarver/osf.io,caneruguz/osf.io,monikagrabowska/osf.io,hmoco/o...
Add logging to spam tasks [#OSF-6977] [skip ci]
from celery.utils.log import get_task_logger from framework.celery_tasks import app as celery_app from website import settings from website.util import akismet logger = get_task_logger(__name__) @celery_app.task def _check_for_spam(node_id, content, author_info, request_headers, flag=True): client = akismet.Ak...
<commit_before><commit_msg>Add logging to spam tasks [#OSF-6977] [skip ci]<commit_after>
from celery.utils.log import get_task_logger from framework.celery_tasks import app as celery_app from website import settings from website.util import akismet logger = get_task_logger(__name__) @celery_app.task def _check_for_spam(node_id, content, author_info, request_headers, flag=True): client = akismet.Ak...
Add logging to spam tasks [#OSF-6977] [skip ci]from celery.utils.log import get_task_logger from framework.celery_tasks import app as celery_app from website import settings from website.util import akismet logger = get_task_logger(__name__) @celery_app.task def _check_for_spam(node_id, content, author_info, requ...
<commit_before><commit_msg>Add logging to spam tasks [#OSF-6977] [skip ci]<commit_after>from celery.utils.log import get_task_logger from framework.celery_tasks import app as celery_app from website import settings from website.util import akismet logger = get_task_logger(__name__) @celery_app.task def _check_for...
74e5a3e347fee91993604dd8407c17fe05da346b
zerrenda/settings/development.py
zerrenda/settings/development.py
from zerrenda.settings import * DEBUG = True INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' )
from zerrenda.settings import * DEBUG = True
Remove duplicate INSTALLED_APPS from settings
Remove duplicate INSTALLED_APPS from settings
Python
mit
ajoyoommen/zerrenda,ajoyoommen/zerrenda
from zerrenda.settings import * DEBUG = True INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' ) Remove duplicate INSTALLED_APPS from settings
from zerrenda.settings import * DEBUG = True
<commit_before>from zerrenda.settings import * DEBUG = True INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' ) <commit_msg>Remove duplicate INSTALLED_APPS from set...
from zerrenda.settings import * DEBUG = True
from zerrenda.settings import * DEBUG = True INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' ) Remove duplicate INSTALLED_APPS from settingsfrom zerrenda.settings...
<commit_before>from zerrenda.settings import * DEBUG = True INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' ) <commit_msg>Remove duplicate INSTALLED_APPS from set...
2fcf9131bca907d79d96c622d015ba99de038e8d
zou/app/stores/publisher_store.py
zou/app/stores/publisher_store.py
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): data = ...
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): if sock...
Make publisher store emit the right event name
Make publisher store emit the right event name
Python
agpl-3.0
cgwire/zou
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): data = ...
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): if sock...
<commit_before>from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, dat...
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): if sock...
from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, data): data = ...
<commit_before>from flask_socketio import SocketIO from flask import current_app from zou.app import config host = config.KEY_VALUE_STORE["host"] port = config.KEY_VALUE_STORE["port"] redis_db = config.KV_EVENTS_DB_INDEX redis_url = "redis://%s:%s/%s" % (host, port, redis_db) socketio = None def publish(event, dat...
24e6d37108bc01b69d2f64014862bebd1e980fee
olim/olim/apps/storage/models.py
olim/olim/apps/storage/models.py
from django.db import models # Create your models here.
from django.db import models class Filesys(models.Model): name = models.CharField(max_length=100) url = models.URLField() date = models.DateField(auto_now=True) #uploader = models.ForeignKey('account.User') thumbnail = models.FileField(upload_to='thumb') parent_dir = models.CharField(max_lengt...
Make a model 'Filesys'. (not yet, because of uploader field)
Make a model 'Filesys'. (not yet, because of uploader field)
Python
apache-2.0
sparcs-kaist/olim,sparcs-kaist/olim
from django.db import models # Create your models here. Make a model 'Filesys'. (not yet, because of uploader field)
from django.db import models class Filesys(models.Model): name = models.CharField(max_length=100) url = models.URLField() date = models.DateField(auto_now=True) #uploader = models.ForeignKey('account.User') thumbnail = models.FileField(upload_to='thumb') parent_dir = models.CharField(max_lengt...
<commit_before>from django.db import models # Create your models here. <commit_msg>Make a model 'Filesys'. (not yet, because of uploader field)<commit_after>
from django.db import models class Filesys(models.Model): name = models.CharField(max_length=100) url = models.URLField() date = models.DateField(auto_now=True) #uploader = models.ForeignKey('account.User') thumbnail = models.FileField(upload_to='thumb') parent_dir = models.CharField(max_lengt...
from django.db import models # Create your models here. Make a model 'Filesys'. (not yet, because of uploader field)from django.db import models class Filesys(models.Model): name = models.CharField(max_length=100) url = models.URLField() date = models.DateField(auto_now=True) #uploader = models.Foreig...
<commit_before>from django.db import models # Create your models here. <commit_msg>Make a model 'Filesys'. (not yet, because of uploader field)<commit_after>from django.db import models class Filesys(models.Model): name = models.CharField(max_length=100) url = models.URLField() date = models.DateField(aut...
bd3b6d1703598d362c29417e0d64e2050a79fbee
willtherebespace/web/__main__.py
willtherebespace/web/__main__.py
from willtherebespace.web import app app.run(port=5000, debug=True)
from willtherebespace.web import app app.run(host='0.0.0.0', port=8000, debug=True)
Change default web server port
Change default web server port
Python
mit
thomasleese/will-there-be-space,tomleese/will-there-be-space,tomleese/will-there-be-space,tomleese/will-there-be-space,tomleese/will-there-be-space,thomasleese/will-there-be-space,tomleese/will-there-be-space,thomasleese/will-there-be-space,thomasleese/will-there-be-space,thomasleese/will-there-be-space
from willtherebespace.web import app app.run(port=5000, debug=True) Change default web server port
from willtherebespace.web import app app.run(host='0.0.0.0', port=8000, debug=True)
<commit_before>from willtherebespace.web import app app.run(port=5000, debug=True) <commit_msg>Change default web server port<commit_after>
from willtherebespace.web import app app.run(host='0.0.0.0', port=8000, debug=True)
from willtherebespace.web import app app.run(port=5000, debug=True) Change default web server portfrom willtherebespace.web import app app.run(host='0.0.0.0', port=8000, debug=True)
<commit_before>from willtherebespace.web import app app.run(port=5000, debug=True) <commit_msg>Change default web server port<commit_after>from willtherebespace.web import app app.run(host='0.0.0.0', port=8000, debug=True)
d10656527cf3a0fe3d47827d8d2f27fda4cb2a5c
zseqfile/__init__.py
zseqfile/__init__.py
""" zseqfile - transparently handle compressed files """ # Expose the public API. from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, )
""" zseqfile - transparently handle compressed files """ from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) open_gz = open_gzip open_bz2 = open_bzip2 open_xz = open_lzma
Define a few convenience aliases in the public API
Define a few convenience aliases in the public API
Python
bsd-3-clause
wbolster/zseqfile
""" zseqfile - transparently handle compressed files """ # Expose the public API. from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) Define a few convenience aliases in the public API
""" zseqfile - transparently handle compressed files """ from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) open_gz = open_gzip open_bz2 = open_bzip2 open_xz = open_lzma
<commit_before>""" zseqfile - transparently handle compressed files """ # Expose the public API. from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) <commit_msg>Define a few convenience aliases in the public API<commit_after>
""" zseqfile - transparently handle compressed files """ from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) open_gz = open_gzip open_bz2 = open_bzip2 open_xz = open_lzma
""" zseqfile - transparently handle compressed files """ # Expose the public API. from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) Define a few convenience aliases in the public API""" zseqfile - transparently handle compressed files """ from .zseqfile import ( # noqa ope...
<commit_before>""" zseqfile - transparently handle compressed files """ # Expose the public API. from .zseqfile import ( # noqa open, open_gzip, open_bzip2, open_lzma, ) <commit_msg>Define a few convenience aliases in the public API<commit_after>""" zseqfile - transparently handle compressed files """...
ff153f141eb67f124520c51de69e161436ff0666
GreyMatter/business_news_reader.py
GreyMatter/business_news_reader.py
import json import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get...
import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get(url) dat...
Fix errors due to quotes and parenthesis in reading
Fix errors due to quotes and parenthesis in reading
Python
mit
anurag-ks/Melissa-Core,Melissa-AI/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core
import json import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get...
import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get(url) dat...
<commit_before>import json import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r ...
import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get(url) dat...
import json import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r = requests.get...
<commit_before>import json import requests from bs4 import BeautifulSoup from SenseCells.tts import tts # NDTV News fixed_url = 'http://profit.ndtv.com/news/latest/' news_headlines_list = [] news_details_list = [] for i in range(1, 2): changing_slug = '/page-' + str(i) url = fixed_url + changing_slug r ...
5bfc42e4f7c948b1cb895ebec523426be6908829
dockorm/tests/utils.py
dockorm/tests/utils.py
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(container, line): """...
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os import getenv from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(con...
Enable running tests from inside a container
TST: Enable running tests from inside a container by setting an env var for the path to the test volume data on the host
Python
apache-2.0
quantopian/DockORM
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(container, line): """...
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os import getenv from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(con...
<commit_before>""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(container,...
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os import getenv from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(con...
""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(container, line): """...
<commit_before>""" Utilities for dockorm tests. """ # encoding: utf-8 from __future__ import unicode_literals from os.path import ( dirname, join, ) from six import iteritems from ..container import ( Container, scalar, ) TEST_ORG = 'dockorm_testing' TEST_TAG = 'test' def assert_in_logs(container,...
ceaae1b0f9191ad84cfd80cbf78e5d14c11f7ea6
src/async_signals/dispatcher.py
src/async_signals/dispatcher.py
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
Fix typo in self.propagate_signal call
Fix typo in self.propagate_signal call
Python
bsd-3-clause
nyergler/async-signals
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
<commit_before>from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, send...
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, sender, **named): ...
<commit_before>from celery import task from django.dispatch.dispatcher import ( _make_id, Signal, ) class AsyncSignal(Signal): def __init__(self, providing_args=None, queue=None): super(AsyncSignal, self).__init__(providing_args=providing_args) self.queue = queue def send(self, send...
ed3906b295669b1c0e38d88a7eb19cdde324042b
pybuild/packages/libzmq.py
pybuild/packages/libzmq.py
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
Fix issue for building PyZMQ
Fix issue for building PyZMQ
Python
apache-2.0
qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core,qpython-android/QPython3-core
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
<commit_before>from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-s-issue-in-auto...
<commit_before>from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class LibZMQ(Package): source = GitSource('https://github.com/AIPYX/zeromq3-x.git', alias='libzmq', branch='qpyc/3.2.5') patches = [ LocalPatch('0001-Fix-libtoolize-...
960520b723d1af1999c647ebea8969b4837aa458
blister/xmp.py
blister/xmp.py
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class VanillaXMP: pass
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from collections.abc import MutableMapping class VanillaXMP (MutableMapping): def __delitem__ (self, key): pass def __getite...
Write minimal code to implement MutableMapping
Write minimal code to implement MutableMapping
Python
bsd-3-clause
daaang/blister
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class VanillaXMP: pass Write minimal code to implement MutableMapping
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from collections.abc import MutableMapping class VanillaXMP (MutableMapping): def __delitem__ (self, key): pass def __getite...
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class VanillaXMP: pass <commit_msg>Write minimal code to implement MutableMapping<commit_after>
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from collections.abc import MutableMapping class VanillaXMP (MutableMapping): def __delitem__ (self, key): pass def __getite...
# Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class VanillaXMP: pass Write minimal code to implement MutableMapping# Copyright (c) 2016 The Regents of the University of Michigan. # Al...
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class VanillaXMP: pass <commit_msg>Write minimal code to implement MutableMapping<commit_after># Copyright (c) 2016 The Re...
ba23f58f7359b943d8d8ae7f05e15419c6918c6f
test/blacklist.py
test/blacklist.py
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
Add an entry for test case BasicExprCommandsTestCase.test_evaluate_expression_python, due to crashes while running the entire test suite with clang-126.
Add an entry for test case BasicExprCommandsTestCase.test_evaluate_expression_python, due to crashes while running the entire test suite with clang-126. To reproduce: CC=clang ./dotest.py -v -w 2> ~/Developer/Log/lldbtest.log To skip this test case: CC=clang ./dotest.py -b blacklist.py -v -w 2> ~/Developer/Log/lldb...
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
<commit_before>""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test...
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test class crashed'...
<commit_before>""" 'blacklist' is a Python dictionary, it stores the mapping of a string describing either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a string) it is blacklisted. Following is an example which states that test class IntegerTypesExprTestCase should be skipped because 'This test...
8c26cb08dd08b7e34352e51b06ecb9129ac201a1
stagecraft/libs/schemas/schemas.py
stagecraft/libs/schemas/schemas.py
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) return json_f
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: schema = json_loads(f.read()) return schema
Make the schema return object a bit more obvious and descriptive
Make the schema return object a bit more obvious and descriptive
Python
mit
alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) return json_f ...
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: schema = json_loads(f.read()) return schema
<commit_before>from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) ...
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: schema = json_loads(f.read()) return schema
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) return json_f ...
<commit_before>from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) ...
316d86bdf56ed376fc039aa0f6dbd7fb05548bac
scheduler/schedule.py
scheduler/schedule.py
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
Fix stats job job's name
Fix stats job job's name
Python
apache-2.0
ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
<commit_before>import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(conne...
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(connection=conn) sc...
<commit_before>import sys import time import logging logging.basicConfig(level=logging.DEBUG) from redis import StrictRedis from rq import Queue from apscheduler.schedulers.blocking import BlockingScheduler sys.path.append('/d1lod') from d1lod import jobs conn = StrictRedis(host='redis', port='6379') q = Queue(conne...
5d3349675a0b4049efedf52958b6843e9ef31c1b
src/models/image.py
src/models/image.py
import datetime from utils.utils import limit_file_name class Image(): _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = l...
import datetime from utils.utils import limit_file_name class Image: _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = lim...
Remove redundant parenthesis in Image
Remove redundant parenthesis in Image
Python
apache-2.0
CharlieCorner/pymage_downloader
import datetime from utils.utils import limit_file_name class Image(): _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = l...
import datetime from utils.utils import limit_file_name class Image: _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = lim...
<commit_before>import datetime from utils.utils import limit_file_name class Image(): _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self...
import datetime from utils.utils import limit_file_name class Image: _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = lim...
import datetime from utils.utils import limit_file_name class Image(): _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self.image_file = l...
<commit_before>import datetime from utils.utils import limit_file_name class Image(): _file_name_pattern = "reddit_%s_%s_%s_album_%s_%s_%s" def __init__(self, url, post, image_file): self.post_id = post.id self.url = url self.sub_display_name = post.subreddit.display_name self...
e3f55180bba935f09355b73049c3729c797c9e9f
lc0266_palindrome_permutation.py
lc0266_palindrome_permutation.py
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
Complete one odd char count sol
Complete one odd char count sol
Python
bsd-2-clause
bowen0701/algorithms_data_structures
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
<commit_before>"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" O...
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" Output: true """...
<commit_before>"""Leetcode 266. Palindrome Permutation (Premium) Easy URL: https://leetcode.com/problems/palindrome-permutation Given a string, determine if a permutation of the string could form a palindrome. Example 1: Input: "code" Output: false Example 2: Input: "aab" Output: true Example 3: Input: "carerac" O...
b6d61fef0fe372c7149fa52e2ab1acff144d0118
tests/fixtures/dummy/facilities.py
tests/fixtures/dummy/facilities.py
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData class SiteData(DataSet): class dummy: ...
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData from .finance import AccountData class SiteData(...
Add fee_account to BuildingData of legacy test base
Add fee_account to BuildingData of legacy test base
Python
apache-2.0
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData class SiteData(DataSet): class dummy: ...
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData from .finance import AccountData class SiteData(...
<commit_before># Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData class SiteData(DataSet): clas...
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData from .finance import AccountData class SiteData(...
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData class SiteData(DataSet): class dummy: ...
<commit_before># Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from fixture import DataSet from .address import AddressData class SiteData(DataSet): clas...
5f27e570a369fbb408a48a567064a96f1ceac277
tests/commands/project/utils.py
tests/commands/project/utils.py
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() m = requests_mock.mock() if isinstance(existing_projects, int):...
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() project_id = uuid4() m = requests_mock.mock() if isinstance...
Add a mock API path for project details, used in e.g. test_init
Add a mock API path for project details, used in e.g. test_init
Python
mit
valohai/valohai-cli
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() m = requests_mock.mock() if isinstance(existing_projects, int):...
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() project_id = uuid4() m = requests_mock.mock() if isinstance...
<commit_before>from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() m = requests_mock.mock() if isinstance(existing_...
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() project_id = uuid4() m = requests_mock.mock() if isinstance...
from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() m = requests_mock.mock() if isinstance(existing_projects, int):...
<commit_before>from uuid import uuid4 import requests_mock from tests.utils import get_project_list_data from valohai_cli.utils import get_random_string def get_project_mock(create_project_name=None, existing_projects=None): username = get_random_string() m = requests_mock.mock() if isinstance(existing_...
8c015d47fa77ea6de56e194b754939632399ad3e
contones/test/test_geometry.py
contones/test/test_geometry.py
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def test_init(self): extent = (-120, 38, -110, 45) e1 = Envelope(*extent) extent_inv = (-110, 45, -120, 38) e2 = Envelope(*extent_inv) self.assertEqual(e1.tuple, e2.tuple) ...
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def setUp(self): extent = (-120, 30, -110, 40) self.en = Envelope(*extent) self.esub = Envelope(-118, 32, -115, 38) def test_contains(self): self.assertIn(self.esub, self.en) ...
Add intersects, contains, and equality tests for Envelope
Add intersects, contains, and equality tests for Envelope
Python
bsd-3-clause
bkg/greenwich
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def test_init(self): extent = (-120, 38, -110, 45) e1 = Envelope(*extent) extent_inv = (-110, 45, -120, 38) e2 = Envelope(*extent_inv) self.assertEqual(e1.tuple, e2.tuple) ...
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def setUp(self): extent = (-120, 30, -110, 40) self.en = Envelope(*extent) self.esub = Envelope(-118, 32, -115, 38) def test_contains(self): self.assertIn(self.esub, self.en) ...
<commit_before>import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def test_init(self): extent = (-120, 38, -110, 45) e1 = Envelope(*extent) extent_inv = (-110, 45, -120, 38) e2 = Envelope(*extent_inv) self.assertEqual(e1.tupl...
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def setUp(self): extent = (-120, 30, -110, 40) self.en = Envelope(*extent) self.esub = Envelope(-118, 32, -115, 38) def test_contains(self): self.assertIn(self.esub, self.en) ...
import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def test_init(self): extent = (-120, 38, -110, 45) e1 = Envelope(*extent) extent_inv = (-110, 45, -120, 38) e2 = Envelope(*extent_inv) self.assertEqual(e1.tuple, e2.tuple) ...
<commit_before>import unittest from contones.geometry import Envelope class EnvelopeTestCase(unittest.TestCase): def test_init(self): extent = (-120, 38, -110, 45) e1 = Envelope(*extent) extent_inv = (-110, 45, -120, 38) e2 = Envelope(*extent_inv) self.assertEqual(e1.tupl...
bbd8b027eecc48266dfeee12419a6bcd807bdf65
tests/__init__.py
tests/__init__.py
import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.te...
import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
Set maxDiff to 'None' on the base ScraperTest class
Set maxDiff to 'None' on the base ScraperTest class
Python
mit
hhursev/recipe-scraper
import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.te...
import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
<commit_before>import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.te...
<commit_before>import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( ...
181d3b06bf985d0ccec156363ecd4fe3792ddf1a
scripts/assignment_test.py
scripts/assignment_test.py
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments ...
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments...
Refactor of one assignment test
Refactor of one assignment test
Python
agpl-3.0
Som-Energia/somenergia-generationkwh,Som-Energia/somenergia-generationkwh
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments ...
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments...
<commit_before># -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) se...
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments...
# -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) self.Assignments ...
<commit_before># -*- coding: utf-8 -*- import unittest dbconfig = None try: import dbconfig import erppeek except ImportError: pass @unittest.skipIf(not dbconfig, "depends on ERP") class Assignment_Test(unittest.TestCase): def setUp(self): self.erp = erppeek.Client(**dbconfig.erppeek) se...
120bff1f3bdf347351c6903dc3df0cd51f1837c6
tools/clean_output_directory.py
tools/clean_output_directory.py
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
Fix build directory cleaner, to not follow links on Windows.
Fix build directory cleaner, to not follow links on Windows. BUG= [email protected] Review URL: https://codereview.chromium.org//1219833003.
Python
bsd-3-clause
dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root =...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root = utils.GetBuild...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # import shutil import sys import utils def Main(): build_root =...
a0605e1be5980f9c2f80fe0e751e736a3f4b48ef
fiji_skeleton_macro.py
fiji_skeleton_macro.py
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
Add pruning step to skeletonization
Add pruning step to skeletonization This requires an updated Fiji, as detailed in this mailing list thread: https://list.nih.gov/cgi-bin/wa.exe?A1=ind1308&L=IMAGEJ#41 https://list.nih.gov/cgi-bin/wa.exe?A2=ind1308&L=IMAGEJ&F=&S=&P=36891
Python
bsd-3-clause
jni/skeletons
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
<commit_before>import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the ske...
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the skeleton image fil...
<commit_before>import sys from ij import IJ def ij_binary_skeletonize(impath_in, impath_out): """Load image `impath`, skeletonize it, and save it to the same file. Parameters ---------- impath_in : string Path to a 3D image file. impath_out : string Path to which to write the ske...
f2b52883921af4c006680d58df43f32da739554e
mediachain/translation/lookup.py
mediachain/translation/lookup.py
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(self): os...
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os import shutil from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(sel...
Use normal full names for translators
Use normal full names for translators - Remove and replace any existing module - Pull new module from ipfs and rename from multihash to normal name (ipfsApi doesn't support specifying output paths) - Rename full_path to full_name for consistency
Python
mit
mediachain/mediachain-client,mediachain/mediachain-client
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(self): os...
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os import shutil from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(sel...
<commit_before>from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(se...
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os import shutil from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(sel...
from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(self): os...
<commit_before>from mediachain.datastore.ipfs import get_ipfs_datastore import sys import os from os.path import expanduser, join class ChDir(object): """ Step into a directory temporarily """ def __init__(self, path): self.old_dir = os.getcwd() self.new_dir = path def __enter__(se...
327ddb6db4009cf329ac0f8fb22b56b002e7ef96
server/adventures/tests.py
server/adventures/tests.py
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
Add Setting model creation test
Add Setting model creation test
Python
mit
petertrotman/adventurelookup,petertrotman/adventurelookup,petertrotman/adventurelookup,petertrotman/adventurelookup
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
<commit_before>from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Au...
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Author.objects.co...
<commit_before>from django.test import TestCase from .models import Author, Publisher, Edition, Setting, Adventure class AuthorTests(TestCase): def test_create_author(self): gygax = Author.objects.create(name='Gary Gygax') self.assertEqual(Author.objects.first(), gygax) self.assertEqual(Au...
a3187d16a70966c84a4f4977768fcfefc93b5a6d
this_app/forms.py
this_app/forms.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
Add form to create a bucketlist item
Add form to create a bucketlist item
Python
mit
borenho/flask-bucketlist,borenho/flask-bucketlist
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), ...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), Email(message="...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, TextAreaField from wtforms.validators import DataRequired, Length, Email class SignupForm(FlaskForm): """Render and validate the signup form""" email = StringField("Email", validators=[DataRequired(), ...
674491d8806ae2a56b747622f16f25e75732925e
db/util.py
db/util.py
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
Allow additional args for ensure_table
Allow additional args for ensure_table I had this at some point in some diff somewhere, but it got lost... that's worrying. Maybe in a stash somewhere.
Python
mit
shaialon/vim-awesome,divad12/vim-awesome,shaialon/vim-awesome,vim-awesome/vim-awesome,vim-awesome/vim-awesome,divad12/vim-awesome,vim-awesome/vim-awesome,starcraftman/vim-awesome,divad12/vim-awesome,jonafato/vim-awesome,starcraftman/vim-awesome,jonafato/vim-awesome,jonafato/vim-awesome,starcraftman/vim-awesome,shaialon...
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
<commit_before>import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if resul...
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if results else None ...
<commit_before>import rethinkdb as r # TODO(alpert): Read port and db from app.config? def r_conn(box=[None]): if box[0] is None: box[0] = r.connect() box[0].use('vim_awesome') return box[0] def get_first(query): results = list(query.limit(1).run(r_conn())) return results[0] if resul...
73c842af63a09add43c0e33336dd4eb21153fda1
bin/database.py
bin/database.py
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version does not match requi...
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new schema change is made def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version d...
Fix tab vs spaces issue
Fix tab vs spaces issue
Python
mit
scitran/api,scitran/api,scitran/core,scitran/core,scitran/core,scitran/core
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version does not match requi...
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new schema change is made def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version d...
<commit_before>#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version does not match ...
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new schema change is made def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version d...
#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version does not match requi...
<commit_before>#!/usr/bin/env python import json from api import config CURRENT_DATABASE_VERSION = 1 # An int that is bumped when a new def confirm_schema_match(): """ Checks version of database schema Returns (0) if DB schema version matches requirements. Returns (42) if DB schema version does not match ...
95a5c3076dbe5f967a44988c469ca96d660d0679
muzicast/collection/fswatcher.py
muzicast/collection/fswatcher.py
from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle, search fo...
import os from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle,...
Update on file modification by running a scan on the directory
Update on file modification by running a scan on the directory
Python
mit
nikhilm/muzicast,nikhilm/muzicast
from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle, search fo...
import os from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle,...
<commit_before>from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to ha...
import os from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle,...
from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to handle, search fo...
<commit_before>from watchdog.events import FileSystemEventHandler from muzicast.meta import Track class CollectionEventHandler(FileSystemEventHandler): def __init__(self, scanner): FileSystemEventHandler.__init__(self) self.scanner = scanner def on_moved(self, event): # a move is simple to ha...
dd65699f72ec951321ef0957dfdfc2d37f44b4d9
app/tests/settings.py
app/tests/settings.py
import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWORD_HASHERS = ["...
import logging import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWO...
Disable non-critical logging in tests
Disable non-critical logging in tests
Python
apache-2.0
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWORD_HASHERS = ["...
import logging import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWO...
<commit_before>import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWO...
import logging import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWO...
import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWORD_HASHERS = ["...
<commit_before>import os # Set environment variables before importing settings os.environ["PROTECTED_S3_CUSTOM_DOMAIN"] = "testserver/media" # noinspection PyUnresolvedReferences from config.settings import * """ Settings overrides for tests """ ALLOWED_HOSTS = [".testserver"] WHITENOISE_AUTOREFRESH = True PASSWO...
03866f41c15a22e66a2ba43cf1b4b78f991e5d8c
app/versions.py
app/versions.py
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( self._api_v...
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( APIVersion....
Call APIVersion._api_version_detail not nonexistent self._api_version_detail.
Call APIVersion._api_version_detail not nonexistent self._api_version_detail.
Python
apache-2.0
NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api,NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( self._api_v...
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( APIVersion....
<commit_before>from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): retur...
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( APIVersion....
from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): return ( self._api_v...
<commit_before>from common.apiversion import APIVersion from common.application import Application class VersionsApp(Application): def APIVersionList(self, req, args): return ( [ version._api_version_detail(req) for version in APIVersion.version_classes ], None ) def APIVersionDetails(self, req, params): retur...
a5200bf744b819deff5f2301f5affdc524754a9a
code/png/__init__.py
code/png/__init__.py
from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes
try: from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes except ImportError: _png = __import__(__name__ + '.png') _to_import = _png.png.__all__ _to_import.extend(('_main', 'strtobytes')) for it in _to_...
Fix compatibility with absolute import of Py3
Fix compatibility with absolute import of Py3
Python
mit
Scondo/purepng,Scondo/purepng
from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytesFix compatibility with absolute import of Py3
try: from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes except ImportError: _png = __import__(__name__ + '.png') _to_import = _png.png.__all__ _to_import.extend(('_main', 'strtobytes')) for it in _to_...
<commit_before>from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes<commit_msg>Fix compatibility with absolute import of Py3<commit_after>
try: from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes except ImportError: _png = __import__(__name__ + '.png') _to_import = _png.png.__all__ _to_import.extend(('_main', 'strtobytes')) for it in _to_...
from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytesFix compatibility with absolute import of Py3try: from png import * # Following methods are not parts of API and imports only for unittest from png import _main fro...
<commit_before>from png import * # Following methods are not parts of API and imports only for unittest from png import _main from png import strtobytes<commit_msg>Fix compatibility with absolute import of Py3<commit_after>try: from png import * # Following methods are not parts of API and imports only for u...
73c84754699a6f0803d0ceb3081988b45c9c76e7
contours/__init__.py
contours/__init__.py
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from .core import numpy_formatter, matlab...
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support from __future__ import absolute_import from .core import numpy_formatter, matlab_formatter, shapely_formatter from .quad import QuadContourGenerator __version__ = '0.0.2.dev0'
Remove unneeded Python 2.7 compatibility imports.
Remove unneeded Python 2.7 compatibility imports.
Python
mit
ccarocean/python-contours
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from .core import numpy_formatter, matlab...
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support from __future__ import absolute_import from .core import numpy_formatter, matlab_formatter, shapely_formatter from .quad import QuadContourGenerator __version__ = '0.0.2.dev0'
<commit_before># -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from .core import numpy_fo...
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support from __future__ import absolute_import from .core import numpy_formatter, matlab_formatter, shapely_formatter from .quad import QuadContourGenerator __version__ = '0.0.2.dev0'
# -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from .core import numpy_formatter, matlab...
<commit_before># -* coding: utf-8 -*- """Contour calculations.""" # Python 2 support # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from .core import numpy_fo...
2ad9cf280ee1743f1ad542d3c0c8d8365caea11e
condatestall.py
condatestall.py
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys NPY = '16', '17' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def main(): failfast = '-v' in sys.argv[1:] args = "...
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys if '-q' in sys.argv[1:]: NPY = '18', else: NPY = '16', '17', '18' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def ...
Add option for quick test on all python version
Add option for quick test on all python version
Python
bsd-2-clause
pitrou/numba,GaZ3ll3/numba,pombredanne/numba,GaZ3ll3/numba,stuartarchibald/numba,numba/numba,cpcloud/numba,gmarkall/numba,cpcloud/numba,gdementen/numba,ssarangi/numba,seibert/numba,sklam/numba,gdementen/numba,jriehl/numba,gmarkall/numba,IntelLabs/numba,pombredanne/numba,stuartarchibald/numba,jriehl/numba,stuartarchibal...
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys NPY = '16', '17' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def main(): failfast = '-v' in sys.argv[1:] args = "...
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys if '-q' in sys.argv[1:]: NPY = '18', else: NPY = '16', '17', '18' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def ...
<commit_before>""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys NPY = '16', '17' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def main(): failfast = '-v' in sys.argv[1:...
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys if '-q' in sys.argv[1:]: NPY = '18', else: NPY = '16', '17', '18' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def ...
""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys NPY = '16', '17' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def main(): failfast = '-v' in sys.argv[1:] args = "...
<commit_before>""" Uses conda to run and test all supported python + numpy versions. """ from __future__ import print_function import itertools import subprocess import os import sys NPY = '16', '17' PY = '26', '27', '33' RECIPE_DIR = "./buildscripts/condarecipe.local" def main(): failfast = '-v' in sys.argv[1:...
a3e537dc7e91785bb45bfe4d5a788c26d52653b1
command_line/make_sphinx_html.py
command_line/make_sphinx_html.py
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division from libtbx import easy_run import libtbx.load_env import os.path as op import shutil import os import sys if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not...
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division import libtbx.load_env from dials.util.procrunner import run_process import shutil import os if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not None) dest_...
Check make exit codes and stop on error
Check make exit codes and stop on error
Python
bsd-3-clause
xia2/xia2,xia2/xia2
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division from libtbx import easy_run import libtbx.load_env import os.path as op import shutil import os import sys if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not...
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division import libtbx.load_env from dials.util.procrunner import run_process import shutil import os if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not None) dest_...
<commit_before># LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division from libtbx import easy_run import libtbx.load_env import os.path as op import shutil import os import sys if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (...
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division import libtbx.load_env from dials.util.procrunner import run_process import shutil import os if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not None) dest_...
# LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division from libtbx import easy_run import libtbx.load_env import os.path as op import shutil import os import sys if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (xia2_dir is not...
<commit_before># LIBTBX_SET_DISPATCHER_NAME dev.xia2.make_sphinx_html from __future__ import division from libtbx import easy_run import libtbx.load_env import os.path as op import shutil import os import sys if (__name__ == "__main__") : xia2_dir = libtbx.env.find_in_repositories("xia2", optional=False) assert (...
72d45d64cace23950ef32e670e074ab45ec4d25b
designatedashboard/enabled/_1720_project_dns_panel.py
designatedashboard/enabled/_1720_project_dns_panel.py
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
Add ADD_INSTALLED_APPS to 'enabled' file
Add ADD_INSTALLED_APPS to 'enabled' file Django looks for translation catalogs from directories in INSTALLED_APPS. To display translations for designate-dashboard, 'designatedashboard' needs to be registered to INSTALLED_APPS. (cherry picked from commit 1ed7893eb2ae10172a2f664fc05428c28c29099e) Change-Id: Id5f0f0cb9c...
Python
apache-2.0
openstack/designate-dashboard,openstack/designate-dashboard,openstack/designate-dashboard
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
<commit_before># Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
<commit_before># Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
14b0ddc6fccf54a430caffdb10bad3a8cbbd2bc1
ereuse_devicehub/scripts/updates/snapshot_software.py
ereuse_devicehub/scripts/updates/snapshot_software.py
from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of SnapshotSoftware and adds it to ...
from contextlib import suppress from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of...
Fix getting snapshotsoftware on old snapshots
Fix getting snapshotsoftware on old snapshots
Python
agpl-3.0
eReuse/DeviceHub,eReuse/DeviceHub
from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of SnapshotSoftware and adds it to ...
from contextlib import suppress from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of...
<commit_before>from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of SnapshotSoftware ...
from contextlib import suppress from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of...
from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of SnapshotSoftware and adds it to ...
<commit_before>from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of SnapshotSoftware ...
ae89d2c6a93929ea77fdd1cf0c7685c75f84fd54
roman-numerals/roman_numerals.py
roman-numerals/roman_numerals.py
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
Rectify AttributeError: 'module' object has no attribute 'numeral'
Rectify AttributeError: 'module' object has no attribute 'numeral'
Python
mit
amalshehu/exercism-python
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
<commit_before># File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM...
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
# File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM', 'D', 'CD', '...
<commit_before># File: roman_numerals.py # Purpose: Function to convert from normal numbers to Roman Numerals. # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 17 September 2016, 03:30 PM numerals = tuple(zip( (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), ('M', 'CM...
35325168839234efe98a927fda76548de553d666
test/test_pipeline.py
test/test_pipeline.py
from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def test_lexer(): lexer.i...
from pytest import raises from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def...
Raise pypeSyntaxError in pype test
Raise pypeSyntaxError in pype test
Python
mit
cs207-project/TimeSeries,cs207-project/TimeSeries,cs207-project/TimeSeries,cs207-project/TimeSeries
from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def test_lexer(): lexer.i...
from pytest import raises from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def...
<commit_before>from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def test_lexer...
from pytest import raises from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def...
from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def test_lexer(): lexer.i...
<commit_before>from pype.lexer import lexer from pype.pipeline import Pipeline example_error_ppl='test/samples/example_error.ppl' example0_ppl='test/samples/example0.ppl' example0_token='test/samples/example0.tokens' example1_ppl='test/samples/example1.ppl' example1_token='test/samples/example1.tokens' def test_lexer...
ee68ed703786afadface47a3f276cefae17c583d
test/unit/conftest.py
test/unit/conftest.py
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
Disable test_pack.py unit test until it works on Travis-CI and for Python 2.7.
Disable test_pack.py unit test until it works on Travis-CI and for Python 2.7.
Python
apache-2.0
pyocd/pyOCD,mbedmicro/pyOCD,mesheven/pyOCD,mbedmicro/pyOCD,flit/pyOCD,mesheven/pyOCD,flit/pyOCD,pyocd/pyOCD,mbedmicro/pyOCD,mesheven/pyOCD
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
<commit_before># pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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/L...
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
<commit_before># pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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/L...
000bcc94cd97de849c3989e69bc5006de130b01e
tests/test_bgw_dl.py
tests/test_bgw_dl.py
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw-dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw_dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass
Replace hyphen on test class name
Replace hyphen on test class name
Python
mit
vonpupp/bgw-dl
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw-dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass Repla...
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw_dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass
<commit_before># -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw-dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): ...
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw_dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass
# -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw-dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): pass Repla...
<commit_before># -*- coding: utf-8 -*- """ test_bgw_dl ---------------------------------- Tests for `bgw_dl` module. """ import pytest import bgw_dl class TestBgw-dl(object): @classmethod def set_up(self): pass def test_something(self): pass @classmethod def tear_down(self): ...
d84a47b875af42da3491c771e461b0a8ca5556db
tests/test_models.py
tests/test_models.py
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload)
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) @pytest.mark.django_db def test_tinycontentfile_slug(file_upload): assert "foobar"...
Test the slug field is generated correctly
Test the slug field is generated correctly
Python
bsd-3-clause
dominicrodger/django-tinycontent,ad-m/django-tinycontent,watchdogpolska/django-tinycontent,ad-m/django-tinycontent,dominicrodger/django-tinycontent,watchdogpolska/django-tinycontent
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) Test the slug field is generated correctly
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) @pytest.mark.django_db def test_tinycontentfile_slug(file_upload): assert "foobar"...
<commit_before>import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) <commit_msg>Test the slug field is generated correctly<commit_after>
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) @pytest.mark.django_db def test_tinycontentfile_slug(file_upload): assert "foobar"...
import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) Test the slug field is generated correctlyimport pytest @pytest.mark.django_db def tes...
<commit_before>import pytest @pytest.mark.django_db def test_tinycontent_str(simple_content): assert "foobar" == str(simple_content) @pytest.mark.django_db def test_tinycontentfile_str(file_upload): assert "Foobar" == str(file_upload) <commit_msg>Test the slug field is generated correctly<commit_after>impor...
ea2383175456257384e625bb1113d98536b78a92
tests/test_shutil.py
tests/test_shutil.py
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r class CopyRTest(unittest.T...
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r # class CopyRTest(unittest...
Comment out CopyR test for now.
Comment out CopyR test for now.
Python
mit
yanikou19/monty,davidwaroquiers/monty,materialsvirtuallab/monty,davidwaroquiers/monty,materialsvirtuallab/monty,gpetretto/monty,gmatteo/monty,gmatteo/monty
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r class CopyRTest(unittest.T...
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r # class CopyRTest(unittest...
<commit_before>#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r class CopyR...
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r # class CopyRTest(unittest...
#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r class CopyRTest(unittest.T...
<commit_before>#!/usr/bin/env python __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[email protected]' __date__ = '1/24/14' import unittest import os import shutil from monty.shutil import copy_r class CopyR...
0cc408e04c0f321bf486d6063b11e9b0762ef8fc
tests/test_tokens.py
tests/test_tokens.py
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
Use str and repr functions instead of magic methods
Use str and repr functions instead of magic methods
Python
isc
bike-barn/red-green-refactor
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
<commit_before>""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): ...
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): Token() ...
<commit_before>""" NOTE: There are no tests that check for data validation at this point since the interpreter doesn't have any data validation as a feature. """ import pytest from calc import INTEGER, Token def test_no_defaults(): # There's no valid defaults at the moment. with pytest.raises(TypeError): ...
6c4883d6e4e65c9d6618244d821ca44c59ca5d58
tests/test_prepare.py
tests/test_prepare.py
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
Test that we handle None->NULL conversion for TEXT and BINARY
tests: Test that we handle None->NULL conversion for TEXT and BINARY
Python
apache-2.0
MagicStack/asyncpg,MagicStack/asyncpg
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
<commit_before>from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self....
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self.assertEqual(tup...
<commit_before>from asyncpg import _testbase as tb class TestPrepare(tb.ConnectedTestCase): async def test_prepare_1(self): st = await self.con.prepare('SELECT 1 = $1 AS test') rec = (await st.execute(1))[0] self.assertTrue(rec['test']) self.assertEqual(len(rec), 1) self....
a0392d693c238cb4548fa6aa2b7f10b6c818b648
currencies/utils.py
currencies/utils.py
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise Currency.DoesNotExist e...
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise else: facto...
Simplify a raise in debug mode
Simplify a raise in debug mode
Python
bsd-3-clause
marcosalcazar/django-currencies,jmp0xf/django-currencies,bashu/django-simple-currencies,mysociety/django-currencies,mysociety/django-currencies,racitup/django-currencies,panosl/django-currencies,ydaniv/django-currencies,pathakamit88/django-currencies,marcosalcazar/django-currencies,racitup/django-currencies,bashu/djang...
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise Currency.DoesNotExist e...
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise else: facto...
<commit_before>from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise Currency.DoesNot...
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise else: facto...
from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise Currency.DoesNotExist e...
<commit_before>from decimal import * from django.conf import settings from currencies.models import Currency def calculate_price(price, currency): try: factor = Currency.objects.get(code__exact=currency).factor except Currency.DoesNotExist: if settings.DEBUG: raise Currency.DoesNot...
37eb125c2b68c0c0c271325aab9cb4863dc6ea55
cte-collation-poc/extractmath.py
cte-collation-poc/extractmath.py
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
Use clear() instead of manually deleting all elements in the body
Use clear() instead of manually deleting all elements in the body
Python
lgpl-2.1
Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-rulesets,Connexions/cnx-rulesets,Connexions/cnx-rulesets,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cnx-rulesets,Connexions/cte,Connexions/cte
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
<commit_before>#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namesp...
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namespaces=NS) def ...
<commit_before>#!/usr/bin/env python from __future__ import print_function import sys import argparse from lxml import etree NS = {'x': 'http://www.w3.org/1999/xhtml', 'mml':'http://www.w3.org/1998/Math/MathML'} body_xpath = etree.XPath('//x:body', namespaces=NS) math_xpath = etree.XPath("//mml:math", namesp...