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
b964c71509d1c562d4080a39bf5fc7333da39608
fedora/__init__.py
fedora/__init__.py
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
Rearrange imports of gettext and release because of dependencies in circular import.
Rearrange imports of gettext and release because of dependencies in circular import.
Python
lgpl-2.1
fedora-infra/python-fedora
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
<commit_before># This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
<commit_before># This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
f3735ed56bff6425eb87f492707b7a8a5ef3119a
touch/__init__.py
touch/__init__.py
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def touch_file(path, context): content = context.get('article', context.get('page')) if content and hasattr(content, 'date'): mtime = time.mktime(content.date.timetuple()) logger.info('touc...
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def set_file_utime(path, datetime): mtime = time.mktime(datetime.timetuple()) logger.info('touching %s', path) os.utime(path, (mtime, mtime)) def touch_file(path, context): content = context.get(...
Make touch plugin touch files with lists
Make touch plugin touch files with lists
Python
agpl-3.0
xsteadfastx/pelican-plugins,doctorwidget/pelican-plugins,lazycoder-ru/pelican-plugins,Neurita/pelican-plugins,lele1122/pelican-plugins,mitchins/pelican-plugins,jantman/pelican-plugins,samueljohn/pelican-plugins,MarkusH/pelican-plugins,jakevdp/pelican-plugins,florianjacob/pelican-plugins,danmackinlay/pelican-plugins,dan...
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def touch_file(path, context): content = context.get('article', context.get('page')) if content and hasattr(content, 'date'): mtime = time.mktime(content.date.timetuple()) logger.info('touc...
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def set_file_utime(path, datetime): mtime = time.mktime(datetime.timetuple()) logger.info('touching %s', path) os.utime(path, (mtime, mtime)) def touch_file(path, context): content = context.get(...
<commit_before>from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def touch_file(path, context): content = context.get('article', context.get('page')) if content and hasattr(content, 'date'): mtime = time.mktime(content.date.timetuple()) lo...
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def set_file_utime(path, datetime): mtime = time.mktime(datetime.timetuple()) logger.info('touching %s', path) os.utime(path, (mtime, mtime)) def touch_file(path, context): content = context.get(...
from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def touch_file(path, context): content = context.get('article', context.get('page')) if content and hasattr(content, 'date'): mtime = time.mktime(content.date.timetuple()) logger.info('touc...
<commit_before>from pelican import signals import logging import os import time logger = logging.getLogger(__name__) def touch_file(path, context): content = context.get('article', context.get('page')) if content and hasattr(content, 'date'): mtime = time.mktime(content.date.timetuple()) lo...
f4d5bafcf99d2117fe589d8c31f8aff8ed3467a5
RefreshScripts.py
RefreshScripts.py
#from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: checkNewSubmissions() timeToSleep = 900 print("Sleeping for " + ...
### exclam /usr/bin/env python3 #from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: try: checkNewSubmissions() ...
Refresh script now displays error message
Refresh script now displays error message
Python
mit
LiquidFun/Reddit-GeoGuessr-Tracking-Bot
#from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: checkNewSubmissions() timeToSleep = 900 print("Sleeping for " + ...
### exclam /usr/bin/env python3 #from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: try: checkNewSubmissions() ...
<commit_before>#from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: checkNewSubmissions() timeToSleep = 900 print("Sl...
### exclam /usr/bin/env python3 #from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: try: checkNewSubmissions() ...
#from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: checkNewSubmissions() timeToSleep = 900 print("Sleeping for " + ...
<commit_before>#from CreateTableFromDatabase import getRankingsFromDatabase import time from CheckAndPostForSeriesSubmissions import checkNewSubmissions # Refreshes all other scripts every couple of minutes def refreshScripts(): while True: checkNewSubmissions() timeToSleep = 900 print("Sl...
e881465050ef9edbf2b47071b1fa2fc27ac26c1a
tests/Settings/TestExtruderStack.py
tests/Settings/TestExtruderStack.py
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
Add delimiter between global stuff and test cases
Add delimiter between global stuff and test cases Helps provide some oversight since this module is about to explode in size. Contributes to issue CURA-3497.
Python
agpl-3.0
hmflash/Cura,ynotstartups/Wanhao,Curahelper/Cura,ynotstartups/Wanhao,hmflash/Cura,fieldOfView/Cura,fieldOfView/Cura,Curahelper/Cura
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
<commit_before># Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.E...
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.Exceptions impor...
<commit_before># Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import pytest #This module contains automated tests. import unittest.mock #For the mocking and monkeypatching functionality. import cura.Settings.ExtruderStack #The module we're testing. from cura.Settings.E...
1d1348eb2126a0a8ee1a18b37a5254b59c3a4c76
examples/ensemble/plot_forest_importances_faces.py
examples/ensemble/plot_forest_importances_faces.py
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ impor...
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ from ...
Update random forest face example to use several cores
Update random forest face example to use several cores
Python
bsd-3-clause
scikit-learn/scikit-learn,madjelan/scikit-learn,xubenben/scikit-learn,Vimos/scikit-learn,nrhine1/scikit-learn,zhenv5/scikit-learn,liberatorqjw/scikit-learn,ndingwall/scikit-learn,beepee14/scikit-learn,shyamalschandra/scikit-learn,walterreade/scikit-learn,dhruv13J/scikit-learn,Adai0808/scikit-learn,Nyker510/scikit-learn...
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ impor...
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ from ...
<commit_before>""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print...
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ from ...
""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print __doc__ impor...
<commit_before>""" ======================================= Pixel importances with forests of trees ======================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more important. """ print...
27be11775d23e873f9e568b86b8a0b2409878d30
job_runner/settings/env/development.py
job_runner/settings/env/development.py
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
Hide the django backend db log messages.
Hide the django backend db log messages.
Python
bsd-3-clause
spilgames/job-runner,spilgames/job-runner
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
<commit_before>import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACK...
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACKEND = 'django.c...
<commit_before>import os from job_runner.settings.base import * DEBUG = True TEMPLATE_DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.sqlite'), } } JOB_RUNNER_WS_SERVER = 'ws://localhost:5000/' EMAIL_BACK...
9de6036f722fb63378a74f08d7f05d184e1b175f
src/buildercore/concurrency.py
src/buildercore/concurrency.py
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
Correct tuple for error message arguments
Correct tuple for error message arguments
Python
mit
elifesciences/builder,elifesciences/builder
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
<commit_before>from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together ...
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together - blue-green: ...
<commit_before>from . import bluegreen, context_handler # TODO: move as buildercore.concurrency.concurrency_for def concurrency_for(stackname, concurrency_name): """concurrency default is to perform updates one machine at a time. Concurrency can be: - serial: one at a time - parallel: all together ...
29d6010c18605179860afe08f5cac218e1a65716
dbaas/workflow/steps/util/resize/check_database_status.py
dbaas/workflow/steps/util/resize/check_database_status.py
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
Change check_db connection resize step to wait database start process
Change check_db connection resize step to wait database start process
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
<commit_before># -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workf...
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
# -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workflow_dict: ...
<commit_before># -*- coding: utf-8 -*- import logging from ...util.base import BaseStep LOG = logging.getLogger(__name__) class CheckDatabaseStatus(BaseStep): def __unicode__(self): return "Checking database status..." def do(self, workflow_dict): try: if not 'database' in workf...
08167d79efb97a0728564caf96a96b08763ddf60
bibliopixel/util/importer.py
bibliopixel/util/importer.py
import importlib def import_symbol(typename): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename = parts.pop() # Ca...
import importlib def import_symbol(typename, package=None): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename, package=package) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename ...
Add a package argument to import_symbol.
Add a package argument to import_symbol.
Python
mit
ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel
import importlib def import_symbol(typename): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename = parts.pop() # Ca...
import importlib def import_symbol(typename, package=None): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename, package=package) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename ...
<commit_before>import importlib def import_symbol(typename): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename = parts.pop() ...
import importlib def import_symbol(typename, package=None): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename, package=package) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename ...
import importlib def import_symbol(typename): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename = parts.pop() # Ca...
<commit_before>import importlib def import_symbol(typename): """Import a module or typename within a module from its name.""" try: return importlib.import_module(typename) except ImportError as e: parts = typename.split('.') if len(parts) > 1: typename = parts.pop() ...
5c7f6f90f4ae88e70c738ab13170ad1c64447db3
xfdf2ascii.py
xfdf2ascii.py
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
Correct the off-by one error from logical to physical pages
Correct the off-by one error from logical to physical pages
Python
mit
juandesant/xfdf2ascii
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
<commit_before>#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix...
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix: highlight...
<commit_before>#!/usr/bin/env python from lxml import etree import sys comments_file = open("examples/Technical_Document_Comments.xfdf", "r") comments_xml = etree.parse(comments_file) root = comments_xml.getroot() prefix = None try: prefix = root.tag.partition("}")[0].partition("{")[-1] except: pass if prefix...
a5a92b81244076e8cf04c06398ce63a87d1357dd
adhocracy/tests/test_doctest_files.py
adhocracy/tests/test_doctest_files.py
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url from adhocracy.tests.testbrowser import Browser def find_use_cas...
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy import model from adhocracy.tests import testtools from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url ...
Add the modules models and testtools to the doctest globals
Add the modules models and testtools to the doctest globals
Python
agpl-3.0
SysTheron/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,alkadis/vcv,SysTheron/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy,SysTheron/adhocracy,liqd/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,alk...
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url from adhocracy.tests.testbrowser import Browser def find_use_cas...
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy import model from adhocracy.tests import testtools from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url ...
<commit_before>from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url from adhocracy.tests.testbrowser import Browser d...
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy import model from adhocracy.tests import testtools from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url ...
from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url from adhocracy.tests.testbrowser import Browser def find_use_cas...
<commit_before>from glob import glob import doctest from doctest import DocFileSuite from os.path import dirname import unittest from adhocracy.tests.testbrowser import ADHOCRACY_LAYER, ADHOCRACY_LAYER_APP from adhocracy.tests.testbrowser import app_url, instance_url from adhocracy.tests.testbrowser import Browser d...
1ed6c3f6d79aca5d647e8ff8332096c4fc111548
neuroimaging/utils/tests/test_utils.py
neuroimaging/utils/tests/test_utils.py
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): pass #print "testing foo" def test_bar(self): pass #print "testing bar" if __name__ == '__main__': Nump...
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): self.fail('neuroimaging.utils, odict, path, etc... have _NO_ tests!') if __name__ == '__main__': NumpyTest().run()
Fix test example so it runs.
BUG: Fix test example so it runs.
Python
bsd-3-clause
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): pass #print "testing foo" def test_bar(self): pass #print "testing bar" if __name__ == '__main__': Nump...
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): self.fail('neuroimaging.utils, odict, path, etc... have _NO_ tests!') if __name__ == '__main__': NumpyTest().run()
<commit_before>from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): pass #print "testing foo" def test_bar(self): pass #print "testing bar" if __name__ == '__ma...
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): self.fail('neuroimaging.utils, odict, path, etc... have _NO_ tests!') if __name__ == '__main__': NumpyTest().run()
from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): pass #print "testing foo" def test_bar(self): pass #print "testing bar" if __name__ == '__main__': Nump...
<commit_before>from numpy.testing import NumpyTest, NumpyTestCase class test_Template(NumpyTestCase): def setUp(self): pass #print "TestCase initialization..." def test_foo(self): pass #print "testing foo" def test_bar(self): pass #print "testing bar" if __name__ == '__ma...
3a2b536f24eee711a1329daf7403bd92840a87e3
gpxpandas/gpxreader.py
gpxpandas/gpxreader.py
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
Use gpx.name as index to gpx data_frame
Use gpx.name as index to gpx data_frame
Python
mit
komax/gpx-pandas
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
<commit_before>__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, ...
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, poi...
<commit_before>__author__ = 'max' import gpxpy import pandas as pd def parse_gpx(gpx_file_name): return gpxpy.parse(gpx_file_name) def data_frame_for_track_segment(segment): seg_dict = {} for point in segment.points: seg_dict[point.time] = [point.latitude, point.longitude, ...
f2f422702985c3e890fa19a7f841baba837c5bba
main.py
main.py
from listing import Listing, session from scraper import Scraper from slack import Slack import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result).process() if listi...
from listing import Listing, session from scraper import Scraper from slack import Slack from random import randint import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result)....
Increase and fuzz sleep time
Increase and fuzz sleep time
Python
mit
vboginskey/cribfinder
from listing import Listing, session from scraper import Scraper from slack import Slack import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result).process() if listi...
from listing import Listing, session from scraper import Scraper from slack import Slack from random import randint import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result)....
<commit_before>from listing import Listing, session from scraper import Scraper from slack import Slack import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result).process() ...
from listing import Listing, session from scraper import Scraper from slack import Slack from random import randint import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result)....
from listing import Listing, session from scraper import Scraper from slack import Slack import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result).process() if listi...
<commit_before>from listing import Listing, session from scraper import Scraper from slack import Slack import sys import traceback import time slack = Slack() def scrape(): results = 0 duplicates = 0 for result in Scraper().results(): results += 1 listing = Listing(result).process() ...
56b4532bd330ad4075f882511c87cb97eaeff10e
jujupy/__init__.py
jujupy/__init__.py
from jujupy.client import * from jujupy.client import _temp_env __all__ = ['_temp_env']
from jujupy.client import ( AgentsNotStarted, AuthNotAccepted, AGENTS_READY, client_from_config, ConditionList, coalesce_agent_status, describe_substrate, EnvJujuClient, EnvJujuClient1X, EnvJujuClient25, ensure_dir, get_cache_path, get_client_class, get_local_root...
Switch to explicit imports for jujupy.
Switch to explicit imports for jujupy.
Python
agpl-3.0
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
from jujupy.client import * from jujupy.client import _temp_env __all__ = ['_temp_env'] Switch to explicit imports for jujupy.
from jujupy.client import ( AgentsNotStarted, AuthNotAccepted, AGENTS_READY, client_from_config, ConditionList, coalesce_agent_status, describe_substrate, EnvJujuClient, EnvJujuClient1X, EnvJujuClient25, ensure_dir, get_cache_path, get_client_class, get_local_root...
<commit_before>from jujupy.client import * from jujupy.client import _temp_env __all__ = ['_temp_env'] <commit_msg>Switch to explicit imports for jujupy.<commit_after>
from jujupy.client import ( AgentsNotStarted, AuthNotAccepted, AGENTS_READY, client_from_config, ConditionList, coalesce_agent_status, describe_substrate, EnvJujuClient, EnvJujuClient1X, EnvJujuClient25, ensure_dir, get_cache_path, get_client_class, get_local_root...
from jujupy.client import * from jujupy.client import _temp_env __all__ = ['_temp_env'] Switch to explicit imports for jujupy.from jujupy.client import ( AgentsNotStarted, AuthNotAccepted, AGENTS_READY, client_from_config, ConditionList, coalesce_agent_status, describe_substrate, EnvJuj...
<commit_before>from jujupy.client import * from jujupy.client import _temp_env __all__ = ['_temp_env'] <commit_msg>Switch to explicit imports for jujupy.<commit_after>from jujupy.client import ( AgentsNotStarted, AuthNotAccepted, AGENTS_READY, client_from_config, ConditionList, coalesce_agent_s...
55f0ab3ba544344bda4c95b014193dffe9db70cd
examples/99bottles.py
examples/99bottles.py
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
Use explicit API(s) for examples
Use explicit API(s) for examples
Python
mit
nizox/circuits,eriol/circuits,treemo/circuits,treemo/circuits,treemo/circuits,eriol/circuits,eriol/circuits
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
<commit_before>#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocol...
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocols import LP c...
<commit_before>#!/usr/bin/env python # XXX: Broken - Does O_NONBLOCK work at all? """An implementation of the Python Concurrency Problem of 99 Bottles of Beer See: http://wiki.python.org/moin/Concurrency/99Bottles """ import sys from circuits.io import File from circuits import Component from circuits.net.protocol...
497451ee060b1dd7655ad648f4026633e6e3318c
leaflets/models.py
leaflets/models.py
from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' competition = models.ForeignKey('competitions.Competition') year = models.IntegerField() issue = models.IntegerField() # Fields added via foreign key...
import reversion from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' def generate_name(self, filename): return "leaflets/{competition}-{year}-{issue}.pdf"\ .format(competition=self.competiti...
Add capability to upload Leaflets
Add capability to upload Leaflets
Python
mit
matus-stehlik/roots,matus-stehlik/roots,matus-stehlik/glowing-batman,rtrembecky/roots,tbabej/roots,matus-stehlik/roots,tbabej/roots,tbabej/roots,rtrembecky/roots,matus-stehlik/glowing-batman,rtrembecky/roots
from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' competition = models.ForeignKey('competitions.Competition') year = models.IntegerField() issue = models.IntegerField() # Fields added via foreign key...
import reversion from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' def generate_name(self, filename): return "leaflets/{competition}-{year}-{issue}.pdf"\ .format(competition=self.competiti...
<commit_before>from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' competition = models.ForeignKey('competitions.Competition') year = models.IntegerField() issue = models.IntegerField() # Fields added ...
import reversion from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' def generate_name(self, filename): return "leaflets/{competition}-{year}-{issue}.pdf"\ .format(competition=self.competiti...
from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' competition = models.ForeignKey('competitions.Competition') year = models.IntegerField() issue = models.IntegerField() # Fields added via foreign key...
<commit_before>from django.db import models from django.contrib import admin class Leaflet(models.Model): ''' Represents a given (generated) leaflet. ''' competition = models.ForeignKey('competitions.Competition') year = models.IntegerField() issue = models.IntegerField() # Fields added ...
3f394b37174d97b53fdef8ce662e258c6b2aa337
src/appleseed.python/studio/__init__.py
src/appleseed.python/studio/__init__.py
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
Add PySide to as.studio init preferred binding
Add PySide to as.studio init preferred binding
Python
mit
luisbarrancos/appleseed,est77/appleseed,appleseedhq/appleseed,pjessesco/appleseed,gospodnetic/appleseed,Vertexwahn/appleseed,appleseedhq/appleseed,dictoon/appleseed,Aakash1312/appleseed,Biart95/appleseed,Vertexwahn/appleseed,dictoon/appleseed,Biart95/appleseed,aytekaman/appleseed,pjessesco/appleseed,aytekaman/appleseed...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
<commit_before> # # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person o...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy...
<commit_before> # # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person o...
4f9e602bfbf145adfc93270d915325b59c710a46
conman/routes/migrations/0001_initial.py
conman/routes/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
Update new migration to match existing docstring
Update new migration to match existing docstring
Python
bsd-2-clause
Ian-Foote/django-conman,meshy/django-conman,meshy/django-conman
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='R...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='Route', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] operations = [ migrations.CreateModel( name='R...
2ac7b22e592557ea8be70311e641b1f42f6c7128
tests/settings.py
tests/settings.py
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () SECRET_KEY = 'test'
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () PASSWORD_HASHERS = ['django.contrib.auth.has...
Use md5 password hasher for tests
Use md5 password hasher for tests
Python
bsd-2-clause
incuna/incuna-test-utils,incuna/incuna-test-utils
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () SECRET_KEY = 'test' Use md5 password hasher ...
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () PASSWORD_HASHERS = ['django.contrib.auth.has...
<commit_before>import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () SECRET_KEY = 'test' <commit_m...
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () PASSWORD_HASHERS = ['django.contrib.auth.has...
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () SECRET_KEY = 'test' Use md5 password hasher ...
<commit_before>import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ) MIDDLEWARE_CLASSES = () SECRET_KEY = 'test' <commit_m...
d9d2c7d341894e28a5ad73469ec0d9d23d78429e
vispy/visuals/graphs/layouts/__init__.py
vispy/visuals/graphs/layouts/__init__.py
from .random import random # noqa from .circular import circular # noqa
import inspect from .random import random from .circular import circular from .force_directed import fruchterman_reingold _layout_map = { 'random': random, 'circular': circular, 'force_directed': fruchterman_reingold } def get(name, *args, **kwargs): if name not in _layout_map: raise KeyErr...
Add new way of retreiving graph layouts
Add new way of retreiving graph layouts
Python
bsd-3-clause
ghisvail/vispy,michaelaye/vispy,Eric89GXL/vispy,michaelaye/vispy,Eric89GXL/vispy,Eric89GXL/vispy,drufat/vispy,drufat/vispy,ghisvail/vispy,michaelaye/vispy,drufat/vispy,ghisvail/vispy
from .random import random # noqa from .circular import circular # noqa Add new way of retreiving graph layouts
import inspect from .random import random from .circular import circular from .force_directed import fruchterman_reingold _layout_map = { 'random': random, 'circular': circular, 'force_directed': fruchterman_reingold } def get(name, *args, **kwargs): if name not in _layout_map: raise KeyErr...
<commit_before>from .random import random # noqa from .circular import circular # noqa <commit_msg>Add new way of retreiving graph layouts<commit_after>
import inspect from .random import random from .circular import circular from .force_directed import fruchterman_reingold _layout_map = { 'random': random, 'circular': circular, 'force_directed': fruchterman_reingold } def get(name, *args, **kwargs): if name not in _layout_map: raise KeyErr...
from .random import random # noqa from .circular import circular # noqa Add new way of retreiving graph layoutsimport inspect from .random import random from .circular import circular from .force_directed import fruchterman_reingold _layout_map = { 'random': random, 'circular': circular, 'force_directe...
<commit_before>from .random import random # noqa from .circular import circular # noqa <commit_msg>Add new way of retreiving graph layouts<commit_after>import inspect from .random import random from .circular import circular from .force_directed import fruchterman_reingold _layout_map = { 'random': random, ...
739ae88d817cb86723b126360aaf3dd6df3045c0
tests/test_log.py
tests/test_log.py
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert "..." in message["...
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values, _trim_message def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert ".....
Add coverage to some of log.py
Add coverage to some of log.py
Python
mit
bcb/jsonrpcclient
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert "..." in message["...
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values, _trim_message def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert ".....
<commit_before>import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert ".....
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values, _trim_message def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert ".....
import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert "..." in message["...
<commit_before>import json import logging from unittest.mock import Mock, patch from jsonrpcclient.log import _trim_string, _trim_values def test_trim_string(): message = _trim_string("foo" * 100) assert "..." in message def test_trim_values(): message = _trim_values({"list": [0] * 100}) assert ".....
1927c503fda892490fb7262ba480e429a0f416fb
intermol/orderedset.py
intermol/orderedset.py
import collections from copy import deepcopy class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def difference_update(self, *a...
from collections.abc import Set from collections import OrderedDict from copy import deepcopy class OrderedSet(Set): def __init__(self, iterable=()): self.d = OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def d...
Update collections imports for deprecations
Update collections imports for deprecations
Python
mit
shirtsgroup/InterMol,shirtsgroup/InterMol
import collections from copy import deepcopy class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def difference_update(self, *a...
from collections.abc import Set from collections import OrderedDict from copy import deepcopy class OrderedSet(Set): def __init__(self, iterable=()): self.d = OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def d...
<commit_before>import collections from copy import deepcopy class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def difference_...
from collections.abc import Set from collections import OrderedDict from copy import deepcopy class OrderedSet(Set): def __init__(self, iterable=()): self.d = OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def d...
import collections from copy import deepcopy class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def difference_update(self, *a...
<commit_before>import collections from copy import deepcopy class OrderedSet(collections.Set): def __init__(self, iterable=()): self.d = collections.OrderedDict.fromkeys(iterable) def add(self, key): self.d[key] = None def discard(self, key): del self.d[key] def difference_...
3bd409a0c7f252811c7e8488493270d225e8616a
src/main/python/piglatin.py
src/main/python/piglatin.py
import sys def parseCommandLine(argv): return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay")
import sys def parseCommandLine(argv): print 'Inside parser' return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay")
Test case: failing print for python3
Test case: failing print for python3
Python
mit
oneyoke/sw_asgmt_2
import sys def parseCommandLine(argv): return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay") Test case: failing print for python3
import sys def parseCommandLine(argv): print 'Inside parser' return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay")
<commit_before>import sys def parseCommandLine(argv): return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay") <commit_msg>Test case: failing print for python3<commit_after>
import sys def parseCommandLine(argv): print 'Inside parser' return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay")
import sys def parseCommandLine(argv): return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay") Test case: failing print for python3import sys def parseCommandLine(argv): print 'Inside parser' return argv[1] if ...
<commit_before>import sys def parseCommandLine(argv): return argv[1] if len(argv) > 1 else "" if __name__ == "__main__": latin = parseCommandLine(sys.argv) print(latin) print("igpay atinlay") <commit_msg>Test case: failing print for python3<commit_after>import sys def parseCommandLine(argv): pri...
5185222f82b22868a28cb93a6a11632a9e1f6456
libdotify/utils.py
libdotify/utils.py
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
Fix path creation/git detection bugs
[libdotify] Fix path creation/git detection bugs
Python
mit
tobi-wan-kenobi/dotfiles
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
<commit_before>import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = sub...
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = subprocess.Popen(a...
<commit_before>import os import shlex import logging import subprocess import contextlib @contextlib.contextmanager def cd(newdir): prevdir = os.getcwd() os.chdir(os.path.expanduser(newdir)) try: yield finally: os.chdir(prevdir) def execute(cmd): args = shlex.split(cmd) p = sub...
a09edcdf11c0d6c6b43cbff5029ac8cfb5741170
application.py
application.py
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) migrate = Migrate(application, db) manager.add_command('db', Mig...
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5000)) migr...
Update to run on port 5000
Update to run on port 5000 For development we will want to run multiple apps, so they should each bind to a different port number. The default port is 5000 anyway, but we should state the port explicitly in the code which is why I've added it here.
Python
mit
mtekel/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,alphagov/digitalmarketplace-api,mtekel/digitalmarketplace-api,mtekel/digitalmarketplace-api,mtekel/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,alphagov/digitalmarketplace-...
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) migrate = Migrate(application, db) manager.add_command('db', Mig...
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5000)) migr...
<commit_before>#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) migrate = Migrate(application, db) manager.add_co...
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5000)) migr...
#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) migrate = Migrate(application, db) manager.add_command('db', Mig...
<commit_before>#!/usr/bin/env python import os from app import create_app, db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) migrate = Migrate(application, db) manager.add_co...
9cdf014f2349b7c39974ccfc5e873dbcb8e9cee9
application.py
application.py
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
Make it easier to run
Make it easier to run
Python
mpl-2.0
radremedy/radremedy,radioprotector/radremedy,radioprotector/radremedy,AllieDeford/radremedy,AllieDeford/radremedy,radremedy/radremedy,radioprotector/radremedy,AllieDeford/radremedy,radremedy/radremedy,radremedy/radremedy,radioprotector/radremedy
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() Make it easier to run
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
<commit_before> from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() <commit_msg>Make it easier to run<commit_after>
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() Make it easier to run#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.Prod...
<commit_before> from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() <commit_msg>Make it easier to run<commit_after>#!/usr/bin/env python from remedy.radremedy import create_app application,...
d2f1b9311b546c079490e5f0bdb45b9c9d570bb1
system/test_coupling_fields.py
system/test_coupling_fields.py
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
Fix up paths in system test.
Fix up paths in system test.
Python
apache-2.0
CWSL/access-om
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
<commit_before> from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave f...
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave flux over a geog...
<commit_before> from __future__ import print_function import os import netCDF4 as nc from model_test_helper import ModelTestHelper class TestCouplingFields(ModelTestHelper): def __init__(self): super(TestCouplingFields, self).__init__() def test_swflx(self): """ Compare short wave f...
2d30393166e6c9bd0995810226a223b44635da6d
src/stratis_cli/_version.py
src/stratis_cli/_version.py
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Set stratis-cli version to 3.1.0
Set stratis-cli version to 3.1.0 Signed-off-by: mulhern <[email protected]>
Python
apache-2.0
stratis-storage/stratis-cli,stratis-storage/stratis-cli
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
655c3ca55a5b3bb1f03d524219c3d038c2d02ed5
st2client/st2client/models/datastore.py
st2client/st2client/models/datastore.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Update KeyValuePair model so delete and other operations which require "id" attribute to be present still work.
Update KeyValuePair model so delete and other operations which require "id" attribute to be present still work.
Python
apache-2.0
tonybaloney/st2,alfasin/st2,nzlosh/st2,tonybaloney/st2,pixelrebel/st2,Plexxi/st2,punalpatel/st2,StackStorm/st2,Itxaka/st2,nzlosh/st2,pinterb/st2,StackStorm/st2,emedvedev/st2,alfasin/st2,jtopjian/st2,peak6/st2,peak6/st2,emedvedev/st2,tonybaloney/st2,Itxaka/st2,lakshmi-kannan/st2,Plexxi/st2,grengojbo/st2,dennybaa/st2,nzl...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
24dba96be4a9202fdac5fa779c52789ec6cd13c4
api/common/views.py
api/common/views.py
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
Improve subprocess call during deployment
Improve subprocess call during deployment
Python
apache-2.0
prattl/teamfinder,prattl/teamfinder,prattl/teamfinder,prattl/teamfinder
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
<commit_before>import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf...
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf_exempt def dep...
<commit_before>import subprocess from django.conf import settings from django.contrib.sites.models import Site from django.http import JsonResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token @csrf...
6740f677903c7d48748fd0a595762b8bf2c7dcb3
test_connector/components/components.py
test_connector/components/components.py
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component from odoo.addons.connector.components.collection import use ...
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component class BaseComponent(Component): _inherit = 'base' d...
Improve on the collections, work, ...
Improve on the collections, work, ...
Python
agpl-3.0
OCA/connector,OCA/connector
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component from odoo.addons.connector.components.collection import use ...
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component class BaseComponent(Component): _inherit = 'base' d...
<commit_before># -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component from odoo.addons.connector.components.collectio...
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component class BaseComponent(Component): _inherit = 'base' d...
# -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component from odoo.addons.connector.components.collection import use ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # TODO make API short paths # from odoo.addons.connector import Component from odoo.addons.connector.components.core import Component from odoo.addons.connector.components.collectio...
3bee320f66d192e2e40b6b91a53c3ccd64c09443
test/MSVC/query_vcbat.py
test/MSVC/query_vcbat.py
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" import os env = Environment(tools = ['MSVCC...
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" from SCons.Tool.MSVCCommon import FindMSVSB...
Update our fake test for debugging purpose.
Update our fake test for debugging purpose.
Python
mit
azatoth/scons,azatoth/scons,azatoth/scons,azatoth/scons,azatoth/scons
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" import os env = Environment(tools = ['MSVCC...
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" from SCons.Tool.MSVCCommon import FindMSVSB...
<commit_before>import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" import os env = Environment(...
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" from SCons.Tool.MSVCCommon import FindMSVSB...
import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" import os env = Environment(tools = ['MSVCC...
<commit_before>import sys import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re) if sys.platform != 'win32': msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) ##### # Test the basics test.write('SConstruct',""" import os env = Environment(...
d58eb0f244d461222d5cd0719675cf46a9297081
app/influx/views.py
app/influx/views.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
Stop watching movies while editing code!
Stop watching movies while editing code!
Python
bsd-2-clause
Crapworks/ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash,Aorjoa/aiyara-ceph-dash,Aorjoa/aiyara-ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
<commit_before>#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { 'rule...
<commit_before>#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import jsonify from flask import current_app from influxdb import InfluxDBClient from app.base import ApiResource class InfluxResource(ApiResource): endpoint = 'influxdb' url_prefix = '/influxdb' url_rules = { 'index': { ...
165d76e68492070060a7045e08a7bec09a226093
api/base/exceptions.py
api/base/exceptions.py
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ from rest_framework.views import exception_handler response = exception_handler(exc, context) # ...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
Add comment to explain import inside method
Add comment to explain import inside method
Python
apache-2.0
arpitar/osf.io,mluke93/osf.io,icereval/osf.io,DanielSBrown/osf.io,MerlinZhang/osf.io,pattisdr/osf.io,cslzchen/osf.io,ckc6cz/osf.io,ckc6cz/osf.io,sbt9uc/osf.io,RomanZWang/osf.io,sloria/osf.io,jnayak1/osf.io,petermalcolm/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,alexschiller/osf.io,Ghalko/osf.io,alexschiller/osf...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ from rest_framework.views import exception_handler response = exception_handler(exc, context) # ...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ from rest_framework.views import exception_handler response = exception_handler(exc, c...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ from rest_framework.views import exception_handler response = exception_handler(exc, context) # ...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ from rest_framework.views import exception_handler response = exception_handler(exc, c...
2a925111aa0cd114b30e94c6a8d7d96d46f6d3d8
appengine_config.py
appengine_config.py
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
Enable the Appstats Interactive Playground.
Enable the Appstats Interactive Playground.
Python
apache-2.0
riannucci/rietveldv2,riannucci/rietveldv2
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
<commit_before>"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return ...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return app # Custom A...
<commit_before>"""Configuration.""" import logging import os import re from google.appengine.ext.appstats import recording logging.info('Loading %s from %s', __name__, __file__) # Custom webapp middleware to add Appstats. def webapp_add_wsgi_middleware(app): app = recording.appstats_wsgi_middleware(app) return ...
df2fe66f64f79127374d2f183cb76966f77761ee
signac/common/errors.py
signac/common/errors.py
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): pass
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): def __str__(self): if len(self.arg...
Improve error message for authentication issues.
Improve error message for authentication issues.
Python
bsd-3-clause
csadorf/signac,csadorf/signac
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): pass Improve error message for authenticati...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): def __str__(self): if len(self.arg...
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): pass <commit_msg>Improve err...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): def __str__(self): if len(self.arg...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): pass Improve error message for authenticati...
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the MIT License. class Error(Exception): pass class ConfigError(Error, RuntimeError): pass class AuthenticationError(Error, RuntimeError): pass <commit_msg>Improve err...
b1adfacff3b7c319ae148e79807d371ded934a5c
tx_salaries/management/commands/generate_transformer_hash.py
tx_salaries/management/commands/generate_transformer_hash.py
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() print transformer.generate_key(labels)
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() transformer_key = transformer.generate_key(labels) ...
Add message if transformer_hash already exists
Add message if transformer_hash already exists
Python
apache-2.0
texastribune/tx_salaries,texastribune/tx_salaries
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() print transformer.generate_key(labels) Add message if t...
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() transformer_key = transformer.generate_key(labels) ...
<commit_before>from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() print transformer.generate_key(labels) <...
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() transformer_key = transformer.generate_key(labels) ...
from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() print transformer.generate_key(labels) Add message if t...
<commit_before>from django.core.management.base import BaseCommand from ...utils import transformer class Command(BaseCommand): def handle(self, filename, *args, **kwargs): reader = transformer.convert_to_csv_reader(filename) labels = reader.next() print transformer.generate_key(labels) <...
e4b47c9bc3de18c83a2fb718c806b7668b492de6
authentication/urls.py
authentication/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login'))
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login',name='logout'))
Add name to logout url regex
Add name to logout url regex
Python
mit
DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login'))Add name to logout url regex
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login',name='logout'))
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login'))<commit_msg>Add name to logout url regex<commit_after>
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login',name='logout'))
from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login'))Add name to logout url regexfrom django.conf.urls import patterns, include, url urlpatterns...
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}), url(r'^logout/$', 'logout_then_login'))<commit_msg>Add name to logout url regex<commit_after>from django.conf.urls i...
caa2b1e9303d2ba67a0491942d2459006ea8efe3
bucky/__init__.py
bucky/__init__.py
from flask import Flask from flask_login import LoginManager from config import config database = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.config.from_object(config[config_name]) login_manager.init_app(app) @logi...
from flask import Flask from flask_login import LoginManager from config import config database = {} current_user = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.current_user = current_user app.config.from_object(config[con...
Add current_user to app properties
Add current_user to app properties
Python
mit
JoshuaOndieki/buckylist,JoshuaOndieki/buckylist
from flask import Flask from flask_login import LoginManager from config import config database = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.config.from_object(config[config_name]) login_manager.init_app(app) @logi...
from flask import Flask from flask_login import LoginManager from config import config database = {} current_user = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.current_user = current_user app.config.from_object(config[con...
<commit_before>from flask import Flask from flask_login import LoginManager from config import config database = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.config.from_object(config[config_name]) login_manager.init_app(ap...
from flask import Flask from flask_login import LoginManager from config import config database = {} current_user = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.current_user = current_user app.config.from_object(config[con...
from flask import Flask from flask_login import LoginManager from config import config database = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.config.from_object(config[config_name]) login_manager.init_app(app) @logi...
<commit_before>from flask import Flask from flask_login import LoginManager from config import config database = {} login_manager = LoginManager() def create_app(config_name): app = Flask(__name__) app.database = database app.config.from_object(config[config_name]) login_manager.init_app(ap...
b9b194b9eb9a9ddefa9549a522fc67c181acbc4a
tests/test_importlazy.py
tests/test_importlazy.py
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
Check the instance against the original class declaration.
Check the instance against the original class declaration.
Python
mit
ldiary/importlazy
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
<commit_before>""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module shoul...
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module should not be import...
<commit_before>""" To run this test: 1. cd importlazy/tests 2. python -m unittest test_importlazy.py """ import unittest import sys class ImportLazyTest(unittest.TestCase): def test1_initial_state(self): """Initially, the module must not exist in the imported modules. The package or module shoul...
0f16fe34654560f8889ad1f5b199cb8bfa2b3846
tests/web/test_status.py
tests/web/test_status.py
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): res = self.request('/status').text assert res == 'OK' ...
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): """ { "code": 200, "status": "yel...
Update test case for status handler accordingly
Update test case for status handler accordingly
Python
apache-2.0
biothings/biothings.api,biothings/biothings.api
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): res = self.request('/status').text assert res == 'OK' ...
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): """ { "code": 200, "status": "yel...
<commit_before>""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): res = self.request('/status').text assert...
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): """ { "code": 200, "status": "yel...
""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): res = self.request('/status').text assert res == 'OK' ...
<commit_before>""" Test Status Endpoint GET /status HEAD /status """ from biothings.tests.web import BiothingsTestCase from setup import setup_es # pylint: disable=unused-import class TestStatus(BiothingsTestCase): def test_01_get(self): res = self.request('/status').text assert...
69d88adcedaf3779e5bf5a5757a21c71d4aa3016
novajoin/errors.py
novajoin/errors.py
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Use Exception instead of StandardError
Use Exception instead of StandardError StandardError was deprecated in python 3.X.
Python
apache-2.0
rcritten/novajoin
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
6caa1c3962ecc7ab57dea83a5c7beef4f3c1220e
pmxbot/__init__.py
pmxbot/__init__.py
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = No...
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, p...
Fix issue with conflated pmxbot.logging
Fix issue with conflated pmxbot.logging
Python
bsd-3-clause
jamwt/diesel-pmxbot,jamwt/diesel-pmxbot
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = No...
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, p...
<commit_before># -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False,...
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, p...
# -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = No...
<commit_before># -*- coding: utf-8 -*- # vim:ts=4:sw=4:noexpandtab from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False,...
0928060f4390f221d68518a9ec7b8b43b82423b2
iatidq/dqfunctions.py
iatidq/dqfunctions.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
Adjust for new IATI Updates API; don't have to page through results
Adjust for new IATI Updates API; don't have to page through results
Python
agpl-3.0
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
c9f4c6442c250d8daecb7476bb1a22dae53f3859
blockbuster/__init__.py
blockbuster/__init__.py
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask app = Flask(__name__) def startup(): import blockbuster.bb_dbconnector_factory import blockbuster.bb_logging as log import blockbuster.bb_auditlogger as audit blockbuster.app.debug = blockbus...
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask import logging logger = logging.getLogger(__name__) app = Flask(__name__) import blockbuster.bb_auditlogger as audit def startup(): import blockbuster.bb_dbconnector_factory blockbuster.app.debug =...
Change logging to use standard logging library.
Change logging to use standard logging library.
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask app = Flask(__name__) def startup(): import blockbuster.bb_dbconnector_factory import blockbuster.bb_logging as log import blockbuster.bb_auditlogger as audit blockbuster.app.debug = blockbus...
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask import logging logger = logging.getLogger(__name__) app = Flask(__name__) import blockbuster.bb_auditlogger as audit def startup(): import blockbuster.bb_dbconnector_factory blockbuster.app.debug =...
<commit_before>__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask app = Flask(__name__) def startup(): import blockbuster.bb_dbconnector_factory import blockbuster.bb_logging as log import blockbuster.bb_auditlogger as audit blockbuster.app.d...
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask import logging logger = logging.getLogger(__name__) app = Flask(__name__) import blockbuster.bb_auditlogger as audit def startup(): import blockbuster.bb_dbconnector_factory blockbuster.app.debug =...
__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask app = Flask(__name__) def startup(): import blockbuster.bb_dbconnector_factory import blockbuster.bb_logging as log import blockbuster.bb_auditlogger as audit blockbuster.app.debug = blockbus...
<commit_before>__author__ = 'Matt Stibbs' __version__ = '1.27.00' target_schema_version = '1.25.00' from flask import Flask app = Flask(__name__) def startup(): import blockbuster.bb_dbconnector_factory import blockbuster.bb_logging as log import blockbuster.bb_auditlogger as audit blockbuster.app.d...
df45251622e6b935b27022e36fcbd79e9228f989
bonobo/commands/init.py
bonobo/commands/init.py
import os def execute(name, branch, overwrite_if_exists=False): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc if os.listdir...
import os def execute(name, branch): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc overwrite_if_exists = False project_...
Check if target directory is empty instead of current directory and remove overwrite_if_exists argument
Check if target directory is empty instead of current directory and remove overwrite_if_exists argument
Python
apache-2.0
hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,hartym/bonobo,python-bonobo/bonobo,python-bonobo/bonobo
import os def execute(name, branch, overwrite_if_exists=False): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc if os.listdir...
import os def execute(name, branch): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc overwrite_if_exists = False project_...
<commit_before>import os def execute(name, branch, overwrite_if_exists=False): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc ...
import os def execute(name, branch): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc overwrite_if_exists = False project_...
import os def execute(name, branch, overwrite_if_exists=False): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc if os.listdir...
<commit_before>import os def execute(name, branch, overwrite_if_exists=False): try: from cookiecutter.main import cookiecutter except ImportError as exc: raise ImportError( 'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n' ) from exc ...
c8a2647424a24ea97c1e5ed5a14c85f8a8eadd8b
email_tools.py
email_tools.py
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
Raise exception is EMAIL_RECIPIENT not set
Raise exception is EMAIL_RECIPIENT not set
Python
mit
achauve/pycurator
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
<commit_before>from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s....
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s.login(Settings....
<commit_before>from contextlib import contextmanager import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from settings import Settings @contextmanager def smtp_server(): s = smtplib.SMTP(Settings.SMTP_HOST, Settings.SMTP_PORT) s.starttls() s....
c4bf617dddd15e77974b000e8fa90750e1761386
siteconfig/__init__.py
siteconfig/__init__.py
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get get_bool = config.get_bool
Add get_bool to package exports
Add get_bool to package exports
Python
bsd-3-clause
mikeboers/siteconfig,mikeboers/siteconfig
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get Add get_bool to package exports
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get get_bool = config.get_bool
<commit_before>from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get <commit_msg>Add get_bool to package exports<commit_after>
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get get_bool = config.get_bool
from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get Add get_bool to package exportsfrom .configobj import Config config = Config.from_environ() # Add the data and some of the API as attribut...
<commit_before>from .configobj import Config config = Config.from_environ() # Add the data and some of the API as attributes of the top-level package. globals().update(config) get = config.get <commit_msg>Add get_bool to package exports<commit_after>from .configobj import Config config = Config.from_environ() # Add...
4c71ba23720001d06d519a7828f2866814f1c46a
tests/conftest.py
tests/conftest.py
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1.0") def functionEvent(se...
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application from UM.Signal import Signal class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1....
Make sure to set the test application instance as app for Signals
Make sure to set the test application instance as app for Signals This makes singals be properly emitted in tests
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1.0") def functionEvent(se...
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application from UM.Signal import Signal class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1....
<commit_before># Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1.0") def f...
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application from UM.Signal import Signal class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1....
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1.0") def functionEvent(se...
<commit_before># Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import pytest from UM.Application import Application class FixtureApplication(Application): def __init__(self): Application._instance = None super().__init__("test", "1.0") def f...
14917a4d503569147277bfd5fefa4b2600dfea40
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if tags_marker and tags.isdi...
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
Set xfailtags as first priority
Set xfailtags as first priority
Python
mit
dincamihai/salt-toaster,dincamihai/salt-toaster
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if tags_marker and tags.isdi...
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
<commit_before>import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if tags_marke...
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if tags_marker and tags.isdi...
<commit_before>import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if tags_marke...
eacfca844e5ab590acfcd193e2ca1fa379e10009
alg_strongly_connected_components.py
alg_strongly_connected_components.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def strongly_connected_components(): """Strongly connected components for graph. Procedure: - Call (Depth First Search) DFS on graph G to compute finish times for each vertex. - C...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def dfs(): pass def _transpose_graph(): pass def _inverse_postvisit_vertex(): pass def strongly_connected_components(): """Strongl...
Add strongly connected components's methods
Add strongly connected components's methods
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import print_function from __future__ import division def strongly_connected_components(): """Strongly connected components for graph. Procedure: - Call (Depth First Search) DFS on graph G to compute finish times for each vertex. - C...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def dfs(): pass def _transpose_graph(): pass def _inverse_postvisit_vertex(): pass def strongly_connected_components(): """Strongl...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def strongly_connected_components(): """Strongly connected components for graph. Procedure: - Call (Depth First Search) DFS on graph G to compute finish times for each ve...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def dfs(): pass def _transpose_graph(): pass def _inverse_postvisit_vertex(): pass def strongly_connected_components(): """Strongl...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def strongly_connected_components(): """Strongly connected components for graph. Procedure: - Call (Depth First Search) DFS on graph G to compute finish times for each vertex. - C...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def strongly_connected_components(): """Strongly connected components for graph. Procedure: - Call (Depth First Search) DFS on graph G to compute finish times for each ve...
150058856f10992d0f65f47d79ac14e2f52818cc
cellcounter/urls.py
cellcounter/urls.py
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
Add URL to enable user list view
Add URL to enable user list view
Python
mit
cellcounter/cellcounter,oghm2/hackdayoxford,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcountr,haematologic/cellcounter,cellcounter/cellcounter,haematologic/cellcountr,haematologic/cellcounter,haematologic/cellcounter,oghm2/hackdayoxford
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
<commit_before>from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_...
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
<commit_before>from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_...
c18bdb90e6197e298cc6bfb5f52ffbf1d48f029e
paramrunner.py
paramrunner.py
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
Change name of results array.
Change name of results array.
Python
bsd-3-clause
ihuston/pyflation,ihuston/pyflation
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
<commit_before># -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np....
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
# -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np.linspace(4.9e-8...
<commit_before># -*- coding: utf-8 -*- # paramrunner.py # Run findparams on linde model and save results import helpers import findparams import tables import numpy as np savedir = "/home/ith/results/" savefile = "linde-params.hf5" WMAP5PIVOT = np.array([5.25e-60]) lindefx = {"vars":["mass","lambda"], "values": [np....
705b93f7fd688c4889562a9950c220db23ffa98a
tomso/__init__.py
tomso/__init__.py
__version__ = "0.0.12" __all__ = [ 'adipls', 'utils', 'constants', 'gyre', 'fgong', 'mesa', 'stars' ]
__version__ = "0.0.12" __all__ = [ 'adipls', 'constants', 'fgong', 'gyre', 'mesa', 'stars', 'utils' ]
Put modules in alphabetical order
Put modules in alphabetical order
Python
mit
warrickball/tomso
__version__ = "0.0.12" __all__ = [ 'adipls', 'utils', 'constants', 'gyre', 'fgong', 'mesa', 'stars' ] Put modules in alphabetical order
__version__ = "0.0.12" __all__ = [ 'adipls', 'constants', 'fgong', 'gyre', 'mesa', 'stars', 'utils' ]
<commit_before>__version__ = "0.0.12" __all__ = [ 'adipls', 'utils', 'constants', 'gyre', 'fgong', 'mesa', 'stars' ] <commit_msg>Put modules in alphabetical order<commit_after>
__version__ = "0.0.12" __all__ = [ 'adipls', 'constants', 'fgong', 'gyre', 'mesa', 'stars', 'utils' ]
__version__ = "0.0.12" __all__ = [ 'adipls', 'utils', 'constants', 'gyre', 'fgong', 'mesa', 'stars' ] Put modules in alphabetical order__version__ = "0.0.12" __all__ = [ 'adipls', 'constants', 'fgong', 'gyre', 'mesa', 'stars', 'utils' ]
<commit_before>__version__ = "0.0.12" __all__ = [ 'adipls', 'utils', 'constants', 'gyre', 'fgong', 'mesa', 'stars' ] <commit_msg>Put modules in alphabetical order<commit_after>__version__ = "0.0.12" __all__ = [ 'adipls', 'constants', 'fgong', 'gyre', 'mesa', 'st...
594f6b189f496ec01c8c6742cde8639689dd50cc
tomso/__init__.py
tomso/__init__.py
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'io', 'mesa', 'stars' ]
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'fgong', 'mesa', 'stars' ]
Fix list of submodules so that from tomso import * works
Fix list of submodules so that from tomso import * works
Python
mit
warrickball/tomso
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'io', 'mesa', 'stars' ] Fix list of submodules so that from tomso import * works
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'fgong', 'mesa', 'stars' ]
<commit_before>__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'io', 'mesa', 'stars' ] <commit_msg>Fix list of submodules so that from tomso import * works<commit_after>
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'fgong', 'mesa', 'stars' ]
__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'io', 'mesa', 'stars' ] Fix list of submodules so that from tomso import * works__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'fgong', 'mesa', 'stars' ]
<commit_before>__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'io', 'mesa', 'stars' ] <commit_msg>Fix list of submodules so that from tomso import * works<commit_after>__version__ = "0.0.11a" __all__ = [ 'adipls', 'common', 'gyre', 'fgong', 'mesa', ...
72455eeeab41810e49a182422c41a4c6e315055e
build.py
build.py
import os.path from buildlib import * CONFIGURATION = 'Debug' project = Project(__file__, 'build') project.version = '0.1.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Release' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') pr...
import os.path from buildlib import * project = Project(__file__, 'build') project.version = '0.0.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Debug' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') project.msbuild('src/Dolstagis....
Build as 0.0.0-debug for now.
Build as 0.0.0-debug for now.
Python
mit
jammycakes/dolstagis.web,jammycakes/dolstagis.web,jammycakes/dolstagis.web
import os.path from buildlib import * CONFIGURATION = 'Debug' project = Project(__file__, 'build') project.version = '0.1.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Release' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') pr...
import os.path from buildlib import * project = Project(__file__, 'build') project.version = '0.0.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Debug' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') project.msbuild('src/Dolstagis....
<commit_before>import os.path from buildlib import * CONFIGURATION = 'Debug' project = Project(__file__, 'build') project.version = '0.1.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Release' project.start() project.clean() project.write_version('src/.version/Versi...
import os.path from buildlib import * project = Project(__file__, 'build') project.version = '0.0.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Debug' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') project.msbuild('src/Dolstagis....
import os.path from buildlib import * CONFIGURATION = 'Debug' project = Project(__file__, 'build') project.version = '0.1.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Release' project.start() project.clean() project.write_version('src/.version/VersionInfo.cs') pr...
<commit_before>import os.path from buildlib import * CONFIGURATION = 'Debug' project = Project(__file__, 'build') project.version = '0.1.0' project.versioninfo = 'alpha' project.build_number = 0 project.configuration = 'Release' project.start() project.clean() project.write_version('src/.version/Versi...
8445c6bc549285fea5313a72c0500e2240460332
avalonstar/apps/subscribers/admin.py
avalonstar/apps/subscribers/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.register(Ticket, TicketAd...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
Add created to list_display; make it editable.
Add created to list_display; make it editable.
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.register(Ticket, TicketAd...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.register(T...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['created', 'updated', 'is_active', 'is_paid'] ordering = ['-updated'] adm...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.register(Ticket, TicketAd...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Ticket class TicketAdmin(admin.ModelAdmin): list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid'] list_editable = ['is_active', 'is_paid'] ordering = ['-updated'] admin.site.register(T...
5af67c1bf24768e5d2fe573198866af7d3e766de
lms/djangoapps/heartbeat/views.py
lms/djangoapps/heartbeat/views.py
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
Put course location urls in heartbeat page, rather than lists
Put course location urls in heartbeat page, rather than lists
Python
agpl-3.0
edx-solutions/edx-platform,beni55/edx-platform,arifsetiawan/edx-platform,lduarte1991/edx-platform,dsajkl/123,J861449197/edx-platform,ampax/edx-platform-backup,motion2015/edx-platform,alexthered/kienhoc-platform,cyanna/edx-platform,ZLLab-Mooc/edx-platform,motion2015/a3,amir-qayyum-khan/edx-platform,wwj718/edx-platform,j...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
<commit_before>import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(),...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
<commit_before>import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(),...
7ba76f2f4dd861e4acd34536e3484fc8ef001b3f
IPython/nbconvert/exporters/python.py
IPython/nbconvert/exporters/python.py
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
Add the . into file_extension
Add the . into file_extension
Python
bsd-3-clause
cornhundred/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipy...
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
<commit_before>"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this softwa...
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
<commit_before>"""Python script Exporter class""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this softwa...
2e1b5f4804023cd551b1d641e4b4dc5ba693ff62
demos/simple.py
demos/simple.py
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp if __name__ == '__main__': sn = 0.2 ell = 0.670104947766 sf = 1.25415619045 model = pbm.Sinusoidal(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds...
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp def run_model(Model, sn, ell, sf, T): model = Model(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds) xmin = model.bounds[0][0] xmax = model.bounds[0][1]...
Add a harder test example.
Add a harder test example.
Python
bsd-2-clause
mwhoffman/pybo,jhartford/pybo
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp if __name__ == '__main__': sn = 0.2 ell = 0.670104947766 sf = 1.25415619045 model = pbm.Sinusoidal(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds...
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp def run_model(Model, sn, ell, sf, T): model = Model(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds) xmin = model.bounds[0][0] xmax = model.bounds[0][1]...
<commit_before>import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp if __name__ == '__main__': sn = 0.2 ell = 0.670104947766 sf = 1.25415619045 model = pbm.Sinusoidal(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(g...
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp def run_model(Model, sn, ell, sf, T): model = Model(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds) xmin = model.bounds[0][0] xmax = model.bounds[0][1]...
import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp if __name__ == '__main__': sn = 0.2 ell = 0.670104947766 sf = 1.25415619045 model = pbm.Sinusoidal(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(gp, model.bounds...
<commit_before>import numpy as np import matplotlib.pyplot as pl import pygp as pg import pybo.models as pbm import pybo.policies as pbp if __name__ == '__main__': sn = 0.2 ell = 0.670104947766 sf = 1.25415619045 model = pbm.Sinusoidal(0.2) gp = pg.BasicGP(sn, ell, sf) policy = pbp.GPUCB(g...
d008a08d0c79610eba715842c2f437bf89f8787c
puffin/gui/form.py
puffin/gui/form.py
from flask_wtf import Form from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form): start = SubmitField('Start') stop =...
from flask_wtf import Form from flask_security.core import current_user from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form)...
Allow changing domain to own
Allow changing domain to own
Python
agpl-3.0
loomchild/jenca-puffin,loomchild/puffin,puffinrocks/puffin,loomchild/puffin,puffinrocks/puffin,loomchild/puffin,loomchild/puffin,loomchild/puffin,loomchild/jenca-puffin
from flask_wtf import Form from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form): start = SubmitField('Start') stop =...
from flask_wtf import Form from flask_security.core import current_user from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form)...
<commit_before>from flask_wtf import Form from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form): start = SubmitField('Sta...
from flask_wtf import Form from flask_security.core import current_user from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form)...
from flask_wtf import Form from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form): start = SubmitField('Start') stop =...
<commit_before>from flask_wtf import Form from wtforms import StringField, IntegerField, PasswordField, SubmitField, SelectField from wtforms.validators import Required, Length, Regexp from ..core.db import db from ..core.security import User from .. import app class ApplicationForm(Form): start = SubmitField('Sta...
5944ada060154cde31c1fe04adeb1fb10a718eaf
urllibRequests.py
urllibRequests.py
import urllib.request import urllib.parse def get(urlStr,params={}): if params == {}: req = urllib.request.urlopen(urlStr) else: reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('ascii')) req = urllib.request.urlopen(reqdata) return req.read()
import urllib.request import urllib.parse def get(urlStr,params={}): reqdata = urllib.request.Request(urlStr) reqdata.add_header('User-Agent', 'VocabTool/0.2 (https://github.com/RihanWu/vocabtool)') if params != {}: reqdata.data = urllib.parse.urlencode(params).encode('ascii'...
Add User-Agent for better netiquette
Add User-Agent for better netiquette
Python
mit
RihanWu/vocabtool
import urllib.request import urllib.parse def get(urlStr,params={}): if params == {}: req = urllib.request.urlopen(urlStr) else: reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('ascii')) req = urllib.request.urlopen(reqdata) return req.read() Add User-Agent...
import urllib.request import urllib.parse def get(urlStr,params={}): reqdata = urllib.request.Request(urlStr) reqdata.add_header('User-Agent', 'VocabTool/0.2 (https://github.com/RihanWu/vocabtool)') if params != {}: reqdata.data = urllib.parse.urlencode(params).encode('ascii'...
<commit_before>import urllib.request import urllib.parse def get(urlStr,params={}): if params == {}: req = urllib.request.urlopen(urlStr) else: reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('ascii')) req = urllib.request.urlopen(reqdata) return req.read()...
import urllib.request import urllib.parse def get(urlStr,params={}): reqdata = urllib.request.Request(urlStr) reqdata.add_header('User-Agent', 'VocabTool/0.2 (https://github.com/RihanWu/vocabtool)') if params != {}: reqdata.data = urllib.parse.urlencode(params).encode('ascii'...
import urllib.request import urllib.parse def get(urlStr,params={}): if params == {}: req = urllib.request.urlopen(urlStr) else: reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('ascii')) req = urllib.request.urlopen(reqdata) return req.read() Add User-Agent...
<commit_before>import urllib.request import urllib.parse def get(urlStr,params={}): if params == {}: req = urllib.request.urlopen(urlStr) else: reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('ascii')) req = urllib.request.urlopen(reqdata) return req.read()...
c72120b4b3b7131450f1ee34c9b373f61a80c581
utils/database.py
utils/database.py
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
Fix NameError: global name 'messsage' is not defined
Fix NameError: global name 'messsage' is not defined
Python
mit
wolfy1339/Python-IRC-Bot
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
<commit_before>import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: ...
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: del self...
<commit_before>import json class Database(dict): """Holds a dict that contains all the information about the users in a channel""" def __init__(self, irc): super(Database, self).__init__(json.load(open("userdb.json"))) self.irc = irc def remove_entry(self, event, nick): try: ...
cde59e7f8f8ea74c720f107c80c933b5b9aa913e
recipy/__init__.py
recipy/__init__.py
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.2.3' # Patch built-in open function # orig_open = __builtins__['open'] # def patched_open(*args, **k...
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.3' log_init()
Remove old commented out code, and update version to 0.3
Remove old commented out code, and update version to 0.3
Python
apache-2.0
recipy/recipy,recipy/recipy
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.2.3' # Patch built-in open function # orig_open = __builtins__['open'] # def patched_open(*args, **k...
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.3' log_init()
<commit_before># These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.2.3' # Patch built-in open function # orig_open = __builtins__['open'] # def patched_...
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.3' log_init()
# These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.2.3' # Patch built-in open function # orig_open = __builtins__['open'] # def patched_open(*args, **k...
<commit_before># These lines ARE needed, as they actually set up sys.meta_path from . import PatchWarnings from . import PatchBaseScientific from . import PatchScientific from .log import * from .utils import open __version__ = '0.2.3' # Patch built-in open function # orig_open = __builtins__['open'] # def patched_...
f7dd603d4e24134affda6430736838ecaaab9938
jungle/cli.py
jungle/cli.py
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
Fix unintended ImportError for wrong subcommnad
Fix unintended ImportError for wrong subcommnad
Python
mit
achiku/jungle
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
<commit_before># -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """g...
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
# -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """get command""" ...
<commit_before># -*- coding: utf-8 -*- import click from . import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb', 'emr', 'asg'] def get_command(self, ctx, name): """g...
d0211871e11d2a2ce9f9a961750aa12a28658c62
vroom/graphics.py
vroom/graphics.py
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
Change car color depending on acceleration rate
Change car color depending on acceleration rate
Python
mit
thibault/vroom
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
<commit_before>import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): ...
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): object_...
<commit_before>import pygame class Graphic: car_color = (255, 50, 50) car_width = 3 road_color = (255, 255, 255) road_width = 6 draw_methods = { 'Car': 'draw_car', 'Road': 'draw_road', } def __init__(self, surface): self.surface = surface def draw(self, obj): ...
bddf5358b92d58549496de41ffeea724aeb2feb7
openmm/run_test.py
openmm/run_test.py
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.1.1', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == 'c1a64aa...
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.2', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == '07c1b86c9...
Update test for 7.2 beta build
[openmm] Update test for 7.2 beta build
Python
mit
peastman/conda-recipes,omnia-md/conda-recipes,peastman/conda-recipes,omnia-md/conda-recipes,omnia-md/conda-recipes,peastman/conda-recipes
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.1.1', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == 'c1a64aa...
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.2', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == '07c1b86c9...
<commit_before>#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.1.1', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revis...
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.2', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == '07c1b86c9...
#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.1.1', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revision == 'c1a64aa...
<commit_before>#!/usr/bin/env python from simtk import openmm # Check major version number # If Z=0 for version X.Y.Z, out put is "X.Y" assert openmm.Platform.getOpenMMVersion() == '7.1.1', "openmm.Platform.getOpenMMVersion() = %s" % openmm.Platform.getOpenMMVersion() # Check git hash assert openmm.version.git_revis...
9c184878af2e7dd45bc7ff653979d008a77b0e30
SimPEG/regularization/__init__.py
SimPEG/regularization/__init__.py
from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ( PGIsmallness, PGI, PGIwithNonline...
from ..utils.code_utils import deprecate_class from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ...
Move deprecate reg classed to init
Move deprecate reg classed to init
Python
mit
simpeg/simpeg
from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ( PGIsmallness, PGI, PGIwithNonline...
from ..utils.code_utils import deprecate_class from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ...
<commit_before>from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ( PGIsmallness, PGI, ...
from ..utils.code_utils import deprecate_class from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ...
from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ( PGIsmallness, PGI, PGIwithNonline...
<commit_before>from .base import ( BaseRegularization, LeastSquaresRegularization, BaseSimilarityMeasure, Small, SmoothDeriv, SmoothDeriv2, ) from .regularization_mesh import RegularizationMesh from .sparse import SparseSmall, SparseDeriv, Sparse from .pgi import ( PGIsmallness, PGI, ...
f9b6dbc958251050c6170587d5a205350252329c
samples/ucrmain.py
samples/ucrmain.py
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): blaze.Array(np.loadtx...
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr import numpy as np # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): bl...
Fix missing numpy import in ucr test
Fix missing numpy import in ucr test
Python
bsd-2-clause
seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): blaze.Array(np.loadtx...
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr import numpy as np # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): bl...
<commit_before>""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): blaze....
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr import numpy as np # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): bl...
""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): blaze.Array(np.loadtx...
<commit_before>""" Script for performing queries on large time series by using UCR ED and DTW algs. """ from time import time import blaze from blaze.ts.ucr_dtw import ucr # Convert txt file into Blaze native format def convert(filetxt, storage): import os.path if not os.path.exists(storage): blaze....
29d24fb5e484e552b12778268d249b62390408be
webserver/urls.py
webserver/urls.py
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
Fix that makes the media uploads work correctly.
Fix that makes the media uploads work correctly.
Python
bsd-3-clause
siggame/webserver,siggame/webserver,siggame/webserver
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
<commit_before>from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), ...
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), url(r'^', inc...
<commit_before>from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Webserver urls url(r'^', include('webserver.home.urls')), url(r'^', include('webserver.profiles.urls')), ...
d00aea75e0f4e6ba74a2ccf57d02a0ef912d17ac
db/TableConfig.py
db/TableConfig.py
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
Update DB to v4.2 on note pdf support
Update DB to v4.2 on note pdf support
Python
mit
eddiedb6/ej,eddiedb6/ej,eddiedb6/ej
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
<commit_before>{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name":...
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name": "'version'", "...
<commit_before>{ PDBConst.Name: "config", PDBConst.Columns: [ { PDBConst.Name: "Name", PDBConst.Attributes: ["varchar(128)", "not null", "primary key"] }, { PDBConst.Name: "Value", PDBConst.Attributes: ["varchar(128)"] }], PDBConst.Initials: [ {"Name":...
bce79a9156f93fd3c9356579bcb9309a66f2bdf2
pushbullet/filetype.py
pushbullet/filetype.py
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return file_type.decode('utf-8') def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] try: import magic except ImportError: import mimetypes get_file_type = _guess_file...
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return maybe_decode(file_type) def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] # return str on python3. Don't want to unconditionally # decode because that results in unicode...
Return str rather than bytes for the description strings on python3.
Return str rather than bytes for the description strings on python3.
Python
mit
randomchars/pushbullet.py,kovacsbalu/pushbullet.py,Saturn/pushbullet.py
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return file_type.decode('utf-8') def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] try: import magic except ImportError: import mimetypes get_file_type = _guess_file...
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return maybe_decode(file_type) def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] # return str on python3. Don't want to unconditionally # decode because that results in unicode...
<commit_before>def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return file_type.decode('utf-8') def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] try: import magic except ImportError: import mimetypes get_file_typ...
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return maybe_decode(file_type) def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] # return str on python3. Don't want to unconditionally # decode because that results in unicode...
def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return file_type.decode('utf-8') def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] try: import magic except ImportError: import mimetypes get_file_type = _guess_file...
<commit_before>def _magic_get_file_type(f, _): file_type = magic.from_buffer(f.read(1024), mime=True) f.seek(0) return file_type.decode('utf-8') def _guess_file_type(_, filename): return mimetypes.guess_type(filename)[0] try: import magic except ImportError: import mimetypes get_file_typ...
2a57e5c17115e9c89936e6667985af1a47bf3247
raiden/utils/typing.py
raiden/utils/typing.py
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
Fix an oversight in new type definitions
Fix an oversight in new type definitions
Python
mit
hackaugusto/raiden,hackaugusto/raiden
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
<commit_before># -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewTyp...
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
# -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewType('BlockNumber'...
<commit_before># -*- coding: utf-8 -*- from typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import from typing import NewType T_Address = bytes Address = NewType('Address', bytes) T_BlockExpiration = int BlockExpiration = NewType('BlockExpiration', int) T_BlockNumber = int BlockNumber = NewTyp...
525a9fcb14a1f91aa94508ca6dcc362d430d2969
__openerp__.py
__openerp__.py
{ 'name': "Project Logical Framework", 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/create_project.xml', ], }
{ 'name': "Project Logical Framework", 'author' : 'Stéphane Codazzi @ TeMPO-consulting', 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/creat...
Add o2m between project and logical frameworks lines
Add o2m between project and logical frameworks lines
Python
mit
stephane-/project_logical_framework
{ 'name': "Project Logical Framework", 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/create_project.xml', ], } Add o2m between project and ...
{ 'name': "Project Logical Framework", 'author' : 'Stéphane Codazzi @ TeMPO-consulting', 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/creat...
<commit_before>{ 'name': "Project Logical Framework", 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/create_project.xml', ], } <commit_msg>A...
{ 'name': "Project Logical Framework", 'author' : 'Stéphane Codazzi @ TeMPO-consulting', 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/creat...
{ 'name': "Project Logical Framework", 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/create_project.xml', ], } Add o2m between project and ...
<commit_before>{ 'name': "Project Logical Framework", 'category': 'Project', 'sequence': 1, 'description': """ Project Logical Framework ========================= """, 'version': '0.3', 'depends': ['project'], 'data': [ 'static/src/xml/create_project.xml', ], } <commit_msg>A...
fc203d643aa9a69c835aebee0de9b17851ef7a58
compose/cli/docker_client.py
compose/cli/docker_client.py
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
Allow API version specification via env var
Allow API version specification via env var Hard-coding the API version to '1.18' with the docker-py constructor will cause the docker-py logic at https://github.com/docker/docker-py/blob/master/docker/client.py#L143-L146 to always fail, which will cause authentication issues if you're using a remote daemon using API ...
Python
apache-2.0
jeanpralo/compose,shubheksha/docker.github.io,saada/compose,talolard/compose,joaofnfernandes/docker.github.io,ionrock/compose,iamluc/compose,goloveychuk/compose,vdemeester/compose,menglingwei/denverdino.github.io,qzio/compose,d2bit/compose,docker/docker.github.io,GM-Alex/compose,bdwill/docker.github.io,anweiss/docker.g...
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
<commit_before>from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if c...
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if cert_path == '':...
<commit_before>from docker import Client from docker import tls import ssl import os def docker_client(): """ Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ cert_path = os.environ.get('DOCKER_CERT_PATH', '') if c...
21dabaa963815f5dc99f19a7e3f792b0515c9089
Mockbox.py
Mockbox.py
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
Fix logging so it doesn't erase the file
Fix logging so it doesn't erase the file
Python
mit
jkingsman/Mockbox,jkingsman/Mockbox,jkingsman/Mockbox
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
<commit_before>from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") a...
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") args = parser.pa...
<commit_before>from threading import Thread from Queue import Queue from twisted.python import log import time import Mailbox, Web import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("--verbose", "-v", help="output logs to std out, not the file", action="store_true") a...
7343cf6fe3b9dde76a629fd0c607d7ce0b632a64
coupons/settings.py
coupons/settings.py
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPNS_CODE_LENGTH', 15) CODE_CHARS = getatt...
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPONS_CODE_LENGTH', 15) CODE_CHARS = getat...
Correct typo in setting names
Correct typo in setting names
Python
bsd-3-clause
rsalmaso/django-fluo-coupons,rsalmaso/django-fluo-coupons
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPNS_CODE_LENGTH', 15) CODE_CHARS = getatt...
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPONS_CODE_LENGTH', 15) CODE_CHARS = getat...
<commit_before>import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPNS_CODE_LENGTH', 15) CODE...
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPONS_CODE_LENGTH', 15) CODE_CHARS = getat...
import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPNS_CODE_LENGTH', 15) CODE_CHARS = getatt...
<commit_before>import string from django.conf import settings COUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', ( ('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency'), )) CODE_LENGTH = getattr(settings, 'COUPNS_CODE_LENGTH', 15) CODE...
093702a38645853d560606446da0b078ba12d14e
eventkit_cloud/auth/admin.py
eventkit_cloud/auth/admin.py
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
Add OAuth class information to the UserAdmin page.
Add OAuth class information to the UserAdmin page.
Python
bsd-3-clause
terranodo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud,venicegeo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
<commit_before> import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = loggi...
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = logging.getLogger(__...
<commit_before> import logging from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from eventkit_cloud.auth.models import OAuth from eventkit_cloud.jobs.models import UserLicense logger = loggi...
bf4b22ef25d158ddeb1a98432d29451e10a912e6
quick_orm/examples/hello_world.py
quick_orm/examples/hello_world.py
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') db.create_tables() user = User(name = 'Hello World') ...
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') # database urls: http://docs.sqlalchemy.org/en/latest/core/engines.html#da...
Add a link for database urls
Add a link for database urls
Python
bsd-3-clause
tek/sqlpharmacy,tylerlong/quick_orm
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') db.create_tables() user = User(name = 'Hello World') ...
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') # database urls: http://docs.sqlalchemy.org/en/latest/core/engines.html#da...
<commit_before>from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') db.create_tables() user = User(name = 'Hell...
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') # database urls: http://docs.sqlalchemy.org/en/latest/core/engines.html#da...
from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') db.create_tables() user = User(name = 'Hello World') ...
<commit_before>from quick_orm.core import Database from sqlalchemy import Column, String __metaclass__ = Database.DefaultMeta class User: name = Column(String(30)) Database.register() if __name__ == '__main__': db = Database('sqlite://') db.create_tables() user = User(name = 'Hell...
c55a2b152cd2b6603ef358e0f764eeb0308ff332
Orange/__init__.py
Orange/__init__.py
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
Remove imports in Orange, except data
Remove imports in Orange, except data
Python
bsd-2-clause
marinkaz/orange3,kwikadi/orange3,qusp/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,qusp/orange3,qPCR4vir/orange3,cheral/orange3,qusp/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,ch...
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
<commit_before>from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revisio...
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revision__ = "unknown"...
<commit_before>from __future__ import absolute_import from importlib import import_module try: from .import version # Always use short_version here (see PEP 386) __version__ = version.short_version __git_revision__ = version.git_revision except ImportError: __version__ = "unknown" __git_revisio...
1bd90d597b23f49bce3ca3402256c9bb1ad22647
accounts/management/commands/request_common_profile_update.py
accounts/management/commands/request_common_profile_update.py
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify users to update." def handle(self, *args, **option...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify use...
Handle missing and invalid email addresses.
Handle missing and invalid email addresses.
Python
agpl-3.0
osamak/student-portal,osamak/student-portal,enjaz/enjaz,osamak/student-portal,osamak/student-portal,enjaz/enjaz,enjaz/enjaz,enjaz/enjaz,enjaz/enjaz,osamak/student-portal
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify users to update." def handle(self, *args, **option...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify use...
<commit_before>from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify users to update." def handle(self, ...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify use...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify users to update." def handle(self, *args, **option...
<commit_before>from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand from django.core.urlresolvers import reverse from post_office import mail class Command(BaseCommand): help = "Notify users to update." def handle(self, ...
c2973d4f2ae7da0f75f573cebd8eb1780d5b33e1
account_withholding_automatic/models/account_payment_group.py
account_withholding_automatic/models/account_payment_group.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
FIX withholdings computation when payment come from invoices
FIX withholdings computation when payment come from invoices
Python
agpl-3.0
ingadhoc/account-payment
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fi...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class Ac...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fi...
987d943a076b591309c06f67834dcb0012dd8491
audio_train.py
audio_train.py
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
Fix OOM by reducing batch
Fix OOM by reducing batch
Python
apache-2.0
israelg99/eva
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
<commit_before>#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data...
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data RATE, DATA = s...
<commit_before>#%% Setup. import numpy as np import scipy.io.wavfile from keras.utils.visualize_util import plot from keras.callbacks import TensorBoard, ModelCheckpoint from keras.utils import np_utils from eva.models.wavenet import Wavenet, compute_receptive_field from eva.util.mutil import sparse_labels #%% Data...
fdfe3c77e7b147f813b4cbb13b211f6ed8ff9057
sublime_plugin_tests/launchers/init.py
sublime_plugin_tests/launchers/init.py
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
Increase the timeout to an absurd value
Increase the timeout to an absurd value
Python
unlicense
twolfson/sublime-plugin-tests,twolfson/sublime-plugin-tests
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
<commit_before># Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { ...
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
# Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { '__dir__...
<commit_before># Load in core dependencies import code import os import sublime # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) def run(): # On every run, re-import the test class # TODO: Determine if this is necessary filepath = __dir__ + '/plugin_runner.py' plugin_dict = { ...
ffa6417b30517569cadff00aec839d968f3c91d7
bisnode/constants.py
bisnode/constants.py
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (BELOW_AVERAGE, "below average"), (BAD, "ba...
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' NEW = 'AN' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (NEW, "new"), (BELOW_AVERAGE, "b...
Add a new rating code
Add a new rating code
Python
mit
FundedByMe/django-bisnode
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (BELOW_AVERAGE, "below average"), (BAD, "ba...
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' NEW = 'AN' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (NEW, "new"), (BELOW_AVERAGE, "b...
<commit_before>COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (BELOW_AVERAGE, "below average")...
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' NEW = 'AN' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (NEW, "new"), (BELOW_AVERAGE, "b...
COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (BELOW_AVERAGE, "below average"), (BAD, "ba...
<commit_before>COMPANY_STANDARD_REPORT = "NRGCompanyReportStandard" COMPANY_RATING_REPORT = "NRGCompanyReportRating" HIGH = 'AAA' GOOD = 'AA' WORTHY = 'A' BELOW_AVERAGE = 'B' BAD = 'C' MISSING = '-' RATING_CHOICES = ( (HIGH, "high"), (GOOD, "good"), (WORTHY, "worthy"), (BELOW_AVERAGE, "below average")...
73b1273de8f8e17adf51893bdbd24d2067866297
bootstrap/helpers.py
bootstrap/helpers.py
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.orga.models import OrgaFlag from byceps.services.user.models.user import User from byceps.services.user import service as user_service ...
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.user.models.user import User from byceps.services.user import service as user_service from .util import add_to_database # -----------...
Remove bootstrap helper to promote a user to organizer as there is a service function (and a script calling it) for that
Remove bootstrap helper to promote a user to organizer as there is a service function (and a script calling it) for that
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.orga.models import OrgaFlag from byceps.services.user.models.user import User from byceps.services.user import service as user_service ...
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.user.models.user import User from byceps.services.user import service as user_service from .util import add_to_database # -----------...
<commit_before># -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.orga.models import OrgaFlag from byceps.services.user.models.user import User from byceps.services.user import service as...
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.user.models.user import User from byceps.services.user import service as user_service from .util import add_to_database # -----------...
# -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.orga.models import OrgaFlag from byceps.services.user.models.user import User from byceps.services.user import service as user_service ...
<commit_before># -*- coding: utf-8 -*- """ bootstrap.helpers ~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.orga.models import OrgaFlag from byceps.services.user.models.user import User from byceps.services.user import service as...
a1e56d65807228b952036fc182071aab5e6ff25f
tests/cli/test_pixel.py
tests/cli/test_pixel.py
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
Add test for all plot types
Add test for all plot types
Python
mit
valpasq/yatsm,c11/yatsm,ceholden/yatsm,ceholden/yatsm,c11/yatsm,valpasq/yatsm
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
<commit_before>""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DI...
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')...
<commit_before>""" Test ``yatsm line`` """ import os from click.testing import CliRunner import matplotlib as mpl import pytest from yatsm.cli.main import cli mpl_skip = pytest.mark.skipif( mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ, reason='Requires either matplotlib "agg" backend or that DI...
1441a4e96ee610cbb6c87a9e04491102a29c0032
importlib_metadata/tests/test_main.py
importlib_metadata/tests/test_main.py
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.for_module(importlib_metadata) assert isinstance(dist.version, str) ...
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.from_module(importlib_metadata) assert isinstance(dist.version, str)...
Fix test failures after method renames
Fix test failures after method renames
Python
apache-2.0
python/importlib_metadata
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.for_module(importlib_metadata) assert isinstance(dist.version, str) ...
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.from_module(importlib_metadata) assert isinstance(dist.version, str)...
<commit_before>import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.for_module(importlib_metadata) assert isinstance(dist...
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.from_module(importlib_metadata) assert isinstance(dist.version, str)...
import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.for_module(importlib_metadata) assert isinstance(dist.version, str) ...
<commit_before>import unittest import re import importlib import importlib_metadata class BasicTests(unittest.TestCase): version_pattern = r'\d+\.\d+(\.\d)?' def test_retrieves_version_of_self(self): dist = importlib_metadata.Distribution.for_module(importlib_metadata) assert isinstance(dist...
4107fe1240598f64335bf3203c717f4ef00f9e0f
settings/travis.py
settings/travis.py
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'ENGINE': 'django.db.backends.sqlite3', #'NAME': 'atlas_test', #'USER': 'postgres', 'PASSWORD': '', 'HO...
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.contrib.gis.db.backends.postgis', # 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'atlas_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST...
Switch to postgis for Travis
Switch to postgis for Travis At least until I have time to figure out the spatialite automatic build.
Python
mit
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'ENGINE': 'django.db.backends.sqlite3', #'NAME': 'atlas_test', #'USER': 'postgres', 'PASSWORD': '', 'HO...
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.contrib.gis.db.backends.postgis', # 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'atlas_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST...
<commit_before>from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'ENGINE': 'django.db.backends.sqlite3', #'NAME': 'atlas_test', #'USER': 'postgres', 'PASSWORD': ...
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.contrib.gis.db.backends.postgis', # 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'atlas_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST...
from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'ENGINE': 'django.db.backends.sqlite3', #'NAME': 'atlas_test', #'USER': 'postgres', 'PASSWORD': '', 'HO...
<commit_before>from defaults import * DATABASES = { 'default': { #'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'ENGINE': 'django.db.backends.sqlite3', #'NAME': 'atlas_test', #'USER': 'postgres', 'PASSWORD': ...
e0fa24595a60dd3c2ab5d1b64a76bae9ce3c05a8
testproject/testapp/tests/test_root.py
testproject/testapp/tests/test_root.py
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
Add test for non existent url pattern
Add test for non existent url pattern
Python
mit
akalipetis/djoser,sunscrapers/djoser,akalipetis/djoser,sunscrapers/djoser,sunscrapers/djoser
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
<commit_before>from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_g...
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_get_should_retur...
<commit_before>from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views class RootViewTest(restframework.APIViewTestCase, assertions.StatusCodeAssertionsMixin): view_class = djoser.views.RootView def test_g...
8f24d774227dca13500c0db0c10771d6b4ee7141
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: ...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def check_domain(self, domain, csv_writer): if domain.secure_submissions: for app in do...
Add audio/video support and bail on findings
Add audio/video support and bail on findings
Python
bsd-3-clause
qedsoftware/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttar...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: ...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def check_domain(self, domain, csv_writer): if domain.secure_submissions: for app in do...
<commit_before>from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfil...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def check_domain(self, domain, csv_writer): if domain.secure_submissions: for app in do...
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: ...
<commit_before>from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfil...
194a84b4559449f0b0e3e9cc9e7026392822c0af
questions/urls.py
questions/urls.py
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
Change to questions template location.
Change to questions template location.
Python
bsd-3-clause
mfitzp/smrtr,mfitzp/smrtr
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
<commit_before>from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'que...
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'queryset': Module....
<commit_before>from django.conf.urls.defaults import * from spenglr.education.models import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^m/(?P<object_id>\d+)$', 'django.views.generic.list_detail.object_detail', { 'que...
b9389a54183e37d8b0d17f74c4655dfb51bf2053
neo/test/rawiotest/test_openephysbinaryrawio.py
neo/test/rawiotest/test_openephysbinaryrawio.py
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
Add new OE test folder
Add new OE test folder
Python
bsd-3-clause
NeuralEnsemble/python-neo,INM-6/python-neo,JuliaSprenger/python-neo,apdavison/python-neo
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
<commit_before>import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ...
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ] entit...
<commit_before>import unittest from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase): rawioclass = OpenEphysBinaryRawIO entities_to_download = [ 'openephysbinary' ...
9f8db061956fc73a197d9c5eb1b045a6e0655dc0
fc2json.py
fc2json.py
#!/usr/bin/env python import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().splitlines()] js = open(subject + ".json", 'w') for line in fc: data["cards"][line[0]] = line[1] js.write(json.dum...
#!/usr/bin/env python ''' File: fc2json.py Author: Kristoffer Dalby Description: Tiny script for converting flashcard format to json. ''' import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().spli...
Use a real JS construct, WTF knows why this works in chromium.
Use a real JS construct, WTF knows why this works in chromium.
Python
mit
kradalby/flashcards,kradalby/flashcards
#!/usr/bin/env python import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().splitlines()] js = open(subject + ".json", 'w') for line in fc: data["cards"][line[0]] = line[1] js.write(json.dum...
#!/usr/bin/env python ''' File: fc2json.py Author: Kristoffer Dalby Description: Tiny script for converting flashcard format to json. ''' import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().spli...
<commit_before>#!/usr/bin/env python import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().splitlines()] js = open(subject + ".json", 'w') for line in fc: data["cards"][line[0]] = line[1] js...
#!/usr/bin/env python ''' File: fc2json.py Author: Kristoffer Dalby Description: Tiny script for converting flashcard format to json. ''' import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().spli...
#!/usr/bin/env python import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().splitlines()] js = open(subject + ".json", 'w') for line in fc: data["cards"][line[0]] = line[1] js.write(json.dum...
<commit_before>#!/usr/bin/env python import sys, json file = sys.argv[1] subject = file.split('.')[0] data = { "subject": subject, "cards": {} } fc = [line.split(':') for line in open(file, 'r').read().splitlines()] js = open(subject + ".json", 'w') for line in fc: data["cards"][line[0]] = line[1] js...
9d78b571fcd0575e02d4849a0938a51f15e07961
multi_schema/management/__init__.py
multi_schema/management/__init__.py
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
Create the correct references to other tables in all schemata.
Create the correct references to other tables in all schemata.
Python
bsd-3-clause
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
<commit_before>from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if...
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if m._is_schema_a...
<commit_before>from django.db import models, connection from django.core.management.color import no_style from multi_schema.models import Schema def post_syncdb_duplicator(sender, **kwargs): # See if any of the newly created models are schema-aware schema_aware_models = [m for m in kwargs['created_models'] if...
533194b5b8e044bca2aaeccff4d550731922b3b8
genome_designer/conf/demo_settings.py
genome_designer/conf/demo_settings.py
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
Add login and logout to allowed views in DEMO_MODE.
Add login and logout to allowed views in DEMO_MODE.
Python
mit
woodymit/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,woodymit/millstone,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone_accidental_source
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
<commit_before>""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_l...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
<commit_before>""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_l...
6282aa2617bcc9bb8f293ea620eff23d2009334b
example/test.py
example/test.py
import rust_ext import numpy as np a = np.array([1.0, 2.0]) rust_ext.mult(3, a) print(a)
#!/usr/bin/env python import rust_ext import numpy as np x = np.array([1.0, 2.0]) y = np.array([2.0, 3.0]) result = rust_ext.axpy(3, x, y) print(result)
Use axpy on sample Python script
Use axpy on sample Python script
Python
bsd-2-clause
termoshtt/rust-numpy,termoshtt/rust-numpy
import rust_ext import numpy as np a = np.array([1.0, 2.0]) rust_ext.mult(3, a) print(a) Use axpy on sample Python script
#!/usr/bin/env python import rust_ext import numpy as np x = np.array([1.0, 2.0]) y = np.array([2.0, 3.0]) result = rust_ext.axpy(3, x, y) print(result)
<commit_before> import rust_ext import numpy as np a = np.array([1.0, 2.0]) rust_ext.mult(3, a) print(a) <commit_msg>Use axpy on sample Python script<commit_after>
#!/usr/bin/env python import rust_ext import numpy as np x = np.array([1.0, 2.0]) y = np.array([2.0, 3.0]) result = rust_ext.axpy(3, x, y) print(result)
import rust_ext import numpy as np a = np.array([1.0, 2.0]) rust_ext.mult(3, a) print(a) Use axpy on sample Python script#!/usr/bin/env python import rust_ext import numpy as np x = np.array([1.0, 2.0]) y = np.array([2.0, 3.0]) result = rust_ext.axpy(3, x, y) print(result)
<commit_before> import rust_ext import numpy as np a = np.array([1.0, 2.0]) rust_ext.mult(3, a) print(a) <commit_msg>Use axpy on sample Python script<commit_after>#!/usr/bin/env python import rust_ext import numpy as np x = np.array([1.0, 2.0]) y = np.array([2.0, 3.0]) result = rust_ext.axpy(3, x, y) print(result)
f894aff53577fb459bfac1802f3880133e4143cf
build/build.py
build/build.py
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class Make: def doBuild(self, dir): os.system("cd %s; make" % dir) class MakeInstall: def doInstall(self, dir, root): os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root)) def __init__(self,...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class ManualConfigure: def doBuild(self, dir): os.system("cd %s; ./configure %s" % (dir, self.extraflags)) def __init__(self, extraflags=""): self.extraflags = extraflags class Configure: def doBu...
Add classes to run ./configure
Add classes to run ./configure
Python
apache-2.0
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class Make: def doBuild(self, dir): os.system("cd %s; make" % dir) class MakeInstall: def doInstall(self, dir, root): os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root)) def __init__(self,...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class ManualConfigure: def doBuild(self, dir): os.system("cd %s; ./configure %s" % (dir, self.extraflags)) def __init__(self, extraflags=""): self.extraflags = extraflags class Configure: def doBu...
<commit_before># # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class Make: def doBuild(self, dir): os.system("cd %s; make" % dir) class MakeInstall: def doInstall(self, dir, root): os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root)) def...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class ManualConfigure: def doBuild(self, dir): os.system("cd %s; ./configure %s" % (dir, self.extraflags)) def __init__(self, extraflags=""): self.extraflags = extraflags class Configure: def doBu...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class Make: def doBuild(self, dir): os.system("cd %s; make" % dir) class MakeInstall: def doInstall(self, dir, root): os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root)) def __init__(self,...
<commit_before># # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import os import shutil import util class Make: def doBuild(self, dir): os.system("cd %s; make" % dir) class MakeInstall: def doInstall(self, dir, root): os.system("cd %s; make %s=%s install" % (dir, self.rootVar, root)) def...
cf3596ee93eabf425c7d42c15fc07b11f7741158
humblemedia/causes/models.py
humblemedia/causes/models.py
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') target = models.PositiveIntegerField(null=True, blank=True) url = models.URLField(null=True, blank=True) ...
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') organization = models.ForeignKey('organizations.Organization', related_name='causes', null=True, blank=True) ...
Add organization to cause model
Add organization to cause model
Python
mit
vladimiroff/humble-media,vladimiroff/humble-media
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') target = models.PositiveIntegerField(null=True, blank=True) url = models.URLField(null=True, blank=True) ...
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') organization = models.ForeignKey('organizations.Organization', related_name='causes', null=True, blank=True) ...
<commit_before>from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') target = models.PositiveIntegerField(null=True, blank=True) url = models.URLField(null=Tru...
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') organization = models.ForeignKey('organizations.Organization', related_name='causes', null=True, blank=True) ...
from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') target = models.PositiveIntegerField(null=True, blank=True) url = models.URLField(null=True, blank=True) ...
<commit_before>from django.db import models class Cause(models.Model): title = models.CharField(max_length=64) description = models.TextField() creator = models.ForeignKey('auth.User', related_name='causes') target = models.PositiveIntegerField(null=True, blank=True) url = models.URLField(null=Tru...